On the Usage of Deterministic (Related-Key) Truncated Differentials - - PowerPoint PPT Presentation

on the usage of deterministic related key truncated
SMART_READER_LITE
LIVE PREVIEW

On the Usage of Deterministic (Related-Key) Truncated Differentials - - PowerPoint PPT Presentation

On the Usage of Deterministic (Related-Key) Truncated Differentials and Multidimensional Linear Approximations for SPN Ciphers Ling Sun 1 , David Gerault 2 , Wei Wang 1 , Meiqin Wang 1 ( ) 1. Shandong University, Jinan & Qingdao, China


slide-1
SLIDE 1

On the Usage of Deterministic (Related-Key) Truncated Differentials and Multidimensional Linear Approximations for SPN Ciphers

Ling Sun1, David Gerault2, Wei Wang1, Meiqin Wang1()

  • 1. Shandong University, Jinan & Qingdao, China
  • 2. Nanyang Technological University, Singapore

FSE 2020 @ November, 2020

slide-2
SLIDE 2

Outline

Background & Contributions Preliminaries Finding Deterministic (RK) TDs and MDLAs Related-Key Differential-Linear Attack on AES-192 Constructing IDs with TDs and ZCLAs with MDLAs Finding (RK) IDs and ZCLAs with the CP Method Conclusion

slide-3
SLIDE 3

Background & Contributions

Automatic Search

Automatic tools for cryptanalysis obtained rapid development. Few works concentrated on the deterministic TD/MDLA.

Essential Problems

The optimality of TD/MDLA must be confirmed via an exhaustive search. The incomplete search is also a long-term problem for optimal ID/ZCLA.

Contributions

An automatic tool for the search of deterministic (RK) TDs and MDLAs. Improved related-key differential-linear attack on AES-192. Constructing (RK) IDs with TDs and ZCLAs with MDLAs. ◮ Provable security against ID attack of SKINNY and Midori64.

slide-4
SLIDE 4

Outline

Background & Contributions Preliminaries Finding Deterministic (RK) TDs and MDLAs Related-Key Differential-Linear Attack on AES-192 Constructing IDs with TDs and ZCLAs with MDLAs Finding (RK) IDs and ZCLAs with the CP Method Conclusion

slide-5
SLIDE 5

Preliminaries

Basics of Differential and Linear Cryptanalyses

The difference of the state ∆X = (∆X0, ∆X1, . . . , ∆Xℓ−1), ∆Xi ∈ F2s . The differential pattern ∆X = (∆X0, ∆X1, . . . , ∆Xℓ−1). ◮ zero differential pattern (Z). ◮ nonzero fixed differential pattern (N). ◮ nonzero varied differential pattern (N∗). ◮ varied differential pattern (U).

Lemma 1 (Branching) ∆Y0 = ∆Y1 = ∆X.

X Y1 Y0 X0 X1 Y

Lemma 2 (XOR) (∆X0, ∆X1) → ∆Y .

∆Y ∆X1 Z N N ⊕ N∗ N∗ U ∆X0 Z Z N N ⊕ N∗ N∗ U N N Z/N N∗/N ⊕ N∗ N ⊕ N∗ U N ⊕ N∗ N ⊕ N∗ N∗/N ⊕ N∗ U U U N∗ N∗ N ⊕ N∗ U U U U U U U U U

slide-6
SLIDE 6

Preliminaries

Basics of Differential and Linear Cryptanalyses

Lemma 3 (S-box) ∆X → ∆Y .

∆X Z N N ⊕ N∗ N∗ U ∆Y Z N∗ U N∗ U

S

X Y

M

X0 Y0 X1 Y1 Xm−1 Ym−1

· · · · · ·

Lemma 4 (MDS matrix) ∆X → ∆Y .

∆X (Z, Z, . . . , Z) (Z, . . . , Z, N/N∗, Z, . . . , Z) Remaining cases ∆Y (Z, Z, . . . , Z) (N∗, N∗, . . . , N∗) (U, U, . . . , U)

The linear mask of the state Γ

X = (Γ X0, Γ X1, . . . , Γ Xℓ−1), Γ Xi ∈ F2s .

The linear pattern ΓX = (ΓX0, ΓX1, . . . , ΓXℓ−1). ◮ zero linear pattern (Z). ◮ nonzero fixed linear pattern (N). ◮ nonzero varied linear pattern (N∗). ◮ varied linear pattern (U).

slide-7
SLIDE 7

Preliminaries

Constraint Satisfaction Problem

Definition 1 (Constraint satisfaction problem @ SGL+17) A constraint satisfaction problem (CSP) is represented as a triple X, D, C.

X = {x0, x1, . . . , xn−1} is a set of variables. D = {D(x0), D(x1), . . . , D(xn−1)} is a set of nonempty sets. C = {C0, C1, . . . , Cm−1} stands for a set of constraints.

A B C D E F G H I J

X = {A, B, . . . , J}. D = {D(A), D(B), . . . , D(J)}. D(·) = {“red”, “yellow”, “blue”}. C = {C0, C1, . . . , C14}, C∗ = X∗, R∗. C∗ = {A, D}, A = D. SAT/SMT problems can be viewed as individual cases of the CSP. The CSP can describe much harder cases. Many CP solvers are available to solve problems of practical interest.

slide-8
SLIDE 8

Outline

Background & Contributions Preliminaries Finding Deterministic (RK) TDs and MDLAs Related-Key Differential-Linear Attack on AES-192 Constructing IDs with TDs and ZCLAs with MDLAs Finding (RK) IDs and ZCLAs with the CP Method Conclusion

slide-9
SLIDE 9

Finding Deterministic TDs and MDLAs

Step 1: Initialising Variables

X0 X1 Xr−1 Xr

f f

δXi : pattern ∆Xi .

δXi =          0, if ∆Xi = Z 1, if ∆Xi = N 2, if ∆Xi = N∗ 3, if ∆Xi = U .

ζXi : s-bit difference ∆Xi.

ζXi ∈          {0}, if δXi = 0 {1, 2, . . . , 2s − 1}, if δXi = 1 {−1}, if δXi = 2 {−2}, if δXi = 3 . Model 1 (Relation between δXi and ζXi ) The following expression will ensure that ζXi falls into the correct range. if δXi = 0 then ζXi = 0 elseif δXi = 1 then ζXi > 0 elseif δXi = 2 then ζXi = −1 else ζXi = −2 endif

slide-10
SLIDE 10

Finding Deterministic TDs and MDLAs

Step 2: Propagating Differential Patterns

X0 X1 Xr−1 Xr

f f Model 2 (Branching) The constraint restricts the pattern propagation for the Branching operation. δY0 = δX and ζY0 = ζX and δY1 = δX and ζY1 = ζX Model 3 (XOR) The constraint restricts the pattern propagation for the XOR operation. if δX0 + δX1 > 2 then δY = 3 and ζY = −2 elseif δX0 + δX1 = 1 then δY = 1 and ζY = ζX0 + ζX1 elseif δX0 = δX1 = 0 then δY = 0 and ζY = 0 elseif ζX0 + ζX1 < 0 then δY = 2 and ζY = −1 elseif ζX0 = ζX1 then δY = 0 and ζY = 0 else δY = 1 and ζY = ζX0 ⊕ ζX1 endif

slide-11
SLIDE 11

Finding Deterministic TDs and MDLAs

Step 2: Propagating Differential Patterns

X0 X1 Xr−1 Xr

f f Model 4 (S-box) The constraint restricts the pattern propagation for the S-box. δY = 1 and δX + δY ∈ {0, 3, 4, 6} and δY δX and δY − δX 1 Model 5 (MDS matrix) The constraint restricts the pattern propagation for the MDS matrix. if

m−1

  • i=0

δXi ≡ 0 then δY0 = δY1 = · · · = δYm−1 = 0 elseif

m−1

  • i=0

δXi ≡ 1 then δY0 = δY1 = · · · = δYm−1 = 2 elseif

m−1

  • i=0

δXi ≡ 2 and

m−1

  • i=0

ζXi < 0 then δY0 = δY1 = · · · = δYm−1 = 2 else δY0 = δY1 = · · · = δYm−1 = 3 endif

slide-12
SLIDE 12

Finding Deterministic TDs and MDLAs

Step 3: Clarifying the Searching Scopes of the Input Patterns

X0 X1 Xr−1 Xr

f f Old-fashion

Fix the input pattern as a predetermined value. The optimal TD requests an exhaustive search over all possible patterns. The program should be implemented for about 2ℓ times.

New-fashion

Do not fix the format of the input pattern. Denote (X 0

0 , X 0 1 , . . . , X 0 ℓ−1) the input state. Add ℓ−1

  • i=0

δX 0

i = 0.

The CP solver will automatically traverse all possible input patterns. To ensure the existence of R-round TDs/MDLAs, at most, we invoke the

searching program for 3 · R · ℓ times.

The number of runs to search for the optimal ID of Minalpher-P is

reduced from 2128 to 210.9.

slide-13
SLIDE 13

Finding Deterministic TDs and MDLAs

Step 4: Clarifying the Searching Scopes of the Output Patterns

X0 X1 Xr−1 Xr

f f

The output differential patterns we are interested in are Z, N and N∗. ◮ ∆X r

i being zero corresponds to δX r

i = 0.

◮ ∆X r

i being nonzero and fixed corresponds to δX r

i = 1.

◮ ∆X r

i being any value except zero corresponds to δX r

i = 2.

Generalisation

The method for the search of TDs can be adjusted to search for MDLAs. For ciphers with word-oriented key schedules, this method can be applied

to search for related-key truncated differentials.

slide-14
SLIDE 14

Outline

Background & Contributions Preliminaries Finding Deterministic (RK) TDs and MDLAs Related-Key Differential-Linear Attack on AES-192 Constructing IDs with TDs and ZCLAs with MDLAs Finding (RK) IDs and ZCLAs with the CP Method Conclusion

slide-15
SLIDE 15

Related-Key Differential-Linear Attack on AES-192

Improved RK DL Attack on AES-192

∆k0 α α AK ∆P α α Key Schedule ∆xI 1 SB ∆xS 1 <<< 1 <<< 2 <<< 3 SR ∆xR 1 MC ∆xM 1 ∆k1 AK Key Schedule ∆xI 2 SB ∆xS 2 <<< 1 <<< 2 <<< 3 SR ∆xR 2 MC ∆xM 2 ∆k2 α AK Key Schedule ∆xI 3

α SB ∆xS

3 <<< 1 <<< 2 <<< 3 SR ∆xR 3 MC ∆xM 3 ∆k3 α α AK Key Schedule ∆xI 4

α α SB ∆xS

4 <<< 1 <<< 2 <<< 3 SR ∆xR 4
  • δ
MC ∆xM 4
  • δ
  • δ
∆k4 α α β β AK Key Schedule ∆xI 5
  • δ
  • δ
∆k5 α α β β β β MC-1 ΓxI 5
  • λ
  • λ
SB ΓxS 5

λ λ <<< 1 <<< 2 <<< 3 SR ΓxR

5

λ λ AK ΓxW

5

λ λ

Legend

Known nonzero difference Unknown nonzero difference Unknown difference Known nonzero mask Unknown nonzero mask Zero difference/mask

Previous distinguishing property λ · (∆xW

5 [1, 3] ⊕ ∆xW 5 [2, 2]) = 0

The bias is about 2−9.

New distinguishing property λ · ∆xW

5 [1, 3] = 0

The bias is about 2−8.99. The biases are almost the same. The complexity of the distinguishing attack basically remains unchanged. The complexity of the key-recovery attack drops.

slide-16
SLIDE 16

Related-Key Differential-Linear Attack on AES-192

Improved RK DL Attack on AES-192

Given N pairs of plaintexts, Σ records the number of good pairs. For the real cipher, |Σ/N − 0.5| follows the distribution N(ε, 1/4N). Otherwise, |Σ/N − 0.5| follows the distribution N(0, 1/4N).

500 1000 1500 2000 2500 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0x06

500 1000 1500 2000 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0x1b

500 1000 1500 2000 2500 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0x20

500 1000 1500 2000 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0x41

500 1000 1500 2000 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0x45

500 1000 1500 2000 2500 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0x7b

500 1000 1500 2000 2500 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0x8a

500 1000 1500 2000 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0xc9

500 1000 1500 2000 0.0000 0.0005 0.0010 0.0015 0.0020 0.0025 0.0030 0.0035 Bias Density

Distributions for λ = 0xf0

The key-recovery attack requires 221.3 chosen plaintexts. The time complexity is reduced from 2187 to 2170.5.

slide-17
SLIDE 17

Outline

Background & Contributions Preliminaries Finding Deterministic (RK) TDs and MDLAs Related-Key Differential-Linear Attack on AES-192 Constructing IDs with TDs and ZCLAs with MDLAs Finding (RK) IDs and ZCLAs with the CP Method Conclusion

slide-18
SLIDE 18

Constructing IDs with TDs and ZCLAs with MDLAs

Basic Tool Relying on Miss-in-the-Middle Approach

Miss-in-the-Middle approach

Constructing two TDs ∆I1 −

− − − − − →

R1-round ∆O1 and ∆O2 ←

− − − − − −

R2-round ∆I2.

Checking the compatibility of the two output patterns ∆O1 and ∆O2.

Distinctions between U-method and our U∗-method

The way to implement the search. The set of differential patterns applied to yield contradictions. ◮ The U-method considers the set U = {Z, N, N ⊕ N∗, N∗}. ◮ The U∗-method takes the smaller set U∗ = {Z, N, N∗}. The searching scopes of the input and output patterns. Regarding SPN ciphers ◮ The U∗-method has almost the same performance as the U-method.

slide-19
SLIDE 19

Constructing IDs with TDs and ZCLAs with MDLAs

Optimising IDs and ZCLAs Obtained with the U∗-method

∆α[0] ∆α[1] · · · ∆α[ℓ − 1]

∆α

· · ·

Round function f

· · · ∆1 α[0] ∆1 α[1] · · · ∆1 α[ℓ − 1]

∆1

α · · · . . . . . . . . . · · · ∆R1−1 α [0] ∆R1−1 α [1] · · · ∆R1−1 α [ℓ − 1]

∆R1−1

α · · ·

Round function f

· · · ∆R1 α [0] ∆R1 α [1] · · · ∆R1 α [ℓ − 1]

∆R1

α

Meeting point

✓ ✓ ✓ ✗ Contradiction!

∆R1 α [i] ∈ ∆R2 β [i] ∆β[0] ∆β[1] · · · ∆β[ℓ − 1]

∆β

· · ·

Round function f

· · · ∆1 β[0] ∆1 β[1] · · · ∆1 β[ℓ − 1]

∆1

β · · · . . . . . . . . . · · · ∆R2−1 β [0] ∆R2−1 β [1] · · · ∆R2−1 β [ℓ − 1]

∆R2−1

β · · ·

Round function f

· · · ∆R2 β [0] ∆R2 β [1] · · · ∆R2 β [ℓ − 1]

∆R2

β

(a) Type-I contradiction. (b) Type-II contradiction.

∆α[0] ∆α[1] · · · ∆α[ℓ − 1]

∆α

· · ·

Round function f

· · · ∆1 α[0] ∆1 α[1] · · · ∆1 α[ℓ − 1]

∆1

α · · ·

Round function f

· · · ∆2 α[0] ∆2 α[1] · · · ∆2 α[ℓ − 1]

∆2

α · · · . . . . . . . . . · · · ∆R1 α [0] ∆R1 α [1] · · · ∆R1 α [ℓ − 1]

∆R1

α · · ·

Round function f

· · · ∆R1+1 α [0] ∆R1+1 α [1] · · · ∆R1+1 α [ℓ − 1]

∆R1+1

α

✓ ✓ ✓ fcollect ✗ ✗ ✗ ✗ ✗ ✗ ✗

∆R1+1,R2 α,β [0] ∆R1+1,R2 α,β [1] · · · ∆R1+1,R2 α,β [ℓ − 1] ∆R1+1,R2 α,β · · · · · · ∆β[0] ∆β[1] · · · ∆β[ℓ − 1]

∆β

· · ·

Round function f

· · · ∆1 β[0] ∆1 β[1] · · · ∆1 β[ℓ − 1]

∆1

β · · · . . . . . . . . . · · · ∆R2−1 β [0] ∆R2−1 β [1] · · · ∆R2−1 β [ℓ − 1]

∆R2−1

β · · ·

Round function f

· · · ∆R2 β [0] ∆R2 β [1] · · · ∆R2 β [ℓ − 1]

∆R2

β ∆0 β,new[0] ∆0 β,new[1] · · · ∆0 β,new[ℓ − 1] ∆0 β,new · · ·

Round function f

· · · ∆1 β,new[0] ∆1 β,new[1] · · · ∆1 β,new[ℓ − 1] ∆1 β,new · · · . . . . . . . . . ∆R2−1 β,new[0] ∆R2−1 β,new[1] · · · ∆R2−1 β,new[ℓ − 1] ∆R2−1 β,new · · ·

Round function f

· · · ∆0 α,new[0] ∆0 α,new[1] · · · ∆0 α,new[ℓ − 1] ∆0 α,new · · ·

Round function f

· · · ∆1 α,new[0] ∆1 α,new[1] · · · ∆1 α,new[ℓ − 1] ∆1 α,new · · ·

Round function f

· · · ∆2 α,new[0] ∆2 α,new[1] · · · ∆2 α,new[ℓ − 1] ∆2 α,new · · · . . . . . . . . . ∆R1 α,new[0] ∆R1 α,new[1] · · · ∆R1 α,new[ℓ − 1] ∆R1 α,new · · ·

Round function f

· · ·

Definition 2 (Message collecting function) The message collecting function fcollect is a function over two differential patterns ∆X and ∆Y with ∆Y / ∈ ∆X. The output fcollect(∆X, ∆Y ) is a pattern that unifies information of two compatible differential patterns.

slide-20
SLIDE 20

Constructing IDs with TDs and ZCLAs with MDLAs

Comparison of All Tools Targeting (RK) IDs of SPN Ciphers

Method Properties P 1 : 1

  • p

r

  • p

e r t y P 2 : D D T P 3 : t r u n c a t e d P 4 : 8

  • b

i t S

  • b
  • x

P 5 : fi x e d P 6 : e x h a u s t i v e P 7 : R K I D U-method ⋆ ⋆ ⋆ ⋆

  • UID-method

⋆ ⋆ ⋆

  • Wu and Wang

⋆ ⋆ ⋆

  • Sasaki and Todo

⋆ ⋆ ⋆ ⋆

  • Sun et al.

⋆ ⋆ ⋆ (Optimised) U ∗-method ⋆ ⋆ ⋆ ⋆

The source codes can be found at

https://github.com/Deterministic-TD-MDLA/auxiliary_material.

One processor Intel Xeon Gold 5118 CPU @ 2.30GHz. For SKINNY and Midori64, all programs finish in several seconds. For Minalpher-P, it takes several minutes to return the result.

slide-21
SLIDE 21

Outline

Background & Contributions Preliminaries Finding Deterministic (RK) TDs and MDLAs Related-Key Differential-Linear Attack on AES-192 Constructing IDs with TDs and ZCLAs with MDLAs Finding (RK) IDs and ZCLAs with the CP Method Conclusion

slide-22
SLIDE 22

Finding (RK) IDs and ZCLAs with the CP Method

Applications to SKINNY

Main results

12.5-round impossible differentials with the optimised U ∗-method. New 12.5-round related-tweakey impossible differentials for SKINNY-n-n. 11.5-round zero-correlation linear approximations.

Theorem 1 (Provable security of SKINNY against ID distinguishing attack) Under the keyed (uniform) bijective S-box assumption, 13.5-round encryption

  • f SKINNY is secure against impossible differentials with arbitrary nonzero input

and output differences. Theorem 2 (Provable security of SKINNY-n-n against RT IDs) 13.5-round SKINNY-n-n is secure against related-tweakey impossible differentials with arbitrary nonzero input and output differences under the following assumptions:

the S-box satisfies keyed (uniform) bijective assumption; the difference of tweakey only has one active cell.

slide-23
SLIDE 23

Finding (RK) IDs and ZCLAs with the CP Method

Applications to Midori64 and Minalpher-P

Main results

480 6.5-round impossible differentials for Midori64. 600 8.5-round impossible differentials for Minalpher-P.

Theorem 3 (Provable security of Midori64 against ID distinguishing attack) Under the keyed (uniform) bijective S-box assumption, 7.5-round Midori64 is secure against impossible differentials with arbitrary nonzero input and output differences.

slide-24
SLIDE 24

Outline

Background & Contributions Preliminaries Finding Deterministic (RK) TDs and MDLAs Related-Key Differential-Linear Attack on AES-192 Constructing IDs with TDs and ZCLAs with MDLAs Finding (RK) IDs and ZCLAs with the CP Method Conclusion

slide-25
SLIDE 25

Conclusion

An automatic tool for the search of deterministic (RK) TDs and MDLAs. Improved related-key differential-linear attack on AES-192. Constructing (RK) IDs with TDs and ZCLAs with MDLAs. ◮ Provable security against ID attack of SKINNY and Midori64.

Discussion

The centre of the paper is more the new technique. The tool may play an essential role in the designing phase of new ciphers. Constructing a unified framework involving the key-recovery approach.

slide-26
SLIDE 26

Thank you for your attention!

Thank the anonymous reviewers for their valuable comments and suggestions to improve the quality of the paper.