Cryptanalysis of the 10-Round Hash and Full Compression Function of - - PowerPoint PPT Presentation

cryptanalysis of the 10 round hash and full compression
SMART_READER_LITE
LIVE PREVIEW

Cryptanalysis of the 10-Round Hash and Full Compression Function of - - PowerPoint PPT Presentation

Cryptanalysis of the 10-Round Hash and Full Compression Function of SHAvite-3-512 Praveen Gauravaram 1 , Ga eten Leurent 2 , Florian Mendel 3 , Mar a Naya-Plasencia 4 , Thomas Peyrin 5 , Christian Rechberger 6 , Martin Schl affer 3 , 1


slide-1
SLIDE 1

Cryptanalysis of the 10-Round Hash and Full Compression Function of SHAvite-3-512

Praveen Gauravaram1, Ga¨ eten Leurent2, Florian Mendel3, Mar´ ıa Naya-Plasencia4, Thomas Peyrin5, Christian Rechberger6, Martin Schl¨ affer3,

1Department of Mathematics, DTU, Denmark, 2ENS, France, 3IAIK, TU Graz, Austria, 4FHNW Windisch, Switzerland, 5Ingenico, France, 6ESAT/COSIC, K.U.Leuven and IBBT, Belgium

Africacrypt 2010

(initially discussed at ECRYPT2 Hash3 workshop) Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 1 / 31

slide-2
SLIDE 2

Outline

1

Motivation

2

SHAvite-3

3

Basic Attack Strategy

4

Attack on Compression Function

5

Attack on Hash Function

6

Conclusion

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 2 / 31

slide-3
SLIDE 3

Overview

1

Motivation

2

SHAvite-3

3

Basic Attack Strategy

4

Attack on Compression Function

5

Attack on Hash Function

6

Conclusion

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 3 / 31

slide-4
SLIDE 4

Cryptographic Hash Function

m h h(m)

∗ n

Hash function h maps arbitrary length input m to n-bit output h(m) Collision Resistance

find m, m′ with m = m′ and h(m) = h(m′) birthday attack applies (freedom to choose h(m)) generic complexity: 2n/2

Second-Preimage Resistance

given m, h(m) find m′ with m = m′ and h(m) = h(m′) generic complexity: 2n

Preimage Resistance

given h(m) find m generic complexity: 2n

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 4 / 31

slide-5
SLIDE 5

Hash Function Cryptanalysis

Recent improvements in hash functions cryptanalysis

last decade: major weaknesses in many hash functions especially in MD-family of hash functions NIST standard SHA-1 broken

NIST SHA-3 competition [Nat07] (2008-2012)

find a successor of SHA-1 and SHA-2 similar as AES competition (2000)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 5 / 31

slide-6
SLIDE 6

SHA-3 Candidates

64 submissions to NIST call (October 2008) 51 round 1 candidates (December 2008)

many broken, too slow, not chosen, ...

14 round 2 candidates (August 2009)

chosen by NIST, tweaks allowed

5 finalists (fall 2010)

to focus analysis

choose winner in 2011

standardize SHA-3 in 2012

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 6 / 31

slide-7
SLIDE 7

How to Compare Attacks on SHA-3 Candidates?

Attacks on Building Blocks very different requirements for different designs

building blocks often not ideal sponge: trivial “compression function” collisions/preimages distinguishers on building blocks?

when is an attack interesting?

NIST: not anticipated by the designers if it extends to the hash function

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 7 / 31

slide-8
SLIDE 8

How to Compare Attacks on SHA-3 Candidates?

Attacks on Building Blocks very different requirements for different designs

building blocks often not ideal sponge: trivial “compression function” collisions/preimages distinguishers on building blocks?

when is an attack interesting?

NIST: not anticipated by the designers if it extends to the hash function

Attacks on Hash Function same requirements for all candidates a lot easier to compare

attacks on reduced hash function? still hard to compare different security parameter(s)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 7 / 31

slide-9
SLIDE 9

How to Compare Attacks on SHA-3 Candidates?

Attacks on Building Blocks very different requirements for different designs

building blocks often not ideal sponge: trivial “compression function” collisions/preimages distinguishers on building blocks?

when is an attack interesting?

NIST: not anticipated by the designers if it extends to the hash function

Attacks on Hash Function same requirements for all candidates a lot easier to compare

attacks on reduced hash function? still hard to compare different security parameter(s) Collection of SHA-3 Attacks: http://ehash.iaik.tugraz.at/wiki/The SHA-3 Zoo

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 7 / 31

slide-10
SLIDE 10

Overview

1

Motivation

2

SHAvite-3

3

Basic Attack Strategy

4

Attack on Compression Function

5

Attack on Hash Function

6

Conclusion

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 8 / 31

slide-11
SLIDE 11

Description of SHAvite-3-512

IV f

cnt salt

M1

n

f

cnt salt

M2

n

f

cnt salt

M3

n cnt salt

f Mt H(m)

n

Designed by Orr Dunkelman and Eli Biham [BD08]

Round 2 candidate tweaked

Iterated hash function

single-pipe construction Haifa design principle

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 9 / 31

slide-12
SLIDE 12

SHAvite-3-512 Compression Function

state update key schedule hi−1 hi Mi

cnt salt

block cipher in Davies-Meyer mode state update:

14-round Feistel network (F-function: 4 AES rounds)

key schedule:

parallel AES rounds with linear mixing layers

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 10 / 31

slide-13
SLIDE 13

State Update

Ai Bi Ci Di

Fi RKi F ′

i

RK ′

i

Ai+1 Bi+1 Ci+1 Di+1 Fi(x) = AES(AES(AES(AES(x ⊕ k0

0,i) ⊕ k1 0,i) ⊕ k2 0,i) ⊕ k3 0,i)

AES(x) = MixColumns(ShiftRows(SubBytes(x))) RKi = (k0

0,i, k1 0,i, k2 0,i, k3 0,i)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 11 / 31

slide-14
SLIDE 14

Key Schedule

k0

0,8

k1

0,8

k2

0,8

k3

0,8

k0

1,8

k1

1,8

k2

1,8

k3

1,8

AES (s0, s1, s2, s3) AES (s4, s5, s6, s7) AES (s8, s9, s10, s11) AES (s12, s13, s14, s15) AES (s0, s1, s2, s3) AES (s4, s5, s6, s7) AES (s8, s9, s10, s11) AES (s12, s13, s14, s15) cnt[2] cnt[3] cnt[0] cnt[1]

k0

0,9

k1

0,9

k2

0,9

k3

0,9

k0

1,9

k1

1,9

k2

1,9

k3

1,9

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 12 / 31

slide-15
SLIDE 15

Key Schedule

k0

0,9

k1

0,9

k2

0,9

k3

0,9

k0

1,9

k1

1,9

k2

1,9

k3

1,9

k0

0,10

k1

0,10

k2

0,10

k3

0,10

k0

1,10

k1

1,10

k2

1,10

k3

1,10

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 12 / 31

slide-16
SLIDE 16

Key Schedule (schematic)

1024 bit (8 × AES) M = RK0 RK ′ AES(ki,j ⊕ salt) Linear Layer 1 RK1 RK ′

1

Linear Layer 2 RK2 RK ′

2

AES(ki,j ⊕ salt) Linear Layer 1 RK3 RK ′

3

Linear Layer 2 RK4 RK ′

4

AES(ki,j ⊕ salt) Linear Layer 1 RK5 RK ′

5

Linear Layer 2 RK6 RK ′

6

c3c2c1c0 c2c3c0c1 c1c0c3c2

Round 1: plain counter words added: cnt = c0c1c2c3 Round 2: inverted and shuffled counter words added

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 13 / 31

slide-17
SLIDE 17

Overview

1

Motivation

2

SHAvite-3

3

Basic Attack Strategy

4

Attack on Compression Function

5

Attack on Hash Function

6

Conclusion

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 14 / 31

slide-18
SLIDE 18

Cancellation Property [BDLF09]

Ai Bi Ci Di Ai+1 Bi+1 Ci+1 Di+1 Ai+2 Bi+2 Ci+2 Di+2 Ai+3 Bi+3 Ci+3 Di+3 Ai+4 Bi+4 Ci+4 Di+4 Fi RKi F ′

i

RK ′

i

Fi+1 RKi+1 F ′

i+1

RK ′

i+1

Fi+2 RKi+2 F ′

i+2

RK ′

i+2

Fi+3 RKi+3 F ′

i+3

RK ′

i+3

Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 15 / 31

slide-19
SLIDE 19

Cancellation Property [BDLF09]

Ai Bi Ci Di Ai+1 Bi+1 Ci+1 Di+1 Ai+2 Bi+2 Ci+2 Di+2 Ai+3 Bi+3 Ci+3 Di+3 Ai+4 Bi+4 Ci+4 Di+4 Fi RKi F ′

i

RK ′

i

Fi+1 RKi+1 F ′

i+1

RK ′

i+1

Fi+2 RKi+2 F ′

i+2

RK ′

i+2

Fi+3 RKi+3 F ′

i+3

RK ′

i+3

Bi Bi Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

idea: keep Bi unchanged

Bi+4 = Bi

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 15 / 31

slide-20
SLIDE 20

Cancellation Property [BDLF09]

Ai Bi Ci Di Ai+1 Bi+1 Ci+1 Di+1 Ai+2 Bi+2 Ci+2 Di+2 Ai+3 Bi+3 Ci+3 Di+3 Ai+4 Bi+4 Ci+4 Di+4 Fi RKi F ′

i

RK ′

i

Fi+1 RKi+1 F ′

i+1

RK ′

i+1

Fi+2 RKi+2 F ′

i+2

RK ′

i+2

Fi+3 RKi+3 F ′

i+3

RK ′

i+3

Bi Bi Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

idea: keep Bi unchanged

Bi+4 = Bi

when does this happen?

Fi+3(Bi+3) = F ′

i+1(Di+1)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 15 / 31

slide-21
SLIDE 21

Cancellation Property [BDLF09]

Ai Bi Ci Di Ai+1 Bi+1 Ci+1 Di+1 Ai+2 Bi+2 Ci+2 Di+2 Ai+3 Bi+3 Ci+3 Di+3 Ai+4 Bi+4 Ci+4 Di+4 Fi RKi F ′

i

RK ′

i

Fi+1 RKi+1 F ′

i+1

RK ′

i+1

Fi+2 RKi+2 F ′

i+2

RK ′

i+2

Fi+3 RKi+3 F ′

i+3

RK ′

i+3

Bi Bi Di+1 Di+1 Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

Bi ⊕ F ′

i+1(Di+1)

idea: keep Bi unchanged

Bi+4 = Bi

when does this happen?

Fi+3(Bi+3) = F ′

i+1(Di+1)

  • r more specific:

Fi+2(Bi+2) = 0 RKi+3 = RK ′

i+1

second case:

two 128-bit conditions but easier to fulfill conditions can be “interleaved”

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 15 / 31

slide-22
SLIDE 22

Interleaving

interleave cancellation property with same value

Z = Bi = Bi+4 Z = Bi+2 = Bi+4

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 16 / 31

slide-23
SLIDE 23

Interleaving

i Ai Bi Ci Di conditions 3 ? Z ? ? 4 ? ? Z D4 5 D4 Z ? Z + F ′

4(D4)

F5(Z) = 0 6 Z + F ′

4(D4)

D4 Z D6 RK6 = RK ′

4

7 D6 Z D4 Z + F ′

6(D6)

RK7 = RK5 8 Z + F ′

6(D6)

D6 Z D8 RK8 = RK ′

6

9 D8 Z D6 Z + F ′

8(D8)

RK9 = RK5 10 Z + F ′

8(D8)

D8 Z D10 RK10 = RK ′

8

11 D10 Z D8 Z + F ′

10(D10)

RK11 = RK7 interleave cancellation property with same value

Z = Bi = Bi+4 Z = Bi+2 = Bi+4

conditions on state fulfill each other

we can choose Z = F −1

5

(0)

⇒ we get conditions only on keys (message expansion)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 16 / 31

slide-24
SLIDE 24

Weak Subkeys for SHAvite-3-512 (Round 1)

1024 bit (8 × AES) M = RK0 = 0 RK ′

0 = 0

AES(ki,j ⊕ salt) Linear Layer 1 RK1 = 0 RK ′

1 = 0

Linear Layer 2 RK2 = 0 RK ′

2 = 0

AES(ki,j ⊕ salt) Linear Layer 1 RK3 = 0 RK ′

3 = 0

Linear Layer 2 RK4 = 0 RK ′

4 = 0

AES(ki,j ⊕ salt) Linear Layer 1 RK5 = 0 RK ′

5 = 0

Linear Layer 2 RK6 = 0 RK ′

6 = 0

cnt = 0 cnt = 0 cnt = 0

construct all-zero subkeys [Pey09]

take the zero counter cnt = 0 choose salt such that 0 = AES(0 ⊕ salt) salt = 0x525252...52

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 17 / 31

slide-25
SLIDE 25

Weak Subkeys for SHAvite-3-512 (Round 2)

1024 bit (8 × AES) M = RK0 RK ′ AES(ki,j ⊕ salt) Linear Layer 1 RK1 RK ′

1

Linear Layer 2 RK2 RK ′

2

AES(ki,j ⊕ salt) Linear Layer 1 RK3 RK ′

3

Linear Layer 2 RK4 RK ′

4

AES(ki,j ⊕ salt) Linear Layer 1 RK5 RK ′

5

Linear Layer 2 RK6 RK ′

6

c3c2c1c0 c2c3c0c1 c1c1c3c2

tweak for SHAvite-3-512 (Round 2):

some counter words are inverted all-zero subkey not possible anymore

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 18 / 31

slide-26
SLIDE 26

Weak Subkeys for SHAvite-3-512 (Round 2)

1024 bit (8 × AES) M = RK0 RK ′ AES(ki,j ⊕ salt) Linear Layer 1 RK1 RK ′

1

Linear Layer 2 RK2 RK ′

2

AES(ki,j ⊕ salt) Linear Layer 1 RK3 RK ′

3

Linear Layer 2 RK4 RK ′

4

AES(ki,j ⊕ salt) Linear Layer 1 RK5 RK ′

5

Linear Layer 2 RK6 RK ′

6

c3c2c1c0 c2c3c0c1 c1c1c3c2

tweak for SHAvite-3-512 (Round 2):

some counter words are inverted all-zero subkey not possible anymore

choose c2c3c0c1 = 0 (valid counter!)

many round keys get zero

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 18 / 31

slide-27
SLIDE 27

Weak Subkeys for SHAvite-3-512 (Round 2)

i RKi RK ′

i

r k0

0,i

k1

0,i

k2

0,i

k3

0,i

k0

1,i

k1

1,i

k2

1,i

k3

1,i

? ? ? ? ? ? ? ? M 1 ?∗ ? ? ? ? ? ? 1 2 ? ? ? ? 3 ? ? ? 2 4 ? 5 0∗ 3 6 7 4 8 9 0∗ 5 10 11 6 12 13 ?∗ ? 7

key conditions are fulfilled for Z = B3 = B5 = · · · = B13

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 19 / 31

slide-28
SLIDE 28

Weak Subkeys for SHAvite-3-512 (Round 2)

i RKi RK ′

i

r k0

0,i

k1

0,i

k2

0,i

k3

0,i

k0

1,i

k1

1,i

k2

1,i

k3

1,i

? ? ? ? ? ? ? ? M 1 ?∗ ? ? ? ? ? ? 1 2 ? ? ? ? 3 ? ? ? 2 4 ? 5 0∗ 3 6 7 4 8 9 0∗ 5 10 11 6 12 13 ?∗ ? 7

key conditions are fulfilled for Z = B3 = B5 = · · · = B13 in fact we can find 2224 weak salts

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 19 / 31

slide-29
SLIDE 29

Overview

1

Motivation

2

SHAvite-3

3

Basic Attack Strategy

4

Attack on Compression Function

5

Attack on Hash Function

6

Conclusion

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 20 / 31

slide-30
SLIDE 30

Compression Function

state update key schedule hi−1 hi = (H0, H1, H2, H3) Mi

cnt salt 1

partial preimage attack (of 128 bits):

given H2, compute Mi, cnt, salt, hi

2

collision or preimage only on H0, H1, H3

complexity 2192 and 2384 (|hi| = 512)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 21 / 31

slide-31
SLIDE 31

The 14-Round Characteristic

i Ai Bi Ci Di conditions ? ? ? ? 1 ? ? ? ? 2 ? X ? ? 3 ? Z X ? 4 ? Y Z D4 5 D4 Z Y Z + F ′

4(D4)

F5(Z) = 0 6 Z + F ′

4(D4)

D4 Z D6 RK6 = RK ′

4

7 D6 Z D4 Z + F ′

6(D6)

RK7 = RK5 8 Z + F ′

6(D6)

D6 Z D8 RK8 = RK ′

6

9 D8 Z D6 Z + F ′

8(D8)

RK9 = RK7 10 Z + F ′

8(D8)

D8 Z D10 RK10 = RK ′

8

11 D10 Z D8 Z + F ′

10(D10)

RK11 = RK9 12 Z + F ′

10(D10)

D10 Z ? RK12 = RK ′

10

13 ? Z D10 ? RK13 = RK11 14 ? ? Z ?

choose (M, cnt, salt) according to key conditions compute Z in round 5 we know that we get C14 = Z missing: compute X, Y for given H2 = C0 ⊕ C14

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 22 / 31

slide-32
SLIDE 32

Partial Preimage for 14-Rounds

i Ai Bi Ci Di conditions ? ? ? ? 1 ? ? ? ? 2 ? X ? ? 3 ? Z X ? 4 ? Y Z D4 5 D4 Z Y Z + F ′

4(D4)

F5(Z) = 0 6 Z + F ′

4(D4)

D4 Z D6 RK6 = RK ′

4

7 D6 Z D4 Z + F ′

6(D6)

RK7 = RK5 8 Z + F ′

6(D6)

D6 Z D8 RK8 = RK ′

6

9 D8 Z D6 Z + F ′

8(D8)

RK9 = RK7 10 Z + F ′

8(D8)

D8 Z D10 RK10 = RK ′

8

11 D10 Z D8 Z + F ′

10(D10)

RK11 = RK9 12 Z + F ′

10(D10)

D10 Z ? RK12 = RK ′

10

13 ? Z D10 ? RK13 = RK11 14 ? ? Z ?

write H2 = C0 ⊕ C14 as a function of X, Y, Z: H2 = F2(X) + F ′

0(X + F1(Z + F4(Y) + F ′ 2(Y + F3(Z))))

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 23 / 31

slide-33
SLIDE 33

Partial Preimage for 14-Rounds

i Ai Bi Ci Di conditions ? ? ? ? 1 ? ? ? ? 2 ? X ? ? 3 ? Z X ? 4 ? Y Z D4 5 D4 Z Y Z + F ′

4(D4)

F5(Z) = 0 6 Z + F ′

4(D4)

D4 Z D6 RK6 = RK ′

4

7 D6 Z D4 Z + F ′

6(D6)

RK7 = RK5 8 Z + F ′

6(D6)

D6 Z D8 RK8 = RK ′

6

9 D8 Z D6 Z + F ′

8(D8)

RK9 = RK7 10 Z + F ′

8(D8)

D8 Z D10 RK10 = RK ′

8

11 D10 Z D8 Z + F ′

10(D10)

RK11 = RK9 12 Z + F ′

10(D10)

D10 Z ? RK12 = RK ′

10

13 ? Z D10 ? RK13 = RK11 14 ? ? Z ?

write H2 = C0 ⊕ C14 as a function of X, Y, Z: H2 = F2(X) + F ′

0(X + F1(Z + F4(Y) + F ′ 2(Y + F3(Z))))

solve for X, Y using birthday effect (264): F ′−1 (H2 + F2(X)) + X = F1(Z + F4(Y) + F ′

2(Y + F3(Z)))

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 23 / 31

slide-34
SLIDE 34

Results for the Full Compression Function

state update key schedule hi−1 hi Mi

cnt salt

collision attack:

complexity 2192 and 2128 memory

preimage attacks:

complexity 2384 and 2128 memory complexity 2448 without memory with chosen salt and chosen counter

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 24 / 31

slide-35
SLIDE 35

Overview

1

Motivation

2

SHAvite-3

3

Basic Attack Strategy

4

Attack on Compression Function

5

Attack on Hash Function

6

Conclusion

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 25 / 31

slide-36
SLIDE 36

Hash Function

IV f

cnt salt

M1

n

f

cnt salt

M2

n

H(m)

n

Can we extend the attack on the compression function to an attack on the hash function? in general: yes

if the design is single-pipe, and we fix one output word: do a meet-in-the-middle attack on 512 bit chaining value (two blocks needed)

in this case: no

because salt is different for each 2nd block

⇒ extend the attack of [BDLF10] by one round

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 26 / 31

slide-37
SLIDE 37

Characteristic for 10 Rounds

i Ai Bi Ci Di condition ? ? ? ? 1 ? ? ? ? 2 ? X ? ? 3 ? Z7 X ? 4 ? Y Z7 D4 5 D4 Z5 Y Z7 + F ′

4(D4)

6 Z7 + F ′

4(D4)

D4 + F5(Z5) Z5 D6 F6(D4 + F5(Z5)) = F ′

4(D4)

7 D6 Z7 ? Z5 + F ′

6(D6)

8 Z5 + F ′

6(D6)

D6 + F7(Z7) Z7 ? F8(D6 + F7(Z7)) = F ′

6(D6)

9 ? Z5 ? ? 10 ? ? Z5 ?

fulfill conditions by carefully choosing subkey values [BDLF10]:

(k 1

0,4, k 2 0,4, k3 0,4) = (k1 1,6, k 2 1,6, k 3 1,6) and k0 0,4 + k 0 1,6 = F5(Z5)

(k 1

0,6, k 2 0,6, k3 0,6) = (k 1 1,8, k 2 1,8, k 3 1,8) and k0 0,6 + k 0 1,8 = F7(Z7)

compute H2 = C0 ⊕ C14 as a function of X, Y, Z5, Z7

using birthday effect again (264)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 27 / 31

slide-38
SLIDE 38

Hash Function Attack on 10 Rounds

IV f

cnt salt

M1

n

f

cnt salt

M2

n

f

cnt salt

M3

n

H(m)

n Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 28 / 31

slide-39
SLIDE 39

Hash Function Attack on 10 Rounds

IV f

cnt salt

M1

n

f

cnt salt

M2

n

f

cnt salt

M3

n

M2 H(m)

n 1

find a message (M2) according to key conditions (2224)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 28 / 31

slide-40
SLIDE 40

Hash Function Attack on 10 Rounds

IV f

cnt salt

M1

n

f

cnt salt

M2

n

f

cnt salt

M3

n

M2

H2

H(m)

n 1

find a message (M2) according to key conditions (2224)

2

find all 2128 partial preimages (solutions for X, Y)

using cycle finding algorithm total complexity: 2128+64 = 2192

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 28 / 31

slide-41
SLIDE 41

Hash Function Attack on 10 Rounds

IV f

cnt salt

M1

n

f

cnt salt

M2

n

f

cnt salt

M3

n

M2

H2

H(m)

n 1

find a message (M2) according to key conditions (2224)

2

find all 2128 partial preimages (solutions for X, Y)

using cycle finding algorithm total complexity: 2128+64 = 2192

3

to find a preimage for the compression function

repeat previous steps 2256 times total complexity: 2224+256 = 2480

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 28 / 31

slide-42
SLIDE 42

Hash Function Attack on 10 Rounds

IV f

cnt salt

M1

n

f

cnt salt

M2

n

f

cnt salt

M3

n

M2

H2

H(m)

n 1

find a message (M2) according to key conditions (2224)

2

find all 2128 partial preimages (solutions for X, Y)

using cycle finding algorithm total complexity: 2128+64 = 2192

3

to find a preimage for the compression function

repeat previous steps 2256 times total complexity: 2224+256 = 2480

4

construct a second-preimage for the hash function

using unbalanced meet-in-the-middle attack complexity: 2497 and 216 memory

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 28 / 31

slide-43
SLIDE 43

Overview

1

Motivation

2

SHAvite-3

3

Basic Attack Strategy

4

Attack on Compression Function

5

Attack on Hash Function

6

Conclusion

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 29 / 31

slide-44
SLIDE 44

Conclusion

Attacks on SHAvite-3-512:

Full Compression Function 10/14 Rounds for the Hash Function

Why does it work?

salt, cnt inputs: weaker compression functions (harder to extend attacks to hash function) regular key schedule Feistel: we can keep properties for many rounds single-pipe design

Security margin already rather small Attack did not use properties of AES yet

(even works for ideal permutation instead of AES rounds)

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 30 / 31

slide-45
SLIDE 45

References I

Eli Biham and Orr Dunkelman. The SHAvite-3 Hash Function. Submission to NIST, 2008. Available online at http://ehash.iaik.tugraz.at/uploads/f/f5/Shavite.pdf. Charles Bouillaguet, Orr Dunkelman, Ga¨ etan Leurent, and Pierre-Alain Fouque. Attacks on Hash Functions based on Generalized Feistel - Application to Reduced-Round Lesamnta and SHAvite-3512. Cryptology ePrint Archive, Report 2009/634, 2009. http://eprint.iacr.org/. Charles Bouillaguet, Orr Dunkelman, Ga¨ etan Leurent, and Pierre-Alain Fouque. Another Look at Complementation Properties. In Seokhie Hong and Tetsu Iwata, editors, FSE, LNCS. Springer, 2010. to appear. National Institute of Standards and Technology. Announcing Request for Candidate Algorithm Nominations for a New Cryptographic Hash Algorithm (SHA-3) Family. Federal Register, 27(212):62212–62220, November 2007. Available: http://csrc.nist.gov/groups/ST/hash/documents/FR_Notice_Nov07.pdf. Thomas Peyrin. Chosen-salt, chosen-counter, pseudo-collision on SHAvite-3 compression function, 2009. Available online: http://ehash.iaik.tugraz.at/uploads/e/ea/Peyrin-SHAvite-3.txt.

Martin Schl¨ affer Africacrypt 2010 Cryptanalysis of SHAvite-3-512 31 / 31