two ways of building round functions for block ciphers
play

Two ways of building round functions for block ciphers Joan Daemen - PowerPoint PPT Presentation

Two ways of building round functions for block ciphers Joan Daemen Radboud University ibenik summer school 2016 1 / 44 Outline 1 Block ciphers and statistical attacks 2 Correlation basics 3 Wide trail strategy: strongly-aligned flavor


  1. Two ways of building round functions for block ciphers Joan Daemen Radboud University Šibenik summer school 2016 1 / 44

  2. Outline 1 Block ciphers and statistical attacks 2 Correlation basics 3 Wide trail strategy: strongly-aligned flavor 4 Wide trail strategy: weakly-aligned flavor 5 Conclusions 2 / 44

  3. Block ciphers and statistical attacks Outline 1 Block ciphers and statistical attacks 2 Correlation basics 3 Wide trail strategy: strongly-aligned flavor 4 Wide trail strategy: weakly-aligned flavor 5 Conclusions 3 / 44

  4. Block ciphers and statistical attacks Product cipher [Claude Shannon, 1949] and SPN 4 / 44

  5. Block ciphers and statistical attacks Product cipher [Claude Shannon, 1949] and SPN 4 / 44

  6. Block ciphers and statistical attacks Product cipher [Claude Shannon, 1949] and SPN 4 / 44

  7. Block ciphers and statistical attacks Product cipher [Claude Shannon, 1949] and SPN 4 / 44

  8. Block ciphers and statistical attacks Product cipher [Claude Shannon, 1949] and SPN 4 / 44

  9. Block ciphers and statistical attacks Iterated block ciphers [DES and later] 5 / 44

  10. Block ciphers and statistical attacks offline: guess k a Statistical attacks Basic attacks Many variants … Two phases: 6 / 44 Exploits Distinguisher Ω over r − 1 rounds online: get many ( C i , P i ) K P Wrong guess destroys Ω Key Data sched. path DC: requires 1 / DP couples rounds rounds LC: requires 1 / C 2 couples C

  11. Block ciphers and statistical attacks Basic attacks Many variants … Statistical attacks 6 / 44 offline: guess k a Two phases: Exploits Distinguisher Ω over r − 1 rounds online: get many ( C i , P i ) P Wrong guess destroys Ω Distinguisher DC: requires 1 / DP couples LC: requires 1 / C 2 couples a k a C

  12. Block ciphers and statistical attacks Basic attacks Many variants … Statistical attacks 6 / 44 offline: guess k a Two phases: Exploits Distinguisher Ω over r − 1 rounds online: get many ( C i , P i ) P ∆ p Wrong guess destroys Ω DP( ∆ p, ∆ a ) DC: requires 1 / DP couples LC: requires 1 / C 2 couples ∆ a a k a C

  13. Block ciphers and statistical attacks Basic attacks Many variants … Statistical attacks 6 / 44 offline: guess k a Two phases: Exploits Distinguisher Ω over r − 1 rounds online: get many ( C i , P i ) P u p Wrong guess destroys Ω C 2 ( u p, u a ) DC: requires 1 / DP couples LC: requires 1 / C 2 couples u a a k a C

  14. Block ciphers and statistical attacks Distinguisher: difference propagation 7 / 44 Differential trail: DP ( Q ) ≈ ∏ i DP ( Sbox i ) and w ( Q ) = ∑ i w ( Sbox i ) Differential: DP ( ∆ p , ∆ a ) = ∑ ∆ p → Q → ∆ a DP ( Q )

  15. Block ciphers and statistical attacks Distinguisher: difference propagation 7 / 44 Differential trail: DP ( Q ) ≈ ∏ i DP ( Sbox i ) and w ( Q ) = ∑ i w ( Sbox i ) Differential: DP ( ∆ p , ∆ a ) = ∑ ∆ p → Q → ∆ a DP ( Q )

  16. Correlation basics Outline 1 Block ciphers and statistical attacks 2 Correlation basics 3 Wide trail strategy: strongly-aligned flavor 4 Wide trail strategy: weakly-aligned flavor 5 Conclusions 8 / 44

  17. Correlation basics 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 0 1 1 0 0 0 0 Boolean function x 4 0 0 1 0 0 0 0 y x 3 1 x 2 x 1 y x 4 x 3 x 2 x 1 Algebraic expression: Mapping from GF(2 n ) to GF(2) 0 1 1 1 1 0 1 0 1 0 1 0 1 0 0 1 1 0 0 1 1 0 0 0 9 / 44 Input is a vector x = ( x 1 , x 2 , . . . x n ) y = x 1 x 2 + x 1 x 3 x 4 + x 2 x 4 + 1 Truth table: 2 n bit array or vector :

  18. Correlation basics We define an inner product: The correlation now becomes Correlation between two Boolean functions x 10 / 44 Real-valued counterpart of a Boolean function: C ( f , g ) = 2Pr ( f ( x ) = g ( x )) − 1 f ( x ) = ( − 1 ) f ( x ) ˆ g > = ∑ < ˆ ˆ f , ˆ f ( x ) ˆ g ( x ) √ …and norm || ˆ < ˆ f , ˆ f || = f > C ( f , g ) = < ˆ f , ˆ g > || ˆ f || · || ˆ g ||

  19. Correlation basics Correlation between Boolean functions geometrically g f 11 / 44 ✕ ✁ ✁ ˆ C ( f , g ) = cos α ✁ ✁ ✁ ✁ ✯ ✟ ✟✟✟✟✟✟✟✟✟✟✟ ✁ ✁ ✁ α ˆ ✁ ✁ ✁ Vector space: R 2 n

  20. Correlation basics Linear functions and selection vectors x 8 x 1 w T x : 0 0 0 1 0 0 1 1 0 0 1 0 w : x 3 Linear Boolean function with mask w : w T x x : x 0 x 2 x 1 x 4 x 5 x 6 x 7 x 8 x 9 12 / 44 If u ̸ = v : < ( − 1 ) u T x , ( − 1 ) v T x > = 0 Linear functions form an orthogonal basis of R 2 n x 10 x 11 + x 4 + x 5 +

  21. Correlation basics w x Spectrum of a Boolean function with coordinates given by: 13 / 44 We can represent ˆ f ( x ) with respect to the basis of linear functions: ˆ f ( x ) = ∑ F ( w )( − 1 ) w T x F ( w ) = 2 − n ∑ ˆ f ( x )( − 1 ) w T x This is called the Walsh-Hadamard transform F ( w ) = W ( f ( x )) So simply: F ( w ) = C ( f ( x ) , w T x ) Orthogonal transformation in R 2 n Consequence: Parseval’s Theorem ∑ F ( w ) 2 = 1

  22. Correlation basics Adding Boolean functions in GF(2) Spectrum of sum equals convolution of spectra Special cases: 14 / 44 Let h ( x ) = f ( x ) + g ( x ) From ˆ h ( x ) = ˆ f ( x ) ˆ g ( x ) follows H ( w ) = ∑ v F ( v + w ) G ( v ) Constant function: g ( x ) = 1 : H ( w ) = − F ( w ) Linear function: g ( x ) = u T x : H ( w ) = F ( w + u ) Disjunct functions f and g : H ( v + w ) = F ( v ) G ( w )

  23. Correlation basics 2 From this it follows Multiplying Boolean functions in GF(2) 15 / 44 Let h ( x ) = f ( x ) g ( x ) . Then: ( ) ˆ 1 + ˆ g ( x ) − ˆ h ( x ) = 1 f ( x ) + ˆ f ( x ) ˆ g ( x ) W ( fg ) = 1 2 ( δ ( w ) + W ( f ) + W ( g ) + W ( f + g )) with δ ( w ) = 1 iff w = 0

  24. Correlation basics x T h Correlation matrices [Daemen 1994] 16 / 44 Homomorphism: Correlation matrix C h : m -bit vector Boolean function: h ( x ) = ( h 1 ( x ) , h 2 ( x ) . . . h m ( x )) 2 m rows and 2 n columns element at row u , column v : C ( u T h ( x ) , v T x ) ✲ y = h ( x ) ⇕ L ⇕ L C ( h ) ✲ X with X u = ( − 1 ) x T u Y = C ( h ) X − 1 = ( C ( h ) ) If h is permutation: C ( h − 1 ) = ( C ( h ) )

  25. Correlation basics Correlation matrices of special functions i 17 / 44 Adding a constant: f ( x ) = x + k C u , u = ( − 1 ) u T k and C u , v ̸ = u = 0 Linear function: f ( x ) = Mx C u , w = 1 iff M T u = w and 0 otherwise Parallel composition: b = ( b 1 , b 2 , . . . ) = ( h 1 ( a 1 ) , h 2 ( a 2 ) , . . . ) = h ( a ) C ( h ) u , w = ∏ C ( h i ) u ( i ) , w ( i ) If w i = 0 then C ( h i ) u ( i ) , w ( i ) = 1 C ( h ) u , w is product of correlation over active S-boxes

  26. Correlation basics f w g Correlation matrices: serial composition 18 / 44 a A ✲ ✲ f ( a ) g ( f ( a )) ⇕ L ⇕ L ⇕ L C ( f ) C ( g ) ✲ ✲ C ( f ) A C ( g ) C ( f ) A C ( g ◦ f ) ( u , v ) = ∑ C ( g ) ( u , w ) C ( f ) ( w , v )

  27. Correlation basics Linear trails and correlation 19 / 44 Linear trail: C p ( Q ) = ∏ i C ( Sbox i ) Correlation: C ( u T β ( a ) , w T a ) = ∑ w → Q → u C p ( Q )

  28. Wide trail strategy: strongly-aligned flavor Outline 1 Block ciphers and statistical attacks 2 Correlation basics 3 Wide trail strategy: strongly-aligned flavor 4 Wide trail strategy: weakly-aligned flavor 5 Conclusions 20 / 44

  29. Wide trail strategy: strongly-aligned flavor Replacing the permutation in SPN by a mixing layer 21 / 44

  30. Wide trail strategy: strongly-aligned flavor Replacing the permutation in SPN by a mixing layer 21 / 44

  31. Wide trail strategy: strongly-aligned flavor 22 / 44 Mixing layer criterion: Branch number B

  32. Wide trail strategy: strongly-aligned flavor 22 / 44 Mixing layer criterion: Branch number B

  33. Wide trail strategy: strongly-aligned flavor 22 / 44 Mixing layer criterion: Branch number B

  34. Wide trail strategy: strongly-aligned flavor Mixing layer and error-correcting codes 23 / 44

  35. Wide trail strategy: strongly-aligned flavor Mixing layer and error-correcting codes 23 / 44

  36. Wide trail strategy: strongly-aligned flavor 24 / 44 B active S-boxes in each sequence of 2 rounds

  37. Wide trail strategy: strongly-aligned flavor Recursion: four-round theorem 25 / 44 B 1 × B 2 active S-boxes per 4 rounds

  38. Wide trail strategy: strongly-aligned flavor Recursion: four-round theorem 25 / 44 B 1 × B 2 active S-boxes per 4 rounds

  39. Wide trail strategy: strongly-aligned flavor Recursion: four-round theorem 25 / 44 B 1 × B 2 active S-boxes per 4 rounds

  40. Wide trail strategy: strongly-aligned flavor Recursion: four-round theorem 25 / 44 B 1 × B 2 active S-boxes per 4 rounds

  41. Wide trail strategy: strongly-aligned flavor Rijndael [Daemen, Rijmen 1998] Trails: 25 active S-boxes per 4 rounds Clustering of trails but not alarming Costly S-box and mixing Byte-alignment leads to structural properties 26 / 44

  42. Wide trail strategy: weakly-aligned flavor Outline 1 Block ciphers and statistical attacks 2 Correlation basics 3 Wide trail strategy: strongly-aligned flavor 4 Wide trail strategy: weakly-aligned flavor 5 Conclusions 27 / 44

Recommend


More recommend