New Techniques for Cryptanalysis of Cryptographic Hash Functions - - PowerPoint PPT Presentation

new techniques for cryptanalysis of cryptographic hash
SMART_READER_LITE
LIVE PREVIEW

New Techniques for Cryptanalysis of Cryptographic Hash Functions - - PowerPoint PPT Presentation

New Techniques for Cryptanalysis of Cryptographic Hash Functions Rafi Chen Department of Computer Science, Technion Israel Institute of Technology Joint work with Eli Biham Cryptoday 2011 p. 1/52 Talk Outline Definition and properties


slide-1
SLIDE 1

New Techniques for Cryptanalysis of Cryptographic Hash Functions

Rafi Chen Department of Computer Science, Technion – Israel Institute of Technology Joint work with Eli Biham

Cryptoday 2011 – p. 1/52

slide-2
SLIDE 2

Talk Outline

Definition and properties Applications Hash functions from the 90’s till today Merkle-Damgård construction and its weaknesses Differential cryptanalysis of hash functions. The multi-block technique. The neutral-bits technique. Results.

Cryptoday 2011 – p. 2/52

slide-3
SLIDE 3

A Cryptographic Hash Function

A Cryptographic hash function H takes a message of arbitrary length and generates a short fingerprint.

H : {0, 1}∗ → {0, 1}m

Cryptoday 2011 – p. 3/52

slide-4
SLIDE 4

A Cryptographic Hash Function

A Cryptographic hash function H takes a message of arbitrary length and generates a short fingerprint.

H : {0, 1}∗ → {0, 1}m H has no secret key or hidden data. Cryptographic

applications that use it rely on its properties.

Cryptoday 2011 – p. 3/52

slide-5
SLIDE 5

Required Properties

Preimage resistance (2n):

H n M* = H(M )

*

H(M) M M

Cryptoday 2011 – p. 4/52

slide-6
SLIDE 6

Required Properties

Preimage resistance (2n):

H n M* = H(M )

*

H(M) M M

2nd Preimage resistance (2n):

H n M* = H(M )

*

M H(M)

Cryptoday 2011 – p. 4/52

slide-7
SLIDE 7

Required Properties

Preimage resistance (2n):

H n M* = H(M )

*

H(M) M M

2nd Preimage resistance (2n):

H n M* = H(M )

*

M H(M)

Collision-resistance (2n/2):

H n M* = H(M )

*

H(M) M

Cryptoday 2011 – p. 4/52

slide-8
SLIDE 8

Required Properties

Preimage resistance (2n):

H n M* = H(M )

*

H(M) M M

2nd Preimage resistance (2n):

H n M* = H(M )

*

M H(M)

Collision-resistance (2n/2):

H n M* = H(M )

*

H(M) M

Easy to compute .

Cryptoday 2011 – p. 4/52

slide-9
SLIDE 9

Applications - Digital Signature

M Hash Func. Verification scheme M Hash Func. Signature scheme Signature Private Key Signature A Message to Sign H(M) Public Key True A Message to Sign Signer H(M)

Send

Verifier

Cryptoday 2011 – p. 5/52

slide-10
SLIDE 10

Applications - Digital Signature

M Hash Func. Verification scheme M Hash Func. Signature scheme Private Key Signature Signature A Message to Sign H(M) Public Key True A Message to Sign H(M) Signer

Send

Verifier

Cryptoday 2011 – p. 5/52

slide-11
SLIDE 11

Applications - Digital Signature

M Hash Func. Verification scheme M Hash Func. Signature scheme Private Key Signature A Message to Sign H(M) Public Key True Signature A Message to Sign H(M) Signer

Send

Verifier

Cryptoday 2011 – p. 5/52

slide-12
SLIDE 12

Applications - Digital Signature

M Hash Func. Verification scheme M Hash Func. Signature scheme Private Key Signature Signature A Message to Sign H(M) Public Key True A Message to Sign H(M) Signer

Send

Verifier

Cryptoday 2011 – p. 5/52

slide-13
SLIDE 13

Applications - Digital Signature

M Hash Func. Signature scheme Hash Func. Verification scheme M Private Key Signature A Message to Sign H(M) Signer

Send

Verifier H(M) Public Key True A Message to Sign Signature

Cryptoday 2011 – p. 5/52

slide-14
SLIDE 14

Applications - Digital Signature

M Hash Func. Signature scheme Verification scheme M Hash Func. Private Key Signature A Message to Sign H(M) Signer Verifier Public Key True A Message to Sign Signature

Send

H(M)

Cryptoday 2011 – p. 5/52

slide-15
SLIDE 15

Applications - Digital Signature

M Hash Func. Signature scheme M Hash Func. Verification scheme Private Key Signature A Message to Sign H(M) Signer Verifier True A Message to Sign Signature

Send

H(M) Public Key

Cryptoday 2011 – p. 5/52

slide-16
SLIDE 16

Applications - Digital Signature

M Hash Func. Signature scheme M Hash Func. Verification scheme Private Key Signature A Message to Sign H(M) Signer Verifier True A Message to Sign Signature

Send

H(M) Public Key

Cryptoday 2011 – p. 5/52

slide-17
SLIDE 17

Applications - Digital Signature

M Hash Func. Signature scheme M Hash Func. Verification scheme Private Key Signature A Message to Sign H(M) Signer Verifier True A Message to Sign Signature

Send

H(M) Public Key

If H(M) = H(M ∗) then M and M ∗ have the same signature.

Cryptoday 2011 – p. 5/52

slide-18
SLIDE 18

Applications

Message Integrity: Instead of protecting the whole data, protect the hash of the data. Second preimage resistance is required.

Cryptoday 2011 – p. 6/52

slide-19
SLIDE 19

Applications

Message Integrity: Instead of protecting the whole data, protect the hash of the data. Second preimage resistance is required. Password protection. A password file holds:

(User name, salt, H(password||salt)).

Passwords are protected in case an attacker accesses the password file. Preimage resistance is required.

Cryptoday 2011 – p. 6/52

slide-20
SLIDE 20

Applications

Commitment A who commit to M sends H(M||salt) to B. At the time A reveals his commitment he publishes

M and the salt. B verifies the commitment by

hashing and comparing. Collision resistance , preimage resistance and second preimage resistance are required.

Cryptoday 2011 – p. 7/52

slide-21
SLIDE 21

Applications

Message Authentication Code - MAC. Preimage resistance is required.

Cryptoday 2011 – p. 8/52

slide-22
SLIDE 22

Applications

Message Authentication Code - MAC. Preimage resistance is required. and there are many more...

Cryptoday 2011 – p. 8/52

slide-23
SLIDE 23

Hash Functions from the 90’s till Today

Cryptoday 2011 – p. 9/52

slide-24
SLIDE 24

1990-2000 (partial list)

The hash functions use Merkle-Damgård construction. Hash size 128-192 bits. Optimized for 32-bit machines (except for Tiger).

Function

  • Dig. size

Designed Broken Complexity Snefru 128-224 1990 1990 212.5 − 256.5 MD4 128 1990 1995,2004 220, 28 MD5 128 1992 2004,2008 239, 216 SHA-0 160 1993 1998,2004 261, 251, 239 SHA-1 160 1995 2005,2011 263, 258 Tiger ≤ 192 1995 RIPEMD-160 160 1996

Cryptoday 2011 – p. 10/52

slide-25
SLIDE 25

2000-2003

Whirlpool, Nessie(2000) and SHA-2, NIST (2002) The hash functions still use Merkle-Damgård construction. Whirlpool is based on the Square block cipher. SHA-224, SHA-256, SHA-384, SHA-512 are based on the MD/SHA concept with more complex operations. Hash size 224-512. No real motivation to upgrade till the first attacks on SHA-1 in 2005.

Cryptoday 2011 – p. 11/52

slide-26
SLIDE 26

SHA-3 Competition (2007)

The break of SHA-1 motivated NIST to establish a public competition to choose the next generation of hash functions. 64 proposals were submitted. 51 passed Round 1, 14 passed Round 2, five passed Round 3, and the final decision will be given in 2012.

Cryptoday 2011 – p. 12/52

slide-27
SLIDE 27

Recommendations

Do not use broken hash functions, not SHA-1 and certainly not MD5. Midterm solution - Upgrade to Whirlpool or SHA-2. Upgrade to SHA-3 when it is available.

Cryptoday 2011 – p. 13/52

slide-28
SLIDE 28

Merkle-Damgård Construction and Its Weaknesses

Cryptoday 2011 – p. 14/52

slide-29
SLIDE 29

Merkle-Damgård Construction (1989)

The hash function iterates a compression function C

C : {0, 1}mc+b → {0, 1}mc,

  • n a chaining value hk−1 and a message block Mk.

Cryptoday 2011 – p. 15/52

slide-30
SLIDE 30

Merkle-Damgård Construction (1989)

b mc b b mc b mc mc

0 ’s padding with

mc

Hash Result E E E

mc

M C IV M1 M2 h2 Mn Mn−1 hn−1 hn h1 h0

The first chaining value is initialized to h0 = IV . For each Mk and hk−1 compute: hk = C(Mk, hk−1).

Cryptoday 2011 – p. 15/52

slide-31
SLIDE 31

Merkle-Damgård Construction (1989)

b mc b b mc b mc mc

0 ’s padding with

mc

Hash Result E E E

mc

M C IV M1 M2 h2 Mn Mn−1 hn−1 hn h1 h0

h1 = C(M1, h0)

Cryptoday 2011 – p. 15/52

slide-32
SLIDE 32

Merkle-Damgård Construction (1989)

b b mc b b mc mc

0 ’s padding with

mc

Hash Result E E

mc

M C C

mc

IV M1 M2 h1 h2 Mn Mn−1 hn−1 hn h0

h2 = C(M2, h1)

Cryptoday 2011 – p. 15/52

slide-33
SLIDE 33

Merkle-Damgård Construction (1989)

b mc b b mc mc mc mc b mc

Hash Result E 0 ’s padding with M C C C IV M1 M2 Mn−1 h0 h1 h2 hn−1 Mn hn

hn−1 = C(Mn−1, hn−2)

Cryptoday 2011 – p. 15/52

slide-34
SLIDE 34

Merkle-Damgård Construction (1989)

b b mc b b mc mc mc mc mc

0 ’s, and message length padding with 1, M C C C C Hash Result IV M1 M2 Mn Mn−1 h0 h1 h2 hn−1 hn

hn = C(Mn, hn−1)

Cryptoday 2011 – p. 15/52

slide-35
SLIDE 35

Merkle-Damgård Construction (1989)

b b mc b b mc mc mc mc mc

Hash Result M C C C C IV M1 M2 Mn Mn−1 h0 h1 hn−1 hn h2

hn is the output of the hash function. H(M) = hn

Cryptoday 2011 – p. 15/52

slide-36
SLIDE 36

Merkle-Damgård construction is the de-facto standard for hash functions.

Cryptoday 2011 – p. 16/52

slide-37
SLIDE 37

Merkle-Damgård Construction

The hash size should be long enough to prevent Yuval’s type attacks. The padding of the length prevents some long messages second preimage attacks. The compression function is not invertible to prevent meet-in the middle attacks.

H(M) is collision free if C(Mk, hk−1) is collision free.

Cryptoday 2011 – p. 17/52

slide-38
SLIDE 38

Wang’s MD5 Collision

In 2005 Wang found a collision of MD5 with a complexity 239.

Cryptoday 2011 – p. 18/52

slide-39
SLIDE 39

Wang’s MD5 Collision

In 2005 Wang found a collision of MD5 with a complexity 239. Wang’s novel technique was exciting. However, was it more than academic achievement?

Cryptoday 2011 – p. 18/52

slide-40
SLIDE 40

Wang’s MD5 Collision

In particular, is this collision a security risk?

M

02DD31D1 C4EEE6C5 069A3D69 5CF9AF98 87B5CA2F AB7E4612 3E580440 897FFBB8 0634AD55 02B3F409 8388E483 5A417125 E8255108 9FC9CDF7 F2BD1DD9 5B3C3780 D11D0B96 9C7B41DC F497D8E4 D555655A C79A7335 0CFDEBF0 66F12930 8FB109D1 797F2775 EB5CD530 BAADE822 5C15CC79 DDCB74ED 6DD3C55F D80A9BB1 E3A7CC35

M ∗

02DD31D1 C4EEE6C5 069A3D69 5CF9AF98 07B5CA2F AB7E4612 3E580440 897FFBB8 0634AD55 02B3F409 8388E483 5A41F125 E8255108 9FC9CDF7 72BD1DD9 5B3C3780 D11D0B96 9C7B41DC F497D8E4 D555655A 479A7335 0CFDEBF0 66F12930 8FB109D1 797F2775 EB5CD530 BAADE822 5C154C79 DDCB74ED 6DD3C55F 580A9BB1 E3A7CC35

Cryptoday 2011 – p. 18/52

slide-41
SLIDE 41

Notice that given a single collision of the hash function the number of colliding pairs is practically unlimited.

Cryptoday 2011 – p. 19/52

slide-42
SLIDE 42

Notice that given a single collision of the hash function the number of colliding pairs is practically unlimited. E.g., If

H(m) = H(m∗)

then

H(m||M) = H(m∗||M)

for all M’s.

Cryptoday 2011 – p. 19/52

slide-43
SLIDE 43

Notice that given a single collision of the hash function the number of colliding pairs is practically unlimited. E.g., If

H(m) = H(m∗)

then

H(m||M) = H(m∗||M)

for all M’s. But m and m∗ are meaningless and can not be used in a real message.

Cryptoday 2011 – p. 19/52

slide-44
SLIDE 44

Should a collision of a random and meaningless pair of messages worry us?

Cryptoday 2011 – p. 20/52

slide-45
SLIDE 45

“The Story of Alice and Her Boss”, Lucks and Daum (2005)

M Letter A Letter B

File A shows Letter A, File B shows Letter B Two postscript documents: = H(File B) C(hi, M) = C(h i * , M ) H(File A)

M Letter A Letter B

*

File A File B var:

else show letter B show letter A if var=M else show letter B show letter A if var=M

Cryptoday 2011 – p. 21/52

slide-46
SLIDE 46

Alice prepares file A and file B, sends file A to her boss, and asks him to sign.

Cryptoday 2011 – p. 22/52

slide-47
SLIDE 47

Alice prepares file A and file B, sends file A to her boss, and asks him to sign. Alice’s boss is satisfied with what he sees (Letter A)

To whom it may concern, I highly recommend hiring Alice... . . . . . . . . Sincerely Julius Caesar

and he signs.

Cryptoday 2011 – p. 22/52

slide-48
SLIDE 48

Alice prepares file A and file B, sends file A to her boss, and asks him to sign. Alice uses file B and shows Letter B signed by her boss.

Order, Alice is given full access... . . . . . . . . Sincerely Julius Caesar

Cryptoday 2011 – p. 22/52

slide-49
SLIDE 49

With this trick the same collision may be reused with as many letters Alice likes. The same trick is applicable to pdf and doc documents. This trick is applicable to any executable that is based

  • n programming language...

Cryptoday 2011 – p. 22/52

slide-50
SLIDE 50

Conclusion: Do not use a broken hash function

Cryptoday 2011 – p. 23/52

slide-51
SLIDE 51

Conclusion: Do not use a broken hash function Do software manufactures aware of the risk?

Cryptoday 2011 – p. 23/52

slide-52
SLIDE 52

from openSUSE 11.4 download page (2011):

“ Verify your download (optional, for experts) Many applications can verify the checksum of a download. To verify your download can be important as it verifies you really have got the ISO file you wanted to download and not some broken version. You could verify the file in the process of downloading. For example a checksum (SHA256) will be used automatically if you choose Metalink in the field above and use the add-on DownThemAll! in Firefox. We offer three different checksums: * gpg signature offers the most security as you can verify who signed it. It should be 79C1 79B2 E1C8 20C1 890F 9994 A84E DAE8 9C80 0ACA. * md5 checksum is still the most commonly used checksum. Many ISO burners display it right before burning. * sha1 checksum is the less known but more secure checksum than md5.”

More than six years after SHA-1 was broken and MD5 collisions were published, they are still used in real applications.

Cryptoday 2011 – p. 24/52

slide-53
SLIDE 53

2005: 800 calls of MD5 in Microsoft Windows. (Preneel’s talk, ICICS 2010) Android applications use RSA and MD5 for signature.

Cryptoday 2011 – p. 25/52

slide-54
SLIDE 54

What if finding collisions is trivial, e.g, MD5 or MD4?

Cryptoday 2011 – p. 25/52

slide-55
SLIDE 55

Rouge CA, Sotirov et al. (2008)

A Certificate Authority (CA) is a trusted third party who issues and revokes certificates associating public encryption keys with the identity of their owners. Digital signatures are used by Certificate Authorities to sign certificates. An attacker who can forge certificates may impersonate any website on the Internet. In particular an attacker who can forge a certificate of a CA may impersonate any website on the Internet, including banking and e-commerce sites secured by the HTTPS protocol.

Cryptoday 2011 – p. 26/52

slide-56
SLIDE 56

Sotirov et al. demonstrated how collisions of MD5 are used to create a rogue CA certificate, which in turn allows the creation of valid certificates of arbitrary web sites.

Cryptoday 2011 – p. 27/52

slide-57
SLIDE 57

Microsoft response: "This new disclosure does not increase risk to customers significantly, as the researchers have not published the cryptographic background to the attack, and the attack is not repeatable without this information," ...

Cryptoday 2011 – p. 28/52

slide-58
SLIDE 58

24/3/2011: Comodo a trusted internet security provider whose mission is to ‘create trust online’ gets a crucial hack attack issuing a fake digital SSL certificates. It is roaming on seven different domains including those of Live, Google, Yahoo, Skype, Mozilla and more.

Cryptoday 2011 – p. 29/52

slide-59
SLIDE 59

Is H(M) as strong as C(Mk, hk−1)?

Cryptoday 2011 – p. 30/52

slide-60
SLIDE 60

Multi-Collision, Joux (2004)

h0 h h2 hr−1 hr

1

M2

2*

Mr Mr−1 hr−2 M1 M *

1

M Mr−1

* *

Mr

r collisions of C() → 2r-collisions of H(), i.e., 2r messages have the same hash value.

Cryptoday 2011 – p. 31/52

slide-61
SLIDE 61

Multi-Collision, Joux (2004)

h0 h h2 hr−1 hr

2* 1

M2 Mr Mr−1 hr−2 M1

* 1

M Mr−1

* *

Mr M

r collisions of C() → 2r-collisions of H(), i.e., 2r messages have the same hash value.

Cryptoday 2011 – p. 31/52

slide-62
SLIDE 62

Multi-Collision, Joux (2004)

h0 h h2 hr−1 hr M1

2* 1

M2 Mr Mr−1 hr−2 M Mr−1

* *

Mr M *

1

r collisions of C() → 2r-collisions of H(), i.e., 2r messages have the same hash value.

Cryptoday 2011 – p. 31/52

slide-63
SLIDE 63

Multi-Collision, Joux (2004)

h0 h h2 hr−1 hr M2

1 2*

Mr Mr−1 hr−2 M1 M *

1

Mr−1

* *

Mr M

r collisions of C() → 2r-collisions of H(), i.e., 2r messages have the same hash value.

Cryptoday 2011 – p. 31/52

slide-64
SLIDE 64

Multi-collisions are used to show that cascading two hash functions is not much stronger than the strongest

  • f the two (in respect to collision resistance and

preimage resistance).

Cryptoday 2011 – p. 32/52

slide-65
SLIDE 65

Nostradamus Attack, Kelsey and Kohno(2005)

Nostradamus commitment to “which celebrities will marry this year” is H(M) = h5:

h0 h h2 h3 h4 h5

1

yes yes yes yes yes no no no no no Alice Bob Carol Dave Ed

Cryptoday 2011 – p. 33/52

slide-66
SLIDE 66

Nostradamus Attack, Kelsey and Kohno(2005)

Nostradamus commitment to “which celebrities will marry this year” is H(M) = h5: At the end of the year he reveals...

h0 h h2 h3 h4 h5

1

yes yes yes no no Alice Bob Dave Ed no yes Carol no no yes

Cryptoday 2011 – p. 33/52

slide-67
SLIDE 67

Differential Cryptanalysis of Hash Functions

Cryptoday 2011 – p. 34/52

slide-68
SLIDE 68

Differential Cryptanalysis of H.F.’s

Our research is focused on attacking the collision resistance property. The most general, efficient and widely used technique to attack the collision resistance property is differential cryptanalysis that was introduced by Biham and Shamir in 1990. In our research we use and enhance the differential cryptanalysis technique.

Cryptoday 2011 – p. 35/52

slide-69
SLIDE 69

Differential Based Attacks

In 1998 Chabaud and Joux published an attack on SHA-0. In 2004 we published our neutral-bits technique with application to SHA-0. In 2005 we published the multi-block technique and the first attacks on SHA-1. Joux used our techniques added an improvement and found a collision of SHA-0. Wang used some of our techniques, introduced substential improvements of her own and broke SHA-1,

Cryptoday 2011 – p. 36/52

slide-70
SLIDE 70

In 2005 Wang published her modular differential and message modification techniques to attack MD4, MD5, HAVAL, RIPEMD-128, SHA-0 and SHA-1. Recently we have developed the second order differential technique.

Cryptoday 2011 – p. 37/52

slide-71
SLIDE 71

Compression-Function Design

Mk mc mc hk−1 Σ

E

b hk = EMk ) + h k−1 (h k−1

Based on an encryption function sur- rounded by a feed-forward that cancels the ability to decrypt.

Cryptoday 2011 – p. 38/52

slide-72
SLIDE 72

Compression-Function Design

Mk mc mc hk−1 Σ

E

b hk = EMk ) + h k−1 (h k−1

Based on an encryption function sur- rounded by a feed-forward that cancels the ability to decrypt. The message is used as the “key” and the chaining value as the “plaintext”.

Cryptoday 2011 – p. 38/52

slide-73
SLIDE 73

Differential Cryptanalysis of H.F.’s

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M Ω P Ω M Ω T

2 5 3 4 1

Σ

E

2 5 3 4 1

Σ

E

hk−1

R−2 R−1 R−2 R−1

The idea: Differences are easier to predict than values.

Cryptoday 2011 – p. 39/52

slide-74
SLIDE 74

Differential Cryptanalysis of H.F.’s

. . . ~ ~ . . .

k−1 *

h

k

M

* k

M Ω T

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

~ ~

k

h

k *

h Ω P Ω M

2 5 3 4 1

Σ

E

2 5 3 4 1

Σ

E

hk−1

R−2 R−1 R−2 R−1

An attacker selects in- put differences Ωp and ΩM, and analyzes the pre- dicted difference of the in- ternal state A′

i and the

probability pi that it oc- curs, in each round +to the output difference ΩT .

Cryptoday 2011 – p. 39/52

slide-75
SLIDE 75

Differential Cryptanalysis of H.F.’s

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

2 5 3 4 1

Σ

E

2 5 3 4 1

Σ

E

hk−1

R−2 R−1 R−2 R−1

*

An attacker selects in- put differences Ωp and ΩM, and analyzes the pre- dicted difference of the in- ternal state A′

i and the

probability pi that it oc- curs, in each round up to the output difference ΩT .

Cryptoday 2011 – p. 39/52

slide-76
SLIDE 76

Differential Cryptanalysis of H.F.’s

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

2 5 3 4 1

Σ

E

2 5 3 4 1

Σ

E

hk−1

R−2 R−1 R−2 R−1

*

The list of predicted dif- ferences and probabilities forms a characteristic.

Cryptoday 2011 – p. 39/52

slide-77
SLIDE 77

Differential Cryptanalysis of H.F.’s

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

2 5 3 4 1

Σ

E

2 5 3 4 1

Σ

E

hk−1

R−2 R−1 R−2 R−1

*

The list of predicted dif- ferences and probabilities forms a characteristic. The probability

  • f

the characteristic is r

i=1 pi.

Cryptoday 2011 – p. 39/52

slide-78
SLIDE 78

The Multi-Block Technique

Cryptoday 2011 – p. 40/52

slide-79
SLIDE 79

A Characteristics of One-Block Attack

M1

*

M1

p

1 =0 M

1

=0

T

1

h’

0 =0

h’

1 =0

Cryptoday 2011 – p. 41/52

slide-80
SLIDE 80

A Characteristics for Near-Collision

h’

0 =0

h1

*

h1 ~ ~ M1 M1 (h1,M2) h1 h1

*

M2

2 *

M =0

p

1

M1 h’

0 =0

M2 M2

*

h1 h1

*

h’

2 =0 *

M1

Two−Block Collision

Pseudo−Collision Near−Collision C (h0,M1) C

* *

(h0

1)

,M h’

2 =0

C = C

Pseudo−Collision

(h1,M2)

* *

Near−Collision

p

2

=0

M

Ω ΩT1

1

M

Ω ΩT2

2 Cryptoday 2011 – p. 42/52

slide-81
SLIDE 81

A Characteristic for Pseudo-Collision

h’

0 =0

h1

*

h1 ~ ~ M1 M1 (h1,M2) h1 h1

*

M2

2 *

M =0

p

1

M1 h’

0 =0

M2 M2

*

h1 h1

*

h’

2 =0 *

M1

Two−Block Collision

Pseudo−Collision Near−Collision C (h0,M1) C

* *

(h0

1)

,M h’

2 =0

C = C

Pseudo−Collision

(h1,M2)

* *

Near−Collision

p

2

=0

M

Ω ΩT1

1

M

Ω ΩT2

2 Cryptoday 2011 – p. 42/52

slide-82
SLIDE 82

Characteristics for Two-Block Attack

h’

0 =0

h1

*

h1 ~ ~ M1 M1 (h1,M2) h1 h1

*

M2

2 *

M =0

p

1

M1 h’

0 =0

M2 M2

*

h1 h1

*

h’

2 =0 *

M1

Two−Block Collision

Pseudo−Collision Near−Collision C (h0,M1) C

* *

(h0

1)

,M h’

2 =0

C = C

Pseudo−Collision

(h1,M2)

* *

Near−Collision

p

2

=0

M

Ω ΩT1

1

M

Ω ΩT2

2 Cryptoday 2011 – p. 42/52

slide-83
SLIDE 83

Multi-Block Attack

M1 Mn Mn

*

h1 h2 h2

*

M2 M2 h’

0 =0

h1

*

with a near−collision. difference in the initial value and ends Additional pairs are added as necessary to reduce the search complexity. The last pair is a pseudo−collision.

Near−Collision Collision h’

n=0

hn−1

*

hn−1

* *

M1

The first pair creates a near−collision. The second pair starts with a small

Pseudo−Collision Pseudo−Near−Collision Pseudo−Near−Collision

Cryptoday 2011 – p. 43/52

slide-84
SLIDE 84

The Neutral-Bits Technique

Cryptoday 2011 – p. 44/52

slide-85
SLIDE 85

Neutral Bits

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

5 5 2 5 3 4 1

Σ

2 3 4 1

Σ

hk−1

R−2 R−1 R−2 R−1

*

22

The idea: Let a pair Mk, M ∗

k con-

forms to the characteristic at least up to Round 22.

Cryptoday 2011 – p. 45/52

slide-86
SLIDE 86

Neutral Bits

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

5 2 5 3 4 1

Σ

2 3 4 1

Σ

hk−1

R−2 R−1 R−2 R−1

bi bi

*

22 22

The idea: Let a pair Mk, M ∗

k con-

forms to the characteristic at least up to Round 22. Complement bit i in both messages.

Cryptoday 2011 – p. 45/52

slide-87
SLIDE 87

Neutral Bits

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

5 2 5 3 4 1

Σ

2 3 4 1

Σ

hk−1

R−2 R−1 R−2 R−1

bi bi

*

22 22

The idea: Let a pair Mk, M ∗

k con-

forms to the characteristic at least up to Round 22. Complement bit i in both messages. If the conformance of the new pair is not affected up to Round 22, then bi is a neutral bit.

Cryptoday 2011 – p. 45/52

slide-88
SLIDE 88

Neutral Bits

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

5 2 5 3 4 1

Σ

2 3 4 1

Σ

hk−1

R−2 R−1 R−2 R−1

bi bj bi bj

*

22 22

Now Complement bit j in both messages.

Cryptoday 2011 – p. 46/52

slide-89
SLIDE 89

Neutral Bits

. . . ~ ~ ~ ~ . . .

k

h

k−1 *

h

k *

h

k

M

* k

M

A 1 ’ A 2 ’ A 3 ’ A 5 ’ A 6 ’ A 4 ’ A R ’ A R−1 ’ p 1 p 2 p 3 p 5 p 6 p 4 p R p R−1

Ω P Ω M Ω T Α Α

5 2 5 3 4 1

Σ

2 3 4 1

Σ

hk−1

R−2 R−1 R−2 R−1

bi bj bi bj

*

22 22

Now Complement bit j in both messages. If the conformance of the new pair is not affected up to Round 22, then bi and bj are mutually indepen- dent neutral bits.

Cryptoday 2011 – p. 46/52

slide-90
SLIDE 90

Neutral Bits

In SHA-0 it is easy to find sets of more than 40 mutually independent neutral bits. By complementing the 240 different combinations of neutral bits we receive 240 new messages, from which about 237 conforms at least to Round 22. Using this technique the probability of the characteristic is effectively R

i=22 pi.

Cryptoday 2011 – p. 47/52

slide-91
SLIDE 91

Example

The following pair conforms to 22 rounds and has about 40 neutral bits from which about 237 pairs that conforms to 22 rounds may be constructed.

M1 19EF75A8 D2F24D9A 8F179A7D 1A295690 2E84C143 D74B9DDC 18C10577 8107056E 5B1A47ED 6212C3F2 3B2D04F8 F5581AB0 26D8CDBC AB3A3248 F347E871 46278F39 M∗

1

19EF75A8 D2F24D9A 8F179A7D 1A295692 2E84C103 D74B9DDE 98C10577 0107056E DB1A47EF 6212C3B2 3B2D04F8 75581AF0 A6D8CDBE AB3A324A 7347E831 C6278F3B

Cryptoday 2011 – p. 48/52

slide-92
SLIDE 92

Example (cont.)

Singles: W 4

12, W 9 14, W 10 14 , W 11 14 , W 16 14 , W 4 15, W 5 15, W 9 15, W 10 15 , W 11 15 , W 14 15 , W 15 15 , W 16 15 ,

W 19

15 , W 21 15 , W 26 15 , W 27 15

Pairs: (W 13

9 , W 8 8 ), (W 13 14 , W 8 13), (W 13 15 , W 8 14), (W 17 15 , W 12 14 ), (W 20 15 , W 15 14 ), (W 22 15 , W 12 13 )

Triplets: (W 8

9 , W 15 5 , W 10 4 ), (W 21 10 , W 28 6 , W 23 5 ), (W 24 11 , W 31 7 , W 26 6 ), (W 2 12, W 9 8 , W 4 7 ),

(W 7

12, W 14 8 , W 9 7 ), (W 14 14 , W 10 13 , W 9 13), (W 18 14 , W 13 13 , W 9 12), (W 8 15, W 3 15, W 30 14 ),

(W 12

15 , W 14 10 , W 9 9 )

Quadru- (W 5

7 , W 9 4 , W 12 3 , W 7 2 ), (W 11 10 , W 18 6 , W 20 3 , W 15 2 ), (W 12 11 , W 18 10 , W 17 10 , W 12 9 )

plets: (W 7

14, W 19 13 , W 18 13 , W 16 12 ), (W 25 15 , W 21 13 , W 15 13 , W 16 12 )

Quintu- (W 23

14 , W 22 14 , W 21 14 , W 17 13 , W 11 12 ), (W 7 15, W 17 14 , W 24 10 , W 23 10 , W 18 9 ),

plets: (W 24

15 , W 0 15, W 3 14, W 22 13 , W 4 13), (W 24 15 , W 0 15, W 3 14, W 22 13 , W 4 13)

Cryptoday 2011 – p. 49/52

slide-93
SLIDE 93

Results Using Our Techniques

H.F . Round Blocks Complexity Found pairs SHA calls SHA-0 50 2 219 216 + 80 4 251 246 + 82 1 244 239 + SHA-1 34 1 27 24 + 36 2 224 221 + 40 2 219 216 + 53 1 249 246 58 2 253 250 80 3 258

Cryptoday 2011 – p. 50/52

slide-94
SLIDE 94

Summary

The research of hash functions in the last seven years received a lot of attention but we still do not have a recommended solution. SHA-2 is safer than SHA-1 but it suffers from Merkle-Damgaård weaknesses. The announcement on SHA-3 recommended algorithm is planned for 2012. Though the threats of using a broken hash function are clear and real, broken hash functions are still in use.

Cryptoday 2011 – p. 51/52

slide-95
SLIDE 95

According to the Israeli low, SHA-1 is not allowed anymore. RIPEMD-160 may be used till the end of 2012. SHA-2 and Whirlpool are allowed with no limitations. Low and Reality: According to the Ministry of Justice “COMSIGN ltd” is the only authorized CA in Israel. However, their certificate is signed by PKCS #1 SHA-1 With RSA Encryption (the signer is veriSign). For the fingerprint they use MD5 and SHA-1...

Cryptoday 2011 – p. 52/52