43
UCL Crypto Group Microelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 Blind Source Separation from Single Measurements using Singular Spectrum Analysis CHES 2015 14.Sept.2015, Saint-Malo, France Santos Merino del Pozo and Fran¸cois-Xavier Standaert ICTEAM/ELEN/Crypto Group Universit´ e catholique de Louvain, Belgium.

Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

Embed Size (px)

Citation preview

Page 1: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015

Blind Source Separation from SingleMeasurements using Singular

Spectrum Analysis

CHES 2015

14.Sept.2015, Saint-Malo, France

Santos Merino del Pozo and Francois-Xavier Standaert

ICTEAM/ELEN/Crypto GroupUniversite catholique de Louvain, Belgium.

Page 2: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 1

Because Noise Matters

I More noise → More side-channel measurements

I attacks become more challengingI critical for higher-order (HO) attacks !!

I Ideally, low-noise measurements

I can be difficult to achieve in practiceI architecture, countermeasures, measurement setup, ...

I So, preprocessing the collected traces is always advisable

Page 3: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 1

Because Noise Matters

I More noise → More side-channel measurementsI attacks become more challengingI critical for higher-order (HO) attacks !!

I Ideally, low-noise measurements

I can be difficult to achieve in practiceI architecture, countermeasures, measurement setup, ...

I So, preprocessing the collected traces is always advisable

Page 4: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 1

Because Noise Matters

I More noise → More side-channel measurementsI attacks become more challengingI critical for higher-order (HO) attacks !!

I Ideally, low-noise measurements

I can be difficult to achieve in practiceI architecture, countermeasures, measurement setup, ...

I So, preprocessing the collected traces is always advisable

Page 5: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 1

Because Noise Matters

I More noise → More side-channel measurementsI attacks become more challengingI critical for higher-order (HO) attacks !!

I Ideally, low-noise measurementsI can be difficult to achieve in practiceI architecture, countermeasures, measurement setup, ...

I So, preprocessing the collected traces is always advisable

Page 6: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 1

Because Noise Matters

I More noise → More side-channel measurementsI attacks become more challengingI critical for higher-order (HO) attacks !!

I Ideally, low-noise measurementsI can be difficult to achieve in practiceI architecture, countermeasures, measurement setup, ...

I So, preprocessing the collected traces is always advisable

Page 7: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 2

State-of-the-Art: Perks and Pitfalls

I Averaging

4 easy yet effective8 useless when exploiting HO leakages

I Digital filtering

4 relevant for HO analysis8 not trivial to design

I PCA and LDA

4 intuitive and easy to implement8 requires profiling, extension to HO analysis?

Page 8: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 2

State-of-the-Art: Perks and Pitfalls

I Averaging

4 easy yet effective8 useless when exploiting HO leakages

I Digital filtering

4 relevant for HO analysis8 not trivial to design

I PCA and LDA

4 intuitive and easy to implement8 requires profiling, extension to HO analysis?

Page 9: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 2

State-of-the-Art: Perks and Pitfalls

I Averaging

4 easy yet effective8 useless when exploiting HO leakages

I Digital filtering

4 relevant for HO analysis8 not trivial to design

I PCA and LDA

4 intuitive and easy to implement8 requires profiling, extension to HO analysis?

Page 10: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 2

State-of-the-Art: Perks and Pitfalls

I Averaging

4 easy yet effective8 useless when exploiting HO leakages

I Digital filtering

4 relevant for HO analysis8 not trivial to design

I PCA and LDA

4 intuitive and easy to implement8 requires profiling, extension to HO analysis?

Page 11: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 3

Our Solution

I Blind source separation using Singular Spectrum Analysis(SSA)

I Disregarded in the context of side-channel analysisI Cool features from the attackers point-of-view

I working in a per-trace fashionI being readily applied to HO scenariosI not requiring proficiency in signal processingI not needing a profiling stage

Page 12: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 3

Our Solution

I Blind source separation using Singular Spectrum Analysis(SSA)

I Disregarded in the context of side-channel analysisI Cool features from the attackers point-of-view

I working in a per-trace fashionI being readily applied to HO scenariosI not requiring proficiency in signal processingI not needing a profiling stage

Page 13: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 4

Outline

Singular Spectrum Analysis 101

Experimental ResultsMasked softwareUnprotected hardware

Conclusions

Page 14: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 5

SSA 101 - Decomposition

So you got a noisy leakage trace ` =(`1, . . . , `N

)I First, take W = blog (N)cc with c ∈ [1.5, 3],

I define D = N −W + 1 delayed vectors

Page 15: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 5

SSA 101 - Decomposition

So you got a noisy leakage trace ` =(`1, . . . , `N

)I First, take W = blog (N)cc with c ∈ [1.5, 3],

I define D = N −W + 1 delayed vectors

`1

`2 · · · `D

`2

`3 · · · `D+1

...

.... . .

...

`W

`W+1 · · · `N

Page 16: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 5

SSA 101 - Decomposition

So you got a noisy leakage trace ` =(`1, . . . , `N

)I First, take W = blog (N)cc with c ∈ [1.5, 3],

I define D = N −W + 1 delayed vectors

`1 `2

· · · `D

`2 `3

· · · `D+1

......

. . ....

`W `W+1

· · · `N

Page 17: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 5

SSA 101 - Decomposition

So you got a noisy leakage trace ` =(`1, . . . , `N

)I First, take W = blog (N)cc with c ∈ [1.5, 3],

I define D = N −W + 1 delayed vectors

`1 `2 · · · `D

`2 `3 · · · `D+1

......

. . ....

`W `W+1 · · · `N

Page 18: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 5

SSA 101 - Decomposition

So you got a noisy leakage trace ` =(`1, . . . , `N

)I First, take W = blog (N)cc with c ∈ [1.5, 3],

I define D = N −W + 1 delayed vectors

I and then build the so-called trajectory matrix L

L =

`1 `2 · · · `D

`2 `3 · · · `D+1

......

. . ....

`W `W+1 · · · `N

Page 19: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 6

SSA 101 - Decomposition

Compute the eigenvalues of LL>

I (λ1 ≥ · · · ≥ λd), the so-called singular spectrum

I d = W if none of them is zero

together with the corresponding eigenvectors u1,u2, . . . ,ud

The SVD decomposition of L is

L = L1 + · · ·+ Ld ,

such that Li =√λiuiv>i and vi =

L>ui√λi

Page 20: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 6

SSA 101 - Decomposition

Compute the eigenvalues of LL>

I (λ1 ≥ · · · ≥ λd), the so-called singular spectrum

I d = W if none of them is zero

together with the corresponding eigenvectors u1,u2, . . . ,ud

The SVD decomposition of L is

L = L1 + · · ·+ Ld ,

such that Li =√λiuiv>i and vi =

L>ui√λi

Page 21: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 7

SSA 101 - Reconstruction

Now, we are ready to extract the underlying components of `I Each Li matrix is transformed into the i -th component

˜i =

(˜1i , . . . , ˜N

i

)

I Trivial when Li is a Hankel matrix, i.e.,

Li =

˜1i

˜2i

˜3i · · ·

˜2i

˜3i · · · · · ·

˜3i

.... . . ˜N−1

i...

... ˜N−1i

˜Ni

I but since this is not the case, the so-called hankelization

function must be applied on each Li

Page 22: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 7

SSA 101 - Reconstruction

Now, we are ready to extract the underlying components of `I Each Li matrix is transformed into the i -th component

˜i =

(˜1i , . . . , ˜N

i

)I Trivial when Li is a Hankel matrix, i.e.,

Li =

˜1i

˜2i

˜3i · · ·

˜2i

˜3i · · · · · ·

˜3i

.... . . ˜N−1

i...

... ˜N−1i

˜Ni

I but since this is not the case, the so-called hankelizationfunction must be applied on each Li

Page 23: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 7

SSA 101 - Reconstruction

Now, we are ready to extract the underlying components of `I Each Li matrix is transformed into the i -th component

˜i =

(˜1i , . . . , ˜N

i

)I Trivial when Li is a Hankel matrix, i.e.,

Li =

˜1i

˜2i

˜3i · · ·

˜2i

˜3i · · · · · ·

˜3i

.... . . ˜N−1

i...

... ˜N−1i

˜Ni

I but since this is not the case, the so-called hankelization

function must be applied on each Li

Page 24: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 8

SSA 101 - Reconstruction

Lastly, the original leakage trace ` can be reconstructed as

I but we aim at a signal vs. noise decomposition

I I = {1, . . . , d} is partitioned into Isignal and Inoise,

so

` = ˜1 + · · ·+ ˜

d

Criteria

I Inoise → small singular values producing a slowlydecreasing sequence

I Isignal → the remaining ones ,

Page 25: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 8

SSA 101 - Reconstruction

Lastly, the original leakage trace ` can be reconstructed as

I but we aim at a signal vs. noise decomposition

I I = {1, . . . , d} is partitioned into Isignal and Inoise,

so

` = ˜1 + · · ·+ ˜

d

Criteria

I Inoise → small singular values producing a slowlydecreasing sequence

I Isignal → the remaining ones ,

Page 26: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 8

SSA 101 - Reconstruction

Lastly, the original leakage trace ` can be reconstructed as

I but we aim at a signal vs. noise decomposition

I I = {1, . . . , d} is partitioned into Isignal and Inoise,

so

` = ˜1 + · · ·+ ˜

d

Criteria

I Inoise → small singular values producing a slowlydecreasing sequence

I Isignal → the remaining ones ,

Page 27: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 8

SSA 101 - Reconstruction

Lastly, the original leakage trace ` can be reconstructed as

I but we aim at a signal vs. noise decomposition

I I = {1, . . . , d} is partitioned into Isignal and Inoise, so

` =∑

i∈Isignal

˜i +

∑i∈Inoise

˜i

Criteria

I Inoise → small singular values producing a slowlydecreasing sequence

I Isignal → the remaining ones ,

Page 28: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 8

SSA 101 - Reconstruction

Lastly, the original leakage trace ` can be reconstructed as

I but we aim at a signal vs. noise decomposition

I I = {1, . . . , d} is partitioned into Isignal and Inoise, so

` =∑

i∈Isignal

˜i +

∑i∈Inoise

˜i

Criteria

I Inoise → small singular values producing a slowlydecreasing sequence

I Isignal → the remaining ones ,

Page 29: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 9

Experimental Results

Two experimental platformsI Atmel 8-bit µC (ATMega644p)

I First-order boolean masking scheme of AESI High Signal-to-Noise RatioI Profiling is allowed

I Spartan-6 FPGA (SAKURA-G)

I Unprotected implementation of PRESENT-80I Low Signal-to-Noise RatioI Small peak-to-peak signal → quantization noiseI Profiling is not allowed

Page 30: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 9

Experimental Results

Two experimental platformsI Atmel 8-bit µC (ATMega644p)

I First-order boolean masking scheme of AESI High Signal-to-Noise RatioI Profiling is allowed

I Spartan-6 FPGA (SAKURA-G)

I Unprotected implementation of PRESENT-80I Low Signal-to-Noise RatioI Small peak-to-peak signal → quantization noiseI Profiling is not allowed

Page 31: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 9

Experimental Results

Two experimental platformsI Atmel 8-bit µC (ATMega644p)

I First-order boolean masking scheme of AESI High Signal-to-Noise RatioI Profiling is allowed

I Spartan-6 FPGA (SAKURA-G)I Unprotected implementation of PRESENT-80I Low Signal-to-Noise RatioI Small peak-to-peak signal → quantization noiseI Profiling is not allowed

Page 32: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 10

Experimental Results - Masked software

Page 33: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 11

Experimental Results - Masked software

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

Page 34: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 11

Experimental Results - Masked software

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

Bivariate MCP-DPA (raw) Bivariate MCP-DPA (SSA)

Page 35: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 11

Experimental Results - Masked software

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

Bivariate TA (raw) Bivariate TA (SSA)

Page 36: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 11

Experimental Results - Masked software

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

SR of bivariate MCP-DPA SR of bivariate TA

Page 37: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 12

Experimental Results - Unprotected hardware

Page 38: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 13

Experimental Results - Unprotected hardware

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

Page 39: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 13

Experimental Results - Unprotected hardware

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

CPA using HD model (raw) CPA using HD model (SSA)

Page 40: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 13

Experimental Results - Unprotected hardware

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

MCC-DPA (raw) MCC-DPA (SSA)

Page 41: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 13

Experimental Results - Unprotected hardware

Signal-to-Noise ratio (raw) Signal-to-Noise ratio (SSA)

SR of CPA using HD model SR of MCC-DPA

Page 42: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 14

Conclusions

I SSA in the context of side-channel analysisI intuitive, easy to use

I window length → standard rule-of-thumbI reconstruction → visual inspection of components

I works in a per-trace fashionI on-the-fly filteringI easily integrated into measurement frameworks

I effectiveI SNR gains up to a factor of 4I attacks with reduced measurement complexity

I Future work:I more challenging scenarios (high noise + masking in

hardware)I distinguish components at same frequencies?

Page 43: Blind Source Separation from Single Measurements using ... · Blind Source Separation from Single Measurements ... of side-channel analysis ... Single Measurements using Singular

UCL Crypto GroupMicroelectronics Laboratory Santos Merino del Pozo - CHES 2015 - 14.Sept.2015 15

Questions?