on darwinism and side channel resistance

82
On Darwinism and Side Channel Resistance RHUL 2013 Talk David Naccache

Upload: lenka

Post on 23-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

On Darwinism and Side Channel Resistance. RHUL 2013 Talk David Naccache. Müllerian Mimicry. “ A natural phenomenon in which two or more poisonous species, that may or may not be related and share one or more common predators, have come to mimic each other's warning signals .” - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: On Darwinism and Side  Channel  Resistance

On Darwinism and Side Channel Resistance

RHUL 2013 TalkDavid Naccache

Page 2: On Darwinism and Side  Channel  Resistance

Müllerian Mimicry

“A natural phenomenon in which two or more poisonous species, that may or may not be related and share one or more common predators, have come to mimic each other's warning signals.”

(Named after German naturalist Fritz Müller, who proposed the concept in 1878).

Page 3: On Darwinism and Side  Channel  Resistance
Page 4: On Darwinism and Side  Channel  Resistance
Page 5: On Darwinism and Side  Channel  Resistance

ant

Page 6: On Darwinism and Side  Channel  Resistance

ant

spiderextra legs

antennae

Page 7: On Darwinism and Side  Channel  Resistance
Page 8: On Darwinism and Side  Channel  Resistance
Page 9: On Darwinism and Side  Channel  Resistance

Physics

µP Memorydata

Leakage function

Page 10: On Darwinism and Side  Channel  Resistance

Physics

µP Memorydata

Leakage function

noisepure leakage

digital information

measured leakage

Page 11: On Darwinism and Side  Channel  Resistance

Model

µP Memorydata

Leakage function

noisepure leakage

digital information

measured leakage

Page 12: On Darwinism and Side  Channel  Resistance

Model

µP Memorydata

Leakage function

noisepure leakage

bits

measured leakage

Page 13: On Darwinism and Side  Channel  Resistance

Digital Müllerian SimilarityRules: attack and defense have the same rights:• Both Have the same knowledge about the system• Both can experiment as much as they wish with the system.• Instead of transmitting bits, the defender sacrifices part of

his bandwidth to buy similarity.

𝑘 camouflage value

The -bit number

Page 14: On Darwinism and Side  Channel  Resistance

The Game

𝑓 𝑑 (𝑡 )𝑘 ,𝑣

Defender’s goal: for each select a .

For the values must be such that: is as similar as possible to

Page 15: On Darwinism and Side  Channel  Resistance

The Game

𝑓 𝑑 (𝑡 )𝑘 ,𝑣

Defender’s goal: for each select a .

For the values must be such that: is as similar as possible to

Be as discreet as possible and let noise do the rest of the cover-up work!

Page 16: On Darwinism and Side  Channel  Resistance

A Small ExampleConsider bits.We devote 2 bits to payload data (i.e. ) and the 2 other bits to camouflage (i.e. )

Page 17: On Darwinism and Side  Channel  Resistance

A Small ExampleConsider bits.We devote 2 bits to payload data (i.e. 0,1,2,3) and the 2 other bits to camouflage (i.e. )

We call these « colors »

Page 18: On Darwinism and Side  Channel  Resistance

A Small ExampleWe have sixteen values belonging to four color groups.We need to select one representative in each group

10001001101010111100110111101111

0000 0001001000110100010101100111

Page 19: On Darwinism and Side  Channel  Resistance

A Small ExampleWe have sixteen values belonging to four color groups.We need to select one representative in each group

10001001101010111100110111101111

0000 0001001000110100010101100111

speciesmelopomene

speciescydna

specieserato

speciessapho

Page 20: On Darwinism and Side  Channel  Resistance

Apply Natural SelectionWe have sixteen values belonging to four color groups.We need to select one representative in each group

10001001101010111100110111101111

0000 0001001000110100010101100111

speciesmelopomene

speciescydna

specieserato

speciessapho

Page 21: On Darwinism and Side  Channel  Resistance

Apply Natural Selection

10001001101010111100110111101111

0000 0001001000110100010101100111

speciesmelopomene

speciescydna

specieserato

speciessapho

Criterion: Analogy: MSB = basic genotype, LSB = mutations

Page 22: On Darwinism and Side  Channel  Resistance

How to Find the Good One?Simulating Mutations is easy, measuring similarity is not! Assume that a simplistic blue jay has only one criterion: the global intensity of yellow in the butterfly.

1000 31001 91010 71011 41100 31101 91110 41111 2

0000 0 0001 00010 10011 30100 00101 10110 10111 4

Page 23: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Page 24: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Page 25: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

No

Page 26: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

No

Page 27: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

No

Page 28: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Yes

Current optimum

Page 29: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Yes

Current optimum

Page 30: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

No

Current optimum

Page 31: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Yes

Current optimum

Page 32: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Yes

Current optimum

Page 33: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Current optimum

No

Page 34: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Current optimum

No

Page 35: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Current optimum

No

Page 36: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Current optimum

No

Page 37: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Current optimum

No

Page 38: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Problem: Find the shortest segment containing all colorsA quadratic-time algorithm: just scan and keep an optimum.

Current optimum

No

Page 39: On Darwinism and Side  Channel  Resistance

Sort Butterflies by Yellowness

0 1 2 3 4 5 6 7 8 9

Indeed:

Page 40: On Darwinism and Side  Channel  Resistance

If The Blue Jay is More Perceptive?

Page 41: On Darwinism and Side  Channel  Resistance

If The Blue Jay is More Perceptive?Cyanocitta cristata oculus-laseris perceives both size and yellow levels.

Page 42: On Darwinism and Side  Channel  Resistance

Well… Now Trouble StartsIn terms of similarity, how many yellow units worth one size unit?

Page 43: On Darwinism and Side  Channel  Resistance

Well… Now Trouble StartsEven if we simplify and assume that 1 size unit = 1 yellow unit how do we find the optimum?

Page 44: On Darwinism and Side  Channel  Resistance

Well… Now Trouble StartsEven if we simplify and assume that 1 size unit = 1 yellow unit how do we find the optimum?Even worse: the Blue Jay’s perception of size and yellow might even be negatively correlated! i.e. if sizes are hard to distinguish then yellows are not and conversely.

Page 45: On Darwinism and Side  Channel  Resistance

Well… Now Trouble StartsEven if we simplify and assume that 1 size unit = 1 yellow unit how do we find the optimum?Even worse: the Blue Jay’s perception of size and yellow might even be negatively correlated! i.e. if sizes are hard to distinguish then yellows are not and conversely.Luckily this can be dealt with.

Page 46: On Darwinism and Side  Channel  Resistance

Well… Now Trouble StartsEven if we simplify and assume that 1 size unit = 1 yellow unit how do we find the optimum?Even worse: the Blue Jay’s perception of size and yellow might even be negatively correlated! i.e. if sizes are hard to distinguish then yellows are not and conversely.Luckily this can be dealt with.For now we assume equal weights and independence.

Page 47: On Darwinism and Side  Channel  Resistance

The New ProblemHere each is a side channel curve with 2 samples

Power Sample 2

PowerSample 1

Power

Time

Page 48: On Darwinism and Side  Channel  Resistance

The New ProblemHere each is a side channel curve with 2 samples

Power Sample 2

PowerSample 1

Page 49: On Darwinism and Side  Channel  Resistance

The New ProblemFind the smallest circle containing all colors

Level of yellow

Size

Page 50: On Darwinism and Side  Channel  Resistance

Note: easy generalization to more properties (will be see later)

Find the smallest sphere containing all colors

Page 51: On Darwinism and Side  Channel  Resistance

The New ProblemFind the smallest circle containing all colors

Level of yellow

Size

Page 52: On Darwinism and Side  Channel  Resistance

The New Problem1. How to do this? 2. At what cost?

Level of yellow

Size

Page 53: On Darwinism and Side  Channel  Resistance

The AlgorithmTake a point at random and find any solution

Level of yellow

Size

Page 54: On Darwinism and Side  Channel  Resistance

The AlgorithmCall the radius of this solution

Level of yellow

Size

𝑟

Page 55: On Darwinism and Side  Channel  Resistance

The AlgorithmHalve the plane

Level of yellow

Size

Page 56: On Darwinism and Side  Channel  Resistance

The AlgorithmHalve the plane

Page 57: On Darwinism and Side  Channel  Resistance

The AlgorithmAdd units at each side

Page 58: On Darwinism and Side  Channel  Resistance

The AlgorithmAdd units at each side

Page 59: On Darwinism and Side  Channel  Resistance

Split to Two Sub-ProblemsFind optimum here

Find optimum here

Page 60: On Darwinism and Side  Channel  Resistance

Split to Two Sub-Problems

Page 61: On Darwinism and Side  Channel  Resistance

Split to Two Sub-Problems

Page 62: On Darwinism and Side  Channel  Resistance

Split to Two Sub-Problems

Problem 1 Problem 2

Page 63: On Darwinism and Side  Channel  Resistance

Split to Two Sub-Problems

Problem 1 Problem 2

Inte

rsec

tion

Page 64: On Darwinism and Side  Channel  Resistance

Interesting Propertymin(Problem) = min(min(Problem 1),min(Problem 2))

Hence:• Iterate the process (possibly cutting along 2 dimensions) until

halving hits a fix-point (i.e. adding compensates halving).• Solve each sub-problem by any algorithm and compute the

min over all solutions.

Page 65: On Darwinism and Side  Channel  Resistance

Higher Dimensions?

A well studied problem, ready to use tools exist:

Page 66: On Darwinism and Side  Channel  Resistance

Output of our program

Page 67: On Darwinism and Side  Channel  Resistance

Infinite Dimensions?

Problem can be modeled in terms of distance between functions.

Page 68: On Darwinism and Side  Channel  Resistance

We Are Now Ready to

• Settle the question of dimension units.• Take correlations into account.• Justify Euclidean distance.

Page 69: On Darwinism and Side  Channel  Resistance

How to Evaluate a Distance?

stand for yellow levels and for sizes

¿ 𝑦 𝑖−𝑦 𝑗∨¿

¿ 𝑠𝑖−𝑠 𝑗∨¿

Page 70: On Darwinism and Side  Channel  Resistance

How to Evaluate a Distance?

stand for yellow levels and for sizes

¿ 𝑦 𝑖−𝑦 𝑗∨¿

¿ 𝑠𝑖−𝑠 𝑗∨¿

No brainerclose!

Page 71: On Darwinism and Side  Channel  Resistance

How to Evaluate a Distance?

stand for yellow levels and for sizes

¿ 𝑦 𝑖−𝑦 𝑗∨¿

¿ 𝑠𝑖−𝑠 𝑗∨¿

No brainerclose!

No brainerfar!

Page 72: On Darwinism and Side  Channel  Resistance

How to Evaluate a Distance?

stand for yellow levels and for sizes

¿ 𝑦 𝑖−𝑦 𝑗∨¿

¿ 𝑠𝑖−𝑠 𝑗∨¿

No brainerclose!

No brainerfar!??

Page 73: On Darwinism and Side  Channel  Resistance

When how many yellow saturation units worth one mm of size?!

¿ 𝑦 𝑖−𝑦 𝑗∨¿

¿ 𝑠𝑖−𝑠 𝑗∨¿

No brainerclose!

No brainerfar!??

How to Evaluate a Distance?

Page 74: On Darwinism and Side  Channel  Resistance

Compare apples to tomatoes?!

¿ 𝑦 𝑖−𝑦 𝑗∨¿

¿ 𝑠𝑖−𝑠 𝑗∨¿

No brainerclose!

No brainerfar!??

How to Evaluate a Distance?

Page 75: On Darwinism and Side  Channel  Resistance

The solution …

Compute

and compare by increasing order of

2

2

2

2

,s

ji

y

jiji σ

)s(sσ

)y(yd

Page 76: On Darwinism and Side  Channel  Resistance

Are we done? No!

The above assumes that butterfly yellowness and size are independent.If they were not, a hidden parameter will “count twice”!Example: weight and size are not independent.

Page 77: On Darwinism and Side  Channel  Resistance

Dealing With Correlations

Assume that we want to use, size, weight and yellowness.Evidently but

This is easy to generalize to more parameters with more correlations. cf. full paper.Euclidian distance stems from assumed multi-dimensional Gaussian distributions.

ws

ijij

y

ij

s

ij

w

ijji

sswwyysswwd

)1())((2)(

)1()(

)1()(

22

2

22

2

22

2

,

Page 78: On Darwinism and Side  Channel  Resistance

Real-Life Experiments

Page 79: On Darwinism and Side  Channel  Resistance

2 bit k (i.e. 4 colors)

Page 80: On Darwinism and Side  Channel  Resistance

And the winners are…

Page 81: On Darwinism and Side  Channel  Resistance

Illustration

Page 82: On Darwinism and Side  Channel  Resistance

What Advantages?

• Little technologic assumptions on leakage model.• Take any off the shelf memory chip and at the

cost of – Simple measurements – (intensive) one-time calculations– Reduction of the useful storage capacity

turn this memory into more side-channel-resistant memory.