Convolutional Neural Networks with Data Augmentation against - - PowerPoint PPT Presentation

convolutional neural networks with data augmentation
SMART_READER_LITE
LIVE PREVIEW

Convolutional Neural Networks with Data Augmentation against - - PowerPoint PPT Presentation

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures Eleonora Cagli 1 , 3 ecile Dumas 1 C Emmanuel Prouff 2 , 3 1


slide-1
SLIDE 1

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Eleonora Cagli1,3 C´ ecile Dumas1 Emmanuel Prouff2,3

  • 1Univ. Grenoble Alpes, F-38000, Grenoble, France

CEA, LETI, MINATEC Campus, F-38054 Grenoble, France

{eleonora.cagli,cecile.dumas}@cea.fr 2Safran Identity and Security, France emmanuel.prouff@safrangroup.com 3Sorbonne Universit´

es, UPMC Univ. Paris 06, CNRS, INRIA, Laboratoire d’Informatique de Paris 6 (LIP6), ´ Equipe PolSys, 4 place Jussieu, 75252 Paris Cedex 05, France

26/09/2017, CHES 2017, Taipei, Taiwan

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 1/26

slide-2
SLIDE 2

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

About the authors

Who we are

Conceives a component Evaluates Security Claims Delivers a Security Certification Commercialises the certified product Developer ITSEF ANSSI Developer

French Certification Scheme 26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 2/26

slide-3
SLIDE 3

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

About the authors

Who we are

Conceives a component Evaluates Security Claims Delivers a Security Certification Commercialises the certified product Developer ITSEF ANSSI Developer Cécile

French Certification Scheme 26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 2/26

slide-4
SLIDE 4

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

About the authors

Who we are

Conceives a component Evaluates Security Claims Delivers a Security Certification Commercialises the certified product Developer ITSEF ANSSI Developer Cécile Eleonora

French Certification Scheme 26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 2/26

slide-5
SLIDE 5

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

About the authors

Who we are

Conceives a component Evaluates Security Claims Delivers a Security Certification Commercialises the certified product Developer ITSEF ANSSI Developer Cécile Eleonora

French Certification Scheme

Emmanuel

(in the past) 26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 2/26

slide-6
SLIDE 6

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

About the authors

Who we are

Conceives a component Evaluates Security Claims Delivers a Security Certification Commercialises the certified product Developer ITSEF ANSSI Developer Cécile Eleonora

French Certification Scheme

Emmanuel

(today) 26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 2/26

slide-7
SLIDE 7

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

About the authors

Who we are

Conceives a component Evaluates Security Claims Delivers a Security Certification Commercialises the certified product Developer ITSEF ANSSI Developer Cécile Eleonora

French Certification Scheme

Emmanuel

(today)

An evaluation point of view

◮ profiling attacks (worst-case security) ◮ practical aspects are concerned

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 2/26

slide-8
SLIDE 8

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Contents

  • 1. Context and Motivation
  • 2. A machine learning approach to classification

2.1 Introduction 2.2 Convolutional Neural Networks

  • 3. Data Augmentation
  • 4. Experimental Results
  • 5. Conclusions

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 3/26

slide-9
SLIDE 9

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 4/26

slide-10
SLIDE 10

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 4/26

slide-11
SLIDE 11

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Profiling phase (using profiling traces under known Z) ◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

Log-likelihood score for each key hypothesis k dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 4/26

slide-12
SLIDE 12

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Profiling phase (using profiling traces under known Z)

◮ estimate Pr[X|Z = z] for each value of z

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

Log-likelihood score for each key hypothesis k dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 4/26

slide-13
SLIDE 13

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Profiling phase (using profiling traces under known Z)

◮ estimate Pr[X|Z = z] for each value of z

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 4/26

slide-14
SLIDE 14

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Profiling phase (using profiling traces under known Z)

◮ mandatory dimensionality reduction ◮ estimate Pr[X|Z = z] for each value of z

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 4/26

slide-15
SLIDE 15

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Profiling phase (using profiling traces under known Z)

◮ manage de-synchronization problem ◮ mandatory dimensionality reduction ◮ estimate Pr[X|Z = z] for each value of z

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 4/26

slide-16
SLIDE 16

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Misalignment

Misaligning Countermeasures

◮ Random Delays, Clock Jittering, ... ◮ In theory: insufficient to provide security, since information still leak

(somewhere)

◮ In practice: one of the main issues for evaluators

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 5/26

slide-17
SLIDE 17

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Misalignment

Misaligning Countermeasures

◮ Random Delays, Clock Jittering, ... ◮ In theory: insufficient to provide security, since information still leak

(somewhere)

◮ In practice: one of the main issues for evaluators

Realignment

Mandatory realignment preprocessing

◮ not a wide literature ◮ in practice: evaluation labs home-made realignment techniques

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 5/26

slide-18
SLIDE 18

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-19
SLIDE 19

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-20
SLIDE 20

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-21
SLIDE 21

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-22
SLIDE 22

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-23
SLIDE 23

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-24
SLIDE 24

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-25
SLIDE 25

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-26
SLIDE 26

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Risks of realignment

An example

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 6/26

slide-27
SLIDE 27

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Motivating Conclusions

An evaluator can spend time to adjust realignment...

◮ try realignments based over other kind of patterns ◮ modify parameters...

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 7/26

slide-28
SLIDE 28

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Motivating Conclusions

An evaluator can spend time to adjust realignment...

◮ try realignments based over other kind of patterns ◮ modify parameters...

...but

◮ no prior knowledge about informative patterns ◮ no way to evaluate realignment without launching the afterwards attack

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 7/26

slide-29
SLIDE 29

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Motivating Conclusions

An evaluator can spend time to adjust realignment...

◮ try realignments based over other kind of patterns ◮ modify parameters...

...but

◮ no prior knowledge about informative patterns ◮ no way to evaluate realignment without launching the afterwards attack

Now:

◮ preprocessing to prepare data ◮ characterization to extract

information Our paper perspective:

◮ preprocessing to prepare data ◮ direct information extraction

No preprocessing ⇒ No risks of information loss

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 7/26

slide-30
SLIDE 30

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Motivating Conclusions

An evaluator can spend time to adjust realignment...

◮ try realignments based over other kind of patterns ◮ modify parameters...

...but

◮ no prior knowledge about informative patterns ◮ no way to evaluate realignment without launching the afterwards attack

Now:

◮ preprocessing to prepare data ◮ characterization to extract

information Our paper perspective:

◮ preprocessing to prepare data ◮ direct information extraction

No preprocessing ⇒ No risks of information loss

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 7/26

slide-31
SLIDE 31

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Profiling phase (using profiling traces under known Z)

◮ manage de-synchronization problem ◮ mandatory dimensionality reduction ◮ estimate Pr[X|Z = z] for each value of z

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 8/26

slide-32
SLIDE 32

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks with a Classifier

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Profiling phase (using profiling traces under known Z)

◮ manage de-synchronization problem ◮ mandatory dimensionality reduction ◮ estimate Pr[X|Z = z] for each value of z

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 8/26

slide-33
SLIDE 33

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks with a Classifier

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Training phase (using training traces under known Z)

◮ manage de-synchronization problem ◮ mandatory dimensionality reduction ◮ estimate Pr[X|Z = z] for each value of z

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 8/26

slide-34
SLIDE 34

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks with a Classifier

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Training phase (using training traces under known Z)

◮ manage de-synchronization problem ◮ mandatory dimensionality reduction ◮ construct a classifier F(x) = y ≈ Pr[Z|X = x]

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log Pr[X = xi|Z = f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 8/26

slide-35
SLIDE 35

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks with a Classifier

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Training phase (using training traces under known Z)

◮ manage de-synchronization problem ◮ mandatory dimensionality reduction ◮ construct a classifier F(x) = y ≈ Pr[Z|X = x]

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log F(xi)[f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 8/26

slide-36
SLIDE 36

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Side Channel Attacks with a Classifier

Notations

◮ X side channel trace ◮ Z target (a cryptographic sensitive variable Z = f (P, K))

Goal: make inference over Z, observing X Pr[Z|X]

Template Attacks

◮ Training phase (using training traces under known Z)

  • Integrated approach

◮ manage de-synchronization problem ◮ mandatory dimensionality reduction ◮ construct a classifier F(x) = y ≈ Pr[Z|X = x]

◮ Attack phase (N attack traces, e.g. with known plaintexts pi)

◮ Log-likelihood score for each key hypothesis k

dk =

N

  • i=1

log F(xi)[f (pi, k)]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 8/26

slide-37
SLIDE 37

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Contents

  • 1. Context and Motivation
  • 2. A machine learning approach to classification

2.1 Introduction 2.2 Convolutional Neural Networks

  • 3. Data Augmentation
  • 4. Experimental Results
  • 5. Conclusions

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 9/26

slide-38
SLIDE 38

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Classification

Classification problem

Assign to a datum X (e.g. an image) a label Z among a set of possible labels Z = {Cat, Dog, Horse}

Classifier

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 10/26

slide-39
SLIDE 39

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Classification

Classification problem

Assign to a datum X (e.g. an image) a label Z among a set of possible labels Z = {Cat, Dog, Horse}

0% 20% 40% 60% Classification Horse Dog Cat Classifier

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 10/26

slide-40
SLIDE 40

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Classification

Classification problem

Assign to a datum X (e.g. an image) a label Z among a set of possible labels Z = {Cat, Dog, Horse}

0% 20% 40% 60% Classification Horse Dog Cat Classifier

Pr[Z|X]

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 10/26

slide-41
SLIDE 41

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Classification

Classification problem

Assign to a datum X (e.g. an image) a label Z among a set of possible labels Z = {Cat, Dog, Horse}

0% 20% 40% 60% Classification Horse Dog Cat Classifier

Pr[Z|X]

SCA as a Classification Problem

0% 50% 100% P(Z|X=x) Z=1 Z=0 x Classifier

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 10/26

slide-42
SLIDE 42

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms ◮ choose a model to fit +

tune hyper-parameters Automatic training:

◮ automatic tuning of

trainable parameters to fit data aaa

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-43
SLIDE 43

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms

Neural Networks

◮ choose a model to fit +

tune hyper-parameters Automatic training:

◮ automatic tuning of

trainable parameters to fit data Stochastic Gradient Descent aaa

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-44
SLIDE 44

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms

Neural Networks

◮ choose a model to fit +

tune hyper-parameters MLP, ConvNet Automatic training:

◮ automatic tuning of

trainable parameters to fit data Stochastic Gradient Descent aaa

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-45
SLIDE 45

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms

Neural Networks

◮ choose a model to fit +

tune hyper-parameters MLP, ConvNet Automatic training:

◮ automatic tuning of

trainable parameters to fit data Stochastic Gradient Descent aaa

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-46
SLIDE 46

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms

Neural Networks

◮ choose a model to fit +

tune hyper-parameters MLP, ConvNet Automatic training:

◮ automatic tuning of

trainable parameters to fit data Stochastic Gradient Descent aaa

Multi-Layer Perceptron (MLP)

F(x, W ) = s ◦ λn ◦ σn−1 ◦ λn−1 ◦ · · · ◦ λ1(x) = y ≈ Pr[Z|X = x] λi linear functions (linear combinations of time samples) depending on some trainable weights W σi non-linear functions s normalizing softmax function

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-47
SLIDE 47

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms

Neural Networks

◮ choose a model to fit +

tune hyper-parameters MLP, ConvNet Automatic training:

◮ automatic tuning of

trainable parameters to fit data Stochastic Gradient Descent aaa

Multi-Layer Perceptron (MLP)

F(x, W ) = s ◦ λn ◦ σn−1 ◦ λn−1 ◦ · · · ◦ λ1(x) = y ≈ Pr[Z|X = x] λi linear functions (linear combinations of time samples) depending on some trainable weights W σi non-linear functions s normalizing softmax function

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-48
SLIDE 48

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms

Neural Networks

◮ choose a model to fit +

tune hyper-parameters MLP, ConvNet Automatic training:

◮ automatic tuning of

trainable parameters to fit data Stochastic Gradient Descent aaa

Multi-Layer Perceptron (MLP)

F(x, W ) = s ◦ λn ◦ σn−1 ◦ λn−1 ◦ · · · ◦ λ1(x) = y ≈ Pr[Z|X = x] λi linear functions (linear combinations of time samples) depending on some trainable weights W σi non-linear activation functions s normalizing softmax function

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-49
SLIDE 49

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Machine Learning Approach

Overview of Machine Learning Methodology

Human effort:

◮ choose a class of algorithms

Neural Networks

◮ choose a model to fit +

tune hyper-parameters MLP, ConvNet Automatic training:

◮ automatic tuning of

trainable parameters to fit data Stochastic Gradient Descent aaa

Multi-Layer Perceptron (MLP)

F(x, W ) = s ◦ λn ◦ σn−1 ◦ λn−1 ◦ · · · ◦ λ1(x) = y ≈ Pr[Z|X = x] λi linear functions (linear combinations of time samples) depending on some trainable weights W σi non-linear activation functions s normalizing softmax function

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 11/26

slide-50
SLIDE 50

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

0% 20% 40% 60% Classification Horse Dog Cat Classifier

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-51
SLIDE 51

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

0% 20% 40% 60% Classification Horse Dog Cat Classifier

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-52
SLIDE 52

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

0% 20% 40% 60% Classification Horse Dog Cat Classifier

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-53
SLIDE 53

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

0% 20% 40% 60% Classification Horse Dog Cat Classifier

It is important to explicit the data translation-invariance

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-54
SLIDE 54

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

0% 10% 20% 30% 40% 50% Classification Horse Dog Cat Classifier

? ? ?

It is important to explicit the data translation-invariance

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-55
SLIDE 55

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-56
SLIDE 56

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-57
SLIDE 57

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-58
SLIDE 58

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance Convolutional Neural Networks: share weights across space

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-59
SLIDE 59

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance Convolutional Neural Networks: share weights across space

2 3

  • 1

8 1 9 Input Trace Length = 11 Output 1 1 2 1 7 8 6 1 2 4 1 5 1 1

  • 1

4 2 6 2 1 1

  • 1

1 4 1 5 7 8 6 1 2 6 2 1 4 1 5 1

  • 1

4 1 5 7 8 6 1 2 1 7 8 6 1 2 1 1 7 8 1 6 2 1 4 1 5 1

  • 1

4 1 5 1 1 8 6 4 1 4

28 61 53 66 132 66 66 87 79 53 61

Matrix of weights 9x11 parameters Length = 9

Linear layer in an MLP (Fully Connected Layer)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-60
SLIDE 60

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance Convolutional Neural Networks: share weights across space

2

2

3 1 1

  • 1

8 1 9 4 1 2 1

  • 1

8 Input Trace Length = 9 Depth = 1 Depth = 4 Filtered Trace 4 convolutional filters of size 2 5 4 5 3

Linear layer in a ConvNet (Convolutional Layer)

2 3

  • 1

8 1 9 Input Trace Length = 11 Output 1 1 2 1 7 8 6 1 2 4 1 5 1 1

  • 1

4 2 6 2 1 1

  • 1

1 4 1 5 7 8 6 1 2 6 2 1 4 1 5 1

  • 1

4 1 5 7 8 6 1 2 1 7 8 6 1 2 1 1 7 8 1 6 2 1 4 1 5 1

  • 1

4 1 5 1 1 8 6 4 1 4

28 61 53 66 132 66 66 87 79 53 61

Matrix of weights 9x11 parameters Length = 9

Linear layer in an MLP (Fully Connected Layer)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-61
SLIDE 61

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance Convolutional Neural Networks: share weights across space

2

3 1 1

  • 1

8 1 9 4 1 2 1

  • 1

8 Input Trace Length = 9 Depth = 1 Depth = 4 Filtered Trace 4 convolutional filters of size 2 5 8

15

1 2

Linear layer in a ConvNet (Convolutional Layer)

2 3

  • 1

8 1 9 Input Trace Length = 11 Output 1 1 2 1 7 8 6 1 2 4 1 5 1 1

  • 1

4 2 6 2 1 1

  • 1

1 4 1 5 7 8 6 1 2 6 2 1 4 1 5 1

  • 1

4 1 5 7 8 6 1 2 1 7 8 6 1 2 1 1 7 8 1 6 2 1 4 1 5 1

  • 1

4 1 5 1 1 8 6 4 1 4

28 61 53 66 132 66 66 87 79 53 61

Matrix of weights 9x11 parameters Length = 9

Linear layer in an MLP (Fully Connected Layer)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-62
SLIDE 62

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance Convolutional Neural Networks: share weights across space

2

3

  • 1

8 1 9 4 1 2 1

  • 1

8 Input Trace Length = 9 Depth = 1 Depth = 4 Filtered Trace 4 convolutional filters of size 2 1 1 2 4 4 6 2

Linear layer in a ConvNet (Convolutional Layer)

2 3

  • 1

8 1 9 Input Trace Length = 11 Output 1 1 2 1 7 8 6 1 2 4 1 5 1 1

  • 1

4 2 6 2 1 1

  • 1

1 4 1 5 7 8 6 1 2 6 2 1 4 1 5 1

  • 1

4 1 5 7 8 6 1 2 1 7 8 6 1 2 1 1 7 8 1 6 2 1 4 1 5 1

  • 1

4 1 5 1 1 8 6 4 1 4

28 61 53 66 132 66 66 87 79 53 61

Matrix of weights 9x11 parameters Length = 9

Linear layer in an MLP (Fully Connected Layer)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-63
SLIDE 63

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Convolutional Neural Networks

An answer to translation-invariance

Classifier 0% 50% 100% P(Z|X=x) Z=1 Z=0 x

It is important to explicit the data translation-invariance Convolutional Neural Networks: share weights across space

2

3

  • 1

8 1 9 4 1 2 1

  • 1

8 Input Trace Length = 9 Depth = 1 Depth = 4 Filtered Trace 4 convolutional filters of size 2 1 1 2 4 4 6 2

Linear layer in a ConvNet (Convolutional Layer)

2 9 1 7 2 5 1 4 8 4 1

10

3 4 1 1 5

15

7 2 4 4 2 9 3 3 1 9 5 3 4 5 2 Length = 9 Depth = 4 After Pooling

10

4

15

7 9 3 9 5 9 7 8 8 Before Pooling Depth = 4 Max Pooling Filter Length = 3 Stride = 3 8 5 5

Max Pooling Layer

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 12/26

slide-64
SLIDE 64

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

ConvNet typical architecture

Side-Channel Trace Convolution + Pooling Convolution + Pooling Convolution + Pooling Fully Connected Layer + Softmax Temporal Features Abstract Features Scores

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 13/26

slide-65
SLIDE 65

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Training and overfitting

Training

Profiling set →

  • Training set

Validation set Randomly partition training set into batches Iterative algorithm over batches (one weights update per processed batch) Epoch:= one pass over the entire training set

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 14/26

slide-66
SLIDE 66

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Training and overfitting

Training

Profiling set →

  • Training set

Validation set Randomly partition training set into batches Iterative algorithm over batches (one weights update per processed batch) Epoch:= one pass over the entire training set

Evaluate and compare training and validation accuracy

Understand significant features Epoch Accuracy Training Validation Learn by heart (OVERFITTING) Epoch Accuracy Training Validation

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 14/26

slide-67
SLIDE 67

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Training and overfitting

Training

Profiling set →

  • Training set

Validation set Randomly partition training set into batches Iterative algorithm over batches (one weights update per processed batch) Epoch:= one pass over the entire training set

Evaluate and compare training and validation accuracy

Why? Too complex model Not enough training data Solution? Data augmentation Learn by heart (OVERFITTING) Epoch Accuracy Training Validation

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 14/26

slide-68
SLIDE 68

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Contents

  • 1. Context and Motivation
  • 2. A machine learning approach to classification

2.1 Introduction 2.2 Convolutional Neural Networks

  • 3. Data Augmentation
  • 4. Experimental Results
  • 5. Conclusions

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 15/26

slide-69
SLIDE 69

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Data Augmentation

Data Augmentation

Artificially generate new training data by deforming those previously acquired, Applying transformations that preserve the label Z

Countermeasure Emulation Idea

Emulate the effects of misaligning countermeasures to generate new traces

SHIFTING ADD-REMOVE

𝑈∗ − 𝑈 2 𝑈∗ − 𝑈 2

t

𝐸′ 𝐸 Shifting Window Time Samples

SHT

Original trace Deforming trace via AR technique Augmented trace

ARR

Parameter T: ♯ of possible positions Parameter R: ♯ of added and removed points Data Augmentation techniques are applied online during training phase.

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 16/26

slide-70
SLIDE 70

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Data Augmentation

Data Augmentation

Artificially generate new training data by deforming those previously acquired, Applying transformations that preserve the label Z

Countermeasure Emulation Idea

Emulate the effects of misaligning countermeasures to generate new traces

SHIFTING ADD-REMOVE

𝑈∗ − 𝑈 2 𝑈∗ − 𝑈 2

t

𝐸′ 𝐸 Shifting Window Time Samples

SHT

Original trace Deforming trace via AR technique Augmented trace

ARR

Parameter T: ♯ of possible positions

− → new hyper-parameter

Parameter R: ♯ of added and removed points

− → new hyper-parameter

Data Augmentation techniques are applied online during training phase.

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 16/26

slide-71
SLIDE 71

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Data Augmentation (2)

Quantitative example

A training set of 10, 000 traces of 1, 000 time samples ⇓ SH10AR5 A training set of ≈ 1031 traces of 9, 990 time samples

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 17/26

slide-72
SLIDE 72

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Contents

  • 1. Context and Motivation
  • 2. A machine learning approach to classification

2.1 Introduction 2.2 Convolutional Neural Networks

  • 3. Data Augmentation
  • 4. Experimental Results
  • 5. Conclusions

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 18/26

slide-73
SLIDE 73

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Experimental Results

◮ Random delays ◮ Artificial Jitter ◮ Real Jitter

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 19/26

slide-74
SLIDE 74

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Experimental Results

◮ Random delays ◮ Artificial Jitter ◮ Real Jitter ◮ Network architecture: s ◦ [λ]1 ◦ [δ ◦ [σ ◦ γ]1]4 ◮ Keras library with Tensorflow backend [Ker] (open source)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 19/26

slide-75
SLIDE 75

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Experimental Results

◮ Random delays ◮ Artificial Jitter ◮ Real Jitter ◮ Network architecture: s ◦ [λ]1 ◦ [δ ◦ [σ ◦ γ]1]4 ◮ Keras library with Tensorflow backend [Ker] (open source)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 19/26

slide-76
SLIDE 76

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Random delays

1000 2000 3000 4000 −0.5 0.5 1000 2000 3000 4000 −0.5 0.5 1000 2000 3000 4000 −0.5 0.5 Time samples Power Consumption

One leaking operation

Setup

◮ Target Chip: Atmega328P ◮ Target Variable: Z = HW(Sbox(P ⊕ K)) ◮ Acquisition: through ChipWhisperer R

platform, ≈ 4, 000 time samples

◮ Countermeasure: Random Delays - insertion of r nop operations,

r ∈ [0, 127] uniform random

◮ 1, 000 training traces

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 20/26

slide-77
SLIDE 77

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Random delays

Data augmentation vs overfitting

Metrics

◮ Test accuracy: classification accuracy over the attack traces ◮ N⋆: minimum number of attack traces to make guessing entropy of the

right key permanently equal to one (N⋆ estimated over 10 independent attacks)

20 40 60 80 100 120 Epoch 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

training accuracy validation accuracy

SH0

20 40 60 80 100 120 140 Epoch 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

training accuracy validation accuracy

SH100

50 100 150 200 250 300 Epoch 0.2 0.4 0.6 0.8

training accuracy validation accuracy

SH500

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 21/26

slide-78
SLIDE 78

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Random delays

Data augmentation vs overfitting

Metrics

◮ Test accuracy: classification accuracy over the attack traces ◮ N⋆: minimum number of attack traces to make guessing entropy of the

right key permanently equal to one (N⋆ estimated over 10 independent attacks)

20 40 60 80 100 120 Epoch 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

training accuracy validation accuracy

SH0

20 40 60 80 100 120 140 Epoch 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

training accuracy validation accuracy

SH100

50 100 150 200 250 300 Epoch 0.2 0.4 0.6 0.8

training accuracy validation accuracy

SH500

SH0 SH100 SH500 Acc N⋆ 27.0% > 1, 000 31.8% 101 78% 7

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 21/26

slide-79
SLIDE 79

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Real Jitter (1)

Target

◮ AES hardware implementation ◮ strong jitter effect ◮ Target Variable: Z = Sbox(P ⊕ K) ◮ 2, 500 selected time samples ◮ 99, 000 training traces

SNR first Sbox

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 22/26

slide-80
SLIDE 80

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Real Jitter (1)

Target

◮ AES hardware implementation ◮ strong jitter effect ◮ Target Variable: Z = Sbox(P ⊕ K) ◮ 2, 500 selected time samples ◮ 99, 000 training traces

SNR second Sbox without realignment Entry region for CNN (2,500 pts)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 22/26

slide-81
SLIDE 81

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Real Jitter (2)

SH0AR0 SH10AR100 SH20AR200 Acc N⋆ 1.2% 137 1.3% 89 1.8% 54

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 23/26

slide-82
SLIDE 82

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Real Jitter (2)

SH0AR0 SH10AR100 SH20AR200 Acc N⋆ 1.2% 137 1.3% 89 1.8% 54

SNR second Sbox with realignment

50 100 150 200 250 20 40 60 80 100 120 Number of attack traces Guessing Entropy Our CNN − SH20 AR200 Gaussian TA with realignment

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 23/26

slide-83
SLIDE 83

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Contents

  • 1. Context and Motivation
  • 2. A machine learning approach to classification

2.1 Introduction 2.2 Convolutional Neural Networks

  • 3. Data Augmentation
  • 4. Experimental Results
  • 5. Conclusions

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 24/26

slide-84
SLIDE 84

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Conclusions

◮ State-of-the-Art Template Attack separates

resynchronization/dimensionality reduction from characterization

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 25/26

slide-85
SLIDE 85

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Conclusions

◮ State-of-the-Art Template Attack separates

resynchronization/dimensionality reduction from characterization

◮ ConvNets provide an integrated approach to directly extract information

from rough data (no preprocessing)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 25/26

slide-86
SLIDE 86

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Conclusions

◮ State-of-the-Art Template Attack separates

resynchronization/dimensionality reduction from characterization

◮ ConvNets provide an integrated approach to directly extract information

from rough data (no preprocessing)

◮ ConvNet models can require plenty of data to be trained

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 25/26

slide-87
SLIDE 87

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Conclusions

◮ State-of-the-Art Template Attack separates

resynchronization/dimensionality reduction from characterization

◮ ConvNets provide an integrated approach to directly extract information

from rough data (no preprocessing)

◮ ConvNet models can require plenty of data to be trained ◮ Data Augmentation provides an answer to the lack of data

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 25/26

slide-88
SLIDE 88

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Conclusions

◮ State-of-the-Art Template Attack separates

resynchronization/dimensionality reduction from characterization

◮ ConvNets provide an integrated approach to directly extract information

from rough data (no preprocessing)

◮ ConvNet models can require plenty of data to be trained ◮ Data Augmentation provides an answer to the lack of data ◮ we proposed two Side-Channel-adapted Data Augmentation techniques

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 25/26

slide-89
SLIDE 89

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Conclusions

◮ State-of-the-Art Template Attack separates

resynchronization/dimensionality reduction from characterization

◮ ConvNets provide an integrated approach to directly extract information

from rough data (no preprocessing)

◮ ConvNet models can require plenty of data to be trained ◮ Data Augmentation provides an answer to the lack of data ◮ we proposed two Side-Channel-adapted Data Augmentation techniques ◮ we verified the effectiveness/efficiency of the ConvNet+Data

Augmentation approach over different sets of misaligned data

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 25/26

slide-90
SLIDE 90

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Conclusions

◮ State-of-the-Art Template Attack separates

resynchronization/dimensionality reduction from characterization

◮ ConvNets provide an integrated approach to directly extract information

from rough data (no preprocessing)

◮ ConvNet models can require plenty of data to be trained ◮ Data Augmentation provides an answer to the lack of data ◮ we proposed two Side-Channel-adapted Data Augmentation techniques ◮ we verified the effectiveness/efficiency of the ConvNet+Data

Augmentation approach over different sets of misaligned data

Thank You! Questions?

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 25/26

slide-91
SLIDE 91

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

References I

[Ker] Keras library. https://keras.io/. [KSH12] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. “ImageNet Classification with Deep Convolutional Neural Networks”. In: Advances in Neural Information Processing Systems 25. Ed. by

  • F. Pereira et al. Curran Associates, Inc., 2012, pp. 1097–1105. url:

http://papers.nips.cc/paper/4824-imagenet- classification-with-deep-convolutional-neural- networks.pdf.

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 26/26

slide-92
SLIDE 92

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Cross-entropy Loss Function

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 27/26

slide-93
SLIDE 93

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Nowadays challenging image classification problems

Imagenet Large Scale Visual Recognition Challenge 2012 (ILSVRC 2012)

Classification and other tasks. 1000 categories.

Egyptian Cat Tiger Cat

Convolutional Neural Networks (AlexNet [KSH12]) ≈ 84% of accuracy Best of other submissions ≈ 74% of accuracy

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 28/26

slide-94
SLIDE 94

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Nowadays challenging image classification problems

Imagenet Large Scale Visual Recognition Challenge 2012 (ILSVRC 2012)

Classification and other tasks. 1000 categories.

Egyptian Cat Tiger Cat

Convolutional Neural Networks (AlexNet [KSH12]) ≈ 84% of accuracy Best of other submissions ≈ 74% of accuracy At ILSVRC 2014 classification accuracy of winner GoogLeNet was ≈ 93% (close to human rate)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 28/26

slide-95
SLIDE 95

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Nowadays challenging image classification problems

Imagenet Large Scale Visual Recognition Challenge 2012 (ILSVRC 2012)

Classification and other tasks. 1000 categories.

Egyptian Cat Tiger Cat

Convolutional Neural Networks (AlexNet [KSH12]) ≈ 84% of accuracy Best of other submissions ≈ 74% of accuracy At ILSVRC 2014 classification accuracy of winner GoogLeNet was ≈ 93% (close to human rate) Today, CNNs are the most diffused and best performing technique in many domains (image recognition, video analysis, natural language processing,...)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 28/26

slide-96
SLIDE 96

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Nowadays challenging image classification problems

Imagenet Large Scale Visual Recognition Challenge 2012 (ILSVRC 2012)

Classification and other tasks. 1000 categories.

Egyptian Cat Tiger Cat

Convolutional Neural Networks (AlexNet [KSH12]) ≈ 84% of accuracy Best of other submissions ≈ 74% of accuracy At ILSVRC 2014 classification accuracy of winner GoogLeNet was ≈ 93% (close to human rate) Today, CNNs are the most diffused and best performing technique in many domains (image recognition, video analysis, natural language processing,...) It deals geometric deformation and de-synchronization (spacial or temporal)

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 28/26

slide-97
SLIDE 97

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Artificial Jitter

Low artificial jitter High artificial jitter

Target

◮ Target Variable: Z = HW(Sbox(P ⊕ K)) ◮ ≈ 2000 time samples ◮ Countermeasure: artificial signal treatment simulating clock jitter ◮ 10000 training traces

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 29/26

slide-98
SLIDE 98

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Artificial Jitter (2)

Low jitter Acc N⋆ SH0 SH20 SH40 AR0 57.4% 14 82.5% 6 83.6% 6 AR100 86.0% 6 87.0% 5 87.5% 6 AR200 86.6% 6 85.7% 6 87.7% 5 High jitter Acc N⋆ SH0 SH20 SH40 AR0 40.6% 35 51.1% 9 62.4% 11 AR100 50.2% 15 72.4% 11 73.5% 9 AR200 64.0% 11 75.5% 8 74.4% 8

10 10

1

10

2

10

3

10

4

50 100 150 200 Number of attack traces Guessing Entropy Gaussian TA wo realignment Gaussian TA with realignment Our CNN − SH40 − AR200

Low Jitter

10 10

1

10

2

10

3

10

4

50 100 150 Number of attack traces Guessing Entropy Gaussian TA wo realignment Gaussian TA with realignment Our CNN − SH20 − AR200

High Jitter

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 30/26

slide-99
SLIDE 99

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Random Delays - Two Leaking Operations

1000 2000 3000 4000 −0.5 0.5 1000 2000 3000 4000 −0.5 0.5 1000 2000 3000 4000 −0.5 0.5 Time samples Power consumption

Two leaking operations

First operation - Test acc: 76.8%, N⋆ = 7 Second operation - Test acc: 82.5%, N⋆ = 6

26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 31/26

slide-100
SLIDE 100

Convolutional Neural Networks with Data Augmentation against Jitter-Based Countermeasures

Artificial Jitter

DS low jitter a b c d SH0 SH20 SH40 SH200 100.0% 68.7% 99.8% 86.1% 98.9% 84.1% AR0 57.4% 14 82.5% 6 83.6% 6 87.7% 88.2% 82.4% 88.4% 81.9% 89.6% AR100 86.0% 6 87.0% 5 87.5% 6 83.2% 88.6% 81.4% 86.9% 80.6% 88.9% AR200 86.6% 6 85.7% 6 87.7% 5 85.0% 88.6% AR500 86.2% 5 DS high jitter a b SH0 SH20 SH40 SH200 c d AR0 100% 45.0% 100% 60.0% 98.5% 67.6% 40.6% 35 51.1% 9 62.4% 11 AR100 90.4% 57.3% 76.6% 73.6% 78.5% 76.4% 50.2% 15 72.4% 11 73.5% 9 AR200 83.1% 67.7% 82.0% 77.1% 82.6% 77.0% 64.0% 11 75.5% 8 74.4% 8 AR500 83.6% 73.4% 68.2% 11 26/09/2017, CHES 2017, Taipei, Taiwan| E. Cagli, C. Dumas, E. Prouff| 32/26