a new criterion for avoiding the propagation of linear
play

A new criterion for avoiding the propagation of linear relations - PowerPoint PPT Presentation

A new criterion for avoiding the propagation of linear relations through an Sbox Christina Boura and Anne Canteaut INRIA Paris-Rocquencourt DTU Compute March 13, 2013 1 / 23 Outline Introduction 1 The notion of ( v, w ) -linearity 2


  1. A new criterion for avoiding the propagation of linear relations through an Sbox Christina Boura and Anne Canteaut INRIA Paris-Rocquencourt DTU Compute March 13, 2013 1 / 23

  2. Outline Introduction 1 The notion of ( v, w ) -linearity 2 Analysis of 4 -bit optimal Sboxes 3 Application to Hamsi 4 Conclusion 5 2 / 23

  3. Introduction Outline Introduction 1 The notion of ( v, w ) -linearity 2 Analysis of 4 -bit optimal Sboxes 3 Application to Hamsi 4 Conclusion 5 3 / 23

  4. Introduction Introduction Investigate SPN primitives using small Sboxes. Ideally, after several rounds, all output bits should be expessed as non-linear functions of all input bits. 4 / 23

  5. Introduction Introduction Investigate SPN primitives using small Sboxes. Ideally, after several rounds, all output bits should be expessed as non-linear functions of all input bits. This is not always so. 4 / 23

  6. Introduction The need for a new linearity measure Some output bits can be expressed as affine functions of some input bits (when the other input bits are fixed to a constant). The sizes of the input and output sets are important. Large sets can lead to a big number of affine relations between input and output bits . Possibly lead to cryptanalysis (Attack against Hamsi 2010, cube-like attacks). We show that the number of affine relations depends on a new linearity measure of the Sbox, that we call ( v, w ) -linearity . 5 / 23

  7. Introduction An example ANF of the Hamsi Sbox = x 0 x 2 + x 1 + x 2 + x 3 y 0 y 1 = x 0 x 1 x 2 + x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 0 x 3 + x 2 x 3 + x 0 + x 1 + x 2 = x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 1 x 3 + x 2 x 3 + x 0 + x 1 + x 3 y 2 y 3 = x 0 x 1 x 2 + x 1 x 3 + x 0 + x 1 + x 2 + 1 . 6 / 23

  8. Introduction An example ANF of the Hamsi Sbox = x 0 x 2 + x 1 + x 2 + x 3 y 0 y 1 = x 0 x 1 x 2 + x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 0 x 3 + x 2 x 3 + x 0 + x 1 + x 2 = x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 1 x 3 + x 2 x 3 + x 0 + x 1 + x 3 y 2 y 3 = x 0 x 1 x 2 + x 1 x 3 + x 0 + x 1 + x 2 + 1 . If we fix all-but-one variables to a constant value then all the coordinates of the Sbox are affine with respect to the input variable. 6 / 23

  9. Introduction An example ANF of the Hamsi Sbox = x 0 x 2 + x 1 + x 2 + x 3 y 0 y 1 = x 0 x 1 x 2 + x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 0 x 3 + x 2 x 3 + x 0 + x 1 + x 2 = x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 1 x 3 + x 2 x 3 + x 0 + x 1 + x 3 y 2 y 3 = x 0 x 1 x 2 + x 1 x 3 + x 0 + x 1 + x 2 + 1 . If we fix two variables to a constant value then two coordinates of the Sbox are affine with respect to the input variables. 6 / 23

  10. Introduction An example ANF of the Hamsi Sbox = x 0 x 2 + x 1 + x 2 + x 3 y 0 y 1 = x 0 x 1 x 2 + x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 0 x 3 + x 2 x 3 + x 0 + x 1 + x 2 = x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 1 x 3 + x 2 x 3 + x 0 + x 1 + x 3 y 2 y 3 = x 0 x 1 x 2 + x 1 x 3 + x 0 + x 1 + x 2 + 1 . If we fix one variable to a constant value then one coordinate of the Sbox is affine with respect to the input variables. 6 / 23

  11. The notion of ( v, w ) -linearity Outline Introduction 1 The notion of ( v, w ) -linearity 2 Analysis of 4 -bit optimal Sboxes 3 Application to Hamsi 4 Conclusion 5 7 / 23

  12. The notion of ( v, w ) -linearity Definition of ( v, w ) -linearity Definition. Let S be a function from F n 2 into F m 2 . Then, S is ( v, w ) -linear if there exist two linear subspaces V ⊂ F n 2 and W ⊂ F m with 2 dim V = v and dim W = w such that, for all λ ∈ W , S λ : x �→ λ · S ( x ) has degree at most 1 on all cosets of V . 8 / 23

  13. The notion of ( v, w ) -linearity Example y 0 = x 0 x 2 + x 1 + x 2 + x 3 = x 0 x 1 x 2 + x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 0 x 3 + x 2 x 3 + x 0 + x 1 + x 2 y 1 = x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 1 x 3 + x 2 x 3 + x 0 + x 1 + x 3 y 2 = x 0 x 1 x 2 + x 1 x 3 + x 0 + x 1 + x 2 + 1 . y 3 S is (2 , 2) -linear for V = � 1 , 8 � and W = � 1 , 8 � . 9 / 23

  14. The notion of ( v, w ) -linearity Example y 0 = x 0 x 2 + x 1 + x 2 + x 3 = x 0 x 1 x 2 + x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 0 x 3 + x 2 x 3 + x 0 + x 1 + x 2 y 1 = x 0 x 1 x 3 + x 0 x 2 x 3 + x 1 x 2 + x 1 x 3 + x 2 x 3 + x 0 + x 1 + x 3 y 2 = x 0 x 1 x 2 + x 1 x 3 + x 0 + x 1 + x 2 + 1 . y 3 S is (3 , 1) -linear for V = � 1 , 2 , 8 � and W = � 1 � . 9 / 23

  15. The notion of ( v, w ) -linearity Link with the Maiorana-McFarland Construction An Example: Let f : F 4 2 → F 2 with f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 . Let V = � 1 , 2 � . Then f is (2 , 1) -linear w.r.t. V . 10 / 23

  16. The notion of ( v, w ) -linearity Link with the Maiorana-McFarland Construction An Example: Let f : F 4 2 → F 2 with f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 . Let V = � 1 , 2 � . Then f is (2 , 1) -linear w.r.t. V . 10 / 23

  17. The notion of ( v, w ) -linearity Link with the Maiorana-McFarland Construction An Example: Let f : F 4 2 → F 2 with f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 . Let V = � 1 , 2 � . Then f is (2 , 1) -linear w.r.t. V . f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 = ( x 3 x 4 + x 4 ) x 1 + ( x 3 + 1) x 2 + x 3 x 4 + x 4 = ( x 3 x 4 + x 4 , x 3 + 1) · ( x 1 , x 2 ) + x 3 x 4 + x 4 10 / 23

  18. The notion of ( v, w ) -linearity Link with the Maiorana-McFarland Construction An Example: Let f : F 4 2 → F 2 with f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 . Let V = � 1 , 2 � . Then f is (2 , 1) -linear w.r.t. V . f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 = ( x 3 x 4 + x 4 ) x 1 + ( x 3 + 1) x 2 + x 3 x 4 + x 4 = ( x 3 x 4 + x 4 , x 3 + 1) · ( x 1 , x 2 ) + x 3 x 4 + x 4 In general, any f : F n 2 → F 2 that is ( v, 1) -linear w.r.t. V can be written as f ( x, y ) = π ( x ) · y + h ( x ) , with ( x, y ) ∈ U × V. 10 / 23

  19. The notion of ( v, w ) -linearity Link with the Maiorana-McFarland Construction An Example: Let f : F 4 2 → F 2 with f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 . Let V = � 1 , 2 � . Then f is (2 , 1) -linear w.r.t. V . f ( x 1 , x 2 , x 3 , x 4 ) = x 1 x 3 x 4 + x 1 x 4 + x 2 x 3 + x 3 x 4 + x 2 + x 4 = ( x 3 x 4 + x 4 ) x 1 + ( x 3 + 1) x 2 + x 3 x 4 + x 4 = ( x 3 x 4 + x 4 , x 3 + 1) · ( x 1 , x 2 ) + x 3 x 4 + x 4 In general, any f : F n 2 → F 2 that is ( v, 1) -linear w.r.t. V can be written as f ( x, y ) = π ( x ) · y + h ( x ) , with ( x, y ) ∈ U × V. Generalisation of the Maiorana-McFarland construction for bent functions . 10 / 23

  20. The notion of ( v, w ) -linearity Link with the Maiorana-McFarland Construction Proposition. S is ( v, w ) - linear w.r.t. ( V, W ) if and only if its components S λ , λ ∈ W , can be written as F w S W : U ⊕ V → 2 ( u, v ) �→ M ( u ) v + G ( u ) where M ( u ) is a w × v binary matrix. Equivalently, all second-order derivatives D α D β S W , with α, β ∈ V , vanish. 11 / 23

  21. The notion of ( v, w ) -linearity General Properties Proposition. If S is ( v, w ) - linear w.r.t. ( V, W ) , then all its compo- nents S λ , λ ∈ W have degree at most n + 1 − v and L ( S ) ≥ 2 v . Equivalence holds for v = n − 1 and w = 1 . 12 / 23

  22. Analysis of 4 -bit optimal Sboxes Outline Introduction 1 The notion of ( v, w ) -linearity 2 Analysis of 4 -bit optimal Sboxes 3 Application to Hamsi 4 Conclusion 5 13 / 23

  23. Analysis of 4 -bit optimal Sboxes 4-bit optimal Sboxes Many symmetric primitives are based on 4 -bit balanced Sboxes. Optimal Sbox: Sbox with optimal resistance against differential and linear cryptanalysis [Leander-Poschmann07]: 16 classes of optimal 4 -bit balanced Sboxes upon affine equivalence. 14 / 23

  24. Analysis of 4 -bit optimal Sboxes 4-bit optimal Sboxes Many symmetric primitives are based on 4 -bit balanced Sboxes. Optimal Sbox: Sbox with optimal resistance against differential and linear cryptanalysis [Leander-Poschmann07]: 16 classes of optimal 4 -bit balanced Sboxes upon affine equivalence. Study these 16 classes under the spectrum of ( v, w ) -linearity . # ( V, W ) such that an Sbox is ( v, w ) -linear w.r.t. ( V, W ) → invariant under affine equivalence. 14 / 23

  25. Analysis of 4 -bit optimal Sboxes Analysis of 4 -bit optimal Sboxes Number of V such that S is ( v, w ) -linear w.r.t. ( V, W ) for some W . ( v, w ) (2,1) (2,2) (2,3) (2,4) (3,1) (3,2) (3,3) (3,4) Q G 0 3 35 19 5 0 7 1 0 0 G 1 3 35 23 3 0 7 1 0 0 G 2 3 35 23 3 0 7 1 0 0 G 3 0 35 5 0 0 0 0 0 0 G 4 0 35 5 0 0 0 0 0 0 G 5 0 35 5 0 0 0 0 0 0 0 35 5 0 0 0 0 0 0 G 6 0 35 5 0 0 0 0 0 0 G 7 G 8 3 35 19 5 0 7 1 0 0 G 9 1 35 13 0 0 3 0 0 0 G 10 1 35 13 0 0 3 0 0 0 G 11 0 35 5 0 0 0 0 0 0 G 12 0 35 5 0 0 0 0 0 0 G 13 0 35 5 0 0 0 0 0 0 1 35 13 0 0 3 0 0 0 G 14 1 35 11 1 0 3 0 0 0 G 15 15 / 23

  26. Application to Hamsi Outline Introduction 1 The notion of ( v, w ) -linearity 2 Analysis of 4 -bit optimal Sboxes 3 Application to Hamsi 4 Conclusion 5 16 / 23

Recommend


More recommend