Hash functions and Cayley graphs: The end of the story ? Christophe - - PowerPoint PPT Presentation

hash functions and cayley graphs the end of the story
SMART_READER_LITE
LIVE PREVIEW

Hash functions and Cayley graphs: The end of the story ? Christophe - - PowerPoint PPT Presentation

Hash functions and Cayley graphs: The end of the story ? Christophe Petit UCL Crypto Group Ch. Petit - Paris VI - Nov 2010 1 Microelectronics Laboratory Hash functions H : { 0 , 1 } { 0 , 1 } n UCL Crypto Group Ch. Petit - Paris VI


slide-1
SLIDE 1

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

1

Hash functions and Cayley graphs: The end of the story ?

Christophe Petit

slide-2
SLIDE 2

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

2

Hash functions

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

slide-3
SLIDE 3

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

3

Applications

◮ Message authentication

codes

◮ Digital signatures ◮ Password storage ◮ Pseudorandom number

generation

◮ Entropy extraction ◮ Key derivation

techniques

◮ ... ◮ ...

slide-4
SLIDE 4

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

4

Properties

◮ Collision resistance :

hard to find m, m′ such that H(m) = H(m′)

◮ Preimage resistance :

given h, hard to find m such that H(m) = h

◮ Second preimage resistance :

given m, hard to find m′ such that H(m′) = h

slide-5
SLIDE 5

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

5

Properties

◮ “Pseudo-randomness” ◮ ...

slide-6
SLIDE 6

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

6

Constructions

“Classical” hash function Hash function based on a Cayley graph

slide-7
SLIDE 7

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

7

Outline

Introduction Cayley hash functions Security : state of the art The end of the story ? Conclusion

slide-8
SLIDE 8

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

8

Outline

Introduction Cayley hash functions Security : state of the art The end of the story ? Conclusion

slide-9
SLIDE 9

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

9

Hash functions from Cayley graphs

◮ Parameters G a group, and S = {s0, ..., sk−1} ⊂ G ◮ Write m = m1m2...mN with mi ∈ {0, ..., k − 1}

Define H(m) := sm1sm2...smN

slide-10
SLIDE 10

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

10

Hash functions from Cayley graphs

◮ Computation ∼ walk in the Cayley graph ◮ Example : G = (Z/8Z, +), S = {1, 2}

1 2 3 4 5 6 7 m = 101 H(m) = 0 + 1 + 2 + 1 = 4 4

slide-11
SLIDE 11

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

11

Example : Tillich-Z´ emor hash function

◮ p ∈ F2[X] irreducible of degree n

K = F2[X]/(p(X)) ≈ F2n

◮ G = SL(2, K)

S = {A0 = ( X 1

1 0 ) , A1 = ( X X+1 1 1 )}

◮ H(m1m2...mN) := Am1Am2...AmN mod p(X)

slide-12
SLIDE 12

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

12

Hard ( ?) problems

◮ Representation problem :

Given G and S = {s0, ..., sk−1} ⊂ G, find a short product smi = 1

◮ Balance problem :

Given G and S = {s0, ..., sk−1} ⊂ G, find two short products smi = sm′

i ◮ Factorization problem :

Given G, g ∈ G and S = {s0, ..., sk−1} ⊂ G, find a short product smi = g

slide-13
SLIDE 13

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

13

Babai’s conjecture [BS92]

For any non-Abelian finite simple group G, there is a constant c such that for all generator sets S, the diameter of the Cayley graph arising from G and S is smaller than (log |G|)c.

◮ Well-studied conjecture, limited results so far ◮ Very few parameters have constructive proofs ◮ Solving the factorization problem for G and S

∼ constructive proof of Babai’s conjecture for G and S

slide-14
SLIDE 14

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

14

Cayley hash functions : properties

◮ Elegant, simple design ◮ Security properties ∼ mathematical problems ◮ Collisions ∼ balance problem ◮ Preimages ∼ factorization problem

∼ constructive proof of Babai’s conjecture

◮ Output distribution ∼ expander properties ◮ Parallelism H(m||m′) = H(m)H(m′) ◮ Good efficiency, at least for matrix groups ◮ Not a random oracle ! but additional heuristics may help ◮ Issue : find good groups G and generator sets S

slide-15
SLIDE 15

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

15

A few proposals

Z´ emor [Z91] p prime G = SL(2, Fp) S = {( 1 1

0 1 ) , ( 1 0 1 1 )}

Tillich-Z´ emor [TZ94] p ∈ F2[X] irreducible G = SL(2, F2n) S = {( X 1

1 0 ) , ( X X+1 1 1 )}

LPS [CGL09] p prime G = PSL(2, Fp) S as in Lubotsky-Philips-Sarnak’s Ramanujan graphs Morgenstern [PLQ07] p ∈ F2[X] irreducible G = PSL(2, F2n) S as in Morgenstern’s Ramanujan graphs

slide-16
SLIDE 16

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

16

Outline

Introduction Cayley hash functions Security : state of the art The end of the story ? Conclusion

slide-17
SLIDE 17

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

17

Many angles of attacks

Exhaustive search Birthday attacks Multicollisions Meet-in-the-middle Trapdoor attacks Malleability Subgroup attacks Lifting attacks Euclidean algorithm Babai’s conjecture

slide-18
SLIDE 18

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

18

Subgroup attacks

◮ Assume G = G0 ⊃ G1 ⊃ G2... ⊃ GN = {1}

slide-19
SLIDE 19

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

19

Subgroup attacks

◮ Assume G = G0 ⊃ G1 ⊃ G2... ⊃ GN = {1}

and |Gi|/|Gi+1| “small”

◮ Preimage of 1 ◮ Random products of s0 and s1

to get two elements s′

0 and s′ 1 of G1

◮ Random products of s′

0 and s′ 1

to get two elements s′′

0 and s′′ 1 of G2

◮ ... ◮ = second preimage attack ◮ H(m) = 1 ⇒ H(m′||m) = H(m′)H(m) = H(m′)

slide-20
SLIDE 20

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

20

Subgroup attacks

◮ Assume G = G0 ⊃ G1 ⊃ G2... ⊃ GN = {1} ◮ More generally, the attack works

if “going from Gi to Gi+1 is easy”

  • Ex. : if Gi/Gi+1 is Abelian and DLP easy in it

◮ [SGGB00] : subgroup attack on Tillich-Z´

emor when n is composite

◮ [PQTZ09] : generic subgroup attacks on Tillich-Z´

emor and variants that “remove easy quotients”

slide-21
SLIDE 21

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

21

Trapdoor attacks

◮ Choose the parameters

such that you know a collision

◮ [SGGB00] against

Tillich-Z´ emor

◮ Can be prevented easily ◮ Sometimes useful ! [CP10]

slide-22
SLIDE 22

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

22

Lifting attacks

◮ Very succesful approach ! ◮ Principle : lift the representation problem to some ring

where it is easier to solve

◮ Define the lifted set appropriately ◮ Find a way to lift elements ◮ Solve the problems in the lifted set

slide-23
SLIDE 23

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

23

Lifting attacks : Z´ emor [TZ94]

◮ Z´

emor G = SL(2, Fp), S = {( 1 1

0 1 ) , ( 1 0 1 1 )}

◮ Given ( a b

c d ) ∈ SL(2, Fp)

  • 1. Lifting : Find

A B

C D

  • ∈ SL(2, Z+) such that

A B

C D

  • =

a b

c d

  • mod p
  • 2. Solving : Factor

A B

C D

  • as a product of ( 1 1

0 1 ) and ( 1 0 1 1 )

with Euclidean algorithm :

If A ≥ B, apply Euclidean algorithm to (A, B) else apply Euclidean algorithm to (C, D)

Indeed :

◮ ai−1 = qiai + ai+1

⇔ ai−2

ai−1

  • =

1 qi−1

1

1

qi 1

  • ( ai

ai+1 )

◮ 1 q

0 1

  • = ( 1 1

0 1 )q and

1 0

q 1

  • = ( 1 0

1 1 )q

slide-24
SLIDE 24

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

24

Lifting attacks : LPS

◮ LPS : G = PSL(2, Fp) and S as in LPS

Ramanujan graphs

◮ Lift from PSL(2, Fp) to SL(2, Z[i])

Here lifts of generators SL(2, Z[i]) Very small subset, but well structured [LPS88]

◮ 2nd preimages [TZ08]

∼ finding λ, w, x, y, z, e such that (λ + wp)2 + 4(xp)2 + 4(yp)2 + 4(zp)2 = ℓe

slide-25
SLIDE 25

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

25

Lifting and subgroup attacks together

◮ Preimages against LPS [PLQ08]

∼ finding λ, w, x, y, z, e such that

(Aλ + wp)2 + (Bλ + xp)2 + (Cλ + yp)2 + (Dλ + zp)2 = ℓ2k

Apparently hard but instead we can

◮ Lift diagonal matrices

(Aλ + wp)2 + (Bλ + xp)2 + (yp)2 + (zp)2 = ℓ2k

◮ Combine diagonal matrices and generators ◮ Similar attacks for Morgenstern [PLQ08]

slide-26
SLIDE 26

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

26

Lifting attack for Tillich-Z´ emor [GIMS09]

◮ Tillich-Z´

emor G = SL(2, F2n), S = {( X 1

1 0 ) , ( X X+1 1 1 )}

  • 1. Change generators S′ = {( X 1

1 0 ) , ( X+1 1 1 0 )}

◮ a b

c d

  • ∈ S′ ⇒ when applying Euclidean algorithm to

(a, b), all the quotients are X or X + 1

  • 2. Apply [MS87] to p(X) to get m = m1...mn such that

H(m) = p b

c d

  • = ( 0 b

c d ) mod p(X)

  • 3. Build the palindrome ˜

m = mn...m2 ¯ m1 ¯ m1m2...mn, then A′

0H( ˜

m)A′

0 = A′ 1H( ˜

m)A′

1.

slide-27
SLIDE 27

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

27

Preimages for Tillich-Z´ emor [PQ10]

◮ Preimage algorithm for TZ given some precomputation ◮ A B

C D

  • = ( 1 0

α 1 )

X 1

1 0

1 β

0 1

X 1

1 0

3 1 0

γ 1

  • 1

αi 1

  • = 1 0

αi 1

  • ◮ H( ˜

m0) =

  • 1

X+b2

i 1

  • if H(m) =
  • 0 bi

ci di

  • ◮ Precomputing algorithms
  • 1. Obtain new matrices
  • 0 bi

ci di

  • recursively

⇒ deterministic algorithm ; full proof when n is prime

  • 2. Apply (an extension of) [MS87] to ai = pqi
slide-28
SLIDE 28

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

28

Progress on Babai’s conjecture

For any non-Abelian finite simple group G, there is a constant c such that for all generator sets S, the diameter of the Cayley graph arising from G and S is smaller than (log |G|)c.

◮ Non constructive results ◮ Conjecture true for SL(2, Fp) and SL(3, Fp) [H05,H10] ◮ True for almost any pair of generators in the symmetric

group [BH05]

slide-29
SLIDE 29

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

29

Progress on Babai’s conjecture

◮ Constructive results ◮ Symmetric group : ∃ 2 generators such that the

diameter is O(n log n) [BHKLS90]

◮ SL(2, K) : ∃ 2 or 3 generators such that the diameter is

O(log |K|) [BHKLS90]

◮ SL(m, Fp) with m > 2 : ∃ 2 generators such that the

diameter is O(m2 log p) [KR05]

◮ All these results (and others) are optimal, but they use

particular generators

slide-30
SLIDE 30

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

30

Outline

Introduction Cayley hash functions Security : state of the art The end of the story ? Conclusion

slide-31
SLIDE 31

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

31

Hard ( ?) problems

◮ Representation problem : (second preimages)

Given G and S = {s0, ..., sk−1} ⊂ G, find a short product smi = 1

◮ Balance problem : (collisions)

Given G and S = {s0, ..., sk−1} ⊂ G, find two short products smi = sm′

i ◮ Factorization problem : (preimages)

Given G, g ∈ G and S = {s0, ..., sk−1} ⊂ G, find a short product smi = g

slide-32
SLIDE 32

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

32

The end of the story ?

◮ Collision & preimages for Z´

emor, Tillich-Z´ emor, LPS, Morgenstern

◮ Other insecure instances from research on Babai’s

conjecture

◮ The end of the story ? ◮ No ! (not yet ?) ◮ For most groups/ generators, we do not know if the

problems can be solved

slide-33
SLIDE 33

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

33

The end of the story ?

◮ Choose G to prevent subgroup attacks ◮ Choose S to prevent lifting attacks ? ◮ Avoid “small” parameters and symmetry ◮ Next challenge : SL(2, F2n)

slide-34
SLIDE 34

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

34

Rubik’s for cryptanalysts

Let A, B generating SL(2, F2n). Let M ∈ SL(2, F2n). How to write I or M as a short product of A and B ?

  • 1. Change the generators s.t.

solution for A′, B′ ⇒ solution for A′, B′

  • 2. Find a message with some nice property
  • 3. Build a preimage attack from this message
slide-35
SLIDE 35

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

35

Step 1

◮ A, B symmetric ◮ A diagonal and B symmetric ◮ A =

t1 1

1

  • and B =

t2 1

1

  • “Euclidean algorithm”

matrices

◮ More than two generators : S = {( t 1

1 ) |t ∈ F}

where F is a vector subspace of F2n/F2

slide-36
SLIDE 36

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

36

Step 3

◮ Tillich-Z´

emor generators

◮ ...

slide-37
SLIDE 37

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

37

Step 2

◮ Depends on Step 1 and Step 3 ◮ Birthday searches : 2n/2 cost ◮ Extension of [MS87] to other partial quotients ? ◮ Can also be the following :

Solve f (w1, ..., wN) = 0 for wi ∈ F, where f is affine in each variable and F is a vector subspace of F2n/F2

◮ Algebraic cryptanalysis ? Generalized birthday attacks ?

slide-38
SLIDE 38

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

38

Rubik’s for cryptanalysts

◮ Same problem in different groups ?

slide-39
SLIDE 39

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

39

Related problems

◮ Graph theory ◮ Expander graphs ◮ Diameter of Cayley graphs, Babai’s conjecture ◮ Euclidean algorithm ◮ Clear for Z´

emor and Tillich-Z´ emor

◮ Implicit in LPS, Morgenstern

(Diophantine equations solved via Lagrange)

◮ Cryptography ◮ Alternative to DL, ECDL and factoring ? ◮ Stream cipher theory

slide-40
SLIDE 40

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

40

Outline

Introduction Cayley hash functions Security : state of the art The end of the story ? Conclusion

slide-41
SLIDE 41

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

41

Conclusion

◮ Elegant design, nice properties ◮ Z´

emor, LPS, Morgenstern, Tillich-Z´ emor broken

◮ Security of other / generic instances ?

slide-42
SLIDE 42

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

42

References

◮ [B92] L Babai, A Seress, On the diameter of permutation

groups

◮ [Z91] G Z´

emor, Hash functions and graphs with large girths

◮ [TZ94] JP Tillich & G Z´

emor, Group-theoretic hash functions

◮ [CGL09] D Charles, E Goren, K Lauter, Cryptographic

hash functions from expander graphs

◮ [PLQ07] C Petit, K Lauter, JJ Quisquater, Cayley

Hashes : A Class of Efficient Graph-based Hash Functions

slide-43
SLIDE 43

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

43

References

◮ [SGGB00] R Steinwandt, M Grassl, W Geiselmann, T

Beth, Weaknesses in the SL2(F n

2 ) Hashing Scheme

◮ [PQTZ09] C Petit, JJ Quisquater, JP Tillich, G Z´

emor, Hard and easy Components of Collision Search in the Z´ emor-Tillich Hash Function : New Instances and Reduced Variants with equivalent Security

◮ [CP10] J Cathalo, C Petit, One-time trapdoor one-way

functions

◮ [LPS88] A Lubotzky, R Phillips, P Sarnak, Ramanujan

Graphs

slide-44
SLIDE 44

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

44

References

◮ [TZ08] JP Tillich, G Z´

emor, Collisions for the LPS Expander Graph Hash Function

◮ [PLQ08] C Petit, K Lauter, JJ Quisquater, Full

Cryptanalysis of LPS and Morgenstern Hash Functions

◮ [GIMS09] M Grassl, I Ilic, S Magliveras, R Steinwandt,

Cryptanalysis of the Tillich-Z´ emor hash function

◮ [MS87] JP Mesirov, MM Sweet, Continued fraction

expansions of rational expressions with irreducible denominators in characteristic 2

◮ [PQ10] C Petit, JJ Quisquater, Preimage algorithms for

the Tillich-Z´ emor hash function

slide-45
SLIDE 45

UCL Crypto Group

Microelectronics Laboratory

  • Ch. Petit - Paris VI - Nov 2010

45

References

◮ [BHKLS90] L Babai, G Hetyei, W Kantor, A Lubotzky, A

Seress, On the diameter of finite groups

◮ [KR05] M Kassabov, T Riley, Diameters of Cayley graphs

  • f Chevalley groups

◮ [H05] H Helfgott, Growth and generation in SL2(Z/pZ) ◮ [H10] H Helfgott, Growth and generation in SL3(Z/pZ) ◮ [BH05] L Babai, T Hayes, Near-independence of

permutations and an almost sure polynomial bound on the diameter of the symmetric group