Attack and Improvement of a Secure S-box Calculation Based on the - - PowerPoint PPT Presentation

attack and improvement of a secure s box calculation
SMART_READER_LITE
LIVE PREVIEW

Attack and Improvement of a Secure S-box Calculation Based on the - - PowerPoint PPT Presentation

8 + Attack and Improvement of a Secure S-box Calculation Based on the Fourier Transform ebastien Coron 1 , Christophe Giraud 2 , Emmanuel Prouff 2 , and Jean-S Matthieu Rivain 1 , 2 1 University of Luxembourg 2 Oberthur Technologies August 11,


slide-1
SLIDE 1

8 +

Attack and Improvement of a Secure S-box Calculation Based on the Fourier Transform

Jean-S´ ebastien Coron1, Christophe Giraud2, Emmanuel Prouff2, and Matthieu Rivain1,2

1 University of Luxembourg 2 Oberthur Technologies

August 11, 2008

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-2
SLIDE 2

8 +

Outline

1

Preliminaries

2

S-box Masking Based on the Fourier Transform

3

Differential Power Analysis vs. Biased Masking

4

DPA against the FT-Based S-box Masking

5

Improved FT-Based S-box Masking

6

Conclusion

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-3
SLIDE 3

8 +

Outline

1

Preliminaries

2

S-box Masking Based on the Fourier Transform

3

Differential Power Analysis vs. Biased Masking

4

DPA against the FT-Based S-box Masking

5

Improved FT-Based S-box Masking

6

Conclusion

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-4
SLIDE 4

8 +

Differential Power Analysis (DPA)

DPA Basics Physical leakage dependent on intermediate variables Sensitive variable depends on both the input plaintext and on a guessable part of the secret key DPA exploits the physical leakage on a sensitive variable for key recovery

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-5
SLIDE 5

8 +

Differential Power Analysis (DPA)

DPA Basics Physical leakage dependent on intermediate variables Sensitive variable depends on both the input plaintext and on a guessable part of the secret key DPA exploits the physical leakage on a sensitive variable for key recovery DPA Security Every intermediate variable is independent of any sensitive variable.

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-6
SLIDE 6

8 +

Masking & S-box protection issue

Masking Countermeasure Every sensitive variable Z is masked with a random value R masked variable Z = Z ⊕ R and mask R both independent of Z Masked variables and masks processed separately Completeness: Z = Z ⊕ R

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-7
SLIDE 7

8 +

Masking & S-box protection issue

Masking Countermeasure Every sensitive variable Z is masked with a random value R masked variable Z = Z ⊕ R and mask R both independent of Z Masked variables and masks processed separately Completeness: Z = Z ⊕ R Masking a block cipher requires the masking of:

◮ the key additions ◮ the linear transformations ◮ the substitution boxes (S-boxes) J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-8
SLIDE 8

8 +

Masking & S-box protection issue

Masking Countermeasure Every sensitive variable Z is masked with a random value R masked variable Z = Z ⊕ R and mask R both independent of Z Masked variables and masks processed separately Completeness: Z = Z ⊕ R Masking a block cipher requires the masking of:

◮ the key additions ◮ the linear transformations ◮ the substitution boxes (S-boxes)

Key addition Masked Var. Mask Z ⊕ R ⊕ R = Z

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-9
SLIDE 9

8 +

Masking & S-box protection issue

Masking Countermeasure Every sensitive variable Z is masked with a random value R masked variable Z = Z ⊕ R and mask R both independent of Z Masked variables and masks processed separately Completeness: Z = Z ⊕ R Masking a block cipher requires the masking of:

◮ the key additions ◮ the linear transformations ◮ the substitution boxes (S-boxes)

Key addition Masked Var. Mask Z ⊕ R⊕K ⊕ R = Z⊕K

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-10
SLIDE 10

8 +

Masking & S-box protection issue

Masking Countermeasure Every sensitive variable Z is masked with a random value R masked variable Z = Z ⊕ R and mask R both independent of Z Masked variables and masks processed separately Completeness: Z = Z ⊕ R Masking a block cipher requires the masking of:

◮ the key additions ◮ the linear transformations ◮ the substitution boxes (S-boxes)

Linear transformation Masked Var. Mask Z ⊕ R ⊕ R = Z

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-11
SLIDE 11

8 +

Masking & S-box protection issue

Masking Countermeasure Every sensitive variable Z is masked with a random value R masked variable Z = Z ⊕ R and mask R both independent of Z Masked variables and masks processed separately Completeness: Z = Z ⊕ R Masking a block cipher requires the masking of:

◮ the key additions ◮ the linear transformations ◮ the substitution boxes (S-boxes)

Linear transformation Masked Var. Mask L(Z ⊕ R) ⊕ L(R) = L(Z)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-12
SLIDE 12

8 +

Masking & S-box protection issue

Masking Countermeasure Every sensitive variable Z is masked with a random value R masked variable Z = Z ⊕ R and mask R both independent of Z Masked variables and masks processed separately Completeness: Z = Z ⊕ R Masking a block cipher requires the masking of:

◮ the key additions ◮ the linear transformations ◮ the substitution boxes (S-boxes)

Substitution box Issue: From Z ⊕ R and R, compute F(Z) ⊕ R′. All intermediate var. must be independent of Z.

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-13
SLIDE 13

8 +

Outline

1

Preliminaries

2

S-box Masking Based on the Fourier Transform

3

Differential Power Analysis vs. Biased Masking

4

DPA against the FT-Based S-box Masking

5

Improved FT-Based S-box Masking

6

Conclusion

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-14
SLIDE 14

8 +

S-box Masking Based on the Fourier Transform

Prouff, Giraud, and Aumonier in CHES 2006 : Provably Secure S-Box Implementation Based on Fourier Transform

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-15
SLIDE 15

8 +

S-box Masking Based on the Fourier Transform

Prouff, Giraud, and Aumonier in CHES 2006 : Provably Secure S-Box Implementation Based on Fourier Transform The Fourier Transform of a (n × n) S-box F is defined by:

  • F(Z) =
  • a∈Fn

2

F(a)(−1)a·Z .

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-16
SLIDE 16

8 +

S-box Masking Based on the Fourier Transform

Prouff, Giraud, and Aumonier in CHES 2006 : Provably Secure S-Box Implementation Based on Fourier Transform The Fourier Transform of a (n × n) S-box F is defined by:

  • F(Z) =
  • a∈Fn

2

F(a)(−1)a·Z . It satisfies

  • F = 2nF, that is:

F(Z) = 1 2n

  • F(Z) = 1

2n

  • a∈Fn

2

  • F(a)(−1)a·Z

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-17
SLIDE 17

8 +

S-box Masking Based on the Fourier Transform

S-box Masking Based on the Fourier Transform Inputs: a masked var. Z = Z ⊕ R1, a mask R1, a look-up table F Outputs: a masked output F(Z) ⊕ R3, a mask R3 F(Z) = 1 2n

  • a∈Fn

2

  • F(a)(−1)a·Z

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-18
SLIDE 18

8 +

S-box Masking Based on the Fourier Transform

S-box Masking Based on the Fourier Transform Inputs: a masked var. Z = Z ⊕ R1, a mask R1, a look-up table F Outputs: a masked output F(Z) ⊕ R3, a mask R3 (−1)

  • Z·R1F(Z) = 1

2n

  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-19
SLIDE 19

8 +

S-box Masking Based on the Fourier Transform

S-box Masking Based on the Fourier Transform Inputs: a masked var. Z = Z ⊕ R1, a mask R1, a look-up table F Outputs: a masked output F(Z) ⊕ R3, a mask R3 (−1)(

Z⊕R2)·R1F(Z) = 1

2n

  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z⊕R2)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-20
SLIDE 20

8 +

S-box Masking Based on the Fourier Transform

S-box Masking Based on the Fourier Transform Inputs: a masked var. Z = Z ⊕ R1, a mask R1, a look-up table F Outputs: a masked output F(Z) ⊕ R3, a mask R3 (−1)(

Z⊕R2)·R1F(Z)+R3 mod 2n =

1 2n

  • 2nR3 + R4+
  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z⊕R2)mod22n

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-21
SLIDE 21

8 +

S-box Masking Based on the Fourier Transform

S-box Masking Based on the Fourier Transform Inputs: a masked var. Z = Z ⊕ R1, a mask R1, a look-up table F Outputs: a masked output F(Z) ⊕ R3, a mask R3 (−1)(

Z⊕R2)·R1F(Z)+R3 mod 2n =

1 2n

  • 2nR3 + R4+
  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z⊕R2)mod22n

Remark

The sum is implemented by a loop on 2n elements. ⇒ Of interest for S-boxes with small dimensions (e.g. n = 4).

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-22
SLIDE 22

8 +

The Flaw

S-box Masking Based on the Fourier Transform (−1)(

Z⊕R2)·R1F(Z) + R3 =

1 2n

  • 2nR3 + R4 +
  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z⊕R2)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-23
SLIDE 23

8 +

The Flaw

S-box Masking Based on the Fourier Transform (−1)(

Z⊕R2)·R1F(Z) + R3 =

1 2n

  • 2nR3 + R4 +
  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z⊕R2)

The Flaw a · Z ⊕ R1 · ( Z ⊕ a ⊕ R2) = a · Z ⊕ R1 · ( Z ⊕ R2)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-24
SLIDE 24

8 +

The Flaw

S-box Masking Based on the Fourier Transform (−1)(

Z⊕R2)·R1F(Z) + R3 =

1 2n

  • 2nR3 + R4 +
  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z⊕R2)

The Flaw a · Z ⊕ R1 · ( Z ⊕ a ⊕ R2) = a · Z ⊕ R1 · ( Z ⊕ R2) R1 and ( Z ⊕ R2) are independently and uniformly distributed (iud)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-25
SLIDE 25

8 +

The Flaw

S-box Masking Based on the Fourier Transform (−1)(

Z⊕R2)·R1F(Z) + R3 =

1 2n

  • 2nR3 + R4 +
  • a∈Fn

2

  • F(a)(−1)a·

Z⊕R1·(a⊕ Z⊕R2)

The Flaw a · Z ⊕ R1 · ( Z ⊕ a ⊕ R2) = a · Z ⊕ R1 · ( Z ⊕ R2) R1 and ( Z ⊕ R2) are independently and uniformly distributed (iud) The scalar product of two iud r. v. X · Y is not a uniform r. v.: P [X · Y = 0] = 1 2 + 1 2n+1 .

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-26
SLIDE 26

8 +

Outline

1

Preliminaries

2

S-box Masking Based on the Fourier Transform

3

Differential Power Analysis vs. Biased Masking

4

DPA against the FT-Based S-box Masking

5

Improved FT-Based S-box Masking

6

Conclusion

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-27
SLIDE 27

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-28
SLIDE 28

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗ DPA Assumption E [L|bk∗ = 0] − E [L|bk∗ = 1] = ∆ = 0

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-29
SLIDE 29

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗ DPA Assumption E [L|bk∗ = 0] − E [L|bk∗ = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-30
SLIDE 30

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗ DPA Assumption E [L|bk∗ = 0] − E [L|bk∗ = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ For several executions, measure L and predict bk = f(X, k).

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-31
SLIDE 31

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗ DPA Assumption E [L|bk∗ = 0] − E [L|bk∗ = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ For several executions, measure L and predict bk = f(X, k). Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1]

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-32
SLIDE 32

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗ DPA Assumption E [L|bk∗ = 0] − E [L|bk∗ = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ For several executions, measure L and predict bk = f(X, k). Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1]

◮ If k = k∗ then P [bk = bk∗] = 1 and ∆k → ∆ J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-33
SLIDE 33

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗ DPA Assumption E [L|bk∗ = 0] − E [L|bk∗ = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ For several executions, measure L and predict bk = f(X, k). Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1]

◮ If k = k∗ then P [bk = bk∗] = 1 and ∆k → ∆ ◮ If k = k∗ then P [bk = bk∗] = α < 1 and ∆k → (1 − 2α)∆ J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-34
SLIDE 34

8 +

DPA Principle

Let bk∗ = f(X, k∗) be a bit of the computation, where

◮ X is a public variable (uniformly distributed) ◮ k∗ is a guessable part of the secret key

Let L be the leakage on bk∗ DPA Assumption E [L|bk∗ = 0] − E [L|bk∗ = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ For several executions, measure L and predict bk = f(X, k). Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1]

◮ If k = k∗ then P [bk = bk∗] = 1 and ∆k → ∆ ◮ If k = k∗ then P [bk = bk∗] = α < 1 and ∆k → (1 − 2α)∆

Assuming α > 0 we have |(1 − 2α)∆| < |∆|

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-35
SLIDE 35

8 +

DPA vs. Biased Masking

The leakage L depends on a masked bit bk∗ ⊕ R The mask is biased: P [R = 0] = 1

2 + ε

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-36
SLIDE 36

8 +

DPA vs. Biased Masking

The leakage L depends on a masked bit bk∗ ⊕ R The mask is biased: P [R = 0] = 1

2 + ε

DPA Assumption E [L|bk∗ ⊕ R = 0] − E [L|bk∗ ⊕ R = 1] = ∆ = 0

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-37
SLIDE 37

8 +

DPA vs. Biased Masking

The leakage L depends on a masked bit bk∗ ⊕ R The mask is biased: P [R = 0] = 1

2 + ε

DPA Assumption E [L|bk∗ ⊕ R = 0] − E [L|bk∗ ⊕ R = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1]

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-38
SLIDE 38

8 +

DPA vs. Biased Masking

The leakage L depends on a masked bit bk∗ ⊕ R The mask is biased: P [R = 0] = 1

2 + ε

DPA Assumption E [L|bk∗ ⊕ R = 0] − E [L|bk∗ ⊕ R = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1] If k = k∗ then P [bk = bk∗ ⊕ R] = 1

2 + ε, and

◮ ∆k →

1

2 + ε

  • ∆ +

1

2 − ε

  • (−∆)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-39
SLIDE 39

8 +

DPA vs. Biased Masking

The leakage L depends on a masked bit bk∗ ⊕ R The mask is biased: P [R = 0] = 1

2 + ε

DPA Assumption E [L|bk∗ ⊕ R = 0] − E [L|bk∗ ⊕ R = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1] If k = k∗ then P [bk = bk∗ ⊕ R] = 1

2 + ε, and

◮ ∆k →

1

2 + ε

  • ∆ +

1

2 − ε

  • (−∆) = 2ε∆

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-40
SLIDE 40

8 +

DPA vs. Biased Masking

The leakage L depends on a masked bit bk∗ ⊕ R The mask is biased: P [R = 0] = 1

2 + ε

DPA Assumption E [L|bk∗ ⊕ R = 0] − E [L|bk∗ ⊕ R = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1] If k = k∗ then P [bk = bk∗ ⊕ R] = 1

2 + ε, and

◮ ∆k →

1

2 + ε

  • ∆ +

1

2 − ε

  • (−∆) = 2ε∆

If k = k∗ then ∆k → 2ε(1 − 2α)∆

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-41
SLIDE 41

8 +

DPA vs. Biased Masking

The leakage L depends on a masked bit bk∗ ⊕ R The mask is biased: P [R = 0] = 1

2 + ε

DPA Assumption E [L|bk∗ ⊕ R = 0] − E [L|bk∗ ⊕ R = 1] = ∆ = 0 DPA Attack Make a guess k ? = k∗ Compute the difference of means: ∆k = E [L|bk = 0] − E [L|bk = 1] If k = k∗ then P [bk = bk∗ ⊕ R] = 1

2 + ε, and

◮ ∆k →

1

2 + ε

  • ∆ +

1

2 − ε

  • (−∆) = 2ε∆

If k = k∗ then ∆k → 2ε(1 − 2α)∆ The convergence requires about ( 1

2ε)2 times more leakage

measurements

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-42
SLIDE 42

8 +

Outline

1

Preliminaries

2

S-box Masking Based on the Fourier Transform

3

Differential Power Analysis vs. Biased Masking

4

DPA against the FT-Based S-box Masking

5

Improved FT-Based S-box Masking

6

Conclusion

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-43
SLIDE 43

8 +

DPA against the FT-Based S-box Masking

Targeted bit: a · Z ⊕ R1 · ( Z ⊕ R2)

◮ Z: sensitive n-bit S-box input ◮ a: loop index ◮ R1 · (

Z ⊕ R2): biased mask

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-44
SLIDE 44

8 +

DPA against the FT-Based S-box Masking

Targeted bit: a · Z ⊕ R1 · ( Z ⊕ R2)

◮ Z: sensitive n-bit S-box input ◮ a: loop index ◮ R1 · (

Z ⊕ R2): biased mask

Mask bias: ε =

1 2n+1

◮ Number of required measurements multiply by ( 1

2ε)2 = 22n

◮ If n = 4 then ( 1

2ε)2 = 256

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-45
SLIDE 45

8 +

DPA against the FT-Based S-box Masking

Practical Experiment

Masked AES implementation S-box implemented with the composite field method F is defined as : F(x) = x−1 if x ∈ GF(16)\{0} if x = 0

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-46
SLIDE 46

8 +

DPA against the FT-Based S-box Masking

Practical Experiment

Masked AES implementation S-box implemented with the composite field method F is defined as : F(x) = x−1 if x ∈ GF(16)\{0} if x = 0

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-47
SLIDE 47

8 +

Outline

1

Preliminaries

2

S-box Masking Based on the Fourier Transform

3

Differential Power Analysis vs. Biased Masking

4

DPA against the FT-Based S-box Masking

5

Improved FT-Based S-box Masking

6

Conclusion

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-48
SLIDE 48

8 +

Improved FT-Based S-box Masking

The exponent is masked with one random bit R2 (−1)R2F(Z) + R3 mod 2n =     1 2n  2nR3 + R4 +

  • a∈Fn

2

  • F(a)(−1)a·Z⊕R2 mod 22n

      ,

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-49
SLIDE 49

8 +

Improved FT-Based S-box Masking

The exponent is masked with one random bit R2 (−1)R2F(Z) + R3 mod 2n =     1 2n  2nR3 + R4 +

  • a∈Fn

2

  • F(a)(−1)a·Z⊕R2 mod 22n

      , For every a: Tmp ← a · Z [Tmp = a · Z]

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-50
SLIDE 50

8 +

Improved FT-Based S-box Masking

The exponent is masked with one random bit R2 (−1)R2F(Z) + R3 mod 2n =     1 2n  2nR3 + R4 +

  • a∈Fn

2

  • F(a)(−1)a·Z⊕R2 mod 22n

      , For every a: Tmp ← a · Z [Tmp = a · Z] Tmp ← Tmp ⊕ R2 [Tmp = a · Z ⊕ R2]

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-51
SLIDE 51

8 +

Improved FT-Based S-box Masking

The exponent is masked with one random bit R2 (−1)R2F(Z) + R3 mod 2n =     1 2n  2nR3 + R4 +

  • a∈Fn

2

  • F(a)(−1)a·Z⊕R2 mod 22n

      , For every a: Tmp ← a · Z [Tmp = a · Z] Tmp ← Tmp ⊕ R2 [Tmp = a · Z ⊕ R2] Tmp ← Tmp ⊕ a · R1 [Tmp = a · Z ⊕ R2]

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-52
SLIDE 52

8 +

Improved FT-Based S-box Masking

The exponent is masked with one random bit R2 (−1)R2F(Z) + R3 mod 2n =     1 2n  2nR3 + R4 +

  • a∈Fn

2

  • F(a)(−1)a·Z⊕R2 mod 22n

      , For every a: Tmp ← a · Z [Tmp = a · Z] Tmp ← Tmp ⊕ R2 [Tmp = a · Z ⊕ R2] Tmp ← Tmp ⊕ a · R1 [Tmp = a · Z ⊕ R2] DPA Security: exponent masked by R2, sum masked by (R3, R4)

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-53
SLIDE 53

8 +

Improved FT-Based S-box Masking

The exponent is masked with one random bit R2 (−1)R2F(Z) + R3 mod 2n =     1 2n  2nR3 + R4 +

  • a∈Fn

2

  • F(a)(−1)a·Z⊕R2 mod 22n

      , For every a: Tmp ← a · Z [Tmp = a · Z] Tmp ← Tmp ⊕ R2 [Tmp = a · Z ⊕ R2] Tmp ← Tmp ⊕ a · R1 [Tmp = a · Z ⊕ R2] DPA Security: exponent masked by R2, sum masked by (R3, R4) Efficiency: 2n+1 look-ups avoided

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-54
SLIDE 54

8 +

Outline

1

Preliminaries

2

S-box Masking Based on the Fourier Transform

3

Differential Power Analysis vs. Biased Masking

4

DPA against the FT-Based S-box Masking

5

Improved FT-Based S-box Masking

6

Conclusion

J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation

slide-55
SLIDE 55

8 +

Conclusion

The FT-based DPA countermeasure of CHES 2006 has a flaw The flaw makes an efficient DPA attack possible Our attack has been practically validated We propose an improved version of the countermeasure

◮ provably secure against DPA ◮ more efficient than the original countermeasure J.-S. Coron, C. Giraud, E. Prouff, and M. Rivain Attack and Improvement of the FT-Based S-box Calculation