Subject | Computer and Network Security |
---|---|

NU Year | Set: 5.(b) Marks: 4+3 Year: 2017 |

MD5 Algorithm

• Step 1 – append padded bits: – The message
is padded so that its length is congruent to 448, modulo 512.

• Means extended to just 64 bits shy
of being of 512 bits long. – A single “1” bit is appended to the message, and
then “0” bits are appended so that the length in bits equals 448 modu

Step 2 – append length: – A 64 bit
representation of b is appended to the result of the previous step. – The
resulting message has a length that is an exact multiple of 512 bits.

Step 3 – Initialize MD Buffer • 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.

Step 3 cont. • These registers are
initialized to the following values in hexadecimal: word A: 01 23 45 67 word B:
89 ab cd ef word C: fe dc ba 98 word D: 76 54 32 10

Step 4 – Process message in 16-word
blocks. – Four auxiliary functions that take as input three 32-bit words and
produce as output one 32-bit word. F(X,Y,Z) = XY v not(X) Z G(X,Y,Z) = XZ v Y
not(Z) H(X,Y,Z) = X xor Y xor Z I(X,Y,Z) = Y xor (X v not(Z))

Step 4 – Process message in 16-word
blocks cont. – if the bits of X, Y, and Z are independent and unbiased, the
each bit of F(X,Y,Z), G(X,Y,Z), H(X,Y,Z), and I(X,Y,Z) will be independent and
unbiased.

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