company logo midterm presentation hash function using md5 algorithm students: eyal mendel &...

17
Company LOGO Midterm Presentation Hash Function using MD5 algorithm Students: Eyal Mendel & Aleks Dyskin Instructor: Evgeny Fiksman High Speed Digital Systems Laboratory

Post on 20-Dec-2015

232 views

Category:

Documents


0 download

TRANSCRIPT

Company

LOGO

Midterm Presentation

Hash Function using MD5 algorithm

Students:Eyal Mendel & Aleks DyskinInstructor:Evgeny Fiksman High Speed Digital Systems Laboratory

Content

1. MD5 algorithm description.1. MD5 algorithm description.

2. System block diagram. 2. System block diagram.

3. Project progress.3. Project progress.

4. Schedule.4. Schedule.

MD5 description

The MD5 (Message Digest 5)algorithm is intended for digital signature applications, where a large file must be "compressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem .

The MD5 algorithm takes as input a message of arbitrary length and producesas output a 128-bit signature of the input.

The algorithm consists of 5 steps, that are performed to compute the messagedigest of the message/ file.

The MD5 (Message Digest 5)algorithm is intended for digital signature applications, where a large file must be "compressed" in a secure manner before being encrypted with a private (secret) key under a public-key cryptosystem .

The MD5 algorithm takes as input a message of arbitrary length and producesas output a 128-bit signature of the input.

The algorithm consists of 5 steps, that are performed to compute the messagedigest of the message/ file.

Brief introduction Brief introduction

Algorithm Steps

MD5 steps.MD5 steps.

Step 1: Append Padding Bits. Step 1: Append Padding Bits.

Step 2: Append Length. Step 2: Append Length.

Step 3: Initialize MD buffer. Step 3: Initialize MD buffer.

Step 4: Process Message in 16-Word Blocks . Step 4: Process Message in 16-Word Blocks .

Step 5: Output . Step 5: Output .

Steps: Description

The message is "padded" so that its length (in bits) is congruent to 448, modulo 512.

The message is "padded" so that its length (in bits) is congruent to 448, modulo 512.

Step 1: Append Padding Bits.Step 1: Append Padding Bits.

message

1 0 0 0 0

padding

congurent to 448 bits

Steps: Description

A 64-bit representation of b (the length of the message before the padding bits were added) is appended to the result of the previous

step.

A 64-bit representation of b (the length of the message before the padding bits were added) is appended to the result of the previous

step.

Step 2: Append Length.Step 2: Append Length.

1 0 0 0 0

congurent to 512 bits

lenght padding

Steps: Description

A four-word buffer (A,B,C,D) is used to compute the message digest. Here each of A, B, C, D is a 32-bit register. These registers are initialized to the following values in hexadecimal, low-order bytes first):

A four-word buffer (A,B,C,D) is used to compute the message digest. Here each of A, B, C, D is a 32-bit register. These registers are initialized to the following values in hexadecimal, low-order bytes first):

Step 3: Initialize MD buffer.Step 3: Initialize MD buffer.

word A: 01 23 45 67 word B: 89 ab cd ef word C: fe dc ba 98word D: 76 54 32 10

Steps: Description

We first define four auxiliary functions that each take as input three 32-bit words and produce as output one 32-bit word:

We first define four auxiliary functions that each take as input three 32-bit words and produce as output one 32-bit word:

Step 4: Process Message in 16-Word Blocks .Step 4: Process Message in 16-Word Blocks .

_

_

_

( , , )

( , , )

( , , )

( , , ) ( )

F x y z xy x y

G x y z xz y z

H x y z x y z

I x y z y x z

Steps: Description

This step also uses a 64-element table T[1 ... 64] constructed fromthe sine function. Let T[i] denote the i-th element of the table, which isequal to the integer part of where i is in radians.The elements of the table are given in the MD5 code.

This step also uses a 64-element table T[1 ... 64] constructed fromthe sine function. Let T[i] denote the i-th element of the table, which isequal to the integer part of where i is in radians.The elements of the table are given in the MD5 code.

Step 4: Process Message in 16-Word Blocks. (continued)Step 4: Process Message in 16-Word Blocks. (continued)

322 × | sin(i) |

Steps: Description

Step 4: Process Message in 16-Word Blocks. (continued)Step 4: Process Message in 16-Word Blocks. (continued)

SETi(a, b, c, d, k, s, Ti): {a=b + ((a + Function(b,c,d) + X[k] + T[i]) << s)}

When the Function is one of the functions that were defined previously, and a,b,c,d are one of the A,B,C,D buffers.

Each of the rounds of the process (i=1,2,3,4) has its SETi function.

Steps: Description

The message digest produced as output is A, B, C, D. That is, we begin with the low-order byte of A, and end with the high-order byte of D.

The message digest produced as output is A, B, C, D. That is, we begin with the low-order byte of A, and end with the high-order byte of D.

Step 5: Output.Step 5: Output.

System Block Diagram

The user interface is MS HyperTerminal. Communicating via COM1 serial port.

TEXT

JTAG programming cable

RS232 serial communication

MD5 is running on FPGA as a software and getting as an input via the UART RS232.

Incoming string

Outgoing signature

System Arch. Block Diagram

CPU BRAMUART

Serial Com.

Desktop PC comm.

BUS

ASC module(future)

Software codeis here

Timing

String\function Init append finish Total

‘a’ 2.1 6.68 91.14 99.92

‘Aleks’ 2.1 8.58 89.62 100.3‘message digest’ 2.1 13.1 86.2 101.4All16-byte strings 2.1 8.77 73.24 84.11

All the times are in microseconds.

Project Progress

Till now:

• Studying EDK

• MD5 code research

• MD5 software implementation

• User interface using HyperTerminal

Schedule

Final

Performanceevaluation

Midterm presentation

Getting startedwith ASC.

Modifying the MD5code to ASC env.

Net list synth.

Debugging

At the End

Thank you for your time.