generating graphs packed with paths
play

Generating Graphs Packed With Paths Philip Vejre 1 Mathias - PowerPoint PPT Presentation

Generating Graphs Packed With Paths Philip Vejre 1 Mathias Hall-Andersen 2 FSE 2019 1 DTU, Akamai Technologies 2 PLTC @ University of Copenhagen 1 Overview Motivation Linear Cryptanalysis & Graphs Subgraph Heuristics (for SPN) Plots &


  1. Generating Graphs Packed With Paths Philip Vejre 1 Mathias Hall-Andersen 2 FSE 2019 1 DTU, Akamai Technologies 2 PLTC @ University of Copenhagen 1

  2. Overview Motivation Linear Cryptanalysis & Graphs Subgraph Heuristics (for SPN) Plots & Results Future Work 2

  3. Motivation

  4. Differential and Linear Distinguishers [BS90] P x [ E k ( x ) + ∇ = E k ( x + ∆)] [Mat93] P x [ � α, x � = � β, E k ( x ) � ] 3

  5. Differential and Linear Distinguishers [BS90] P x [ E k ( x ) + ∇ = E k ( x + ∆)] [Mat93] P x [ � α, x � = � β, E k ( x ) � ] 3

  6. Differential and Linear Distinguishers [BS90] P x [ E k ( x ) + ∇ = E k ( x + ∆)] [Mat93] P x [ � α, x � = � β, E k ( x ) � ] 3

  7. Differential and Linear Distinguishers In this presentation, focus on linear cryptanalysis (differential largely analogous) [MY92], [Mat93] P x [ � α, x � = � β, E k ( x ) � ] 4

  8. Iterated Ciphers and Trails E k = E ( r ) k r ◦ . . . ◦ E (2) k 2 ◦ E (1) k 1 5

  9. Iterated Ciphers and Trails E k = E ( r ) k r ◦ . . . ◦ E (2) k 2 ◦ E (1) k 1 U = ( α = u 0 , . . . , u r = β ) 5

  10. Iterated Ciphers and Trails E k = E ( r ) k r ◦ . . . ◦ E (2) k 2 ◦ E (1) k 1 U = ( α = u 0 , . . . , u r = β ) ( u i , u i +1 ) ( i ) = 2 · P x ∈ F n [ � u i , x � = � u i +1 , E ( i ) C k i k i ( x ) � ] − 1 5

  11. Hull Correlation contribution for linear trail 1 : r C k � C k i U = ( u i , u i +1 ) ( i ) i =0 1 under ‘Markov cipher assumption’ 6

  12. Hull Correlation contribution for linear trail 1 : r C k � C k i U = ( u i , u i +1 ) ( i ) i =0 � C k C k α,β = U U :( u 0 , u r )=( α,β ) 1 under ‘Markov cipher assumption’ 6

  13. Hull; Expected Linear Potential For key-alternating ciphers (key-addition in the field): r U ) 2 = ( C U ) 2 = � ( u i , u i +1 ) ( i )) 2 ∀ k : ( C k ( C k i =0 7

  14. Hull; Expected Linear Potential For key-alternating ciphers (key-addition in the field): r U ) 2 = ( C U ) 2 = ∀ k : ( C k � ( C k ( u i , u i +1 ) ( i )) 2 i =0 E [( C α,β ) 2 ] ≈ � ( C k U ) 2 U :( u 0 , u r )=( α,β ) 7

  15. Hull; Expected Linear Potential For key-alternating ciphers (key-addition in the field): r U ) 2 = ( C U ) 2 = ∀ k : ( C k � ( C k ( u i , u i +1 ) ( i )) 2 i =0 E [( C α,β ) 2 ] ≈ � ( C k U ) 2 U ∈U , ( u 0 , u r )=( α,β ) 7

  16. Hull; Expected Linear Potential For key-alternating ciphers (key-addition in the field): r U ) 2 = ( C U ) 2 = ∀ k : ( C k � ( C k ( u i , u i +1 ) ( i )) 2 i =0 E [( C α,β ) 2 ] ≈ � ( C U ) 2 U ∈U , ( u 0 , u r )=( α,β ) Problem: Current methods usually linear in the number of trails 7

  17. Linear Cryptanalysis & Graphs

  18. Multistage Graph α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 8

  19. Nodes and Parities α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 Nodes α ∈ F n represent parities α ∗ for linear cryptanalysis: α ∗ : v �→ � v , α � 9

  20. Edges and Approximations α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 l ( u → v ) = ( C k ( u , v ) ) 2 10

  21. Paths and Trails α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 r − 1 � l ( v 0 � v r ) = l ( v i → v i +1 ) i =0 11

  22. Hulls as Sets of Paths α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 � � w G E ( α β ) = l ( α � β ) = w G E ( α v ) · l ( v → β ) ♦ ♦ v 12

  23. Hulls as Sets of Paths α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 � � w G E ( α β ) = l ( α � β ) = w G E ( α v ) · l ( v → β ) ♦ ♦ v 13

  24. Hulls as Sets of Paths α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 � � w G E ( α β ) = l ( α � β ) = w G E ( α v ) · l ( v → β ) ♦ ♦ v 13

  25. Hulls as Sets of Paths α 0 u 0 v 0 β 0 α 1 u 1 v 1 β 1 α 2 u 2 v 2 β 2 α 3 u 3 v 3 β 3 E (1) E (2) E (3) k 1 k 2 k 3 � � w G E ( α β ) = l ( α � β ) = w G E ( α v ) · l ( v → β ) ♦ ♦ v 13

  26. Suitable Subgraphs The full graph G E is too large. (exponential in the block-size) 14

  27. Can we find suitable ¯ G E ⊂ G E , that contains the good trails? i.e. max α,β w ¯ G E ( α β ) is large. ♦ 15

  28. Subgraph Heuristics (for SPN)

  29. Overall Method 1. Pick disjoint ‘families’ of edges 16

  30. Overall Method 1. Pick disjoint ‘families’ of edges 2. Prune the families an ‘approximate’ graph 16

  31. Overall Method 1. Pick disjoint ‘families’ of edges 2. Prune the families an ‘approximate’ graph 3. Expand the families to a full graph 16

  32. Overall Method 1. Pick disjoint ‘families’ of edges 2. Prune the families an ‘approximate’ graph 3. Expand the families to a full graph 4. Remove unneeded vertices & edges in resulting graph 16

  33. Pruning Strip l ( v → u ) = 0 17

  34. Pruning Prune 18

  35. S-Box Patterns / Families of edges Example: 16-bit SPN, with four identical 4-bit S-Boxes. 19

  36. S-Box Patterns / Families of edges Example: 16-bit SPN, with four identical 4-bit S-Boxes. C 2 ( 0x3 , 0xd ) = 2 − 2 C 2 ( 0x7 , 0x4 ) = 2 − 2 19

  37. S-Box Patterns / Families of edges Example: 16-bit SPN, with four identical 4-bit S-Boxes. C 2 ( 0x3 , 0xd ) = 2 − 2 C 2 ( 0x7 , 0x4 ) = 2 − 2 p = (1 , 2 − 2 , 1 , 2 − 2 ) 19

  38. S-Box Patterns / Families of edges Example: 16-bit SPN, with four identical 4-bit S-Boxes. C 2 ( 0x3 , 0xd ) = 2 − 2 C 2 ( 0x7 , 0x4 ) = 2 − 2 p = (1 , 2 − 2 , 1 , 2 − 2 ) Ex( p ) = { ( 0x0303 , 0x0d0d ) , ( 0x0307 , 0x0d04 ) , ( 0x0703 , 0x040d ) , ( 0x0707 , 0x0404 ) } 19

  39. S-Box Patterns / Families of edges Ex( p ) = { ( 0x0303 , 0x0d0d ) , ( 0x0307 , 0x0d04 ) , ( 0x0703 , 0x040d ) , ( 0x0707 , 0x0404 ) } Ex in ( p ) = { 0x0303 , 0x0307 , 0x0703 , 0x0707 } Ex out ( p ) = { 0x0d0d , 0x0d04 , 0x040d , 0x0404 } 20

  40. Graph Defined By S-Box Pattern Set Given a set of S-Box patterns P , the graph defined by P : � E = Ex( P ) = Ex( p ) p ∈P V = Ex in ( P ) ∪ Ex out ( P ) 21

  41. Graph Defined By S-Box Pattern Set Let P be a set of S-Box patterns defining our subgraph. 22

  42. Graph Defined By S-Box Pattern Set Let P be a set of S-Box patterns defining our subgraph. For intermediate stages: v / ∈ Ex in ( P ) ∩ Ex out ( P ) = ⇒ v is pruned 22

  43. Graph Compression Problem: Ex( P ) too large to store explicitly ( | Ex( P ) | ≫ |P| ) 23

  44. Graph Compression Problem: Ex( P ) too large to store explicitly ( | Ex( P ) | ≫ |P| ) Idea: Can we prune P before expanding? 23

  45. Graph Compression Problem: Ex( P ) too large to store explicitly ( | Ex( P ) | ≫ |P| ) Idea: Can we prune P before expanding? Generate an approximation of ¯ G E = Ex( P ), by applying a compression function g j : F n → F n / j to every vertex. u → v ∈ ¯ g j ( ¯ G E = ⇒ ˆ g j ( u ) → ˆ g j ( v ) ∈ ˆ G E ) 23

  46. Graph Compression Iteratively refine the compression: 1. Generate a set of patterns P . 2. Pick a j > 1 such that j is a power of two: g j ( ¯ 2.1 Generate the graph ˆ G E ) from P and prune. g j ( ¯ 2.2 Remove dead patterns from P according to ˆ G E ). 2.3 If j = 2 then stop. Otherwise set j = j / 2 and repeat. 24

  47. Vertex Anchoring S 0 S 1 S 2 S 3 S 4 S 5 S 6 S 7 25

  48. Vertex Anchoring Pruned middle rounds S 0 S 1 S 2 S 3 S 4 S 5 S 6 S 7 26

  49. Vertex Anchoring Pruned middle rounds S 0 S 1 S 2 S 3 S 4 S 5 S 6 S 7 27

  50. Plots & Results

  51. https://gitlab.com/psve/cryptagraph 28

  52. Plots of subgraphs (for small parameters) 29

  53. PRESENT [BKL + 07] 30

  54. GIFT [BPP + 17] 31

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