Second-Preimage Attack on New Russian Standardized Hash Function

Second-Preimage Attack on New Russian Standardized Hash Function

The Usage of Counter Revisited: Second-Preimage Attack on New Russian Standardized Hash Function Jérémy Jean1 joint work with: Jian Guo1 Gaëtan Leurent2 Thomas Peyrin1 Lei Wang1 1Nanyang Technological University, Singapore 2INRIA, France SAC 2014 – August 14, 2014 Introduction Our observation Diamond attack Expandable message attack Conclusion Streebog: new Russian hash function. I New hash function standard in Russia. I Standardized name: GOST R 34.11-2012 I Nickname of that function: Streebog. I Previous standard: GOST R 34.11-94. I Theoretical weaknesses. I Rely on the GOST block cipher from the same standard. I This block cipher has also been weakened by third-party cryptanalysis. SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 2/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Specifications: domain extension. I Two versions: Streebog-256 and Streebog-512. ∗ I 10 padding: m1jj · · · jjmt jjm (blocks of 512 bits). I Compression function: g. 512 I Checksum: Σ, over the message blocks mi (addition modulo 2 ). I Counter: N, HAIFA input to g over the number of processed bits. I Three stages: initialization, message processing and finalization. Σ ::: m1 m2 mt m h1 h2 ht−1 ht ht+1 ht+2 h0 = IV g g ::: g g g g h N ::: 512 512 512 jMj 0 0 Stage 1 Stage 2 Stage 3 SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 3/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Specifications: compression function. I Simplification: the counter counts #blocks, not #bits. I g compresses (hi−1; i; mi ) to hi using: hi = f (hi−1 ⊕ i; mi ) ⊕ hi−1. I Our attack is independent of the specifications of f (deterministic). i mi g hi−1 f hi I g is one instantiation of a HAIFA compression function. I The counter is simply XORed to the input of the f function. SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 4/19 ( hi = F (hi−1 ⊕ i; mi ) ⊕ i; F (x; mi ) = f (x; mi ) ⊕ x: i mi i hi−1 f hi ⊕ i F The function F is independent of the counter value! Introduction Our observation Diamond attack Expandable message attack Conclusion Equivalent compression function. i mi hi−1 f hi hi =hi−1 ⊕ f (hi−1 ⊕ i; mi ) () SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 5/19 ( hi = F (hi−1 ⊕ i; mi ) ⊕ i; F (x; mi ) = f (x; mi ) ⊕ x: i hi ⊕ i F The function F is independent of the counter value! Introduction Our observation Diamond attack Expandable message attack Conclusion Equivalent compression function. i mi hi−1 f hi hi =hi−1 ⊕ f (hi−1 ⊕ i; mi ) () i mi hi−1 f SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 5/19 ( hi = F (hi−1 ⊕ i; mi ) ⊕ i; F (x; mi ) = f (x; mi ) ⊕ x: i hi F The function F is independent of the counter value! Introduction Our observation Diamond attack Expandable message attack Conclusion Equivalent compression function. i mi hi−1 f hi hi =hi−1 ⊕ f (hi−1 ⊕ i; mi ) () i mi hi−1 f hi ⊕ i SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 5/19 ( hi = F (hi−1 ⊕ i; mi ) ⊕ i; F (x; mi ) = f (x; mi ) ⊕ x: hi ⊕ i F The function F is independent of the counter value! Introduction Our observation Diamond attack Expandable message attack Conclusion Equivalent compression function. i mi hi−1 f hi hi =hi−1 ⊕ f (hi−1 ⊕ i; mi ) () i mi i hi−1 f hi SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 5/19 hi ⊕ i Introduction Our observation Diamond attack Expandable message attack Conclusion Equivalent compression function. i mi hi−1 f hi ( hi = F (hi−1 ⊕ i; mi ) ⊕ i; hi =hi−1 ⊕ f (hi−1 ⊕ i; mi ) () F (x; mi ) = f (x; mi ) ⊕ x: i mi i hi−1 f hi F The function F is independent of the counter value! SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 5/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Iteration of the equivalent compression function. I We have an equivalent representation of the compression function. I Its iteration allows to combine the counter additions. i mi i i + 1 mi+1 i + 1 hi−1 f f hi+1 F F ∆(i) def= i ⊕ (i + 1); def F∆(i)(X ; Y ) = F (X ; Y ) ⊕ ∆(i): i i i + 1 i + 1 i + 2 hi−1 F F hi+1 ∆(i) ∆(i+1) F∆(i) F∆(i+1) SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 6/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Relations between functions F∆(i) for 1 ≤ i ≤ t (1/2). Recall that t is the number of full blocks m1jj · · · jjmt jjm, jmj < 512. We observe that: I For all even i, ∆(i) = i ⊕ (i + 1) = 1. =) The same function F1 is used every other time. I Sequence of ∆(i) is very structured. i: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ∆(i):1317131 151317131 311317131 15 Let s > 0, and denoting hii the s-bit binary representation of i < 2s − 1: ∆(i + 2s )= 1jjhii ⊕ 1jjhi + 1i = hii ⊕ hi + 1i = ∆(i): s More generally: F∆(i) = F∆(i+j·2s ) for all 0 ≤ i ≤ 2 − 1 and j ≥ 0. For example, with s = 2, F1 and F1+22 = F5 are equal. SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 7/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Relations between functions F∆(i) for 1 ≤ i ≤ t (2/2). Given an integer s > 0, we have: s 8i 2 f0;:::; 2 − 2g; 8j > 0 : F∆(i) = F∆(j·2s +i) 512 − s bits s bits 512 − s bits s bits 0 < i > j < i > 0 < i + 1 > j < i + 1 > = 0 < i ⊕ (i + 1) > = 0 < i ⊕ (i + 1) > ∆(i) ∆(i + j · 2s ) Consequently: s I The same sequence of 2 − 1 functions are used in the domain extension algorithm. I This seems weaker than a true HAIFA mode. SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 8/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Equivalent description of stage 2 of the domain extension. s I The last function differs in each 2 -chunk. =) We call it Gj = F∆(j×2s −1). s I We define l as the number of (2 − 1)-chains of F functions: t s l = 2s . Moreover, let p be the remainder of t modulo 2 . I That is: the function F2s −2 ◦ · · · F1 ◦ F0 is reused l times. 0 F2s −2 ◦ · · · F1 ◦ F0 IV F0 F1 ::: F2s −2 G1 . F0 F1 ::: F2s −2 Gl F0 F1 ::: Fp ht t + 1 SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 9/19 Our second-preimage attacks on Streebog (security level: 2512): I Using a diamond structure: 179 I Original message of at least 2 blocks. 342 I 2 compression function evaluations. I Using a expandable message: 259 I Original message of at least 2 blocks. 266 I 2 compression function evaluations. Introduction Our observation Diamond attack Expandable message attack Conclusion Cryptographic consequences of the HAIFA instantiation. Streebog is one choice of counter usage from the HAIFA framework. Consequences of this choice: I Counters at steps i and i + 1 can be combined. I Distinction of compression function calls in the HAIFA framework not achieved. I Domain extension similar to a Merkle-Damgård scheme. =) Possibility to apply existing known second-preimage attacks. SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 10/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Cryptographic consequences of the HAIFA instantiation. Streebog is one choice of counter usage from the HAIFA framework. Consequences of this choice: I Counters at steps i and i + 1 can be combined. I Distinction of compression function calls in the HAIFA framework not achieved. I Domain extension similar to a Merkle-Damgård scheme. =) Possibility to apply existing known second-preimage attacks. Our second-preimage attacks on Streebog (security level: 2512): I Using a diamond structure: 179 I Original message of at least 2 blocks. 342 I 2 compression function evaluations. I Using a expandable message: 259 I Original message of at least 2 blocks. 266 I 2 compression function evaluations. SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 10/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Diamond structure (1/2) F ◦···◦F F Diamond structure: F0 2s −3 1 2s −2 I Introduced in [KK06]. Complete binary tree. 0 I h1 Nodes: chaining values. I 0 m1 Edges: 1-block n-bit messages. s I 22 −1 h 1 I Depth d. m1 1 Construction: h1 I Levels constructed sequentially. (n+d)=2 I Complexity: 2 calls. I Evaluation done in [KK13]. SAC 2014 – J. Guo, J. Jean, G. Leurent, T. Peyrin, L. Wang – Cryptanalysis of Streebog 11/19 Introduction Our observation Diamond attack Expandable message attack Conclusion Diamond structure (2/2) F ◦···◦F F Diamond used in our attack: F0 2s −3 1 2s −2 I Root h.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    40 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us