Cryptography Reference
In-Depth Information
b
b
c
c
d
d
ROTL
α
i
,
j
(
a
+
f
i
(
b
,
c
,
d
)+
x
+
k
i
,
j
)+
b
Figure 3.5.
Transformation box in MD5.
value, we define
C
(
H
,
B
)
=
C
0
(
H
,
B
)
+
(
A
,
B
,
C
,
D
,
E
)
where the addition here is the word-wise addition modulo 2
32
.
The encryption
C
0
consists of four rounds, each consisting of 20 transformation
steps. The message block (key block) is expanded following a linear relation, and every
of the five input words is sequentially transformed through a generalized five-branch
Feistel scheme. Each transformation is defined by a box with a main input
a
, a key input
x
, and four side inputs
b
,
c
,
d
, and
e
. More precisely,
C
is defined by the algorithm
depicted in Fig. 3.6.
Input
: an initial hashed value
a
,
b
,
c
,
d
,
e
, a message block
x
0
, ...,
x
15
Output
: a hash
a
,
b
,
c
,
d
,
e
1:
for
i
=
16 to 79
do
ROTL
1
(
x
i
−
3
XOR
x
i
−
8
XOR
x
i
−
14
XOR
x
i
−
16
)
x
i
←
2:
3:
end for
4:
for
i
=
1to4
do
for
j
=
0to19
do
5:
ROTL
5
(
a
)
t
←
+
f
i
(
b
,
c
,
d
)
+
e
+
x
20(
i
−
1)
+
j
+
k
i
6:
e
←
d
7:
d
←
c
8:
ROTL
30
(
b
)
c
←
9:
←
b
a
10:
←
a
t
11:
12:
end for
13:
end for
14:
a
←
a
+
a
initial
15:
b
←
b
+
b
initial
16:
c
←
c
+
c
initial
17:
d
←
d
+
d
initial
18:
e
←
e
+
e
initial
Figure 3.6.
Compression in SHA-1.
Search WWH ::
Custom Search