MD5 also known as message digest algorithm was a widely used hash function producing 128 bit hash value.
I has been found to suffer from extensive vulnerabilities.
specified as internet standard RFC1321.
WORKING OF MD5:
- Pad message so it's length is 448 mod 512.
- append a 64 bit length value to the message.
- Initialize four word MD5 buffer (A,B,C,D).
- Process message in 16 word blocks
- Compression function that consists of four rounds of processing labelled as HMD5.
- Using 4 rounds of 16 step operation message block and buffer.
- Each round takes the current 512 bit block being processed(Yq) and 128 bit buffer value ABCD and updates the content of the buffer.
- Output of the fourth round is added to the input (Cq) to produce Cq+1 Output.
MD5 compression function:
Each round has 16 steps of the form:
a=b+((a+g(b,c,d)+X[k]+T[i])<<<S)
a,b,c,d are the four words of the buffer
g() is one of the four functions F,G,H,I
<<<S is the circuit shift of 32 bit argument by s bit
T[i] ith 32 bit in matrix T
Each round the buffer input with the next word of the message in a complex, non linear manner.
A different non-linear function is used in each of the 4 rounds.
The four buffer words are rotated from step to step so all are used and updated.
g is the primitive functions F,G,H,I of four rounds respectively.
X[i] is the 32 bit word in the current message block.
T[i] is the entry in the matrix of constants.
Four 32 bit register:
- A=67452301
- B=EFCDAB89
- C=98BADCFE
- D=10325476
F(B,C,D)=(B AND C) OR (NOT B AND D)
G(B,C,D)=(B AND D) OR (C OR NOT D)
H(B,C,D)=B XOR C XOR D
I(B,C,D)=C XOR(B OR NOT D)
Comments
Post a Comment