On The Distribution of Linear Biases: Three Instructive Examples - - PowerPoint PPT Presentation

on the distribution of linear biases three instructive
SMART_READER_LITE
LIVE PREVIEW

On The Distribution of Linear Biases: Three Instructive Examples - - PowerPoint PPT Presentation

On The Distribution of Linear Biases: Three Instructive Examples Mohamed Ahmed Abdelraheem 1 , Martin Agren 2 , Peter Beelen 1 , and Gregor Leander 1 1 Technical University of Denmark 2 Lund University, Sweden 120820 / Santa Barbara Outline 1


slide-1
SLIDE 1

On The Distribution of Linear Biases: Three Instructive Examples

Mohamed Ahmed Abdelraheem1, Martin ˚ Agren2, Peter Beelen1, and Gregor Leander1

1 Technical University of Denmark 2 Lund University, Sweden 120820 / Santa Barbara

slide-2
SLIDE 2

Outline

1 Introduction 2 The Problem 3 The Examples

The Cube Cipher PRESENT with identical round-keys PRINTcipher, Invariant Subspaces, and Eigenvectors

4 Conclusion

  • M. ˚

Agren, Lund University, Sweden

slide-3
SLIDE 3

Outline

1 Introduction 2 The Problem 3 The Examples

The Cube Cipher PRESENT with identical round-keys PRINTcipher, Invariant Subspaces, and Eigenvectors

4 Conclusion

  • M. ˚

Agren, Lund University, Sweden

slide-4
SLIDE 4

Setting

We are analyzing/constructing/breaking block ciphers. . . Fix the (unknown) key and consider the permutation F: Fn

2 → Fn 2.

  • M. ˚

Agren, Lund University, Sweden

slide-5
SLIDE 5

Linear Approximation

Given F : Fn

2 → Fn 2,

a linear approximation is an equation like α, x = β, F(x). (Input mask α, output mask β.)

  • M. ˚

Agren, Lund University, Sweden

slide-6
SLIDE 6

Linear Approximation

Given F : Fn

2 → Fn 2,

a linear approximation is an equation like α, x = β, F(x). (Input mask α, output mask β.) The bias ǫF(α, β): Pr [α, x = β, F(x)] = 1 2 + ǫF(α, β) The correlation cF(α, β): cF(α, β) = 2ǫF(α, β)

  • M. ˚

Agren, Lund University, Sweden

slide-7
SLIDE 7

Linear Approximation of a Composite Function

x F1 F2 Fr F(x) θ0 θ1 θr A linear trail θ is a collection of all intermediate masks θ = (θ0 = α, . . . , θr = β).

  • M. ˚

Agren, Lund University, Sweden

slide-8
SLIDE 8

Linear Approximation of a Composite Function

x F1 F2 Fr F(x) θ0 θ1 θr A linear trail θ is a collection of all intermediate masks θ = (θ0 = α, . . . , θr = β). The correlation of a trail is Cθ =

  • i

cFi(θi, θi+1).

Theorem

cF(α, β) =

  • θ: θ0=α,θr=β

Cθ.

  • M. ˚

Agren, Lund University, Sweden

slide-9
SLIDE 9

Linear Approximation of a Composite Function

x F1 F2 Fr F(x) θ0 θ1 θr k0 k1 kr A linear trail θ is a collection of all intermediate masks θ = (θ0 = α, . . . , θr = β). The correlation of a trail is Cθ = (−1)θ,k

i

cFi(θi, θi+1).

Theorem (Linear Hull)

cF(α, β) =

  • θ: θ0=α,θr=β

(−1)θ,kCθ.

  • M. ˚

Agren, Lund University, Sweden

slide-10
SLIDE 10

Outline

1 Introduction 2 The Problem 3 The Examples

The Cube Cipher PRESENT with identical round-keys PRINTcipher, Invariant Subspaces, and Eigenvectors

4 Conclusion

  • M. ˚

Agren, Lund University, Sweden

slide-11
SLIDE 11

The Problem

We can: bound the correlation of single linear trails. We cannot: bound the correlation of a linear approximation. Because: Many linear trails interact in a key dependent way. Each key gives a different correlation. We need to understand the distribution.

  • M. ˚

Agren, Lund University, Sweden

slide-12
SLIDE 12

Some Approaches

I: Deal with single trails.

  • M. ˚

Agren, Lund University, Sweden

slide-13
SLIDE 13

Some Approaches

I: Deal with single trails. II: Model the situation – make assumptions. (Possible assumption: Different trails are independent.)

  • M. ˚

Agren, Lund University, Sweden

slide-14
SLIDE 14

Some Approaches

I: Deal with single trails. II: Model the situation – make assumptions. (Possible assumption: Different trails are independent.) III: Perform experiments to validate the model/assumptions.

  • M. ˚

Agren, Lund University, Sweden

slide-15
SLIDE 15

Some Approaches

I: Deal with single trails. II: Model the situation – make assumptions. (Possible assumption: Different trails are independent.) III: Perform experiments to validate the model/assumptions. Todo: Develop a sound framework. Why has it not been done before?

◮ it’s difficult ◮ we didn’t try very hard

  • M. ˚

Agren, Lund University, Sweden

slide-16
SLIDE 16

Our Contribution

Three interesting examples of what can happen.

◮ Counterexample to earlier “theorem”. ◮ Give an idea what you can/cannot hope to prove. ◮ Serve as inspiration for future work.

  • M. ˚

Agren, Lund University, Sweden

slide-17
SLIDE 17

Outline

1 Introduction 2 The Problem 3 The Examples

The Cube Cipher PRESENT with identical round-keys PRINTcipher, Invariant Subspaces, and Eigenvectors

4 Conclusion

  • M. ˚

Agren, Lund University, Sweden

slide-18
SLIDE 18

Normal Distribution?

Consider an n-bit block cipher and assume

◮ independent round keys, ◮ (exponentially in n) many non-zero trails, ◮ all with the same absolute correlation.

If we pick a key, what bias do we get?

Theorem (Daemen and Rijmen, ePrint 2005/212)

The bias distribution tends to a normal distribution as n → ∞.

  • M. ˚

Agren, Lund University, Sweden

slide-19
SLIDE 19

Normal Distribution?

Bias Number of keys

  • M. ˚

Agren, Lund University, Sweden

Theorem (Linear Hull)

cF(α, β) =

  • θ

(−1)θ,kCθ.

slide-20
SLIDE 20

The Cube Cipher

x k0 x3 k1 x3 k2 F(x)

◮ independent round keys, ◮ (exponentially in n) many non-zero trails, ◮ all with the same absolute correlation, ◮ toy cipher.

  • M. ˚

Agren, Lund University, Sweden

slide-21
SLIDE 21

Normal Distribution?

Bias Number of keys Cube cipher vs. the normal distribution. Only 5 values — for any n!

  • M. ˚

Agren, Lund University, Sweden

slide-22
SLIDE 22

The Role of Key-Scheduling

Common analysis: Assume independent round keys and hope that the key-scheduling does not influence the distribution. Two counter-examples:

◮ PRESENT with identical round-keys ◮ PRINTcipher

  • M. ˚

Agren, Lund University, Sweden

slide-23
SLIDE 23

PRESENT

ki S S S S S S S S S S S S S S S S ki+1 S S S S S S S S S S S S S S S S

◮ many linear trails with one active Sbox per round ◮ distribution is close to normal

  • M. ˚

Agren, Lund University, Sweden

slide-24
SLIDE 24

PRESENT

Bias Number of keys Distribution for 17 rounds of PRESENT.

  • M. ˚

Agren, Lund University, Sweden

slide-25
SLIDE 25

PRESENT with Identical Round-Keys

k ⊕ RCi S S S S S S S S S S S S S S S S k ⊕ RCi+1 S S S S S S S S S S S S S S S S Modification:

◮ identical round-keys ◮ round constants

  • M. ˚

Agren, Lund University, Sweden

slide-26
SLIDE 26

PRESENT With Identical Round-Keys

Bias Number of keys Identical vs. original round-keys.

  • M. ˚

Agren, Lund University, Sweden

slide-27
SLIDE 27

PRESENT-Conclusions

◮ PRESENT-const is not secure. ◮ SPONGENT does not have the PRESENT Sbox. ◮ More rounds help.

  • M. ˚

Agren, Lund University, Sweden

slide-28
SLIDE 28

PRINTcipher, Invariant Subspaces, and Eigenvectors

⊕k ⊕RCi π0 S π1 S π2 S π3 S π4 S π5 S π6 S π7 S π8 S π9 S π10 S π11 S π12 S π13 S π14 S π15 S Last year at CRYPTO: invariant subspaces: Let U ⊆ Fn

2 be a subspace and d ∈ Fn

  • 2. Assume a weak key.

Fk(U + d) = U + d.

  • M. ˚

Agren, Lund University, Sweden

slide-29
SLIDE 29

PRINTcipher, Invariant Subspaces, and Eigenvectors

⊕k ⊕RCi π0 S π1 S π2 S π3 S π4 S π5 S π6 S π7 S π8 S π9 S π10 S π11 S π12 S π13 S π14 S π15 S Last year at CRYPTO: invariant subspaces: Let U ⊆ Fn

2 be a subspace and d ∈ Fn

  • 2. Assume a weak key.

Fk(U + d) = U + d. ⇓ F(U + d) = U + d.

  • M. ˚

Agren, Lund University, Sweden

slide-30
SLIDE 30

Linear Biases in PRINTcipher

“PRINTcipher-24:”

  • M. ˚

Agren, Lund University, Sweden

Bias Number of keys

slide-31
SLIDE 31

Linear Biases in PRINTcipher

“PRINTcipher-24:”

  • M. ˚

Agren, Lund University, Sweden

Bias Number of keys

slide-32
SLIDE 32

Linear Biases in PRINTcipher

“PRINTcipher-24:”

  • M. ˚

Agren, Lund University, Sweden

Bias Number of keys

2−9.0

Bias Number of keys Precisely those keys that yield an invariant subspace!

slide-33
SLIDE 33

Correlation Matrices; an Eigenvector

Correlation matrix C = (cF(α, β))α,β.

Theorem

Invariant subspace ⇒ A sub-matrix (A) of the correlation matrix has an eigenvector with a special ±-structure and eigenvalue 1. The matrix has a nonzero limit. We have trail-clustering!

  • M. ˚

Agren, Lund University, Sweden

slide-34
SLIDE 34

The Matrix Power Limit

The eigenvector is const ·

  • +1

+1 −1 −1 +1 +1 −1 . . .

  • .
  • M. ˚

Agren, Lund University, Sweden

slide-35
SLIDE 35

The Matrix Power Limit

The eigenvector is const ·

  • +1

+1 −1 −1 +1 +1 −1 . . .

  • ,

so Ar → ·              +1 +1 −1 −1 +1 +1 −1 . . . +1 +1 −1 −1 +1 +1 −1 . . . −1 −1 +1 +1 −1 −1 +1 . . . −1 −1 +1 +1 −1 −1 +1 . . . +1 +1 −1 −1 +1 +1 −1 . . . +1 +1 −1 −1 +1 +1 −1 . . . −1 −1 +1 +1 −1 −1 +1 . . . . . . . . . . . . . . . . . . . . . . . . ...              .

  • M. ˚

Agren, Lund University, Sweden

const2

slide-36
SLIDE 36

The Matrix Power Limit

The eigenvector is const ·

  • +1

+1 −1 −1 +1 +1 −1 . . .

  • ,

so Ar → 1 216 − 1 ·              +1 +1 −1 −1 +1 +1 −1 . . . +1 +1 −1 −1 +1 +1 −1 . . . −1 −1 +1 +1 −1 −1 +1 . . . −1 −1 +1 +1 −1 −1 +1 . . . +1 +1 −1 −1 +1 +1 −1 . . . +1 +1 −1 −1 +1 +1 −1 . . . −1 −1 +1 +1 −1 −1 +1 . . . . . . . . . . . . . . . . . . . . . . . . ...              . Indeed, experimentally, cF(α, β) ≈ ±2−16 (PRINTcipher-48).

  • M. ˚

Agren, Lund University, Sweden

slide-37
SLIDE 37

Is There any Hope?

Theorem

Invariant subspace ⇒ A sub-matrix of the correlation matrix has an eigenvector with a special ±-structure and eigenvalue 1.

  • M. ˚

Agren, Lund University, Sweden

slide-38
SLIDE 38

Is There any Hope?

Actually,

Theorem

Invariant subspace ⇔ A sub-matrix of the correlation matrix has an eigenvector with a special ±-structure and eigenvalue 1.

  • M. ˚

Agren, Lund University, Sweden

slide-39
SLIDE 39

Outline

1 Introduction 2 The Problem 3 The Examples

The Cube Cipher PRESENT with identical round-keys PRINTcipher, Invariant Subspaces, and Eigenvectors

4 Conclusion

  • M. ˚

Agren, Lund University, Sweden

slide-40
SLIDE 40

Conclusion

◮ Assessing security against linear cryptanalysis is tricky. ◮ An old “theorem” is not entirely correct

— new attempts have to somehow deal with Cube.

  • M. ˚

Agren, Lund University, Sweden

slide-41
SLIDE 41

Conclusion

◮ Assessing security against linear cryptanalysis is tricky. ◮ An old “theorem” is not entirely correct

— new attempts have to somehow deal with Cube.

◮ With identical round-keys, bad things can happen in various

ways (PRESENT-const, PRINTcipher).

◮ With key-schedules, how can we know these things don’t

happen (even for just a few keys)?

  • M. ˚

Agren, Lund University, Sweden