Académique Documents
Professionnel Documents
Culture Documents
Lecture 4
Multiple of 16 octets
explain diag. 1
Explain diag2
V.E.S.I.T_M.C.A Nishi TIku 21
MD4
MD4 was designed to be a 32 bit –word –
oriented so that it can be computed faster on
32 bit CPUs than an octet oriented scheme as
in MD2
Can handle messages with an arbitrary no. of
bits ( as against integral no. of octets)
Is computed in a single pass over data ( with
more intermediate states)
512 bits
digest . . .
512 bits
digest
.
.
.
512 bits
digest
. Diag.3
Selection formula:
d(-i) ∧ 3= d(-i) ∧ 3 +F(d (1-i) ∧3,d (2-i) ∧3,d (3-i) ∧ 3 , +mi)↵S1(i ∧3)
d0 = ( do+F(d1,d2,d3) +m0 )↵ 3
d3 =( d3 +F(do,d1,d2) +m1 ) ↵ 7
d2 =( d2+F(d3,d0,d1) +m2 )↵ 11
d1 =( d1+F(d2,d3,d0) +m3 ↵ 15
do =( do+F(d1,d2,d3) +m0 ↵ 3
where
F(x,y,z) is defined as (x∧y ) ∨ (~ x∧z)
V.E.S.I.T_M.C.A Nishi TIku 28
MD4 msg. digest Pass 2
Majority fn.
G(x,y,z) is defined as (x∧y ) ∨ (x∧z) ∨ ( y∧z )
For each int.i from 0 thru 15
S 2 (i ∧3)
Fn H(x,y,z) is defined as x ⊕ y ⊕ z
d(-i) ∧ 3= d(-i) ∧ 3 +G(d (1-i) ∧ 3 , d (2-i) ∧ 3 , d (3-i) ∧ 3 , +m (X(I))
+5a827999 16↵S 3(i ∧3)
input Message
Initial Value
MD5 Transformation block by block
Fn H(x,y,z) is defined as x ⊕ y ⊕ z
512: B1
512: B2
MD5
512: B3
MD5
512: B4
MD5
MD5
Result
V.E.S.I.T_M.C.A Nishi TIku 43
Processing of Block mi - 4 Passes
mi MDi
ABCD=fF(ABCD,mi,T[1..16])
A B C D
ABCD=fG(ABCD,mi,T[17..32])
ABCD=fH(ABCD,mi,T[33..48])
ABCD=fI(ABCD,mi,T[49..64])
+ + + +
V.E.S.I.T_M.C.A Nishi TIku 44
MD i+1
Process within a round
Other constants t
16 sub blocks
64 elements
M[0] to M[15[
One round
a b c d
add
T[k] step4
add step5
add step6
step7
a V.E.S.I.T_M.C.A NishicTIku 46
a b d
Different Passes...
Different functions and constants are used
Different set of mi is used
Different set of shift amount is used
A B C D E
+
ft
+
CLS5
Wt
+
CLS30 Kt
+
A B C
V.E.S.I.T_M.C.A Nishi TIku
D E 55
Basic Logic Functions
Only 3 different functions