cryptanalysis of fork 256 and some comments on the state
play

Cryptanalysis of FORK-256 and some comments on the state of hash - PowerPoint PPT Presentation

Cryptanalysis of FORK-256 and some comments on the state of hash functions research Krystian Matusiewicz kmatus@ics.mq.edu.au Centre for Advanced Computing Algorithms and Cryptography, Department of Computing, Macquarie University IM PAN, 20


  1. Cryptanalysis of FORK-256 and some comments on the state of hash functions research Krystian Matusiewicz kmatus@ics.mq.edu.au Centre for Advanced Computing Algorithms and Cryptography, Department of Computing, Macquarie University IM PAN, 20 April 2007

  2. Talk overview Part I: Cryptanalysis of FORK-256 ◮ Short description of FORK-256 ◮ Micro-collisions in the step transformation ◮ Simple differential path for the compression function ◮ General method of finding differential paths ◮ Collisions for the compression function ◮ Some improvements Part II: Some comments on the current hash functions research ◮ Current situation in the world of hash functions ◮ NIST call for new hash functions ◮ Do we know what we want? ◮ How to deal with the situation?

  3. PART I: Cryptanalysis of FORK-256 Joint work with Thomas Peyrin 1 , Olivier Billet 1 , Scott Contini 2 and Josef Pieprzyk 2 . 1 Network and Services Security Lab, France Telecom Research and Development 2 Centre for Advanced Computing Algorithms and Cryptography, Department of Computing, Macquarie University

  4. ◮ Short description of FORK-256 ◮ Micro-collisions in the step transformation ◮ Simple differential path for the compression function ◮ General method of finding differential paths ◮ Collisions for the compression function ◮ Some improvements

  5. Structure of FORK-256 :: four parallel branches cv ℓ M ℓ σ 1 σ 2 σ 3 σ 4 B1 B2 B3 B4 cv ℓ +1 ◮ 256 bits of chaining variable cv ◮ 512 bits of message M ◮ each branch B1, B2, B3, B4 consists of 8 steps ◮ each branch uses a different permutation ( σ 1 , σ 2 , σ 3 , σ 4 ) of message words M 0 , . . . , M 15

  6. Structure of FORK-256 :: step transformation A j , k − 1 B j , k − 1 C j , k − 1 D j , k − 1 E j , k − 1 F j , k − 1 G j , k − 1 H j , k − 1 M σ j (2 k − 2) M σ j (2 k − 1) g f δ π j (2 k − 2) δ π j (2 k − 1) ≪ 5 ≪ 9 ≪ 17 ≪ 21 g f ≪ 9 ≪ 5 Q L Q R ≪ 21 ≪ 17 A j , k B j , k C j , k D j , k E j , k F j , k G j , k H j , k ◮ there are 8 steps in each branch ◮ step transformation – composition of 3 simple operations ◮ addition of two different message words ◮ two parallel Q-structures ◮ rotation of registers

  7. ◮ Short description of FORK-256 ◮ Micro-collisions in the step transformation ◮ Simple differential path for the compression function ◮ General method of finding differential paths ◮ Collisions for the compression function ◮ Some improvements

  8. What is a “micro-collision”? A B C D y f ≪ 5 δ π j (2 k ) ≪ 17 z g ≪ 9 Q L ≪ 21 A B C D Micro-collision: a difference in register A does not propagate to the selected register (B,C,D). If it does not propagate to more than one other register we have simultaneous micro-collisions .

  9. A B y f δ π j (2 k ) z g Let us denote A B y ′ = f ( x ′ ) z ′ = g ( x ′ ⊞ δ ) . y = f ( x ) , z = g ( x ⊞ δ ) , We have a micro-collision in the first line if the equation ( y ⊞ B ) ⊕ z = ( y ′ ⊞ B ) ⊕ z ′ (1) is satisfied for given y , y ′ , z , z ′ and some constant B . Our aim is to find the set of all constants B for which (1) is satisfied.

  10. Three representations of a difference ◮ usual XOR difference: ∆ ⊕ ( z , z ′ ) = ( z 0 ⊕ z ′ 0 , . . . , z 31 ⊕ z ′ ∈ { 0 , 1 } 32 31 ) ◮ integer difference: ∂ y = y ′ − y ∈ {− 2 32 + 1 , . . . , 2 32 − 1 } ◮ singed binary difference: ∈ {− 1 , 0 , 1 } 32 , ∆ ± ( y , y ′ ) = ( y 0 − y ′ 0 , . . . , y 31 − y ′ 31 )

  11. Two useful relationships between different representations ◮ If ∆ ± ( y , y ′ ) = ( r 0 , r 1 , . . . , r 31 ) is a signed binary difference, then the corresponding XOR difference is ( | r 0 | , | r 1 | , . . . , | r 31 | ). ◮ Having a signed binary difference we can easily recover the (unique) corresponding integer difference: 31 2 i · ∆ ± ( y , y ′ ) i . � ∂ y = i =0

  12. Finding micro-collisions ◮ We can rewrite ( y ⊞ B ) ⊕ z = ( y ′ ⊞ B ) ⊕ z ′ as ( y ⊞ B ) ⊕ ( y ′ ⊞ B ) = z ⊕ z ′ ◮ This means that the signed difference ∆ ± ( y ⊞ B , y ′ ⊞ B ) has to have non-zero digits in those places where ∆ ⊕ ( z , z ′ ) has ones. ◮ There are 2 h w (∆ ⊕ ( z , z ′ )) such signed differences that “fit” into the XOR difference. ◮ They correspond to 2 h w (∆ ⊕ ( z , z ′ )) integer differences that may yield a micro-collision ◮ Integer difference is not changed by adding the constant B !

  13. Finding micro-collisions y + B = x100x11xx11xx0x11x1xx0xxxxxxxxxx B y y ′ ∆ ± = .+++-.+-+.+..+-.+.-..+.......... the same integer difference ∂ y ∆ ± = +-++.--..--..+.--.-..+.......... z ′ z ∆ ⊕ = 1111.11..11..1.11.1..1.......... XOR difference → 2 h w signed binary diffs → 2 h w integer diffs → one of them must be ∂ y = y − y ′

  14. Finding micro-collisions: Necessary condition To test whether the quadruple ( y , y ′ , z , z ′ ) may yield a micro-collision we have to check whether there exist a signed binary representation corresponding to ∂ y = y − y ′ that “fits” into XOR difference ∆ ⊕ ( z , z ′ ). This problem can be reduced to an easy (superincreasing) knapsack problem: Having a set of positions I = { k 0 , k 1 , . . . , k m } (determined by non-zero bits of ∆ ⊕ ( z , z ′ ) ), decide whether it is possible to find a binary signed representation r = ( r 0 , . . . , r 31 ) corresponding to ∂ y s.t.: m 2 k i · r k i � ∂ y = where r k i ∈ {− 1 , 1 } . i =0

  15. This test can be implemented very efficiently! int micro_possible(WRD y1, WRD y2 , WRD dz) { WRD tmp , delta_y , sum; if ( y2 > y1 ) { tmp = y2; y2 = y1; y1 = tmp; } delta_y = y1 - y2; sum = delta_y; sum += dz; if ( sum < delta_y ) { if ( (dz > >31)==0 ) return 0; } dz <<= 1; return ( (dz|sum) == dz ); }

  16. Finding micro-collisions: Also a sufficient condition In fact we can prove that this condition is also sufficient: if we can find such a representation, we can always find constants B that make the difference “fit” into the prescribed XOR pattern. Moreover, the analysis shows that the size of the set of good constants B is equal to 2 32 − h w ( z ⊕ z ′ )+1 , with the grey one added if the MSB of ∆ ⊕ ( z , z ′ ) is one.

  17. ◮ Short description of FORK-256 ◮ Micro-collisions in the step transformation ◮ Simple differential path for the compression function ◮ General method of finding differential paths ◮ Collisions for the compression function ◮ Some improvements

  18. Simple differential path using micro-collisions Branch 1 Branch 2 Branch 3 Branch 4 0 1 14 15 7 6 5 12 2 3 11 9 10 14 1 8 By introducing dif- ferences in B 0 and 4 5 8 10 13 2 15 0 finding simultane- 6 7 3 4 9 12 13 11 ous microcollisions in four Q-structures 8 9 2 13 11 4 3 10 in step 4 we ob- 10 11 0 5 15 8 9 2 tain a differential restricted to 4 12 13 6 7 5 0 7 14 registers. 14 15 12 1 1 3 4 6

  19. Simple path: complexity analysis ◮ Once we pass through step 4, we can generate 2 32 pairs, ◮ To pass step 4 we have to make a few simple checks for 2 32 values, altogether equivalent to 2 32 / 4 of FORK evaluations, we succeed with probability P 6 d , where P d depends on the difference, for d = 0x00000404 we have P d ≈ 2 − 3 . ◮ the average cost of a single solution ≈ 1 / 4 · P − 6 ≈ 2 16 . d ◮ an example of a pair with output difference of weight 22: cv n 8406e290 5988c6af 76a1d478 0eb60cea f5c5d865 458b2dd1 528590bf c3bf98a1 cv ′ 8406e290 5988cab3 76a1d478 0eb60cea f5c5d865 458b2dd1 528590bf c3bf98a1 n 396eedd8 0e8c2a93 b961f8a4 f0a06fc6 9935952b e01d16c9 ddc60aa4 0ac1d8df M c6fef1d8 4c472ca6 58d9322d 2d087b65 7c8e1a26 71ba5da1 ba5d2bfc 1988f929 cv n +1 9897c70a 4e18862d b4725ac1 cfc9f92c 9aa0637d ae772570 74dd4af1 cd444dd7 cv ′ 9897c70a 4e1880f9 1e677302 4c650966 f4792bf4 ae772570 74dd4af1 cd444dd7 n +1

  20. ◮ Short description of FORK-256 ◮ Micro-collisions in the step transformation ◮ Simple differential path for the compression function ◮ General method of finding differential paths ◮ Collisions for the compression function ◮ Some improvements

  21. Finding high-level paths: idea and model Let’s be optimistic: A B C D E F G H 0 1 ◮ Assume that we can always avoid mixing introduced by Q -structures (finding micro-collisions is always easy). 2 3 ◮ Assume that any two differences cancel each other (i.e. we don’t need to worry about many 4 5 different values, either there is a difference or not and any two differences added together disappear). 6 7 So now we are in F 2 ... ◮ The model is F 2 -linear function L out that maps 8 9 input differences in M and cv n to output diffs. ◮ We can find the kernel of this map to get the set of all input differences that vanish at the output.

  22. Finding high-level paths: example A B C D E F G H 0 1 2 3 Example Input differences 4 5 S = ( A , B , C , D , E , F , G , H , M 0 , . . . , M 9 ). For 6 7 S = (0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 1) we have L out ( S ) = (0 , 0 , 0 , 0 , 0 , 0 , 0 , 0). 8 9

Recommend


More recommend