• Aucun résultat trouvé

Differential Analaysis of Block Ciphers S

N/A
N/A
Protected

Academic year: 2021

Partager "Differential Analaysis of Block Ciphers S"

Copied!
57
0
0

Texte intégral

(1)

Differential Analaysis of Block Ciphers S

IMON

and S

PECK

Alex Biryukov, Arnab Roy, Vesselin Velichkov

(2)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(3)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(4)

S

IMON AND

S

PECK

I SIMON, SPECK- proposed in 2013, by a group of researchers from the NSA

I Competitive designs – Simplicity, Efficiency

I Both are constructed on ARX principle

I SIMON– Feistel design with ARX based function

I SPECK– ARX, Resemblance with Threefish

(5)

S

IMON

Feistel design with very simple F -function

≪ (1)

≪ (8) &

≪ (2) kr

Block Size – 32, 48, 64 with key size 64, 72 or 96, 96 or 128 respectively.

(6)

S

PECK

Round function is similar to Threefish XOR round-key instead of (modular)adding the round-key

≫ (7/8)

≪ (2/3) kr

Block Size – 32, 48, 64 with key size 64, 72 or 96, 96 or 128 respectively.

(7)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(8)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(9)

S

IMON

: DP of A(nd)RX round function

Pr(α → γ) =

{x : x ∧ (x ≪ r ) ⊕ (x ⊕ α) ∧ ((x ⊕ α) ≪ r) = γ}

2n

≪ (1)

≪ (7)

&

≪ (2) kr

(10)

DP: Path counting in DAG

Find DP ⇐⇒ Count paths in a DAG

(Example: n=5, r=2)

0 0 α0α3

0 γ0

1 0 α2α0

0 γ2

0 1 α4α2

0 γ4

1 0 α1α4

0 γ1

0 1 α3α1

0 γ3

0 0 x0x3

0 1 1 0 1 1

0 0 x2x0

0 1 1 0 1 1

0 0 x4x2

0 1 1 0 1 1

0 0 x1x4

0 1 1 0 1 1

0 0 x3x1

0 1 1 0 1 1

(11)

DP: Path counting in DAG

Find DP ⇐⇒ Count paths in a DAG (Example: n=5, r=2)

0 0 α0α3

0 γ0

1 0 α2α0

0 γ2

0 1 α4α2

0 γ4

1 0 α1α4

0 γ1

0 1 α3α1

0 γ3

0 0 x0x3

0 1 1 0 1 1

0 0 x2x0

0 1 1 0 1 1

0 0 x4x2

0 1 1 0 1 1

0 0 x1x4

0 1 1 0 1 1

0 0 x3x1

0 1 1 0 1 1

(12)

DP: Path counting in DAG

Find DP ⇐⇒ Count paths in a DAG (Example: n=5, r=2)

0 0 α0α3

0 γ0

1 0 α2α0

0 γ2

0 1 α4α2

0 γ4

1 0 α1α4

0 γ1

0 1 α3α1

0 γ3

0 0 x0x3

0 1 1 0 1 1

0 0 x2x0

0 1 1 0 1 1

0 0 x4x2

0 1 1 0 1 1

0 0 x1x4

0 1 1 0 1 1

0 0 x3x1

0 1 1 0 1 1

(13)

DP: Path counting in DAG

Find DP ⇐⇒ Count paths in a DAG (Example: n=5, r=2)

0 0 α0α3

0 γ0

1 0 α2α0

0 γ2

0 1 α4α2

0 γ4

1 0 α1α4

0 γ1

0 1 α3α1

0 γ3 α4α3α2α1α0

α2α1α0α4α3

0 0 x0x3

0 1 1 0 1 1

0 0 x2x0

0 1 1 0 1 1

0 0 x4x2

0 1 1 0 1 1

0 0 x1x4

0 1 1 0 1 1

0 0 x3x1

0 1 1 0 1 1

(14)

DP: Path counting in DAG

Find DP ⇐⇒ Count paths in a DAG (Example: n=5, r=2)

0 0 α0α3

0 γ0

1 0 α2α0

0 γ2

0 1 α4α2

0 γ4

1 0 α1α4

0 γ1

0 1 α3α1

0 γ3

0 0 x0x3

0 1 1 0 1 1

0 0 x2x0

0 1 1 0 1 1

0 0 x4x2

0 1 1 0 1 1

0 0 x1x4

0 1 1 0 1 1

0 0 x3x1

0 1 1 0 1 1

(15)

DP: Path counting in DAG

Find DP ⇐⇒ Count paths in a DAG (Example: n=5, r=2)

0 0 α0α3

0 γ0

1 0 α2α0

0 γ2

0 1 α4α2

0 γ4

1 0 α1α4

0 γ1

0 1 α3α1

0 γ3

0 0 x0x3

0 1 1 0 1 1

0 0 x2x0

0 1 1 0 1 1

0 0 x4x2

0 1 1 0 1 1

0 0 x1x4

0 1 1 0 1 1

0 0 x3x1

0 1 1 0 1 1

(16)

Example: Impossible I/O Difference

1 1 α0α3

0 γ0

1 1 x0x3

01 10 1 1

1 1 α2α0

0 γ2

1 1 x2x0

0 1 1 0 1 1

1 1 α4α2

0 γ4

1 1 x4x2

0 1 1 0 1 1

1 1 α1α4

0 γ1

0 0 x1x4

0 1 1 0 1 1

1 1 α3α1

0 γ3

0 0 x3x1

01 10 1 1

(17)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(18)

About Extending Matsui’s Search for ARX

I Matsui[EuroCrypt’94] : while selecting DP of round ` check p = p1· p2. . .p`· Bn−`≥ Bn, if p ≥ Bnupdate the bound

I Problem: DDT requires exponential memory for ARX designs

I Biryukov-Velichkov [CT-RSA’14]: Use partial DDT table for ARX (Threshold Search)

I The pDDT - D contains α → β iff p(α → β) ≥ pτ

I While searching, if some (α → β) /∈ D, then it is possible to take several options e.g. Choose greedily, Search all possible, Highway-Country Road approach

(19)

About Extending Matsui’s Search for ARX

I Matsui[EuroCrypt’94] : while selecting DP of round ` check p = p1· p2. . .p`· Bn−`≥ Bn, if p ≥ Bnupdate the bound

I Problem: DDT requires exponential memory for ARX designs

I Biryukov-Velichkov [CT-RSA’14]: Use partial DDT table for ARX (Threshold Search)

I The pDDT - D contains α → β iff p(α → β) ≥ pτ

I While searching, if some (α → β) /∈ D, then it is possible to take several options e.g. Choose greedily, Search all possible, Highway-Country Road approach

(20)

About Extending Matsui’s Search for ARX

I Matsui[EuroCrypt’94] : while selecting DP of round ` check p = p1· p2. . .p`· Bn−`≥ Bn, if p ≥ Bnupdate the bound

I Problem: DDT requires exponential memory for ARX designs

I Biryukov-Velichkov [CT-RSA’14]: Use partial DDT table for ARX (Threshold Search)

I The pDDT - D contains α → β iff p(α → β) ≥ pτ

I While searching, if some (α → β) /∈ D, then it is possible to take several options e.g. Choose greedily, Search all possible, Highway-Country Road approach

(21)

Using the Threshold Search for ARX

I Parameters in Threshold Search: Size of pDDT (and pτ), precomputaion time for pDDT

I Lower pτ can intuitively lead to better result; But increases the search complexity and size of the pDDT table

I Including New Entries: The new transitions (α → β) /∈ D are added to a secondary table – D0

I Restrict size of D0 – By Hamming weight of the differences; Used for SPECK

I Another way – select (α → β) at round ` such that at round

` +1 there is at least one transition ∈ D; Used for SIMON

together with Hamming weight

(22)

Using the Threshold Search for ARX

I Parameters in Threshold Search: Size of pDDT (and pτ), precomputaion time for pDDT

I Lower pτ can intuitively lead to better result; But increases the search complexity and size of the pDDT table

I Including New Entries: The new transitions (α → β) /∈ D are added to a secondary table – D0

I Restrict size of D0 – By Hamming weight of the differences; Used for SPECK

I Another way – select (α → β) at round ` such that at round

` +1 there is at least one transition ∈ D; Used for SIMON

together with Hamming weight

(23)

Using the Threshold Search for ARX

I Parameters in Threshold Search: Size of pDDT (and pτ), precomputaion time for pDDT

I Lower pτ can intuitively lead to better result; But increases the search complexity and size of the pDDT table

I Including New Entries: The new transitions (α → β) /∈ D are added to a secondary table – D0

I Restrict size of D0 – By Hamming weight of the differences;

Used for SPECK

I Another way – select (α → β) at round ` such that at round

` +1 there is at least one transition ∈ D; Used for SIMON

together with Hamming weight

(24)

Highway-Country Road Analogy

Route: Luxembourg to Frankfurt

The Highway only route – 2hr 46min

(25)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(26)

Extension for Differential: Clustering Trails

I We extend the Threshold Search for clustering trails.

I Main Idea: for round ` select transition with p`: (p1· p2. . .p`−1p`· Bn−`) ≥  ·Bn

I Input: Best trail found by threshold Search, pDDT table, 

I Efficiency: Hamming weight and probability constraints can be applied

I Difference with branch-and-bound – We prune the search tree by limiting the search to  region of the best known probability

I We apply this technique to both SIMONand SPECK

(27)

Extension for Differential: Clustering Trails

I We extend the Threshold Search for clustering trails.

I Main Idea: for round ` select transition with p`: (p1· p2. . .p`−1p`· Bn−`) ≥  ·Bn

I Input: Best trail found by threshold Search, pDDT table, 

I Efficiency: Hamming weight and probability constraints can be applied

I Difference with branch-and-bound – We prune the search tree by limiting the search to  region of the best known probability

I We apply this technique to both SIMONand SPECK

(28)

Extension for Differential: Clustering Trails

I We extend the Threshold Search for clustering trails.

I Main Idea: for round ` select transition with p`: (p1· p2. . .p`−1p`· Bn−`) ≥  ·Bn

I Input: Best trail found by threshold Search, pDDT table, 

I Efficiency: Hamming weight and probability constraints can be applied

I Difference with branch-and-bound – We prune the search tree by limiting the search to  region of the best known probability

I We apply this technique to both SIMONand SPECK

(29)

An overview: Differential Search

in

p1· p2. . .p`−1

Bn−`

Bn

(30)

An overview: Differential Search

in

p1· p2. . .p`−1

Bn−`

Bn

(31)

An overview: Differential Search

in

∆ p1· p2. . .p`−1

Bn−`

Bn

(32)

Search Results

Cipher # rounds log2p, trail log2p, diff. # trails

SIMON32 13 −36 −29.69 45083

−28.11 full search

−36 −30.20

14 −30.94 full search

SIMON48 15 −48 −42.11 112573

−52 −43.01

SIMON64 20 −70 −58.68 210771

−70 −59.01

21 −72 −60.53 337309

−72 −61.01

SPECK32 9 −30 −30 1

SPECK48 10 −40 −39.75 137

−40.55

11 −47 −46.48 384

SPECK64 13 −58 −57.70 48

−58.90

(33)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(34)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(35)

The differential graph for S

IMON 60000 trails

275000 trails

(36)

The differential graph for S

IMON 60000 trails

275000 trails

(37)

The differential graph for S

IMON 60000 trails

275000 trails

(38)

The differential graph for S

IMON 60000 trails

275000 trails

(39)

Bipartite Subgraph of Trails

Feistel: ∆iL= 11 =⇒ ∆i+1R = 11

iL−→ ∇ = {000* 000* 00*0 00*0}f

iR=106

i+1L = 4

iR =104

i+1L = 26

iR = 1006

i+1L = 6

∇ ⊕ (∆iL≪ 2) ⊕ ∆iR) = ∆i+1L 120⊕ (22) ⊕106= 4 122⊕ (22) ⊕104= 4

(40)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(41)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(42)

19 Round S

IMON

32: Practical Attack

Use 13 round differential with probability ≈ 2−28.11, Add 2 rounds on top, 4 rounds at the end

0100 0000 0000 0000 ≪ (1)

≪ (8)

&

≪ (2)

0000 0000 0000 0000

*000 0000 0*00 0000 Kr

*000 0000 0*00 0001

≪ (1)

≪ (8)

&

≪ (2)

0100 0000 0000 0000

0*00 000* *000 00**

Kr +1

0*00 000* *000 01** ≪ (1)

≪ (8)

&

≪ (2)

*000 0000 0*00 0001

*000 0*** 0*00 ****

Kr +2

*000 0*** 0*01 **** ≪ (1)

≪ (8)

&

≪ (2)

0*00 000* *000 01**

Kr +3

(43)

Attack on S

IMON

32

I Identify pairs satisfying top 2 rounds truncated difference – guess 2 bits of K0

0100 000* 0000 01*0 ≪ (1)

≪ (8)

&

≪ (2)

*000 0**0 0*01 **0*

Kr

0000 0000 0000 0001

0000 0000 0000 0001

≪ (1)

≪ (8)

&

≪ (2)

0100 000* 0000 01*0

0100 0000 0000 0000

Kr +1

(44)

Attack on S

IMON

32

We use four differentials

D1: (2000, 8000) → (2000, 0) D2: (4000, 0001) → (4000, 0) D3: (0004, 0010) → (0004, 0) D4: (0008, 0020) → (0008, 0) Truncated diffrence for top 2 round

(0010 0000 *000 001*, **00 00** 00*0 1**0) (0100 000* 0000 01*0, *000 0**0 0*01 **0*) (000* 0000 01*0 0100, 0**0 0*01 **0* *000) (00*0 0000 1*00 1000, **00 *01* *0** 0000)

(45)

Attack on S

IMON

32

I Data Collection: Encrypt structure of size 230

I Filtering: 230−18 =212 pairs remain for any Di

I Counting : For each Di

I 212pairs, 25 bit guessing

I 217candidates for 25 bits

I Intersection of Counters:

I D1, D2– 19 common bits (guessed) =⇒ 215for 35 bits

I Intersection: D3, D1, D2– 20 bits common

I 212 candidates for 42 bits

I Intersection with D4 =⇒ 27candidates for 47 bitsBut 39 from last 4 rounds

I By brute-forcing rest — total 225+7=232key guesses

(46)

Attack on S

IMON

32

I Data Collection: Encrypt structure of size 230

I Filtering: 230−18 =212 pairs remain for any Di

I Counting : For each Di

I 212pairs, 25 bit guessing

I 217candidates for 25 bits

I Intersection of Counters:

I D1, D2– 19 common bits (guessed) =⇒ 215for 35 bits

I Intersection: D3, D1, D2– 20 bits common

I 212 candidates for 42 bits

I Intersection with D4 =⇒ 27candidates for 47 bitsBut 39 from last 4 rounds

I By brute-forcing rest — total 225+7=232key guesses

(47)

Attack on S

IMON

32

I Data Collection: Encrypt structure of size 230

I Filtering: 230−18 =212 pairs remain for any Di

I Counting : For each Di

I 212pairs, 25 bit guessing

I 217candidates for 25 bits

I Intersection of Counters:

I D1, D2– 19 common bits (guessed) =⇒ 215for 35 bits

I Intersection: D3, D1, D2– 20 bits common

I 212 candidates for 42 bits

I Intersection with D4 =⇒ 27candidates for 47 bitsBut 39 from last 4 rounds

I By brute-forcing rest — total 225+7=232key guesses

(48)

Attack on S

IMON

32

I Data Collection: Encrypt structure of size 230

I Filtering: 230−18 =212 pairs remain for any Di

I Counting : For each Di

I 212pairs, 25 bit guessing

I 217candidates for 25 bits

I Intersection of Counters:

I D1, D2– 19 common bits (guessed) =⇒ 215for 35 bits

I Intersection: D3, D1, D2– 20 bits common

I 212 candidates for 42 bits

I Intersection with D4 =⇒ 27candidates for 47 bitsBut 39 from last 4 rounds

I By brute-forcing rest — total 225+7=232key guesses

(49)

Attack on S

IMON

32

I Data Collection: Encrypt structure of size 230

I Filtering: 230−18 =212 pairs remain for any Di

I Counting : For each Di

I 212pairs, 25 bit guessing

I 217candidates for 25 bits

I Intersection of Counters:

I D1, D2– 19 common bits (guessed) =⇒ 215for 35 bits

I Intersection: D3, D1, D2– 20 bits common

I 212 candidates for 42 bits

I Intersection with D4 =⇒ 27candidates for 47 bitsBut 39 from last 4 rounds

I By brute-forcing rest — total 225+7=232key guesses

(50)

Attack on S

IMON

32

I Data Collection: Encrypt structure of size 230

I Filtering: 230−18 =212 pairs remain for any Di

I Counting : For each Di

I 212pairs, 25 bit guessing

I 217candidates for 25 bits

I Intersection of Counters:

I D1, D2– 19 common bits (guessed) =⇒ 215for 35 bits

I Intersection: D3, D1, D2– 20 bits common

I 212 candidates for 42 bits

I Intersection with D4 =⇒ 27candidates for 47 bitsBut 39 from last 4 rounds

I By brute-forcing rest — total 225+7=232key guesses

(51)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(52)

Attack on S

PECK

32

I Use 9 round differential with p = 2−30; Add one round each on top and at the end

≫ (7) 1000 0000 0100 0000

1000 0001 0000 0000

≪ (2)

1000 0001 0100 0000

0000 0101 0000 0010 K9

Pr = 2−2(Round-10)

≫ (7) 0000 0000 0100 0000

1000 0000 0000 0000

≪ (2)

0000 0101 0100 0010

K10

Guess 16 bits from K10, 11 bits from K9, 1 carry bit

(53)

Attack on S

PECK

32

I Verify the difference at the end of round 9

I Keep a counter of size 228

I Expect 218 counters with 4 increments

I Bruteforce rest of the 64 − 27 = 37 bits of last 4 round-keys

I Total number of key guessing 218+37 =255

(54)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(55)

Summary of Attacks

Cipher Key Rounds Rounds Our Results Known Result Size Total Attacked Time Data Time Data SIMON32 64 32 19 232 231 SIMON48 72 36 20 252 246

96 36 20 275 246

SIMON64 96 42 26 289 263 294 263* 128 44 26 2121 263 2126 263* SPECK32 64 22 11 255 231 SPECK48 72/96 22 12 243 243 245.3 245 SPECK64 96 26 16 263 263

128 27 16 263 263

(56)

Outline

Introduction

Light-Weight Block Ciphers: SIMONand SPECK

Differential Anlaysis

SIMON: Round Function Search for Differential Trail Search for Differential Differential Effect in SIMON

Embedded Bipartite Graphs Key Recovery Attacks

Practical Attack: 19-round SIMON32 Attacking 11-round SPECK

Attack Summary Conclusion

(57)

Summary

I Analysis and Linear time (in word size) Algorithm to find DP of SIMONround function

I Threshold Search with Highway-Country road approach for analysing SIMONand SPECK

I Extend the Threshold Search technique forDifferential Search

I Improved differentials for SIMONand SPECK

I All these methods are generic and can be used to analyse ARX designs

I Additionally, use the differentials for key recovery attack on reduced round SIMONand SPECK

Références

Documents relatifs

The most skeptic paper on those findings is perhaps the one by Brunnschweiler and Bulte (2008) who argue that the use of growth regressions in this literature is often accompanied

There exist a number of related research projects that evaluate software implementations of lightweight block ciphers, but none of them analyzed execution time, RAM footprint, and

It should be noted that, without the energy shifts of the projectile and target levels, the minimum potential en- ergy for an ion to allow resonant electron capture from the

It is well known that narrow structures have been obsenred in two nucleon invariant masses, or missing mass experiments/l/.. These structures have been tentatively attributed to iso-

Similarly, we used the split approach for finding the upper bound on the probability of the best characteristics for 12-rounds, and the related-key Matsui’s approach for the bounds

A trust level is a useful method to identify the required hardware and software security protection mechanisms that a system must include to protect the data confiden-

The notion of pervasive/ubiquitous computing refers to user-centric pro- visionning of services and applications that are adaptive to user preferences and monitored conditions,

The next step of the tabu search is to find the best assignment of the trucks to the docks while minimizing the number of used wagons and the distance travelled