Cryptanalysis of LAC G. Leurent (Inria) Cryptanalysis of LAC DIAC - - PowerPoint PPT Presentation

cryptanalysis of lac
SMART_READER_LITE
LIVE PREVIEW

Cryptanalysis of LAC G. Leurent (Inria) Cryptanalysis of LAC DIAC - - PowerPoint PPT Presentation

Description of LAC Differentials and Characteristics Forgery attack Cryptanalysis of LAC G. Leurent (Inria) Cryptanalysis of LAC DIAC 2014 1 / 9 . . . . . . . . Gatan Leurent Inria, France DIAC 2014 2 / 9 Description of LAC DIAC


slide-1
SLIDE 1

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Cryptanalysis of LAC

Gaëtan Leurent

Inria, France

DIAC 2014

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 1 / 9

slide-2
SLIDE 2

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Description of LAC

. N . K . Init . Final . T .

64

. KS . KS . KS .

80

. G . leak . G .

leak

. G .

leak

.

64

. m1 .

48

. m2 . m3 . c1 . c2 . c3 .

48 ▶ Designed by Chinese Academy of Science researchers

▶ Lei Zhang, Wenling Wu, Yanfeng Wang, Shengbao Wu, Jian Zhang

▶ Follows the structure of ALE

▶ G based on modified LBlock. ▶ 80bit key, 64bit state, 48bit leak

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 2 / 9

slide-3
SLIDE 3

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Description of LAC

. N . K . Init . Final . T .

64

. KS . KS . KS .

80

. G . leak . G .

leak

. G .

leak

.

64

. m1 .

48

. m2 . m3 . c1 . c2 . c3 .

48

Security claims

▶ Confidentiality: 80 bits ▶ Authenticity: 64 bits

“any forgery attack with an unused tuple has a success probability at most 2−64”

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 2 / 9

slide-4
SLIDE 4

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Inside LBlock-s

. . . . . . . . . . . . . . . . . .

2

. . . . .

▶ Feistel structure ▶ 16 rounds

▶ Key addition ▶ Nibble Sbox ▶ Nibble permutation

▶ Best characteristics

▶ 35 active Sboxes ▶ Proba ≤ 2−70

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 3 / 9

slide-5
SLIDE 5

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Truncated differential characteristic

. . . . . . . . . . . . . R1 . F .

2

. . . . . . . . . . . . . R2 . F .

2

. . . . . . . . . . . . R3 . F .

2

. . . . . . . . . . . . . R4 . F .

2

. . . . . . . . . . . . . . . . . . . R5 . F .

2

. . . . . . . . . . . . . R6 . F .

2

. . . . . . . . . . . . R7 . F .

2

. . . . . . . . . . . . . R8 . F .

2

. . . . .

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 4 / 9

slide-6
SLIDE 6

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Truncated differential characteristic

. . . . . . . . . . . . . R9 . F .

2

. . . . . . . . . . . . . R10 . F .

2

. . . . . . . . . . . . R11 . F .

2

. . . . . . . . . . . . . R12 . F .

2

. . . . . . . . . . . . . . . . . . . R13 . F .

2

. . . . . . . . . . . . . R14 . F .

2

. . . . . . . . . . . . R15 . F .

2

. . . . . . . . . . . . . R16 . F .

2

. . . . .

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 4 / 9

slide-7
SLIDE 7

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Differential and characteristics

Differential 𝛽 𝛾 Characteristic 𝛽0 → 𝛽1 → ⋯ 𝛽n = 𝛾

▶ Common assumption:

A single characteristic dominates the differential

▶ Modifying one step leads to significantly different characteristics

▶ Not necessarily true for bytewise designs

▶ Given a truncated characteristics, there are many instantiated

characteristics with the same input/output difference.

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 5 / 9

slide-8
SLIDE 8

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Differential and characteristics

Differential 𝛽 𝛾 Characteristic 𝛽0 → 𝛽1 → ⋯ 𝛽n = 𝛾

▶ Common assumption:

A single characteristic dominates the differential

▶ Modifying one step leads to significantly different characteristics

▶ Not necessarily true for bytewise designs

▶ Given a truncated characteristics, there are many instantiated

characteristics with the same input/output difference.

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 5 / 9

slide-9
SLIDE 9

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

A simple example

. 𝛽 . 𝛽 . 𝛿 . . 𝛾

▶ Fixed differential (𝛽, 𝛽) → (0, 𝛾) ▶ Many characteristics: all possible 𝛿

Pr 􏿯(𝛽, 𝛽) → (0, 𝛾)􏿲 = 􏾝

𝛿

Pr 􏿯𝛽 → 𝛿􏿲

2 ⋅ Pr 􏿯𝛿 → 𝛾􏿲 ▶ If Sbox has a flat differential table,

≈ 2n characteristics with probability ≈ 2−3n

▶ Can we evaluate the sum of all the characteristics

following a truncated characteristic?

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 6 / 9

slide-10
SLIDE 10

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Computing aggregation

▶ Consider a fixed truncated characteristic D

▶ Di is the first i rounds of D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 probability that 𝛽 𝛾 following D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 ≤ Pr 􏿯𝛽 𝛾􏿲

Computing Pr 􏿯D ∶ 𝛽 𝛾􏿲

1 Compute Pr [D1 ∶ 𝛽 x] for all x following D1 2 Compute Pr [Di ∶ 𝛽 x] for all x following Di iteratively:

Pr [Di ∶ 𝛽 x] = ∑x′ Pr [Di−1 ∶ 𝛽 x′] × Pr[x′ x] . . 𝛽

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 7 / 9

slide-11
SLIDE 11

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Computing aggregation

▶ Consider a fixed truncated characteristic D

▶ Di is the first i rounds of D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 probability that 𝛽 𝛾 following D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 ≤ Pr 􏿯𝛽 𝛾􏿲

Computing Pr 􏿯D ∶ 𝛽 𝛾􏿲

1 Compute Pr [D1 ∶ 𝛽 x] for all x following D1 2 Compute Pr [Di ∶ 𝛽 x] for all x following Di iteratively:

Pr [Di ∶ 𝛽 x] = ∑x′ Pr [Di−1 ∶ 𝛽 x′] × Pr[x′ x] . . 𝛽 .

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 7 / 9

slide-12
SLIDE 12

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Computing aggregation

▶ Consider a fixed truncated characteristic D

▶ Di is the first i rounds of D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 probability that 𝛽 𝛾 following D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 ≤ Pr 􏿯𝛽 𝛾􏿲

Computing Pr 􏿯D ∶ 𝛽 𝛾􏿲

1 Compute Pr [D1 ∶ 𝛽 x] for all x following D1 2 Compute Pr [Di ∶ 𝛽 x] for all x following Di iteratively:

Pr [Di ∶ 𝛽 x] = ∑x′ Pr [Di−1 ∶ 𝛽 x′] × Pr[x′ x] . . 𝛽 .

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 7 / 9

slide-13
SLIDE 13

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Computing aggregation

▶ Consider a fixed truncated characteristic D

▶ Di is the first i rounds of D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 probability that 𝛽 𝛾 following D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 ≤ Pr 􏿯𝛽 𝛾􏿲

Computing Pr 􏿯D ∶ 𝛽 𝛾􏿲

1 Compute Pr [D1 ∶ 𝛽 x] for all x following D1 2 Compute Pr [Di ∶ 𝛽 x] for all x following Di iteratively:

Pr [Di ∶ 𝛽 x] = ∑x′ Pr [Di−1 ∶ 𝛽 x′] × Pr[x′ x] . . 𝛽 .

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 7 / 9

slide-14
SLIDE 14

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Computing aggregation

▶ Consider a fixed truncated characteristic D

▶ Di is the first i rounds of D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 probability that 𝛽 𝛾 following D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 ≤ Pr 􏿯𝛽 𝛾􏿲

Computing Pr 􏿯D ∶ 𝛽 𝛾􏿲

1 Compute Pr [D1 ∶ 𝛽 x] for all x following D1 2 Compute Pr [Di ∶ 𝛽 x] for all x following Di iteratively:

Pr [Di ∶ 𝛽 x] = ∑x′ Pr [Di−1 ∶ 𝛽 x′] × Pr[x′ x] . . 𝛽 .

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 7 / 9

slide-15
SLIDE 15

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Computing aggregation

▶ Consider a fixed truncated characteristic D

▶ Di is the first i rounds of D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 probability that 𝛽 𝛾 following D

▶ Pr 􏿯D ∶ 𝛽 𝛾􏿲 ≤ Pr 􏿯𝛽 𝛾􏿲

Computing Pr 􏿯D ∶ 𝛽 𝛾􏿲

1 Compute Pr [D1 ∶ 𝛽 x] for all x following D1 2 Compute Pr [Di ∶ 𝛽 x] for all x following Di iteratively:

Pr [Di ∶ 𝛽 x] = ∑x′ Pr [Di−1 ∶ 𝛽 x′] × Pr[x′ x] . . 𝛽 . 𝛾0 . 𝛾1 . 𝛾2 . 𝛾3 . 𝛾4

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 7 / 9

slide-16
SLIDE 16

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Application to LAC

. . . . . . . . . . . . . F .

2

. . . . . . . . . . . . . F .

2

. . . . . . . . . . . . F .

2

. . . . . . . . . . . . . F .

2

. . . . . .

▶ At most 6 active nibbles

▶ Storage 224

▶ At most 3 active Sboxes

▶ At most 29 transitions ▶ Time 237

Results 17512 differentials with p > 2−64 Best differentials found: p ≥ 2−61.52

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 8 / 9

slide-17
SLIDE 17

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Forgery Attack

. N . K . Init . Final . T .

64

. KS . KS .

80

. G . leak . G .

leak

.

64

. m1 ⊕ 𝛽 .

48

. m2 ⊕ 𝛾 . c1 . c2 .

48 1 Get a valid message (m1 ‖ m2, c1 ‖ c2, 𝜐) 2 (c1 ⊕ 𝛽 ‖ c2 ⊕ 𝛾, 𝜐) is a forge with probability ≥ 2−61.52

▶ Corresponding plaintext: m1 ⊕ 𝛽 ‖ m2 ⊕ 𝛾,

because the truncated characteristic doesn’t affect the leak

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 9 / 9

slide-18
SLIDE 18

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Forgery Attack

. N . K . Init . Final . T .

64

. KS . KS .

80

. G . leak . G .

leak

.

64

. m1 ⊕ 𝛽 .

48

. m2 ⊕ 𝛾 . c1 . c2 .

48 1 Get a valid message (m1 ‖ m2, c1 ‖ c2, 𝜐) 2 (c1 ⊕ 𝛽 ‖ c2 ⊕ 𝛾, 𝜐) is a forge with probability ≥ 2−61.52

▶ Corresponding plaintext: m1 ⊕ 𝛽 ‖ m2 ⊕ 𝛾,

because the truncated characteristic doesn’t affect the leak

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 9 / 9

slide-19
SLIDE 19

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Forgery Attack

. N . K . Init . Final . T .

64

. KS . KS .

80

. G . leak . G .

leak

.

64

. m1 ⊕ 𝛽 .

48

. m2 ⊕ 𝛾 . c1 . c2 .

48 1 Get a valid message (m1 ‖ m2, c1 ‖ c2, 𝜐) 2 (c1 ⊕ 𝛽 ‖ c2 ⊕ 𝛾, 𝜐) is a forge with probability ≥ 2−61.52

▶ Corresponding plaintext: m1 ⊕ 𝛽 ‖ m2 ⊕ 𝛾,

because the truncated characteristic doesn’t affect the leak

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 9 / 9

slide-20
SLIDE 20

. . . Description of LAC . . . . Differentials and Characteristics . Forgery attack

Forgery Attack

. N . K . Init . Final . T .

64

. KS . KS .

80

. G . leak . G .

leak

.

64

. m1 ⊕ 𝛽 .

48

. m2 ⊕ 𝛾 . c1 . c2 .

48

Is it an attack?

▶ Probability slightly lower than claimed for forgery (2−61.52vs.2−64) ▶ Need new data to repeat...

▶ Can use several differentials (17512 in this class) ▶ Design limited to 240 data

  • G. Leurent (Inria)

Cryptanalysis of LAC DIAC 2014 9 / 9

slide-21
SLIDE 21

Wheesht design Distinguisher Key recovery Improved key recovery

Cryptanalysis of Wheesht

Anne Canteaut Gaëtan Leurent

Inria, France

DIAC 2014

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 1 / 13

slide-22
SLIDE 22

Wheesht design Distinguisher Key recovery Improved key recovery

CAESAR candidate Wheesht

▶ Designed by Peter Maxwell ▶ 256bit security ▶ ARX, 64bit words ▶ Encryption: counter mode stream cipher ▶ Notations:

▶ Encryption key ki; ▶ Constants qi; ▶ Public nonce ni; ▶ Secret nonce si; ▶ Block counter bi; ▶ Extra parameters pi;

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 2 / 13

slide-23
SLIDE 23

Wheesht design Distinguisher Key recovery Improved key recovery

Wheesht structure

. k0 ⊕ q0 . k1 ⊕ q1 . k2 ⊕ q2 . k3 ⊕ q3 . k0 ⊕ q4 . k1 ⊕ q5 . k2 ⊕ q6 . k3 ⊕ q7 . n0 . n1 . s0 . s1 . 𝜄tm . 𝜄tm . b0 . b1 . p0 . p1 . 𝜄tm . 𝜄tm . 𝜄tf . 𝜄tf . z4 ⊕ k0 . z1 ⊕ k1 . z6 ⊕ k2 . z3 ⊕ k3 . z0 ⊕ k0 . z5 ⊕ k1 . z2 ⊕ k2 . z7 ⊕ k3 . k0 . k1 . k2 . k3 . k0 . k1 . k2 . k3

. x0 . x1 . x2 . x3 . x4 . x5 . x6 . x7 . x4 . x1 ⊕ b0 . x6 . x3 ⊕ b1 . x0 . x5 . x2 . x7 . y0 . y1 . y2 . y3 . y4 . y5 . y6 . y7 . y4 . y1 . y6 . y3 . y0 . y5 . y2 . y7 . z0 . z1 . z2 . z3 . z4 . z5 . z6 . z7

. keystream . authentication key

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 3 / 13

slide-24
SLIDE 24

Wheesht design Distinguisher Key recovery Improved key recovery

Wheesht Analysis

Our results

1 Generic keystream distinguisher

▶ Using 271 data  time

2 Generic key recovery

▶ Using 2197 data, 2192 time

3 Key recovery for Wheesht31256

▶ Using 210 data, 2200 time

Differential attack on the authentication by Samuel Neves

▶ Probability 1 differential ▶ Trivial forgeries

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 4 / 13

slide-25
SLIDE 25

Wheesht design Distinguisher Key recovery Improved key recovery

Wheesht Analysis

Our results

1 Generic keystream distinguisher

▶ Using 271 data  time

2 Generic key recovery

▶ Using 2197 data, 2192 time

3 Key recovery for Wheesht31256

▶ Using 210 data, 2200 time

Differential attack on the authentication by Samuel Neves

▶ Probability 1 differential ▶ Trivial forgeries

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 5 / 13

slide-26
SLIDE 26

Wheesht design Distinguisher Key recovery Improved key recovery

Incrementing the counter

. k0 ⊕ q0 . k1 ⊕ q1 . k2 ⊕ q2 . k3 ⊕ q3 . k0 ⊕ q4 . k1 ⊕ q5 . k2 ⊕ q6 . k3 ⊕ q7 . n0 . n1 . s0 . s1 . 𝜄tm . 𝜄tm . b0 . b1 . p0 . p1 . 𝜄tm . 𝜄tm . 𝜄tf . 𝜄tf . z1 ⊕ k1 . z3 ⊕ k3 . z4 ⊕ k0 . z6 ⊕ k2 . z0 ⊕ k0 . z5 ⊕ k1 . z2 ⊕ k2 . z7 ⊕ k3 . k1 . k3 . k0 . k2 . k0 . k1 . k2 . k3

. x0 . x1 . x2 . x3 . x4 . x5 . x6 . x7 . x4 . x1 ⊕ b0 . x6 . x3 ⊕ b1 . y0 . y1 . y2 . y3 . x0 . x5 . x2 . x7 . y4 . y5 . y6 . y7 . y4 . y1 . y6 . y3 . z0 . z1 . z2 . z3 . y0 . y5 . y2 . y7 . z4 . z5 . z6 . z7

. keystream . authentication key

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 6 / 13

slide-27
SLIDE 27

Wheesht design Distinguisher Key recovery Improved key recovery

Incrementing the counter

. k0 ⊕ q0 . k1 ⊕ q1 . k2 ⊕ q2 . k3 ⊕ q3 . k0 ⊕ q4 . k1 ⊕ q5 . k2 ⊕ q6 . k3 ⊕ q7 . n0 . n1 . s0 . s1 . 𝜄tm . 𝜄tm . b0 . b1 . p0 . p1 . 𝜄tm . 𝜄tm . 𝜄tf . 𝜄tf . z1 ⊕ k1 . z3 ⊕ k3 . z4 ⊕ k0 . z6 ⊕ k2 . z0 ⊕ k0 . z5 ⊕ k1 . z2 ⊕ k2 . z7 ⊕ k3 . k1 . k3 . k0 . k2 . k0 . k1 . k2 . k3

. x0 . x1 . x2 . x3 . x4 . x5 . x6 . x7 . x4 . x1 ⊕ b0 . x6 . x3 ⊕ b1 . y0 . y1 . y2 . y3 . x0 . x5 . x2 . x7 . y4 . y5 . y6 . y7 . y4 . y1 . y6 . y3 . z0 . z1 . z2 . z3 . y0 . y5 . y2 . y7 . z4 . z5 . z6 . z7

. keystream . authentication key

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 6 / 13

slide-28
SLIDE 28

Wheesht design Distinguisher Key recovery Improved key recovery

A Simple Distinguisher

. b0 . b1 . 𝜇x4,x1,x6,x3 . 𝜓y4,y6 . z1 . z3 (y1, y3) = 𝜇x4,x1,x6,x3(b0, b1) (z1, z3) = 𝜓y4,y6(y1, y3)

▶ 𝜇x4,x1,x6,x3 and 𝜓y4,y6 fixed

for a given message

▶ Behave like random functions

The composition of two random functions is not a random function!

▶ Output space 0.46N rather than 0.63N ▶ Distinguisher with O(√N) samples:

time to first collision

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 7 / 13

slide-29
SLIDE 29

Wheesht design Distinguisher Key recovery Improved key recovery

Attack Algorithm

Capture 16 known plaintext messages of length 267 blocks. Denote the keystream as 􏿵𝜏(i)

j 􏿸, 0 ≤ i < 16, 0 ≤ j < 269

for 0 ≤ i < 16 do for 0 ≤ k < 2 do S ← ∅ for 0 ≤ j < 267 do if (𝜏4j+k, 𝜏4j+2+k) ∈ S then B[2i + k] ← j break loop else S ← S ∪ 􏿻(𝜏4j, 𝜏4g+2)􏿾 if Average(B) < 1.038 ⋅ 264 then return 1: keystream is from Wheesht else return 0: keystream is random

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 8 / 13

slide-30
SLIDE 30

Wheesht design Distinguisher Key recovery Improved key recovery

Wheesht Analysis

Our results

1 Generic keystream distinguisher

▶ Using 271 data  time

2 Generic key recovery

▶ Using 2197 data, 2192 time

3 Key recovery for Wheesht31256

▶ Using 210 data, 2200 time

Differential attack on the authentication by Samuel Neves

▶ Probability 1 differential ▶ Trivial forgeries

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 9 / 13

slide-31
SLIDE 31

Wheesht design Distinguisher Key recovery Improved key recovery

Generating output

. k0 ⊕ q0 . k1 ⊕ q1 . k2 ⊕ q2 . k3 ⊕ q3 . k0 ⊕ q4 . k1 ⊕ q5 . k2 ⊕ q6 . k3 ⊕ q7 . n0 . n1 . s0 . s1 . 𝜄tm . 𝜄tm . b0 . b1 . p0 . p1 . 𝜄tm . 𝜄tm . 𝜄tf . 𝜄tf . z1 ⊕ k1 . z3 ⊕ k3 . z4 ⊕ k0 . z6 ⊕ k2 . z0 ⊕ k0 . z5 ⊕ k1 . z2 ⊕ k2 . z7 ⊕ k3 . k1 . k3 . k0 . k2 . k0 . k1 . k2 . k3

. x0 . x2 . x5 . x7 . x1 . x3 . x4 . x6 . x4 . x1 ⊕ b0 . x6 . x3 ⊕ b1 . y0 . y1 . y2 . y3 . y4 . y6 . x0 . x5 . x2 . x7 . y5 . y7 . y4 . y1 . y6 . y3 . z0 . z1 . z2 . z3 . y0 . y5 . y2 . y7 . z4 . z5 . z6 . z7

. keystream . authentication key

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 10 / 13

slide-32
SLIDE 32

Wheesht design Distinguisher Key recovery Improved key recovery

Generating output

. k0 ⊕ q0 . k1 ⊕ q1 . k2 ⊕ q2 . k3 ⊕ q3 . k0 ⊕ q4 . k1 ⊕ q5 . k2 ⊕ q6 . k3 ⊕ q7 . n0 . n1 . s0 . s1 . 𝜄tm . 𝜄tm . b0 . b1 . p0 . p1 . 𝜄tm . 𝜄tm . 𝜄tf . 𝜄tf . z1 ⊕ k1 . z3 ⊕ k3 . z4 ⊕ k0 . z6 ⊕ k2 . z0 ⊕ k0 . z5 ⊕ k1 . z2 ⊕ k2 . z7 ⊕ k3 . k1 . k3 . k0 . k2 . k0 . k1 . k2 . k3

. x0 . x2 . x5 . x7 . x1 . x3 . x4 . x6 . x4 . x1 ⊕ b0 . x6 . x3 ⊕ b1 . y0 . y1 . y2 . y3 . y4 . y6 . x0 . x5 . x2 . x7 . y5 . y7 . y4 . y1 . y6 . y3 . z0 . z1 . z2 . z3 . y0 . y5 . y2 . y7 . z4 . z5 . z6 . z7

. keystream . authentication key

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 10 / 13

slide-33
SLIDE 33

Wheesht design Distinguisher Key recovery Improved key recovery

Key recovery attack

Simplified representation (z(b)

1 , z(b) 3 ) = f(x4, x1, x6, x3, y4, y6, b)

(𝜏(b)

1 , 𝜏(b) 3 ) = (z(b) 1 , z(b) 3 ) ⊕ (k1, k3) ▶ x4, x1, x6, x3, y4, y6 fixed for a given message ▶ Remove k1, k3:

g(x4, x1, x6, x3, y4, y6) = f(x4, x1, x6, x3, y4, y6, 0) ⊕ f(x4, x1, x6, x3, y4, y6, 1) = (𝜏(0)

1 , 𝜏(0) 3 ) ⊕ (𝜏(1) 1 , 𝜏(1) 3 ) ▶ Birthday match to recover x4, x1, x6, x3, y4, y6

▶ Evaluate g with 2192 random states offline ▶ Evaluate online with 2192 different messages

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 11 / 13

slide-34
SLIDE 34

Wheesht design Distinguisher Key recovery Improved key recovery

Wheesht Analysis

Our results

1 Generic keystream distinguisher

▶ Using 271 data  time

2 Generic key recovery

▶ Using 2197 data, 2192 time

3 Key recovery for Wheesht31256

▶ Using 210 data, 2200 time

Differential attack on the authentication by Samuel Neves

▶ Probability 1 differential ▶ Trivial forgeries

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 12 / 13

slide-35
SLIDE 35

Wheesht design Distinguisher Key recovery Improved key recovery

Low data complexity attack

▶ We target Wheesht31256, and the final 𝜄 layer ▶ y6 can be computed from z1, z2, z3

. y4 . y1 . y6 . y3 . z0 . z1 . z2 . z3 .

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 13 / 13

slide-36
SLIDE 36

Wheesht design Distinguisher Key recovery Improved key recovery

Low data complexity attack

▶ We target Wheesht31256, and the final 𝜄 layer ▶ y6 can be computed from z1, z2, z3

. k0 ⊕ q0 . k1 ⊕ q1 . k2 ⊕ q2 . k3 ⊕ q3 . k0 ⊕ q4 . k1 ⊕ q5 . k2 ⊕ q6 . k3 ⊕ q7 . n0 . n1 . s0 . s1 . 𝜄tm . 𝜄tm . b0 . b1 . p0 . p1 . 𝜄tm . 𝜄tm . 𝜄tf . 𝜄tf . z1 ⊕ k1 . z3 ⊕ k3 . z4 ⊕ k0 . z6 ⊕ k2 . z0 ⊕ k0 . z5 ⊕ k1 . z2 ⊕ k2 . z7 ⊕ k3 . k1 . k3 . k0 . k2 . k0 . k1 . k2 . k3

. x0 . x2 . x5 . x7 . x1 . x3 . x4 . x6 . x4 . x1 ⊕ b0 . x6 . x3 ⊕ b1 . y0 . y1 . y2 . y3 . y4 . y6 . x0 . x5 . x2 . x7 . y5 . y7 . y4 . y1 . y6 . y3 . z0 . z1 . z2 . z3 . y0 . y5 . y2 . y7 . z4 . z5 . z6 . z7

. keystream . authentication key

▶ y6 fixed inside a message ▶ Keystream: k1 ⊕ z1, k3 ⊕ z3 1 Guess k1, k3 2 For each message block, compute the set of possible y6

(iterate over z2)

3 Verify whether the intersection is nonempty

▶ Expect single k1, k3 candidate with 256 blocks, time 2200

  • G. Leurent (Inria)

Cryptanalysis of Wheesht DIAC 2014 13 / 13