distinguishing iterated encryption
play

Distinguishing iterated encryption E. Lambooij - PowerPoint PPT Presentation

Distinguishing iterated encryption E. Lambooij eran@hideinplainsight.io This is joint work with: Orr Dunkelman, Nathan Keller and Tanja Lange CRYPTACUS Workshop, 16-18 November 2017 1 / 15 Question: Does security increase if we encrypt twice


  1. Distinguishing iterated encryption E. Lambooij eran@hideinplainsight.io This is joint work with: Orr Dunkelman, Nathan Keller and Tanja Lange CRYPTACUS Workshop, 16-18 November 2017 1 / 15

  2. Question: Does security increase if we encrypt twice with the same key? And thrice? And four times? And what about encrypting it t times with the same key? 2 / 15

  3. Distinguishing t -encryption We can view an encryption under key k as a permutation: E k ∈ P Then double encryption can be viewed as a squared permutation: E k ( E k ( p )) = E 2 k ( p ) ∈ P 2 Question, can we distinguish: p from ( p ′ ) 2 with p , p ′ ∈ P Or even more interesting: p from ( p ′ ) 2 with p , p ′ ∈ P even 3 / 15

  4. Permutation basics Let the permutation σ be defined as: � 1 2 3 4 5 6 7 8 9 10 � σ = 3 2 8 9 4 7 10 5 1 6 4 / 15

  5. Permutation basics Let the permutation σ be defined as: � 1 2 3 4 5 6 7 8 9 10 � σ = 3 2 8 9 4 7 10 5 1 6 The disjoint cycle decomposition of σ is: σ = (1 , 3 , 8 , 5 , 4 , 9)(2)(6 , 7 , 10) 4 / 15

  6. Permutation basics Let the permutation σ be defined as: � 1 2 3 4 5 6 7 8 9 10 � σ = 3 2 8 9 4 7 10 5 1 6 The disjoint cycle decomposition of σ is: σ = (1 , 3 , 8 , 5 , 4 , 9)(2)(6 , 7 , 10) Squaring σ gives: � 1 � 2 3 4 5 6 7 8 9 10 σ 2 = 8 2 5 1 9 7 10 4 3 6 4 / 15

  7. Permutation basics Let the permutation σ be defined as: � 1 2 3 4 5 6 7 8 9 10 � σ = 3 2 8 9 4 7 10 5 1 6 The disjoint cycle decomposition of σ is: σ = (1 , 3 , 8 , 5 , 4 , 9)(2)(6 , 7 , 10) Squaring σ gives: � 1 � 2 3 4 5 6 7 8 9 10 σ 2 = 8 2 5 1 9 7 10 4 3 6 The disjoint cycle decomposition of σ 2 is: σ 2 = (1 , 8 , 4)(3 , 5 , 9)(2)(6 , 7 , 10) 4 / 15

  8. Distinguishing t -encryption σ t splits all cycles with length divisible by t up into t equally sized cycles. 5 / 15

  9. Distinguishing t -encryption σ t splits all cycles with length divisible by t up into t equally sized cycles. E (#cycles in σ t ) ≥ E (#cycles in σ ′ ) 5 / 15

  10. Distinguishing t -encryption σ t splits all cycles with length divisible by t up into t equally sized cycles. E (#cycles in σ t ) ≥ E (#cycles in σ ′ ) Given a random permutation σ N 1 � E (#cycles in σ ) = m = H N ≈ ln N m =1 5 / 15

  11. Distinguishing t -encryption σ t splits all cycles with length divisible by t up into t equally sized cycles. E (#cycles in σ t ) ≥ E (#cycles in σ ′ ) Given a random permutation σ N 1 � E (#cycles in σ ) = m = H N ≈ ln N m =1 Given a random permutation σ , and t is prime E (#cycles in σ t ) ≈ 2 t − 1 ln N t 5 / 15

  12. Distinguishing t -encryption σ t splits all cycles with length divisible by t up into t equally sized cycles. E (#cycles in σ t ) ≥ E (#cycles in σ ′ ) Given a random permutation σ N 1 � E (#cycles in σ ) = m = H N ≈ ln N m =1 Given a random permutation σ , and t is prime E (#cycles in σ t ) ≈ 2 t − 1 ln N t E (#cycles split in σ t ) ≈ ln N t 5 / 15

  13. Experiment 6 / 15

  14. Experiment (2) 7 / 15

  15. Distinguishers ◮ Three distinguishers ◮ All have (near) full codebook data complexity 8 / 15

  16. Distribution distinguisher ◮ Based on the difference in expected number of cycles ◮ The number of cycles in a permutation of size n has an expected number of cycles of ln n ◮ The number of cycles in a permutation to a prime power of t has an expected number of cycles of 2 t − 1 ln n t ◮ With t = 2, if the permutation contains more than 1 . 233 · ln n cycles it is a squared (or higher order) permutation. 9 / 15

  17. Equal cycle length distinguisher ◮ The probability of two cycles in a random permutation having 1 the same length is m 2 ◮ Thus finding two decently large cycles with the same size is a good que for having a squared (or higher power) permutation. 10 / 15

  18. Impossible cycle length distinguisher ◮ In a squared permutation of size n no cycles with length > n 2 and an even cylce length are possible. ◮ The probability of a cycle having even length and length > n 2 is 0 . 1732 ... ◮ This can be used as a distinguisher. 11 / 15

  19. Attacking an encryption scheme ◮ Take a block cipher E κ with key κ = k 0 | k 1 | k 2 | k 3 , and blocksize b . ◮ Note that σ t ⊕ A cannot be disinguished from a random even permutation, but σ t p can be distinguished. ◮ This means that the block cipher can be ( k 0 | k 1 | k 2 | k 3 ) σ broken with O (2 b ) data and O (2 b + | A | ) computations (with the current ( k 0 | k 1 | k 2 | k 3 ) σ distinguishers). ◮ In this case lets take b = 64 and ⊕ k 0 | κ | = 128, then we need 2 64 data and 2 64 computations to recover k 0 and 2 96 c computations to recover the remainder k 1 | k 2 | k 3 . So a total of 2 64 data and 2 96 computations. 12 / 15

  20. The attack ( O (2 b )) 1. Collect data ( O (2 | k 0 | ) 2. For every possible subkey A : ( O (2 b )) 2.1 XOR all ciphertexts with A 2.2 If data behaves as a squared permutation k 0 = A , else ( O (2 b )) continue 3. Brute force the remaining subkeys 13 / 15

  21. Conclusion ◮ Similar applicability as slide attacks, worse but more general ◮ Attack complexity determined by the size of a permutation ◮ Round constants are a good counter measure ◮ Attack complexity can get significantly better with a better distinguisher 14 / 15

  22. Thank you for your attention 15 / 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend