Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cryptanalysis of a Theorem: Decomposing the Onl...

Cryptanalysis of a Theorem: Decomposing the Only Known Solution to the Big APN Problem

Presentation from CRYPTO 2016
Paper: http://ia.cr/2016/539

Avatar for Aleksei Udovenko

Aleksei Udovenko

August 17, 2016
Tweet

More Decks by Aleksei Udovenko

Other Decks in Research

Transcript

  1. Cryptanalysis of a Theorem Decomposing the Only Known Solution to

    the Big APN Problem Alex Biryukov1 Léo Perrin1 Aleksei Udovenko1 1University of Luxembourg, SnT August 17, 2016
  2. Outline 1 Introduction 2 Decomposing the Permutation 3 The Butterfly

    Structure 4 Properties of the APN Permutation 5 Conclusion Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 1 / 23
  3. Introduction Plan 1 Introduction 2 Decomposing the Permutation 3 The

    Butterfly Structure 4 Properties of the APN Permutation 5 Conclusion Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 1 / 23
  4. Introduction Definition (DDT) The DDT of f : {0, 1}n

    → {0, 1}n is a 2n × 2n table such that DDTf [a, b] = #{︀x ∈ {0, 1}n, f (x) ⊕ f (x ⊕ a) = b}︀. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 2 / 23
  5. Introduction Definition (DDT) The DDT of f : {0, 1}n

    → {0, 1}n is a 2n × 2n table such that DDTf [a, b] = #{︀x ∈ {0, 1}n, f (x) ⊕ f (x ⊕ a) = b}︀. Definition (APN) f : {0, 1}n → {0, 1}n is called APN if and only if DDTf [a, b] ≤ 2 for all a ̸= 0, b. In other words: the DDT only contains 0 and 2. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 2 / 23
  6. Introduction Definition (DDT) The DDT of f : {0, 1}n

    → {0, 1}n is a 2n × 2n table such that DDTf [a, b] = #{︀x ∈ {0, 1}n, f (x) ⊕ f (x ⊕ a) = b}︀. Definition (APN) f : {0, 1}n → {0, 1}n is called APN if and only if DDTf [a, b] ≤ 2 for all a ̸= 0, b. In other words: the DDT only contains 0 and 2. The Big APN Problem Does there exist an APN permutation on GF(2n) if n is even? Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 2 / 23
  7. Introduction Definition (DDT) The DDT of f : {0, 1}n

    → {0, 1}n is a 2n × 2n table such that DDTf [a, b] = #{︀x ∈ {0, 1}n, f (x) ⊕ f (x ⊕ a) = b}︀. Definition (APN) f : {0, 1}n → {0, 1}n is called APN if and only if DDTf [a, b] ≤ 2 for all a ̸= 0, b. In other words: the DDT only contains 0 and 2. The Big APN Problem Does there exist an APN permutation on GF(2n) if n is even? For n = 6, yes! [Dillon et al., 2009] Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 2 / 23
  8. Introduction Our Decomposition (and Main Theorem) The APN permutation of

    Dillon et al. is affine-equivalent to... −1 ⊙ ⊕ ⊕ 3 bits ⊙ ⊕ ⊕ for any 3-bit APN permutation (e.g. x ↦→ x3) for any such that Tr() = 0, ̸= 0. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 3 / 23
  9. Decomposing the Permutation Plan 1 Introduction 2 Decomposing the Permutation

    S-Box Reverse-Engineering Decomposing the Dillon Permutation Implementation 3 The Butterfly Structure 4 Properties of the APN Permutation 5 Conclusion Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 3 / 23
  10. Decomposing the Permutation S-Box Reverse-Engineering S-Box Reverse-Engineering Definition Using only

    the look-up table, reverse-engineering an S-Box means recovering unpublished information, e.g.: what properties were optimized? what structure was used to build it? Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 4 / 23
  11. Decomposing the Permutation S-Box Reverse-Engineering S-Box Reverse-Engineering Definition Using only

    the look-up table, reverse-engineering an S-Box means recovering unpublished information, e.g.: what properties were optimized? what structure was used to build it? Possible Targets S-Box of Skipjack [BP, CRYPTO2015] S-Box of Streebog/Kuznechik, [BPU, EUROCRYPT2016] ... The Dillon permutation! Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 4 / 23
  12. Decomposing the Permutation Decomposing the Dillon Permutation Linear Approximation Table

    (LAT) Definition (LAT, Fourier Transform, Walsh Spectrum) The LAT of f : {0, 1}n → {0, 1}n is a 2n × 2n matrix ℒ where ℒ[a, b] = #{x ∈ Fn 2 , a · x = b · f (x)} − 2n−1. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 5 / 23
  13. Decomposing the Permutation Decomposing the Dillon Permutation Jackson Pollock The

    absolute LAT of S0. white=0, grey=4, black=8 Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 6 / 23
  14. Decomposing the Permutation Decomposing the Dillon Permutation Jackson Pollock The

    absolute LAT of S0. white=0, grey=4, black=8 → The absolute LAT of ∘ S0. is a linear permutation. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 6 / 23
  15. Decomposing the Permutation Decomposing the Dillon Permutation TU-Decomposition T U

    Decomposition of ∘ S0 . T and U are keyed permutations (mini-block ciphers). Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 7 / 23
  16. Decomposing the Permutation Decomposing the Dillon Permutation TU-Decomposition T U

    Decomposition of ∘ S0 . T and U are keyed permutations (mini-block ciphers). T and U−1 are related =⇒ only attack T. 0 1 2 3 4 5 6 7 T0 0 6 4 7 3 1 5 2 T1 7 5 1 6 4 2 0 3 T2 4 3 2 0 5 6 1 7 T3 3 5 2 1 4 6 7 0 T4 1 2 0 6 4 3 7 5 T5 6 5 2 4 7 0 1 3 T6 5 2 6 4 0 3 1 7 T7 2 0 1 6 5 3 4 7 Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 7 / 23
  17. Decomposing the Permutation Decomposing the Dillon Permutation Decomposing T T′−1

    t ⊕ (a) Detaching a linear Feistel round. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 8 / 23
  18. Decomposing the Permutation Decomposing the Dillon Permutation Decomposing T T′−1

    t ⊕ (d) Detaching a linear Feistel round. L t N ⊕ ⊕ (e) Splitting T′−1 into N and L. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 8 / 23
  19. Decomposing the Permutation Decomposing the Dillon Permutation Decomposing T T′−1

    t ⊕ (g) Detaching a linear Feistel round. L t N ⊕ ⊕ (h) Splitting T′−1 into N and L. L t ℐ p ⊕ ⊕ (i) Simplifying N into ℐ and linear functions. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 8 / 23
  20. Decomposing the Permutation Decomposing the Dillon Permutation Decomposing T and

    U 1 Deduce a decomposition (see picture). ℐ ℐ 5 5 M 5 5 ℐ ℐ Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 9 / 23
  21. Decomposing the Permutation Decomposing the Dillon Permutation Decomposing T and

    U 1 Deduce a decomposition (see picture). 2 Get rid of constant additions. 3 Find a nicer representation of M. ℐ ℐ 5 5 M 5 5 ℐ ℐ Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 9 / 23
  22. Decomposing the Permutation Decomposing the Dillon Permutation Final Decomposition xe

    x1/e ⊙ ⊕ ⊕ xe xe ⊙ ⊕ ⊕ Branch size: 3 Tr() = 0 e ∈ {3, 5, 6} Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 10 / 23
  23. Decomposing the Permutation Implementation Bit-Sliced Implementation Function A0 (X0, ...,

    X5 ) 1. t = (X5 ∧ X3 ) 2. X0 ⊕= t ⊕ (X5 ∧ X4 ) 3. X1 ⊕= t 4. X2 ⊕= (X4 ∨ X3 ) 5. t = (X1 ∨ X0 ) 6. X0 ⊕= (X2 ∧ X1 ) ⊕ X4 7. X1 ⊕= (X2 ∧ X0 ) ⊕ X5 ⊕ X3 8. X2 ⊕= t ⊕ X3 9. X3 ⊕= X1 10. X4 ⊕= X2 ⊕ X0 11. X5 ⊕= X0 12. u = X3 13. t = X4 14. X3 ⊕= t 15. X3 = X3 ∧ X5 ⊕ t 16. X4 ⊕= ((¬X5 ) ∧ u) 17. X5 ⊕= (t ∨ u) 18. t = (X2 ∧ X0 ) 19. X3 ⊕= t ⊕ (X2 ∧ X1 ) 20. X4 ⊕= t 21. X5 ⊕= (X1 ∨ X0 ) Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 11 / 23
  24. The Butterfly Structure Plan 1 Introduction 2 Decomposing the Permutation

    3 The Butterfly Structure Regular Butterflies Feistel Networks 4 Properties of the APN Permutation 5 Conclusion Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 11 / 23
  25. The Butterfly Structure Regular Butterflies Definition We generalize the structure

    to any odd branch size: xe x1/e ⊙ ⊕ ⊕ xe xe ⊙ ⊕ ⊕ Open (bijective) butterfly H e . ⊙ ⊕ xe xe ⊕ ⊙ ⊕ xe xe ⊕ Closed (non-bijective) butterfly V e . Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 12 / 23
  26. The Butterfly Structure Regular Butterflies CCZ-equivalence Definition Two functions are

    CCZ-equivalent if their graphs are affine-equivalent. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 13 / 23
  27. The Butterfly Structure Regular Butterflies CCZ-equivalence Definition Two functions are

    CCZ-equivalent if their graphs are affine-equivalent. Theorem CCZ-equivalence preserves differential uniformity (maximum DDT coefficient), non-linearity ( =⇒ max coefficient in the LAT). Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 13 / 23
  28. The Butterfly Structure Regular Butterflies CCZ-equivalence Definition Two functions are

    CCZ-equivalent if their graphs are affine-equivalent. Theorem CCZ-equivalence preserves differential uniformity (maximum DDT coefficient), non-linearity ( =⇒ max coefficient in the LAT). Lemma Open and closed butterflies are CCZ-equivalent! Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 13 / 23
  29. The Butterfly Structure Regular Butterflies Properties Theorem (For ̸= 0,

    1) Consider butterflies operating on 2n bits with n odd and e = 3 × 2t. Differential The diff. uniformity of V e and H e is at most 4. Algebraic deg(V e ) = 2, deg(H e ) = n + 1. Nonlinearity (Experimental for small n): NL(V e ) = NL(H e ) = 22n−1 − 2n. The best known to be possible. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 14 / 23
  30. The Butterfly Structure Feistel Networks Feistel Network ( = 1)

    xe ⊕ x1/e ⊕ xe ⊕ Fe (note Fe = H1 e ). xe xe xe ⊕ ⊕ ⊕ Closed butterfly V1 e . Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 15 / 23
  31. The Butterfly Structure Feistel Networks Properties of Feistel Butterflies Theorem

    (For = 1, i.e. the Feistel case) Consider butterflies operating on 2n bits with n odd and e = 3 × 2t. Differential The diff. uniformity of V1 e and H1 e is exactly 4. The DDT of V1 e contains only 0 and 4. Algebraic deg(V1 e ) = 2, deg(H1 e ) = n. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 16 / 23
  32. The Butterfly Structure Feistel Networks Properties of Feistel Butterflies Theorem

    (For = 1, i.e. the Feistel case) Consider butterflies operating on 2n bits with n odd and e = 3 × 2t. Differential The diff. uniformity of V1 e and H1 e is exactly 4. The DDT of V1 e contains only 0 and 4. Algebraic deg(V1 e ) = 2, deg(H1 e ) = n. Theorem (CCZ-equivalence with a monomial) Consider butterflies operating on 2n bits with n odd and e = 22k + 1 Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 16 / 23
  33. The Butterfly Structure Feistel Networks Properties of Feistel Butterflies Theorem

    (For = 1, i.e. the Feistel case) Consider butterflies operating on 2n bits with n odd and e = 3 × 2t. Differential The diff. uniformity of V1 e and H1 e is exactly 4. The DDT of V1 e contains only 0 and 4. Algebraic deg(V1 e ) = 2, deg(H1 e ) = n. Theorem (CCZ-equivalence with a monomial) Consider butterflies operating on 2n bits with n odd and e = 22k + 1 1 V1 e (Lai-Massey-like structure) is Affine-Equivalent to x ↦→ xe in F2n 2 , 2 H1 e (Feistel Network) is CCZ-equivalent to the same function. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 16 / 23
  34. Properties of the APN Permutation Plan 1 Introduction 2 Decomposing

    the Permutation 3 The Butterfly Structure 4 Properties of the APN Permutation 5 Conclusion Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 16 / 23
  35. Properties of the APN Permutation Flexibility Consider APN butterflies over

    6 bits. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 17 / 23
  36. Properties of the APN Permutation Flexibility Consider APN butterflies over

    6 bits. −1 ⊙ ⊕ ⊕ ⊙ ⊕ ⊕ can be any APN permutation, can be any element ̸= 0, 1 with Tr() = 0, We can XOR any values around the center, We can apply identical 3 × 3 linear permutations on the branches around the center. We can swap branches before/after the center (breaks AE but not CCZ-equivalence) Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 17 / 23
  37. Properties of the APN Permutation Multiplicative Stability For (a, b)

    ∈ (Fn 2 )2, (c, d) ∈ (Fn 2 )2, we define (a, b) ⊗ (c, d) = (ac, bd). Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 18 / 23
  38. Properties of the APN Permutation Multiplicative Stability For (a, b)

    ∈ (Fn 2 )2, (c, d) ∈ (Fn 2 )2, we define (a, b) ⊗ (c, d) = (ac, bd). For closed butterflies, Ve (x, y) = (e, e) ⊗ Ve (x, y), and for open ones: He (ex, y) = (e, ) ⊗ He (x, y). Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 18 / 23
  39. Properties of the APN Permutation Parallel Bent Functions V3 is

    affine-equivalent to (x, y) ↦→ Q(x, y)||Q(y, x), with Q(x, y) = x3(1 + 2) + x2y. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 19 / 23
  40. Properties of the APN Permutation Parallel Bent Functions V3 is

    affine-equivalent to (x, y) ↦→ Q(x, y)||Q(y, x), with Q(x, y) = x3(1 + 2) + x2y. Q is bent (Maiorana-McFarland structure) Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 19 / 23
  41. Properties of the APN Permutation Univariate Representation (1/2) From Dillon

    et al. (g is their APN permutation): Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 20 / 23
  42. Properties of the APN Permutation Univariate Representation (2/2) Other definitions

    It still works if we redefine f1, f2: {︃f1(x) = w11x34 + w53x20 + x8 + x, f2(x) = w28x48 + w61x34 + w12x20 + w16x8 + x6 + w2x. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 21 / 23
  43. Properties of the APN Permutation Univariate Representation (2/2) Other definitions

    It still works if we redefine f1, f2: {︃f1(x) = w11x34 + w53x20 + x8 + x, f2(x) = w28x48 + w61x34 + w12x20 + w16x8 + x6 + w2x. Another decomposition g is APN if g = i ∘ m ∘ i−1 and either i(x) = w37x48 + x34 + w49x20 + w21x8 + w30x6 + x, m(x) = x8, or i(x) = w21x34 + x20 + x8 + x, m(x) = w52x8 + w36x. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 21 / 23
  44. Properties of the APN Permutation Kim Mapping Properties The "Kim

    mapping" is the APN function (x) = x3 + x10 + wx24. Not a permutation. Already known (not found by Dillon et al.). Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 22 / 23
  45. Properties of the APN Permutation Kim Mapping Properties The "Kim

    mapping" is the APN function (x) = x3 + x10 + wx24. Not a permutation. Already known (not found by Dillon et al.). Dillon permutation Kim mapping CCZ-equiv.
  46. Properties of the APN Permutation Kim Mapping Properties The "Kim

    mapping" is the APN function (x) = x3 + x10 + wx24. Not a permutation. Already known (not found by Dillon et al.). Dillon permutation Kim mapping CCZ-equiv. Open Butterfly H 3 Closed Butterfly V 3 CCZ-equiv. affine-equiv. affine-equiv. Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 22 / 23
  47. Conclusion Plan 1 Introduction 2 Decomposing the Permutation 3 The

    Butterfly Structure 4 Properties of the APN Permutation 5 Conclusion Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 22 / 23
  48. Conclusion Conclusion Conclusion There is a Decomposition of the 6-bit

    APN permutation! Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 23 / 23
  49. Conclusion Conclusion Conclusion There is a Decomposition of the 6-bit

    APN permutation! Open Problems 1 Is the non-linearity of a 2n-bit butterfly always 22n−1 − 2n? Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 23 / 23
  50. Conclusion Conclusion Conclusion There is a Decomposition of the 6-bit

    APN permutation! Open Problems 1 Is the non-linearity of a 2n-bit butterfly always 22n−1 − 2n? 2 Are there APN Butterflies for n > 3? Thank you! Biryukov, Perrin, Udovenko (uni.lu) Cryptanalysis of a Theorem August 17, 2016 23 / 23