Taylor Expansion of Maximum Likelihood Attacks Institut Nicolas - - PowerPoint PPT Presentation

taylor expansion of maximum likelihood attacks
SMART_READER_LITE
LIVE PREVIEW

Taylor Expansion of Maximum Likelihood Attacks Institut Nicolas - - PowerPoint PPT Presentation

Taylor Expansion of Maximum Likelihood Attacks Institut Nicolas Bruneau 1 , 2 , Sylvain Guilley 1 , 3 , Mines-Telecom Annelie Heuser 1 , Olivier Rioul 1 , cois-Xavier Standaert 4 , Yannick Teglia 5 Fran 1 T el ecom-ParisTech, Crypto


slide-1
SLIDE 1

Institut Mines-Telecom STMicroelectronics

Taylor Expansion of Maximum Likelihood Attacks

Nicolas Bruneau1,2, Sylvain Guilley1,3, Annelie Heuser1, Olivier Rioul1, Fran¸ cois-Xavier Standaert4, Yannick Teglia5

1 T´

el´ ecom-ParisTech, Crypto & ComNum Group, Paris, FRANCE

2 STMicroelectronics, AST division, Rousset, FRANCE 3 Secure-IC S.A.S., Rennes, FRANCE 4 Universit´

e Catholique de Louvain, Louvain-la-Neuve, BELGIQUE

5 Gemalto, La Ciotat, FRANCE

ASIACRYPT 2016 — Hanoi, Vietnam

slide-2
SLIDE 2

Introduction Rounded Optimal Attack Case Study

Nicolas Bruneau, Sylvain Guilley, Annelie Heuser, Olivier Rioul, Fran¸ cois-Xavier Standaert, Yannick Teglia

2/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-3
SLIDE 3

Introduction Rounded Optimal Attack Case Study

Outline

Introduction Side-Channel Analysis as a Threat Protection Methods Template Attacks Rounded Optimal Attack Truncated Taylor Expansion Complexity Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

3/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-4
SLIDE 4

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Outline

Introduction Side-Channel Analysis as a Threat Protection Methods Template Attacks Rounded Optimal Attack Case Study

4/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-5
SLIDE 5

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Side-Channel Analysis on Embedded Systems

moments: µ, σ, etc. distributions:

0xc7 0x00 0x01 0xff 0xc7

Distinguisher:

  • extract link w/ a model
  • for many possible keys

0xc7

side-channel probe noisy measurement

!!!

leakage ... ... Preprocessing:

  • filtering
  • denoising w/ wavelets
  • time/freq. analysis
  • dimensionality

reduction (PCA, LDA) ? ? ? ?

5/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-6
SLIDE 6

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

(Ω − 1)th-Order Masking: Principle

Aim

The sensitive variable Z is randomly split into Ω shares: ⇒ need random masks Mi , 0 < i < Ω Z Z ⊥ M1 ⊥ ... ⊥ MΩ−1 M1 . . . MΩ−1

6/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-7
SLIDE 7

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

(Ω − 1)th-Order Masking: Principle

Aim

The sensitive variable Z is randomly split into Ω shares: ⇒ need random masks Mi , 0 < i < Ω Z Z ⊥ M1 ⊥ ... ⊥ MΩ−1 M1 . . . MΩ−1

6/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-8
SLIDE 8

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

(Ω − 1)th-Order Masking: Principle

Aim

The sensitive variable Z is randomly split into Ω shares: ⇒ need random masks Mi , 0 < i < Ω Z Z ⊥ M1 ⊥ ... ⊥ MΩ−1 M1 . . . MΩ−1

Consequence

Increases the minimum key-dependent statistical moment.

6/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-9
SLIDE 9

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-10
SLIDE 10

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1 Z2

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-11
SLIDE 11

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1 Z2 Z3

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-12
SLIDE 12

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1 Z2 Z3 Z4

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-13
SLIDE 13

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z3

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-14
SLIDE 14

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1 Z3

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-15
SLIDE 15

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1 Z2 Z3

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-16
SLIDE 16

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1 Z2 Z3 Z4

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-17
SLIDE 17

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Shuffling: Principle

Aim

Randomize the order of execution ⇒ need a random permutation π Z1 Z2 Z3 Z4

Consequences

The attacks are applied on the sum of the variables ⇒ increases the algorithmic noise.

7/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-18
SLIDE 18

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Protection Parameters

The security level of the protections depends on these parameters:

Masking

◮ Ω: the number of shares (Ω − 1 masks); ◮ O: the order (i.e. the minimal key-dependent statistical

moment). Perfect masking scheme ⇔ O = Ω.

Shuffling

◮ Π the size of the permutation.

8/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-19
SLIDE 19

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Template Attacks

Template attacks are the most powerful in a information-theoretic sense [Chari et al., 2002].

Offline Profiling

The leakage model is learned:

◮ non-parametric methods (e.g. histogram, kernel methods...); ◮ parametric methods (e.g. mixture models).

Online Attack

Recover the key using the models by applying a maximum likelihood (ML) attack.

9/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-20
SLIDE 20

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Parametric or Non-Parametric ?

Parametric

The only random part is the noise with known distribution.

◮ easy to estimate; ◮ shuffle and mask are known; ◮ many templates are learned.

Non-Parametric

Shuffle and masks are part of the noise.

◮ can be hard to estimate ⇒ curse of dimensionality; ◮ shuffle and mask are unknown.

10/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-21
SLIDE 21

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Parametric or Non-Parametric ?

Parametric

The only random part is the noise with known distribution.

◮ easy to estimate; ◮ shuffle and mask are known; ◮ many templates are learned.

Non-Parametric

Shuffle and masks are part of the noise.

◮ can be hard to estimate ⇒ curse of dimensionality; ◮ shuffle and mask are unknown.

10/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-22
SLIDE 22

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Notations for the Online attack

The attacks are applied on:

◮ Q queries (i.e. the traces). ◮ D dimension (i.e. the number of leakage samples);

A leakage measurement is X = y(t, k∗, R) + N where:

◮ y(t, k∗, R) is the deterministic part of the model; ◮ the secret key k∗ and the plaintext t are n-bit words; ◮ R is the random countermeasure; ◮ N is a random Gaussian noise of variance σ2.

11/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-23
SLIDE 23

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Maximum Likelihood Attacks

Theorem (Maximum Likelihood [Bruneau et al., 2014])

When the model is known the optimal distinguisher (OPT) consists in maximizing the sum over all traces q = 1, . . . , Q of the log-likelihood: LL =

Q

  • q=1

log E exp −x(q) − y(t(q), k, R)2 2σ2 , where expectation E is applied to the random variable R ∈ R and · is the Euclidean norm on RD. For convenience we let γ =

1 2σ2 be the SNR parameter.

12/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-24
SLIDE 24

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Complexity in presence of Masking and Shuffling

O

  • Q · D · (2n)Ω−1 · Π!
  • ◮ number of traces

◮ dimension of the attack ◮ number of possible share values ◮ number of possible permutations

13/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-25
SLIDE 25

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Complexity in presence of Masking and Shuffling

O

  • Q · D · (2n)Ω−1 · Π!
  • ◮ number of traces

◮ dimension of the attack ◮ number of possible share values ◮ number of possible permutations

13/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-26
SLIDE 26

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Complexity in presence of Masking and Shuffling

O

  • Q · D · (2n)Ω−1 · Π!
  • ◮ number of traces

◮ dimension of the attack ◮ number of possible share values ◮ number of possible permutations

13/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-27
SLIDE 27

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Complexity in presence of Masking and Shuffling

O

  • Q · D · (2n)Ω−1 · Π!
  • ◮ number of traces

◮ dimension of the attack ◮ number of possible share values ◮ number of possible permutations

13/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-28
SLIDE 28

Introduction Rounded Optimal Attack Case Study Side-Channel Analysis as a Threat Protection Methods Template Attacks

Complexity in presence of Masking and Shuffling

O

  • Q · D · (2n)Ω−1 · Π!
  • ◮ number of traces

◮ dimension of the attack ◮ number of possible share values ◮ number of possible permutations

Not computable for large Π !

13/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-29
SLIDE 29

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Outline

Introduction Rounded Optimal Attack Truncated Taylor Expansion Complexity Case Study

14/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-30
SLIDE 30

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Taylor Expansion of Optimal Attacks in Gaussian Noise

The optimal attack consists in maximizing the sum over all traces q = 1, . . . , Q of the log-likelihood: LL =

Q

  • q=1

log E exp −x(q) − y(t(q), k, R)2 2σ2 . It can be rewritten using the cumulant generating function: LL =

Q

  • q=1

+∞

  • ℓ=1

κ(q)

ℓ! (−γ)ℓ , where κ(q)

is the ℓth-order cumulant of x(q) − y(t(q), k, R)2.

15/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-31
SLIDE 31

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

High order Cumulants

The ℓth-order cumulant of x − y(t, k, R)2 is given by: κℓ = µℓ −

ℓ−1

  • ℓ′=1

ℓ − 1 ℓ′ − 1

  • κℓ′µℓ−ℓ′

(ℓ ≥ 1), where µℓ is the corresponding moment: µℓ = ER

  • x − y(t, k, R)2ℓ

.

16/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-32
SLIDE 32

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Rounded Optimal Attack

Rounded Optimal Attack (ROPTL)

The rounded optimal Lth-degree attack consists in maximizing the sum over all traces of the Lth-order Taylor expansion LLL in the SNR of the log-likelihood : LLL =

Q

  • q=1

L

  • ℓ=1

(−1)ℓκ(q)

γℓ ℓ! , and we have LL = LLL + o(γL) .

17/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-33
SLIDE 33

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity Gain

◮ number of possible share values ◮ number of traces

O

  • Q · L ·

D+L−1

L

  • · 2(Ω−1)n ·
  • Π

min(⌈ Π

2 ⌉,L)

◮ Factorial terms

◮ dimension of the attack ◮ degree of the Taylor Expansion ◮ size of the permutation 18/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-34
SLIDE 34

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity Gain

◮ number of possible share values ◮ number of traces

O

  • Q · L ·

D+L−1

L

  • · 2(Ω−1)n ·
  • Π

min(⌈ Π

2 ⌉,L)

◮ Factorial terms

◮ dimension of the attack ◮ degree of the Taylor Expansion ◮ size of the permutation 18/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-35
SLIDE 35

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity Gain

◮ number of possible share values ◮ number of traces

O

  • Q · L ·

D+L−1

L

  • · 2(Ω−1)n ·
  • Π

min(⌈ Π

2 ⌉,L)

◮ Factorial terms

◮ dimension of the attack ◮ degree of the Taylor Expansion ◮ size of the permutation 18/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-36
SLIDE 36

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity Gain

◮ number of possible share values ◮ number of traces

O

  • Q · L ·

D+L−1

L

  • · 2(Ω−1)n ·
  • Π

min(⌈ Π

2 ⌉,L)

◮ Factorial terms

◮ dimension of the attack ◮ degree of the Taylor Expansion ◮ size of the permutation 18/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-37
SLIDE 37

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity Gain

◮ number of possible share values ◮ number of traces

O

  • Q · L ·

D+L−1

L

  • · 2(Ω−1)n ·
  • Π

min(⌈ Π

2 ⌉,L)

◮ Factorial terms

◮ dimension of the attack ◮ degree of the Taylor Expansion ◮ size of the permutation 18/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-38
SLIDE 38

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity Gain

◮ number of possible share values ◮ number of traces

O

  • Q · L ·

D+L−1

L

  • · 2(Ω−1)n ·
  • Π

min(⌈ Π

2 ⌉,L)

◮ Factorial terms

◮ dimension of the attack ◮ degree of the Taylor Expansion ◮ size of the permutation 18/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-39
SLIDE 39

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity Gain

◮ number of possible share values ◮ number of traces

O

  • Q · L ·

D+L−1

L

  • · 2(Ω−1)n ·
  • Π

min(⌈ Π

2 ⌉,L)

◮ Factorial terms

◮ dimension of the attack ◮ degree of the Taylor Expansion ◮ size of the permutation

Reduces to small constants when L ≪ D

18/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-40
SLIDE 40

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Outline

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

19/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-41
SLIDE 41

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Implementation of Masking Schemes

In masking schemes, while the implementation of the linear parts is

  • bvious, that of the non linear parts is more difficult.

◮ algebraic methods [Bl¨

  • mer et al., 2004];

◮ global look-up table method [Prouff and Rivain, 2007]; ◮ table recomputation methods which precompute a masked

S-box stored in a table [Chari et al., 1999]. In [Coron, 2014] a table recomputation scheme secure at order Ω − 1 was presented.

20/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-42
SLIDE 42

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Table Recomputation Algorithm

input : t, one byte of plaintext, and k, one byte of key

  • utput: The application of AddRoundKey and SubBytes on t, i.e., S(t ⊕ k)

1 m ←R Fn 2, m′ ←R Fn 2 // Draw of random input and output masks 2 for ω ∈ {0, 1, . . . , 2n − 1}

do // Sbox masking

3

z ← ω ⊕ m // Masked input

4

z′ ← S[ω] ⊕ m′ // Masked output

5

S′[z] ← z′ // Creating the masked Sbox entry

6 end 7 t ← t ⊕ m // Plaintext masking 8 t ← t ⊕ k // Masked AddRoundKey 9 t ← S′[t] // Masked SubBytes 10 t ← t ⊕ m′ // Demasking 11 return t

◮ usual 2-variate 2nd-order attack; ◮ 2-stage CPA attack [Pan et al., 2009]; ◮ improved (2n + 1)-variate 2nd-order attack on the

input [Bruneau et al., 2014].

21/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-43
SLIDE 43

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Protected Table Recomputation Algorithm

input : t, one byte of plaintext, and k, one byte of key

  • utput: The application of AddRoundKey and SubBytes on t

1 m ←R Fn 2, m′ ←R Fn 2 // Draw of random input and output masks 2 ϕ ←R Fn 2 → Fn 2 // Draw of random permutation of Fn 2 3 for ϕ(ω) ∈ {ϕ(0), ϕ(1), . . . , ϕ(2n − 1)}

do // S-box masking

4

z ← ϕ(ω) ⊕ m // Masked input

5

z′ ← S[ϕ(ω)] ⊕ m′ // Masked output

6

S′[z] = z′ // Creating the masked S-box entry

7 end 8 t ← t ⊕ m // Plaintext masking 9 t ← t ⊕ k // Masked AddRoundKey 10 t ← S′[t] // Masked SubBytes 11 t ← t ⊕ m′ // Demasking 12 return t

Make the index of the loop unknown, use some random permutation ϕ.

22/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-44
SLIDE 44

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Leakages

input : t, one byte of plaintext, and k, one byte of key

  • utput: The application of AddRoundKey and SubBytes on t

1 m ←R Fn 2, m′ ←R Fn 2 // Draw of random input and output masks 2 ϕ ←R Fn 2 → Fn 2 // Draw of random permutation of Fn 2 3 for ϕ(ω) ∈ {ϕ(0), ϕ(1), . . . , ϕ(2n − 1)}

do // S-box masking

4

z ← ϕ(ω) ⊕ m // Masked input

5

z′ ← S[ϕ(ω)] ⊕ m′ // Masked output

6

S′[z] = z′ // Creating the masked S-box entry

7 end 8 t ← t ⊕ m // Plaintext masking 9 t ← t ⊕ k // Masked AddRoundKey 10 t ← S′[t] // Masked SubBytes 11 t ← t ⊕ m′ // Demasking 12 return t 23/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-45
SLIDE 45

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Leakages

input : t, one byte of plaintext, and k, one byte of key

  • utput: The application of AddRoundKey and SubBytes on t

1 m ←R Fn 2, m′ ←R Fn 2 // Draw of random input and output masks 2 ϕ ←R Fn 2 → Fn 2 // Draw of random permutation of Fn 2 3 for ϕ(ω) ∈ {ϕ(0), ϕ(1), . . . , ϕ(2n − 1)}

do // S-box masking

4

z ← ϕ(ω) ⊕ m // Masked input

5

z′ ← S[ϕ(ω)] ⊕ m′ // Masked output

6

S′[z] = z′ // Creating the masked S-box entry

7 end 8 t ← t ⊕ m // Plaintext masking 9 t ← t ⊕ k // Masked AddRoundKey 10 t ← S′[t] // Masked SubBytes 11 t ← t ⊕ m′ // Demasking 12 return t

◮ second-order Correlation Power Analysis 2O-CPA; ◮ OPTimal distinguisher OPT;

◮ Rounded OPTimal Distinguisher ROPT2, ROPT4 23/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-46
SLIDE 46

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Bi-Variate Attacks

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 500 1000 1500 2000 Success rate Number of traces ROPT2 ROPT4 OPT 2O-CPA

Figure: σ = 1

24/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-47
SLIDE 47

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Bi-Variate Attacks

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1000 2000 3000 Success rate Number of traces ROPT2 ROPT4 OPT 2O-CPA

Figure: σ = 2

24/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-48
SLIDE 48

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Leakages, with Table Recomputation

input : t, one byte of plaintext, and k, one byte of key

  • utput: The application of AddRoundKey and SubBytes on t

1 m ←R Fn 2, m′ ←R Fn 2 // Draw of random input and output masks 2 ϕ ←R Fn 2 → Fn 2 // Draw of random permutation of Fn 2 3 for ϕ(ω) ∈ {ϕ(0), ϕ(1), . . . , ϕ(2n − 1)} do // S-box masking 4

z ← ϕ(ω) ⊕ m // Masked input

5

z′ ← S[ ϕ(ω) ] ⊕ m′ // Masked output

6

S′[z] = z′ // Creating the masked S-box entry

7 end 8 t ← t ⊕ m // Plaintext masking 9 t ← t ⊕ k // Masked AddRoundKey 10 t ← S′[t] // Masked SubBytes 11 t ← t ⊕ m′ // Demasking 12 return t 25/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-49
SLIDE 49

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Leakages, with Table Recomputation

input : t, one byte of plaintext, and k, one byte of key

  • utput: The application of AddRoundKey and SubBytes on t

1 m ←R Fn 2, m′ ←R Fn 2 // Draw of random input and output masks 2 ϕ ←R Fn 2 → Fn 2 // Draw of random permutation of Fn 2 3 for ϕ(ω) ∈ {ϕ(0), ϕ(1), . . . , ϕ(2n − 1)} do // S-box masking 4

z ← ϕ(ω) ⊕ m // Masked input

5

z′ ← S[ ϕ(ω) ] ⊕ m′ // Masked output

6

S′[z] = z′ // Creating the masked S-box entry

7 end 8 t ← t ⊕ m // Plaintext masking 9 t ← t ⊕ k // Masked AddRoundKey 10 t ← S′[t] // Masked SubBytes 11 t ← t ⊕ m′ // Demasking 12 return t

◮ optimal distinguisher NOT computable due to the term 2n!

25/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-50
SLIDE 50

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Leakages, with Table Recomputation

input : t, one byte of plaintext, and k, one byte of key

  • utput: The application of AddRoundKey and SubBytes on t

1 m ←R Fn 2, m′ ←R Fn 2 // Draw of random input and output masks 2 ϕ ←R Fn 2 → Fn 2 // Draw of random permutation of Fn 2 3 for ϕ(ω) ∈ {ϕ(0), ϕ(1), . . . , ϕ(2n − 1)} do // S-box masking 4

z ← ϕ(ω) ⊕ m // Masked input

5

z′ ← S[ ϕ(ω) ] ⊕ m′ // Masked output

6

S′[z] = z′ // Creating the masked S-box entry

7 end 8 t ← t ⊕ m // Plaintext masking 9 t ← t ⊕ k // Masked AddRoundKey 10 t ← S′[t] // Masked SubBytes 11 t ← t ⊕ m′ // Demasking 12 return t

◮ third order attack MVATR [Bruneau et al., 2015]; ◮ Rounded Optimal Distinguisher ROPT3.

25/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-51
SLIDE 51

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Complexity of the Case Study

Attack Time (seconds) Computational Complexity 2O-CPA 39 O (Q) MVATR 130 O (Q · 2n) ROPT3 2495 O

  • Q · 22n

OPT2O 9473 O (Q · 2n) OPT Not computable O

  • Q · 2n · 2n! ·
  • 2n+1 + 2
  • The time of execution have been computed on a Intel Xeon X5660.

26/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-52
SLIDE 52

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

  • 2n+1 + 2
  • Variate Attacks on Shuffled Table

Recomputation

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2000 4000 6000 8000 10000 Success rate Number of traces 2O-CPA MVATR ROPT3

Figure: σ = 3

27/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-53
SLIDE 53

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

  • 2n+1 + 2
  • Variate Attacks on Shuffled Table

Recomputation

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1e+06 2e+06 Success rate Number of traces 2O-CPA MVATR ROPT3

Figure: σ = 12

27/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-54
SLIDE 54

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

  • 2n+1 + 2
  • Variate Attacks on Shuffled Table

Recomputation

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 50000 100000 150000 200000 Success rate Number of traces 2O-CPA MVATR ROPT3

Figure: σ = 8

28/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-55
SLIDE 55

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

  • 2n+1 + 2
  • Variate Attacks on Shuffled Table

Recomputation

0.2 0.4 0.6 0.8 1 150000 300000 450000 Success rate Number of traces 2O-CPA MVATR ROPT3

Figure: σ = 9

28/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-56
SLIDE 56

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

  • 2n+1 + 2
  • Variate Attacks on Shuffled Table

Recomputation

0.5 1 1.5 2 2.5 2 4 6 8 10 12 Number of traces (×106) Noise standard deviation 2O-CPA MVATR ROPT3

Figure: Number of traces to reach 80% of success

29/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-57
SLIDE 57

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Conclusion

Results

We have presented a practical, truncated version of the theoretical,

  • ptimal distinguisher:

◮ becomes efficient; ◮ remains effective.

Perspective

How to quantify the accuracy of the approximation?

30/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-58
SLIDE 58

Introduction Rounded Optimal Attack Case Study Protected Table Recomputation Implementation Bi-Variate Attacks Multi-Variate Attacks

Conclusion

Results

We have presented a practical, truncated version of the theoretical,

  • ptimal distinguisher:

◮ becomes efficient; ◮ remains effective.

Perspective

How to choose the degree of the Taylor Expansion?

30/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-59
SLIDE 59

Thank you for your attention.

30/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-60
SLIDE 60

[Bl¨

  • mer et al., 2004] Bl¨
  • mer, J., Guajardo, J., and Krummel, V. (2004).

Provably Secure Masking of AES. In Handschuh, H. and Hasan, M. A., editors, Selected Areas in Cryptography, volume 3357 of Lecture Notes in Computer Science, pages 69–83. Springer. [Bruneau et al., 2014] Bruneau, N., Guilley, S., Heuser, A., and Rioul, O. (2014). Masks Will Fall Off: Higher-Order Optimal Distinguishers. In ASIACRYPT, volume 8874 of LNCS, pages 344–365. Springer.

  • P. Sarkar and T. Iwata (Eds.): ASIACRYPT 2014, PART II.

[Bruneau et al., 2015] Bruneau, N., Guilley, S., Najm, Z., and Teglia, Y. (2015). Multi-variate high-order attacks of shuffled tables recomputation. In G¨ uneysu, T. and Handschuh, H., editors, Cryptographic Hardware and Embedded Systems - CHES 2015 - 17th International Workshop, Saint-Malo, France, September 13-16, 2015, Proceedings, volume 9293 of Lecture Notes in Computer Science, pages 475–494. Springer.

30/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-61
SLIDE 61

[Chari et al., 1999] Chari, S., Jutla, C. S., Rao, J. R., and Rohatgi, P. (1999). Towards Sound Approaches to Counteract Power-Analysis Attacks. In CRYPTO, volume 1666 of LNCS. Springer. Santa Barbara, CA, USA. ISBN: 3-540-66347-9. [Chari et al., 2002] Chari, S., Rao, J. R., and Rohatgi, P. (2002). Template Attacks. In CHES, volume 2523 of LNCS, pages 13–28. Springer. San Francisco Bay (Redwood City), USA. [Coron, 2014] Coron, J.-S. (2014). Higher Order Masking of Look-Up Tables. In Nguyen, P. Q. and Oswald, E., editors, EUROCRYPT, volume 8441 of Lecture Notes in Computer Science, pages 441–458. Springer.

31/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-62
SLIDE 62

[Pan et al., 2009] Pan, J., den Hartog, J. I., and Lu, J. (2009). You cannot hide behind the mask: Power analysis on a provably secure S-box implementation. In Youm, H. Y. and Yung, M., editors, Information Security Applications, 10th International Workshop, WISA 2009, Busan, Korea, August 25-27, 2009, Revised Selected Papers, volume 5932 of Lecture Notes in Computer Science, pages 178–192. Springer. [Prouff and Rivain, 2007] Prouff, E. and Rivain, M. (2007). A Generic Method for Secure SBox Implementation. In Kim, S., Yung, M., and Lee, H.-W., editors, WISA, volume 4867 of Lecture Notes in Computer Science, pages 227–244. Springer.

32/30 December 2016 Taylor Expansion of Maximum Likelihood Attacks