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 2 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 Teglia2

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

Cryptarchi 2016 — La Grande Motte, France

slide-2
SLIDE 2

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

2/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-3
SLIDE 3

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

3/29 Juin 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

Side-Channel Analysis on Embedded Systems [GMN+11]

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) ? ? ? ?

4/29 Juin 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

(d − 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

5/29 Juin 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

(d − 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

5/29 Juin 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

(d − 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

5/29 Juin 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

Shuffling: Principle

Aim

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

6/29 Juin 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 Z2 Z3 Z4

6/29 Juin 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 Z3 Z4

6/29 Juin 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 Z4

6/29 Juin 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

6/29 Juin 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 π Z1 Z2 Z3 Z4

6/29 Juin 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 Z2 Z3 Z4

6/29 Juin 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 Z4

6/29 Juin 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

Consequences

Increase the noise in the attacks.

6/29 Juin 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

Summary of the Protection Parameters

The security level of the protections depends on these parameters:

Masking

◮ Ω: the number of shares (link to the numbers of masks) ◮ O: the order (i.e. the minimal key dependent statistical

moment)

Shuffling

◮ Π the size of the permutation

7/29 Juin 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

Template Attacks

Template attacks are the most powerful in a information-theoretic sense [CRR02].

Off-line 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

8/29 Juin 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 [CRR02].

Off-line 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

8/29 Juin 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.

9/29 Juin 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

Notations for the Online attack

The attack are applied on:

◮ D leakage points; ◮ Q traces.

For each trace the leakage model is X = y(t, k∗, R) + N where:

◮ X is the leakage measurement; ◮ y = y(t, k∗, R) is the deterministic part of the model that

depends on the correct key k∗, some known text t, and the unknown random values (masks and permutations) R;

◮ N is a random noise, which follows a Gaussian distribution

pN(z) =

1 √ 2πσ2 exp

  • − z2

2σ2

  • .

We let γ =

1 2σ2 be the SNR parameter.

10/29 Juin 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

Maximum Likelihood Attacks

Theorem (Maximum Likelihood [?])

When the y (t, k, R) are known then the optimal distinguisher (OPT) is given by RDQ × RDQ → Fn

2

(x, y (t, k, R)) → argmax

k∈Fn

2

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:

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

=

D

  • d=1
  • x(q)

d

− yd(t(q), k, R) 2 .

11/29 Juin 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

Complexity

O

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

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

12/29 Juin 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

O

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

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

12/29 Juin 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

O

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

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

12/29 Juin 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

O

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

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

12/29 Juin 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

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 Π !

12/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-28
SLIDE 28

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Outline

Introduction Rounded Optimal Attack Truncated Taylor Expansion Complexity Case Study

13/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-29
SLIDE 29

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 =

+∞

  • ℓ=1

κℓ ℓ! (−γ)ℓ where

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

κℓ = µℓ −

ℓ−1

  • ℓ′=1

ℓ − 1 ℓ′ − 1

  • κℓ′µℓ−ℓ′

(ℓ ≥ 1).

◮ µℓ = ER

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

14/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-30
SLIDE 30

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

  • ver the key hypothesis the sum over all traces of the Lth-order

Taylor expansion LLL in the SNR of the log-likelihood : ROPTL : RDQ × RDQ − → Fn

2

(x, y (t, k, R)) − → argmax

k∈Fn

2

LLL. where LLL =

L

  • ℓ=1

(−1)ℓκℓ

γℓ ℓ! .

And we have LL = LLL + o(γL)

15/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-31
SLIDE 31

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity

◮ 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 16/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-32
SLIDE 32

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity

◮ 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 16/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-33
SLIDE 33

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity

◮ 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 16/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-34
SLIDE 34

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity

◮ 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 16/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-35
SLIDE 35

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity

◮ 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 16/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-36
SLIDE 36

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity

◮ 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 16/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-37
SLIDE 37

Introduction Rounded Optimal Attack Case Study Truncated Taylor Expansion Complexity

Complexity

◮ 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

16/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-38
SLIDE 38

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

17/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-39
SLIDE 39

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 [BGK04, RP10]; ◮ global look-up table method [PR07, SVCO+10]; ◮ table recomputation methods which precompute a masked

S-box stored in a table [CJRR99, Mes00, AG01]. Recently, Coron presented at EUROCRYPT 2014 [Cor14] a table recomputation scheme secure against dth-order attacks.

18/29 Juin 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

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 [PdHL09, ?]; ◮ improved (2n + 1)-variate 2nd-order attack on the

input [BGHR14].

19/29 Juin 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

Classical Countermeasure

Make the index of the loop unknown compute the loop in a random order. Use some random permutation ϕ:

◮ random start index; ◮ LFSR; ◮ etc.

20/29 Juin 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

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 21/29 Juin 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

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 22/29 Juin 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

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

◮ Rounded OPTimal Distinguisher ROPT2, ROPT3 22/29 Juin 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

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

(a) σ = 1

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

(b) σ = 2

23/29 Juin 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

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 24/29 Juin 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

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!

24/29 Juin 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

◮ third order attack MVATR [BGNT15] ◮ Rounded Optimal Distinguisher ROPT3

24/29 Juin 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

  • 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 800010000 Success rate Number of traces 2O-CPA MVATR ROPT3

(a) σ = 3

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

(b) σ = 12

25/29 Juin 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

  • 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 100000 200000 Success rate Number of traces 2O-CPA MVATR ROPT3

(a) σ = 8

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

(b) σ = 9

26/29 Juin 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

  • 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

(a) Number of traces to reach 80%

  • f success

1 2 3 4 5 2 4 6 8 10 12 Normalized Distance Noise standard deviation 2O-CPA MVATR

(b) Distance with ROPT3 at 80%

  • f success

27/29 Juin 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

Complexity of the Case Study

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

  • Q · 22n

OPT Not computable O

  • Q · 2n · 2n! ·
  • 2n+1 + 2
  • 28/29

Juin 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

Conclusion

Results

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

  • ptimal distinguisher:

◮ becomes effective; ◮ remains efficient.

Perspective

How to quantify the accuracy of the approximation?

29/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-54
SLIDE 54

Thank you for your attention.

29/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-55
SLIDE 55

[AG01] Mehdi-Laurent Akkar and Christophe Giraud. An Implementation of DES and AES Secure against Some Attacks. In LNCS, editor, Proceedings of CHES’01, volume 2162 of LNCS, pages 309–318. Springer, May 2001. Paris, France. [BGHR14] Nicolas Bruneau, Sylvain Guilley, Annelie Heuser, and Olivier Rioul. Masks Will Fall Off: Higher-Order Optimal Distinguishers. In ASIACRYPT, volume 8874 of LNCS, pages 344–365. Springer, December 2014.

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

[BGK04] Johannes Bl¨

  • mer, Jorge Guajardo, and Volker Krummel.

Provably Secure Masking of AES. In Helena Handschuh and M. Anwar Hasan, editors, Selected Areas in Cryptography, volume 3357 of Lecture Notes in Computer Science, pages 69–83. Springer, 2004.

29/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-56
SLIDE 56

[BGNT15] Nicolas Bruneau, Sylvain Guilley, Zakaria Najm, and Yannick Teglia. Multi-variate high-order attacks of shuffled tables recomputation. In Tim G¨ uneysu and Helena Handschuh, 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, 2015. [CJRR99] Suresh Chari, Charanjit S. Jutla, Josyula R. Rao, and Pankaj Rohatgi. Towards Sound Approaches to Counteract Power-Analysis Attacks. In CRYPTO, volume 1666 of LNCS. Springer, August 15-19 1999. Santa Barbara, CA, USA. ISBN: 3-540-66347-9.

30/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-57
SLIDE 57

[Cor14] Jean-S´ ebastien Coron. Higher Order Masking of Look-Up Tables. In Phong Q. Nguyen and Elisabeth Oswald, editors, EUROCRYPT, volume 8441 of Lecture Notes in Computer Science, pages 441–458. Springer, 2014. [CRR02] Suresh Chari, Josyula R. Rao, and Pankaj Rohatgi. Template Attacks. In CHES, volume 2523 of LNCS, pages 13–28. Springer, August 2002. San Francisco Bay (Redwood City), USA.

31/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-58
SLIDE 58

[GMN+11] Sylvain Guilley, Olivier Meynard, Maxime Nassar, Guillaume Duc, Philippe Hoogvorst, Houssem Maghrebi, Aziz Elaabid, Shivam Bhasin, Youssef Souissi, Nicolas Debande, Laurent Sauvage, and Jean-Luc Danger. Vade Mecum on Side-Channels Attacks and Countermeasures for the Designer and the Evaluator. In DTIS (Design & Technologies of Integrated Systems), IEEE. IEEE, March 6-8 2011. Athens, Greece. DOI: 10.1109/DTIS.2011.5941419 ; Online version: http://hal.archives-ouvertes.fr/hal-00579020/en/. [Mes00] Thomas S. Messerges. Securing the AES Finalists Against Power Analysis Attacks. In Fast Software Encryption’00, pages 150–164. Springer-Verlag, April 2000. New York.

32/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-59
SLIDE 59

[PdHL09] Jing Pan, Jerry I. den Hartog, and Jiqiang Lu. You cannot hide behind the mask: Power analysis on a provably secure S-box implementation. In Heung Youl Youm and Moti Yung, editors, Information Security Applications, 10th International Workshop, WISA 2009, Busan, Korea, August 25-27, 2009, Revised Selected Papers, volume 5932

  • f Lecture Notes in Computer Science, pages 178–192. Springer,

2009. [PR07] Emmanuel Prouff and Matthieu Rivain. A Generic Method for Secure SBox Implementation. In Sehun Kim, Moti Yung, and Hyung-Woo Lee, editors, WISA, volume 4867 of Lecture Notes in Computer Science, pages 227–244. Springer, 2007. [RP10] Matthieu Rivain and Emmanuel Prouff. Provably Secure Higher-Order Masking of AES. In Stefan Mangard and Fran¸ cois-Xavier Standaert, editors, CHES, volume 6225 of LNCS, pages 413–427. Springer, 2010.

33/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks

slide-60
SLIDE 60

[SVCO+10] Fran¸ cois-Xavier Standaert, Nicolas Veyrat-Charvillon, Elisabeth Oswald, Benedikt Gierlichs, Marcel Medwed, Markus Kasper, and Stefan Mangard. The World is Not Enough: Another Look on Second-Order DPA. In ASIACRYPT, volume 6477 of LNCS, pages 112–129. Springer, December 5-9 2010. Singapore. http://www.dice.ucl.ac.be/~fstandae/PUBLIS/88.pdf. [TWO13] Michael Tunstall, Carolyn Whitnall, and Elisabeth Oswald. Masking Tables - An Underestimated Security Risk. IACR Cryptology ePrint Archive, 2013:735, 2013.

34/29 Juin 2016 Taylor Expansion of Maximum Likelihood Attacks