199.pdf

(56 KB) Pobierz
Collisions for Hash Functions
MD4, MD5, HAVAL-128 and RIPEMD
Xiaoyun Wang
1
,
Dengguo Feng
2
, Xuejia Lai
3
, Hongbo Yu
1
The School of Mathematics and System Science, Shandong University, Jinan250100, China
1
Institute of Software, Chinese Academy of Sciences, Beijing100080, China
2
Dept. of Computer Science and Engineering, Shanghai Jiaotong University, Shanghai, China
3
xywang@sdu.edu.cn
1
revised on August 17, 2004
1 Collisions for MD5
MD5 is the hash function designed by Ron Rivest [9] as a strengthened version of MD4 [8]. In 1993 Bert den
Boer and Antoon Bosselaers [1] found pseudo-collision for MD5 which is made of the same message with two
different sets of initial value. H. Dobbertin[3] found a free-start collision which consists of two different 512-bit
messages with a chosen initial value
IV
0
.
IV
0
:
A
0
0
x
12
AC
2375, B
0
0x 3
B
341042,
C
0
0
x
5
F
62
B
97
C
, D
0
0
x
4
BA
763
ED
Our attack can find many real collisions which are composed of two 1024-bit messages with the original
initial value
IV
0
of MD5:
IV
0
:
A
0
0
x
67452301
,B
0
M
N
i
M
N
i
0
xefcdab
89,
C
0
C
1
,
C
1
0
x
98
badcfe
,
D
0
0
x
10325476
(0,0,0,0,2
31
,...,2
15
,...,2
31
,0)
(0,0,0,0,2
31
,..., 2
15
,...,2
31
,0)
C
2
,
C
2
(non-zeros at position 4,11 and 14)
such that
MD
5(
M
,
N
i
)
MD
5(
M
,
N
i
)
.
On IBM P690, it takes about one hour to find such
M
and
M
, after that, it takes only 15 seconds to 5
minutes to find
N
i
and
N
i
, so that
(
M
,
N
i
)
and
(
M
,
N
i
)
will produce the same hash same value. Moreover,
our attack works for any given initial value.
The following are two pairs of 1024-bit messages producing collisions, the two examples have the same 1-st
half 512 bits.
M
X
1
N
1
M
X
1
N
1
H
M
X
2
N
2
M
X
2
N
2
H
2dd31d1
634ad55
d11d0b96
797f2775
2dd31d1
634ad55
d11d0b96
797f2775
9603161f
2dd31d1
634ad55
313e82d8
42339fe9
2dd31d1
634ad55
313e82d8
42339fe9
8d5e7019
c4eee6c5
2b3f409
eb5cd530
c4eee6c5
2b3f409
9c7b41dc
eb5cd530
f41fc7ef
c4eee6c5
2b3f409
5b8f3456
e87e570f
c4eee6c5
2b3f409
5b8f3456
e87e570f
6324c015
9c7b41dc
69a3d69
8388e483
f497d8e4
baade822
69a3d69
8388e483
f497d8e4
baade822
9f65ffbc
69a3d69
8388e483
d4ac6dae
70b654ce
69a3d69
8388e483
d4ac6dae
70b654ce
5cf9af98
87b5ca2f
ab7e4612
9fc9cdf7
cfdebf0
6dd3c55f
ab7e4612
9fc9cdf7
cfdebf0
6dd3c55f
3e580440
66f12930
d80a9bb1
3e580440
72bd1dd9
66f12930
580a9bb1
897ffbb8
8fb109d1
e3a7cc35
897ffbb8
5b3c3780
8fb109d1
e3a7cc35
5a417125 e8255108
d555655a c79a7335
5c15cc79 ddcb74ed
5cf9af98
7b5ca2f
5a41f125 e8255108
d555655a 479a7335
5c154c79 ddcb74ed
a30f9dbf
5cf9af98
87b5ca2f
f2bd1dd9 5b3c3780
0
ab7e4612
9fc9cdf7
3e580440 897ffbb8
f2bd1dd9 5b3c3780
6633902
2b65f996
a0cd48d2
702af76f
5a417125 e8255108
c619c936
1e0da880
5cf9af98
b4e253dd
bc2198c6
fd03da87
9383a8b6
9fc9cdf7
0
7b5ca2f
ab7e4612
3e580440
897ffbb8
a0cd48d2
702af76f
5a41f125 e8255108
c619c936
1e0d2880
61804e08
34e253dd
bc2198c6
72bd1dd9 5b3c3780
6633902
ab65f996
fd03da87
9383a8b6
715d6b58
Table 1 Two pairs of collisions for MD5
2
Collisions for HAVAL-128
HAVAL is proposed in [10]. HAVAL is a hashing algorithm that can compress messages of any length in 3,4
or 5 passes and produce a fingerprint of length 128, 160, 192 or 224 bits.
Attack on a reduced version for HAVAL was given by P. R. Kasselman and W T Penzhorn [7], which
consists of last rounds for HAVAL-128. We break the full HAVAL-128 with only about the 2
6
HAVAL
computations. Here we give two examples of collisions of HAVAL-128, where
M
M
C
,
C
(2
i
1
,0,0,0,2
i
12
,....2
i
8
,0,...,0)
0,1,2,...31
, such that
HAVAL
(
M
)
HAVAL
(
M
)
.
with non-zeros at position 0,11,18, and
i
M
1
6377448b d9e59f18
a67a8a42 8d3adc8b
38183c9a b67a9289
fff4b3a7
40000096
f2aa3cbb d6cb92ba
b6e3d814 5630998d
c47299b2 27039ee5
7f466aac
fffffbc0
ee544a44 879fa576 1ca34633 76ca5d4f
86ea5dcd a739ae7b 54fd8e32 acbb2b36
dd555e14 839018d8 aabbd9c9 d78fc632
5f4016d2 5f4016d0 12e2b0
f4307f87
M
1
6377488b
a67a8a42
38183c9a
fff4b3a7
6377448b
a67a8a42
38183c9a
fff4b3a7
6377488b
a67a8a42
38183c9a
fff4b3a7
d9e59f18
8d3adc8b
b67a9289
40000096
d9e59f18
8d3adc8b
b67a9289
40000096
d9e59f18
8d3adc8b
b67a9289
40000096
f2aa3cbb
b6e3d814
c47299ba
7f466aac
d6cb92ba ee544a44
d630998d 86ea5dcd
27039ee5 dd555e14
fffffbc0
5f4016d2
6d2b54bf
ee544a44
86ea5dcd
dd555e14
5f4016d2
ee544a44
86ea5dcd
dd555e14
5f4016d2
879fa576 1ca34633 76ca5d4f
a739ae7b 54fd8e32
acbb2b36
839018d8 aabbd9c9 d78fc632
5f4016d0 12e2b0
f4307f87
H
95b5621c ca62817a a48dacd8
M
2
f2aa3cbb d6cb92ba
b6e3d814 5630998d
c47299b2 27039ee5
7f466aac fffffbc0
f2aa3cbb
b6e3d814
c47299ba
7f466aac
d6cb92ba
d630998d
27039ee5
fffffbc0
4293733c
879fa576 1ca34633 76ca5d4f
a739ae7b 54fd8e32 acbb2b36
839018d8 aabbd9c9 d78fc632
5f4016d0 12e2b0 f5b16963
879fa576 1ca34633
a739ae7b 54fd8e32
839018d8 aabbd9c9
5f4016d0 12e2b0
76ca5d4f
acbb2b36
d78fc632
f5b16963
M
2
H
b0e99492 d64eb647 5149ef30
Table 2 Two pairs of collision, where i=11 and these two examples differ only at the last word
3 Collisions for MD4
MD4 is designed by R. L. Rivest[8] . Attack of H. Dobbertin in Eurocrypto'96[2] can find collision with
probability 1/2
22
. Our attack can find collision with hand calculation, such that
M
M
C
,
C
(0,2
31
, 2
28
2
31
,0,0,0,0,0,0,0,0,0, 2
16
,0,0,0)
and
MD
4(
M
)
MD
4(
M
)
.
3b2a5d9f
b9e8c3e9
M
1
M
1
H
M
2
M
2
H
4d7a9c83 56cb927a b9d5a578 57a7a5ee de748a3c dcc366b3 b683a020
c69d71b3 f9e99198 d79f805e a63bb2e8 45dd8e31 97e31fe5 2794bf08
4d7a9c83 d6cb927a 29d5a578 57a7a5ee de748a3c dcc366b3 b683a020 3b2a5d9f
c69d71b3 f9e99198 d79f805e a63bb2e8 45dc8e31 97e31fe5 2794bf08 b9e8c3e9
5f5c1a0d 71b36046 1b5435da 9b0d807a
4d7a9c83 56cb927a b9d5a578 57a7a5ee de748a3c dcc366b3 b683a020 3b2a5d9f
c69d71b3 f9e99198 d79f805e a63bb2e8 45dd8e31 97e31fe5 f713c240 a7b8cf69
4d7a9c83 d6cb927a 29d5a578 57a7a5ee de748a3c dcc366b3 b683a020
c69d71b3 f9e99198 d79f805e a63bb2e8 45dc8e31 97e31fe5 f713c240
e0f76122 c429c56c ebb5e256
b809793
3b2a5d9f
a7b8cf69
Table 3 Two pairs of collisions for MD4
4
Collisions for RIPEMD
RIPEMD was developed for the RIPE project (RACE Integrrity Primitives Evalustion, 1988-1992). In
1995, H. Dobbertin proved that the reduced version RIPEMD with two rounds is not collision-free[4]. We show
that the full RIPEMD also isnO collision-free. The following are two pairs of collisions for RIPEMD:
t
M
i
'
579faf8e
bdeaae7
579faf8e
bdeaae7
1fab152
579faf8e
bdeaae7
579faf8e
bdeaae7
1f2c159f
M
i
C
,
C
(0,0,0,2
20
,0,0,0,0,0,0,2
18
2
31
,0,0,0,0,2 )
574a6aba
47bc6d7d
574a6aba
c7c06d7d
7a33776a
574a6aba
47bc6d7d
78413511
9abdd1b1
78513511
9abdd1b1
9e968ba7
78413511 a2b410a4
9abdd1b1 a45d2015
ad2f6c9f
a0a504ff
b56202c 4d757911
b18d58a8 e70c66b6
a2b410a4
a45d2015
a2b410a4
a45d2015
ad2f6c9f
817104ff
ad2f6c9f
817104ff
b56202c
264758a8
b56202c
264758a8
4d757911
61064ea5
4d757911
e1064ea5
31
M
1
M
1
H
M
2
M
2
H
9ecf579
78bc91f2
9ecf579
78bc91f2
1654a31b
9ecf579
78bc91f2
9ecf579 574a6aba
78bc91f2 c7c06d7d
569b31a6
dfcaa51a
78513511 a2b410a4 ad2f6c9f b56202c 4d757911
9abdd1b1 a45d2015 a0a504ff b18d58a8 670c66b6
25665d24
Table 4 The collisions for RIPEMD
5 Remark
Besides the above hash functions we break, there are some other hash functions not having ideal security. For
example, collision of SHA-0 [6] can be found with about 2
40
computations of SHA-0 algorithms, and a collision
for HAVAL-160 can be found with probability 1/2
32
.
Note that the messages and all other values in this paper are composed of 32-bit words, in each 32-bit word
the most left byte is the most significant byte.
B. den Boer, Antoon Bosselaers, Collisions for the Compression Function of MD5, Eurocrypto,93.
H. Dobbertin, Cryptanalysis of MD4, Fast Software Encryption, LNCS 1039, D. , Springer-Verlag, 1996.
H. Dobbertin, Cryptanalysis of MD5 compress, presented at the rump session of EurocrZpt'96.
Hans Dobbertin, RIPEMD with Two-round Compress Function is Not Collision-Free, J. Cryptology 10(1),
1997.
5 H. Dobbertin, A. Bosselaers, B. Preneel, "RIPMEMD-160: A Strengthened Version of RIPMMD," Fast
Software EncrZption, LNCS 1039, D.Gollmann, Ed., Springer-Verlag, 1996, pp. 71-82.
6 FIPS 180-1, Secure hash standard, NIST, US Department of Commerce, Washington D. C., April 1995.
7 P. R. Kasselman, W T Penzhorn , Cryptananlysis od reduced version of HAVAL, Vol. 36, No. 1, Electronic
Letters, 2000.
8 R. L. Rivest, The MD4 Message Digest Algorithm, Request for Comments (RFC)1320, Internet Activities
Board, Internet Privacy Task Force, April 1992.
9 R. L Rivest, The MD5 Message Digest Algorithm, Request for Comments (RFC)1321, Internet Activities
Board, Internet PrivacZ Task Force, April 1992.3RIPEMD-1281
10 Y. Zheng, J. Pieprzyk, J. Seberry, HAVAL--A One-way Hashing Algorithm with Variable Length of Output,
Auscrypto'92.
1
2
3
4
Zgłoś jeśli naruszono regulamin