boomerang connectivity table revisited

37
Ling Song 1,2 , Xianrui Qin 3 , Lei Hu 2 Boomerang Connectivity Table Revisited 1. Nanyang Technological University, Singapore 2. Institute of Information Engineering, CAS, China 3. Shandong University, China FSE 2019 @ Paris

Upload: others

Post on 28-Apr-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Boomerang Connectivity Table Revisited

Ling Song1,2, Xianrui Qin3, Lei Hu2

Boomerang Connectivity Table Revisited

1. Nanyang Technological University, Singapore

2. Institute of Information Engineering, CAS, China

3. Shandong University, China

FSE 2019 @ Paris

Page 2: Boomerang Connectivity Table Revisited

/24

Boomerang Attacks

Proposed by [Wag99] to combine two diff. trails:β€’ 𝐸0: Pr 𝛼 β†’ 𝛽 = 𝑝

β€’ 𝐸1: Pr 𝛾 β†’ 𝛿 = π‘ž

Distinguishing probability:

𝑝2π‘ž2𝐸1 𝐸1

𝐸1𝐢1

𝐢2

𝐢3

𝐢4

𝛿

𝛿

𝐸0 𝐸0

𝐸0

𝑃1

𝑃2

𝑃3

𝑃4𝛼

𝛾

𝛾𝛽

𝛽

𝛼

𝐸0

𝐸1

2

Page 3: Boomerang Connectivity Table Revisited

/24

Boomerang attacks: When you

send it properly, it always

comes back to you.

Boomerang Attacks

Proposed by [Wag99] to combine two diff. trails:β€’ 𝐸0: Pr 𝛼 β†’ 𝛽 = 𝑝

β€’ 𝐸1: Pr 𝛾 β†’ 𝛿 = π‘ž

Distinguishing probability:

𝑝2π‘ž2𝐸1 𝐸1

𝐸1𝐢1

𝐢2

𝐢3

𝐢4

𝛿

𝛿

𝐸0 𝐸0

𝐸0

𝑃1

𝑃2

𝑃3

𝑃4𝛼

𝛾

𝛾𝛽

𝛽

𝛼

𝐸0

𝐸1

https://www.australiathegift.com.au/shop/boomerang-with-stand/

2

Page 4: Boomerang Connectivity Table Revisited

/24

Boomerang attacks: When you

send it properly, it always

comes back to you.

Boomerang Attacks

Proposed by [Wag99] to combine two diff. trails:β€’ 𝐸0: Pr 𝛼 β†’ 𝛽 = 𝑝

β€’ 𝐸1: Pr 𝛾 β†’ 𝛿 = π‘ž

Distinguishing probability:

𝑝2π‘ž2𝐸1 𝐸1

𝐸1𝐢1

𝐢2

𝐢3

𝐢4

𝛿

𝛿

𝐸0 𝐸0

𝐸0

𝑃1

𝑃2

𝑃3

𝑃4𝛼

𝛾

𝛾𝛽

𝛽

𝛼

𝐸0

𝐸1

[Wag99]: Assumed two trails are independent.

NOT always correct

https://www.australiathegift.com.au/shop/boomerang-with-stand/

2

Page 5: Boomerang Connectivity Table Revisited

/24

β€’ [BDD03]: Middle-round S-box trick

β€’ [BK09]: Boomerang switch: Ladder switch / Feistel switch / S-box switch

Dependency can help attackers

β€’ [Mer09]: Incompatible trails

Dependency can spoil attacks.

Two Trails in Boomerang Attacks

3

Page 6: Boomerang Connectivity Table Revisited

/24

Sandwich Attacks [DKS10]

Distinguishing probability:

𝑝2 π‘ž2π‘Ÿ

𝛿

𝛿

𝛾

𝛾

෨𝐸0 ෨𝐸0

෨𝐸0

𝛼

෨𝐸0𝛽

𝛼

෨𝐸1 ෨𝐸1

෨𝐸1

𝑦1

𝑦2

𝑦3

𝑦4

෨𝐸1

π‘₯1 π‘₯3

π‘₯4πΈπ‘š

𝛽

𝐢1

𝐢2

𝐢3

𝐢4

𝑃1

𝑃2

𝑃3

𝑃4

π‘₯2

πΈπ‘š

πΈπ‘š

πΈπ‘š

Decompose the cipher into three partsβ€’ πΈπ‘š handles the dependency.

β€’ ෨𝐸0 ← 𝐸0 \πΈπ‘š: Pr 𝛼 β†’ 𝛽 = 𝑝

β€’ ෨𝐸1 ← 𝐸1 \πΈπ‘š: Pr 𝛾 β†’ 𝛿 = π‘ž

4

Page 7: Boomerang Connectivity Table Revisited

/24

Sandwich Attacks [DKS10]

Distinguishing probability:

𝑝2 π‘ž2π‘Ÿ

𝛿

𝛿

𝛾

𝛾

෨𝐸0 ෨𝐸0

෨𝐸0

𝛼

෨𝐸0𝛽

𝛼

෨𝐸1 ෨𝐸1

෨𝐸1

𝑦1

𝑦2

𝑦3

𝑦4

෨𝐸1

π‘₯1 π‘₯3

π‘₯4πΈπ‘š

𝜷?

𝐢1

𝐢2

𝐢3

𝐢4

𝑃1

𝑃2

𝑃3

𝑃4

π‘₯2

πΈπ‘š

πΈπ‘š

πΈπ‘š

π‘Ÿ = Pr[π‘₯3 βŠ•π‘₯4 = 𝛽|(π‘₯1 βŠ•π‘₯2 = 𝛽)β‹€(𝑦1 βŠ•π‘¦3 = 𝛾)β‹€(𝑦2 βŠ•π‘¦4 = 𝛾)]

Decompose the cipher into three partsβ€’ πΈπ‘š handles the dependency.

β€’ ෨𝐸0 ← 𝐸0 \πΈπ‘š: Pr 𝛼 β†’ 𝛽 = 𝑝

β€’ ෨𝐸1 ← 𝐸1 \πΈπ‘š: Pr 𝛾 β†’ 𝛿 = π‘ž

4

Page 8: Boomerang Connectivity Table Revisited

/24

BCT [CHP+18]

Boomerang Connectivity Table (BCT)β€’ Calculate π‘Ÿ theoretically when πΈπ‘š is composed of a

single Sβˆ’box layer.β€’ Unify previous observations on the S-box (incompa-

tibilities and switches)

𝑆

𝑆

𝑆

𝑆

π‘₯1

π‘₯2

π‘₯3

π‘₯4

𝑦1

𝑦2

𝑦3

𝑦4

𝛼

𝛽

𝛽

𝛼

5

Page 9: Boomerang Connectivity Table Revisited

/24

Our Work

β€’ The actual boundaries of πΈπ‘š which contains dependency

β€’ How to calculate π‘Ÿ when πΈπ‘š contains multiple rounds?

β€’ Generalized framework of BCT– Determine the boundaries of πΈπ‘š

– Calculate π‘Ÿ of πΈπ‘š in the sandwich attack

Motivation

Contribution

6

Page 10: Boomerang Connectivity Table Revisited

/24

DDT: Difference Distribution Table

𝐷𝐷𝑇 𝛼, 𝛽 = #{π‘₯ ∈ {0,1}𝑛|𝑆 π‘₯ ⨁𝑆 π‘₯⨁𝛼 = 𝛽}

SKINNY’s 4-bit S-box

𝛼

𝛽

7

Page 11: Boomerang Connectivity Table Revisited

/24

BCT: Boomerang Connectivity Table

𝐡𝐢𝑇 𝛼, 𝛽 = #{π‘₯ ∈ {0,1}𝑛|π‘†βˆ’1(𝑆 π‘₯ βŠ• 𝛽)β¨π‘†βˆ’1(𝑆 π‘₯⨁𝛼 βŠ• 𝛽) = 𝛼}

𝑆 𝑆

𝑆

π‘₯1

π‘₯2

π‘₯3

𝑦1

𝑦2

𝑦3

𝑦4

𝛼

𝛽𝑆

𝛽

π‘₯4

𝛼

SKINNY’s 4-bit S-box

𝛼

𝛽

8

Page 12: Boomerang Connectivity Table Revisited

/24

Relation between DDT and BCT

Let

9

Page 13: Boomerang Connectivity Table Revisited

/24

Relation between DDT and BCT

Let

9

Page 14: Boomerang Connectivity Table Revisited

/24

Relation between DDT and BCT

Let

Eq. 1 can be re-written as

9

Page 15: Boomerang Connectivity Table Revisited

/24

New Explanation of BCT

π‘Ÿ for πΈπ‘š with one S-box layer at the boundary of E0 and E1

10

Page 16: Boomerang Connectivity Table Revisited

/24

New Explanation of BCT

π‘Ÿ for πΈπ‘š with one S-box layer at the boundary of E0 and E1

Similarly,

10

Page 17: Boomerang Connectivity Table Revisited

/24

New Explanation of BCT

π‘Ÿ for πΈπ‘š with one S-box layer at the boundary of E0 and E1

Similarly,

In this case, 𝛼 and 𝛽 are regarded as fixed.10

Page 18: Boomerang Connectivity Table Revisited

/24

Generalization: S-box in E0 or E1

Lower crossing difference

Upper crossing difference

S-box in E0 S-box in E1

11

Page 19: Boomerang Connectivity Table Revisited

/24

Generalization: S-box in E0 or E1

11

What if 𝛼 or 𝛽 (crossing differences) are not fixed?

S-box in E0 S-box in E1

Upper crossing difference

Lower crossing difference

Page 20: Boomerang Connectivity Table Revisited

/24

Generalization: S-box in E0

12

Page 21: Boomerang Connectivity Table Revisited

/24

Generalization: S-box in E0

(1) 𝛽 is independent of the upper trail

12

Page 22: Boomerang Connectivity Table Revisited

/24

Generalization: S-box in E0

(1) 𝛽 is independent of the upper trail

which becomes identical to 𝑝2π‘ž2 in the classical boomerang attack.

(2) 𝛽 is uniformly distributed

12

Page 23: Boomerang Connectivity Table Revisited

/24

Generalization: S-box in E1

(1) 𝛼 is independent of the lower trail

which becomes identical to 𝑝2π‘ž2 in the classical boomerang attack.

(2) 𝛼 is uniformly distributed

13

Page 24: Boomerang Connectivity Table Revisited

/24

Generalization: Interrelated S-boxes

S-boxes A and B are interrelated.

Lower crossing diff. (𝛽) of A comes from B.

Upper crossing diff. (𝛼′) of B comes from A.

14

Page 25: Boomerang Connectivity Table Revisited

/24

Generalization: Interrelated S-boxes

S-boxes A and B are interrelated.

Lower crossing diff. (𝛽) of A comes from B.

Upper crossing diff. (𝛼′) of B comes from A.

14

Page 26: Boomerang Connectivity Table Revisited

/24

Generalization: Interrelated S-boxes

S-boxes A and B are interrelated.

Lower crossing diff. (𝛽) of A comes from B.

Upper crossing diff. (𝛼′) of B comes from A.

14

Page 27: Boomerang Connectivity Table Revisited

/24

Generalized Framework of BCT

Boundaries of πΈπ‘š: where crossing differences are distributed (almost) uniformly.

1. Initialization: πΈπ‘š ← 𝐸1π‘“π‘–π‘Ÿπ‘ π‘‘

||𝐸0π‘™π‘Žπ‘ π‘‘ .

2. Extend both trails: 𝛼→𝐸0𝛽 βˆ’β‡’, β‡  βˆ’(𝛾←

𝐸1𝛿).

3. Prepend πΈπ‘š with one more rounda) If the lower crossing differences are distributed uni

formly, peel off the first round and go to Step 4.b) Go to Step 3

4. Append πΈπ‘š with one more rounda) If the upper crossing differences are distributed uni

formly, peel off the last round and go to Step 5.b) Go to Step 4.

5. Calculate r using formulas in the previous slides

𝐸1 𝐸0Pr = 1Pr = 1

15

Page 28: Boomerang Connectivity Table Revisited

/24

Re-evaluate prob of four BM dist. of SKINNY

β€’ Prev: prob evaluated by Ƹ𝑝2 ΰ·œπ‘ž2

β€’ New: prob evaluated by the generalized BCT

Construct related-subkey BM dist. Of AES-128

β€’ Prev: related-subkey BM dist. Of AES-192/256

β€’ New: 6-round related-subkey BM dist. Of AES-128 with 2βˆ’109.42

Applications

16

Page 29: Boomerang Connectivity Table Revisited

/24

SKINNY [BJK+16] is an SPN cipher, with a linear key schedule.

β€’ SKINNY-n-t where n is block size and t tweakey size

Example πΈπ‘š of SKINNY-64-128 in the related-tweakey setting

β€’ Upper trail: 2 rounds, 2βˆ’8

β€’ Lower trail: 4 rounds, 2βˆ’14

β€’ 𝑝2π‘ž2 = 2βˆ’44

SKINNY

17

Page 30: Boomerang Connectivity Table Revisited

/24

π‘¬π’Ž with 6 Middle Rounds

Rd Diff before and after SB βˆ†K βˆ‡K Pr.

R1 0,0,0,0, 0,0,0,0, 0,0,0,b, 0,0,0,00,0,0,0, 0,0,0,0, 0,0,0,1, 0,0,0,0

0,0,0,0, 0,0,0,0 b,0,0,0, 0,0,0,0 2βˆ’2

R2 0,1,0,0, 0,0,0,0, 0,1,0,0, 0,1,0,00,8,0,0, 0,0,0,0, 0,8,0,0, 0,8,0,0

0,0,0,0, 0,c,0,0 0,0,0,0, 5,0,0,0 2βˆ’2βˆ—3

R3 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,20,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,3

0,0,0,0, 0,0,0,0 0,0,3,0, 0,0,0,0 2βˆ’2

R4 0,0,0,0, 0,0,3,0, 0,0,0,0, 0,0,3,00,0,0,0, 0,0,d,0, 0,0,0,0, 0,0,c,0

0,0,0,3, 0,0,0,0 0,0,0,0, 0,0,9,0 2βˆ’3βˆ—2

R5 0,c,0,0, 0,0,0,0, 0,0,0,4, 0,0,0,00,2,0,0, 0,0,0,0, 0,0,0,2, 0,0,0,0

0,0,0,0, 0,0,0,0 0,0,0,0, 2,0,0,0 2βˆ’2βˆ—2

R6 0,0,0,0, 0,2,0,0, 0,0,0,0, 0,0,0,00,0,0,0, 0,1,0,0, 0,0,0,0, 0,0,0,0

0,0,0,0, 0,0,0,d 0,0,0,0, 0,1,0,0 2βˆ’2

18

Page 31: Boomerang Connectivity Table Revisited

/24

Evaluation of 𝒓

Rounds π’‘πŸπ’’πŸ ΰ·π’‘πŸΰ·π’’πŸ π‘Ÿ (new)

1+1 2βˆ’16 2βˆ’8.41 2βˆ’2

2+1 2βˆ’20 … 2βˆ’2.79

2+2 2βˆ’32 … 2βˆ’5.69

2+3 2βˆ’40 … 2βˆ’10.56

2+4 2βˆ’44 2βˆ’29.91 2βˆ’12.96

Experiments confirm the results of π‘Ÿ.

19

Page 32: Boomerang Connectivity Table Revisited

/24

Summary of the results on SKINNY

Ver. nπ‘¬π’Ž 𝑬 = ΰ·©π‘¬πŸ ∘ π‘¬π’Ž ∘ ΰ·©π‘¬πŸŽ

|π‘¬π’Ž| π‘Ÿ |𝐸| 𝑝2 π‘ž2π‘Ÿ Ƹ𝑝2 ΰ·œπ‘ž2[LGS17]

n-2n64 6(13) 2βˆ’12.96 17 2βˆ’29.78 2βˆ’48.72

128 5(12) 2βˆ’11.45 18 2βˆ’77.83 2βˆ’103.84

n-3n64 5(17) 2βˆ’10.50 22 2βˆ’42.98 2βˆ’54.94

128 5(17) 2βˆ’9.88 22 2βˆ’48.30 2βˆ’76.84

Prob. of BM dist. and comparison

β€’ Take seconds to calculate π‘Ÿ

20

Page 33: Boomerang Connectivity Table Revisited

/24

Summary of the results on SKINNY

Ver. nπ‘¬π’Ž 𝑬 = ΰ·©π‘¬πŸ ∘ π‘¬π’Ž ∘ ΰ·©π‘¬πŸŽ

|π‘¬π’Ž| π‘Ÿ |𝐸| 𝑝2 π‘ž2π‘Ÿ Ƹ𝑝2 ΰ·œπ‘ž2[LGS17]

n-2n64 6(13) 2βˆ’12.96 17 2βˆ’29.78 2βˆ’48.72

128 5(12) 2βˆ’11.45 18 2βˆ’77.83 2βˆ’103.84

n-3n64 5(17) 2βˆ’10.50 22 2βˆ’42.98 2βˆ’54.94

128 5(17) 2βˆ’9.88 22 2βˆ’48.30 2βˆ’76.84

Prob. of BM dist. and comparison

β€’ Take seconds to calculate π‘Ÿβ€’ Experiments confirm the results of π‘Ÿ and the

17-round dist. of SKINNY-64-128 20

Page 34: Boomerang Connectivity Table Revisited

/24

6-round related-subkey BM dist. Of AES-128

3-round related-key differential trails:β€’ 2 trails, 5 active S-boxes, 2βˆ’31

β€’ 18 trails, 6 active S-boxes, 2βˆ’36, 2βˆ’37, 2βˆ’38

2βˆ’31

2βˆ’37

πΈπ‘š, π‘Ÿ = 2βˆ’33.42

𝑝2 π‘ž2π‘Ÿ= 2βˆ’109.42

21

Page 35: Boomerang Connectivity Table Revisited

/24

Discussion

Length of πΈπ‘š:

β€’ Mainly determined by the diffusion effect of the linear layer

β€’ Density of active cells of the trails

r:Strongly affected by the DDT and BCT of the S-box

Limitation of the generalized BCT:

For a long πΈπ‘š with large and strong S-boxes, calculating r might be a time-consuming task, e.g., T>235.

22

Page 36: Boomerang Connectivity Table Revisited

/24

Generalized BCT: for calculating 𝒓 in the sandwich attack

1: identify the boundaries of dependency

2: calculate 𝒓

Problems to investigate:– Extension to non S-box based ciphers

– Improving previous boomerang attacks

Concluding Remarks

23

Page 37: Boomerang Connectivity Table Revisited

Slides credit to Yu Sasaki

Thank you for your attention!!