White-Box Cryptography Matthieu Rivain CARDIS 2017 How to protect - - PowerPoint PPT Presentation

white box cryptography
SMART_READER_LITE
LIVE PREVIEW

White-Box Cryptography Matthieu Rivain CARDIS 2017 How to protect - - PowerPoint PPT Presentation

White-Box Cryptography Matthieu Rivain CARDIS 2017 How to protect a cryptographic key? How to protect a cryptographic key? Well, put it in a smartcard of course! ... or any piece of secure hardware But... Secure hardware is expensive


slide-1
SLIDE 1

White-Box Cryptography

Matthieu Rivain

CARDIS 2017

slide-2
SLIDE 2

How to protect a cryptographic key?

slide-3
SLIDE 3

How to protect a cryptographic key?

Well, put it in a smartcard of course! ... or any piece of secure hardware

slide-4
SLIDE 4

But...

∎ Secure hardware is expensive (production,

integration, infrastructures...)

∎ Long lifecycle, limited updates ∎ Bugs, security flaws might occur ▸ e.g. ROCA vulnerability (October 2017)

slide-5
SLIDE 5

Pure software applications

∎ Advantages: cheaper, faster time-to-market,

easier to update

∎ Big trend in ICTs: cloud service + mobile app ∎ HCE-based mobile payment ▸ SE not available ▸ Emulated SE in software ▸ Short-term keys (tokens) ▸ Regular authentication to server (“always on” paradigm)

slide-6
SLIDE 6

Pure software applications

∎ IoT (without SE) ∎ Content protection, DRM ∎ OS / firmwares

slide-7
SLIDE 7

Protecting keys in software?

∎ Potential threats: ▸ malwares ▸ co-hosted applications ▸ users themselves ▸ ... ∎ White-box adversary model ▸ analyse the code ▸ access the memory ▸ tamper with execution ▸ ... ∎ Ex: scan the memory for secret keys

Illustration: Shamir, van Someren. Playing hide and seek with stored keys.

slide-8
SLIDE 8

White-box cryptography

General idea: hide the secret key in an

  • bfuscated cryptographic implementation

Illustration: http://www.whiteboxcrypto.com/

slide-9
SLIDE 9

A scientific timeline

Reign of black-box crypto

slide-10
SLIDE 10

A scientific timeline

1996 1999 timing attacks power analysis Side-channel attacks

Reign of black-box crypto

slide-11
SLIDE 11

1996 1999 timing attacks power analysis Side-channel attacks Cryptographic obfuscation (Barak et al. CRYPTO 2001) Theoretical foundations & impossibility result 2001

Reign of black-box crypto

slide-12
SLIDE 12

1996 1999 timing attacks power analysis Side-channel attacks Cryptographic obfuscation (Barak et al. CRYPTO 2001) Theoretical foundations & impossibility result 2001 White-box cryptography (Chow et al. SAC 2002, DRM 2002) Introduce WBC terminology Describe obfuscated implemen- tations DES and AES 2002

Reign of black-box crypto

slide-13
SLIDE 13

1996 1999 timing attacks power analysis Side-channel attacks Cryptographic obfuscation (Barak et al. CRYPTO 2001) Theoretical foundations & impossibility result 2001 White-box cryptography (Chow et al. SAC 2002, DRM 2002) Introduce WBC terminology Describe obfuscated implemen- tations DES and AES 2002 No WBC land 2004

Reign of black-box crypto

slide-14
SLIDE 14

1996 1999 timing attacks power analysis Side-channel attacks Cryptographic obfuscation (Barak et al. CRYPTO 2001) Theoretical foundations & impossibility result 2001 White-box cryptography (Chow et al. SAC 2002, DRM 2002) Introduce WBC terminology Describe obfuscated implemen- tations DES and AES 2002 No WBC land 2004 First candidates

  • f secure constructions

(Garg et al. EC’13, FOCS’13) Constructions of multilinear maps and indisting. obfuscation (IO) + many many papers 2013

Reign of black-box crypto

slide-15
SLIDE 15

1996 1999 timing attacks power analysis Side-channel attacks Cryptographic obfuscation (Barak et al. CRYPTO 2001) Theoretical foundations & impossibility result 2001 White-box cryptography (Chow et al. SAC 2002, DRM 2002) Introduce WBC terminology Describe obfuscated implemen- tations DES and AES 2002 No WBC land 2004 First candidates

  • f secure constructions

(Garg et al. EC’13, FOCS’13) Constructions of multilinear maps and indisting. obfuscation (IO) + many many papers 2013 Generic attacks Differential Computation Analysis (DCA), Fault Attacks, ... New paradigm 2015

Reign of black-box crypto

slide-16
SLIDE 16

1996 1999 timing attacks power analysis Side-channel attacks Cryptographic obfuscation (Barak et al. CRYPTO 2001) Theoretical foundations & impossibility result 2001 White-box cryptography (Chow et al. SAC 2002, DRM 2002) Introduce WBC terminology Describe obfuscated implemen- tations DES and AES 2002 No WBC land 2004 First candidates

  • f secure constructions

(Garg et al. EC’13, FOCS’13) Constructions of multilinear maps and indisting. obfuscation (IO) + many many papers 2013 Generic attacks Differential Computation Analysis (DCA), Fault Attacks, ... New paradigm 2015 ECRYPT / CHES’17 WBC competition 2017

Reign of black-box crypto

slide-17
SLIDE 17

Overview of this talk

∎ White-box crypto theory ▸ Formal definitions & security notions ∎ White-box crypto practice ▸ Practical constructions & attacks ∎ White-box crypto competition ▸ Wrap-up, break of challenge 777

slide-18
SLIDE 18

White-Box Crypto Theory

slide-19
SLIDE 19

What is a program?

∎ A word in a formal language P ∈ L

execute ∶ L × {0,1}∗ → {0,1}∗ (P,input) ↦ output

(Universal Turing Machine) ∎ ∣P∣: size of P ∈ L ∎ time(P): # operations for execute(P,⋅)

slide-20
SLIDE 20

What is a program?

∎ P ≡ f (P implements f)

∀x ∶ execute(P,x) = f(x)

∎ P1 ≡ P2 (functional equivalence)

∀x ∶ execute(P1,x) = execute(P2,x)

∎ Straight-line programs ▸ no conditional statements, no loops ▸ ∣P∣ = time(P)

slide-21
SLIDE 21

What is an obfuscator?

∎ An algorithm:

P randomness O(P) ≡ P

∎ Size and execution time increase

(hopefully not too much)

slide-22
SLIDE 22

What is a white-box compiler?

k key randomness [Ek] ≡ Ek(·) encryption program ∎ Specific to an encryption function E ∎ Can be constructed from an obfuscator

k → P ≡ Ek(⋅)

O

  • → [Ek]
slide-23
SLIDE 23

What is an adversary?

∎ An algorithm:

O(P)

  • bfuscated

program randomness

  • 1

1 bit of information

∎ Ex: msb of k if P ≡ AESk(⋅) ∎ Wlg: ∄ 1-bit ⇒ ∄ multi-bit

slide-24
SLIDE 24

[Barak et al. – CRYPTO 2001] On the (Im)possibility of Obfuscating Programs

∎ Virtual Black Box (VBB) security notion ∎ Impossibility result: VBB cannot be achieved

for all programs (counterexample)

∎ Indistinguishability Obfuscation (IO)

slide-25
SLIDE 25

VBB security notion

O(P) adversary

  • 1

P

S

simulator

  • 1

x P(x)

∎ O(P) reveals nothing more than the I/O

behavior of P

slide-26
SLIDE 26

Impossibility result

P ∗

inputs secret keys k∗

1, k∗ 2

k P k

?

= k∗

1

P(k∗

1, ⊥) ?

= k∗

2

  • utput k∗

2

  • utput k∗

1

  • utput 0

yes no yes no

P ∗ cannot be VBB obfuscated: ▸ BB access to P ∗ reveals nothing ▸ But O(P ∗)(0,O(P ∗)) = k∗

1

slide-27
SLIDE 27

The good news

∎ The impossibility result does not apply to a

given encryption algorithm

∎ VBB AES might exist

WB-AESk

  • 1

S

  • 1

AESk(·)

m c

∎ The bad news: seems very hard to achieve

slide-28
SLIDE 28

Indistinguishability Obfuscation (IO)

∎ Notion restricted to straight-line programs ∎ For any (P1,P2) st P1 ≡ P2 and ∣P1∣ = ∣P2∣

O(P1)

  • 1

O(P2)

  • 1

∎ i.e. O(P1) and O(P2) are indistinguishable

slide-29
SLIDE 29

Why is IO meaningful?

∎ IO ⇔ Best Possible Obfuscation ∎ For any P ′:

O(P)

  • 1

S

P ′

  • 1

P ′ P

∎ O(P) doesn’t reveal anything more than the

best obfuscated program P ′

slide-30
SLIDE 30

Is IO meaningful for WBC?

∎ IO does not imply resistance to key extraction ∎ For instance Any prog P ≡ AESk(⋅) → Ref implem of AESk(⋅) ∎ Nevertheless

∃P ∗ ≡ AESk(⋅) secure ⇒ ∀P ≡ AESk(⋅) with ∣P∣ ≥ ∣P ∗∣: IO(P) secure

slide-31
SLIDE 31

simple AES VBB AES iO AES

?

Obfuscation scale

slide-32
SLIDE 32

simple AES VBB AES iO AES

?

Obfuscation scale

further white-box security notions

slide-33
SLIDE 33

White-box security notions

∎ Unbreakability: resistance to key extraction WB-AESk k ∎ Basic requirement but insufficient in practice ∎ Other security notions ▸ [SWP09] Towards Security Notions for White-Box Cryptography (ISC 2009) ▸ [DLPR13] White-Box Security Notions for Symmetric Encryption Schemes (SAC 2013)

slide-34
SLIDE 34

One-wayness

∎ One-wayness: hardness of inversion WB-AESk m c m ∎ Turns AES into a public-key cryptosystem ∎ PK crypto with light-weight private operations

slide-35
SLIDE 35

Incompressibility

∎ Incompressibility: hardness of compression

WB-AESk

> 10 GB

AESk

< 10 KB

∎ Makes the implementation less convenient to

share at a large scale

slide-36
SLIDE 36

Incompressibility

∎ Incompressible primitives recently proposed ▸ Bogdanov et al. (CCS 2015, Asiacrypt 2016) ▸ Fouque et al. (Asiacrypt 2016) ∎ But no white-box implementations of a

standard cipher (e.g. AES)

slide-37
SLIDE 37

Security features

∎ Traceability: WB implem traceable

WB-AESk,id Π ≡ AESk(·)

T

id

slide-38
SLIDE 38

Security features

∎ Traceability: WB implem traceable

WB-AESk,id Π ≡ AESk(·)

T

WB-AESk,id1 WB-AESk,id2 WB-AESk,idt id ∈ {id1, id2, . . . , idt}

slide-39
SLIDE 39

Security features

∎ Traceability: WB implem traceable

WB-AESk,id Π ≡ AESk(·)

T

WB-AESk,id1 WB-AESk,id2 WB-AESk,idt id ∈ {id1, id2, . . . , idt}

∎ Password: WB implem locked by password

WB-AESk,π

if (ˆ π == π) return AESk(m) else return ⊥

ˆ π m c c = AESk(m)

max proba 2−|π|

slide-40
SLIDE 40

Some relations

∎ [DLPR13] Perturbation-Value Hiding notion:

PVH ⇒ traceability

∎ If the underlying encryption scheme is secure: INC ⇓ OW ⇒ UBK ⇐ PVH

slide-41
SLIDE 41

Some relations

∎ [DLPR13] Perturbation-Value Hiding notion:

PVH ⇒ traceability

∎ If the underlying encryption scheme is secure: INC ⇓ VBB ⇒ OW ⇒ UBK ⇐ PVH ⇐ VBB

slide-42
SLIDE 42

Some relations

∎ [DLPR13] Perturbation-Value Hiding notion:

PVH ⇒ traceability

∎ If the underlying encryption scheme is secure: VBB

  • INC

⇓ VBB ⇒ OW ⇒ UBK ⇐ PVH ⇐ VBB

slide-43
SLIDE 43

Some relations

∎ [DLPR13] Perturbation-Value Hiding notion:

PVH ⇒ traceability

∎ If the underlying encryption scheme is secure: VBB

  • INC

⇓ VBB ⇒ OW ⇒ UBK ⇐ PVH ⇐ VBB ∎ No UBK construction known for AES ⇒ no OW/INC/PVH/VBB construction neither

slide-44
SLIDE 44

IO constructions

∎ Very active research field ▸ 18 papers in 2017 (IACR conferences) ▸ 22 papers in 2016 (IACR conferences) ∎ Most constructions rely on multilinear maps

e ∶ (ge1

1 ,ge2 2 ,...,ged d )

→ g e1 ⋅ e2 ⋯ ed

T

(or noisy variants)

∎ Many breaks, security still under investigation ∎ Performances far beyond practical applications

slide-45
SLIDE 45

White-Box Crypto Practice

slide-46
SLIDE 46

Original white-box AES

∎ SAC 2002: “White-Box Cryptography and an

AES Implementation” (Chow et al. )

∎ First step: network of look-up tables ∎ Each round split in 4 sub-rounds

(x0,x5,x10,x15) ↦ ⎛ ⎜ ⎜ ⎜ ⎝ 02 03 01 01 01 02 03 01 01 01 02 03 03 01 01 02 ⎞ ⎟ ⎟ ⎟ ⎠ ⊗ ⎛ ⎜ ⎜ ⎜ ⎝ S(x0 ⊕ k0) S(x5 ⊕ k5) S(x10 ⊕ k10) S(x15 ⊕ k15) ⎞ ⎟ ⎟ ⎟ ⎠

slide-47
SLIDE 47

Original white-box AES

∎ Computed as

T0[x0] ⊕ T5[x5] ⊕ T10[x10] ⊕ T15[x15]

∎ Tables Ti ∶ 8 bits → 32 bits

T0[x] = S(x ⊕ k0) × (02 01 01 03)T T5[x] = S(x ⊕ k5) × (03 02 01 01)T T10[x] = S(x ⊕ k10) × (01 03 02 01)T T15[x] = S(x ⊕ k15) × (01 01 03 02)T

∎ XOR table: 8 bits → 4 bits

Txor[x0∣∣x1] = x0 ⊕ x1

slide-48
SLIDE 48

Original white-box AES

Illustration: J. Muir “A Tutorial on White-box AES” (ePrint 2013)

slide-49
SLIDE 49

Original white-box AES

∎ Second step: randomize look-up tables ∎ Each table T is replaced by

T ′ = g ○ T ○ f −1 where f,g are random encodings

∎ For two connected tables T, R

T ′ = g ○ T ○ f −1 R′ = h ○ R ○ g−1 ⇒ R′○T ′ = h○(R○T)○f −1

slide-50
SLIDE 50

Original white-box AES

∎ Intuition: encoded tables bring no information ∎ True for a single (bijective) table g ○ T ○ f −1 ∎ Not for the large picture

Illustration: J. Muir “A Tutorial on White-box AES” (ePrint 2013)

slide-51
SLIDE 51

Many breaks

∎ First break: BGE attack ▸ Billet et al. Cryptanalysis of a White Box AES Implementation (SAC 2004) ∎ Generic attack on WB SPN ciphers ▸ Michiels et al. Cryptanalysis of a Generic Class of White-Box Implementations (SAC 2008) ∎ Collision attack & improved BGE attack ▸ Lepoint et al. Two Attacks on a White-Box AES Implementation (SAC 2013) ∎ Attack complexity ∼ 222

slide-52
SLIDE 52

Example: collision attack

02 ⋅ S0(α) ⊕ 03 ⋅ S1(0) = 02 ⋅ S0(0) ⊕ 03 ⋅ S1(β) where S0(x) = S(P0(x) ⊕ k0) and S1(x) = S(P1(x) ⊕ k1)

slide-53
SLIDE 53

Patches and variants

∎ Perturbed WB-AES using MV crypto (Bringer et al. ePrint 2006)

⇒ broken (De Mulder et al. INDOCRYPT 2010)

∎ WB-AES based on wide linear encodings (Xiao-Lai, CSA 2009)

⇒ broken (De Mulder et al. SAC 2012)

∎ WB-AES based on dual AES ciphers (Karroumi, ICISC 2010)

⇒ broken (Lepoint et al. SAC 2013)

∎ Same situation with DES

slide-54
SLIDE 54

Secret design paradigm

∎ Industrial need ▸ home-made solutions ▸ mix of several obfuscation techniques ▸ secret designs ∎ Security evaluations by ITSEF labs ∎ Development of generic attacks ▸ Fault attacks, DCA ▸ Avoid costly reverse engineering effort

slide-55
SLIDE 55

Fault attacks

∎ Easy fault injection in the white-box context ∎ Plenty of efficient FA techniques (on e.g. AES)

MC SB SR

k10 k11 fault injection round 9 round 10

∎ Original white-box AES vulnerable to this attack

slide-56
SLIDE 56

Differential Computation Analysis

∎ Suggested by NXP / Riscure ▸ Presentation at BalckHat 2015 ▸ Best paper award CHES 2016 ∎ Record data-dependent information at

execution ⇒ computation trace

Trace: J. Bos (presentation CHES 2016)

∎ Apply DPA techniques to computation traces

slide-57
SLIDE 57

Differential Computation Analysis

computation traces

. . .

predictions

S(x1 ⊕ k) S(x2 ⊕ k)

. . .

S(xN ⊕ k)

correlation

ρ( · , · )

k = k∗ k = k∗

slide-58
SLIDE 58

DCA in presence of encodings

∎ DCA can break the original white-box AES ▸ [Bos et al. CHES 2016] Differential Computation Analysis ∎ Why? ▸ random encodings are hardcoded ▸ for some Enc, we might have ρ(xi,Enc(x)j) ≫ 0 ▸ especially with 4-bit encodings Enc(x0 ∣∣ x1) = Enc(x0) ∣∣ Enc(x1)

slide-59
SLIDE 59

DCA experiment

∎ Random 4-bit encoding Enc ∎ Correlation ρ(S(x ⊕ k)0, Enc(S(x ⊕ k∗))j)

5 10 15 20 0.4 0.2 0.2 0.4

Bit 0

5 10 15 20 0.4 0.2 0.2 0.4

Bit 1

5 10 15 20 0.4 0.2 0.2 0.4

Bit 2

5 10 15 20 0.4 0.2 0.2

Bit 3

slide-60
SLIDE 60

DCA experiment

∎ With another (4-bit) encoding

5 10 15 20 0.2 0.2 0.4

Bit 0

5 10 15 20 0.4 0.2 0.2

Bit 1

5 10 15 20 0.4 0.2 0.2 0.4

Bit 2

5 10 15 20 0.4 0.2 0.2 0.4

Bit 3

∎ Most of the time 1, 2, or 3 bits leak

slide-61
SLIDE 61

Countermeasures?

∎ Natural approach: use known SCA/FA

countermeasures

AESk m c

AESk

masking, shuffling, ...

m c

RNG

RNG AESk

masking, shuffling, ...

AESk

masking, shuffling, ...

m

error detection

c

slide-62
SLIDE 62

Countermeasures?

Pseudo RNG

AESk

masking, shuffling, ...

AESk

masking, shuffling, ...

m

error detection

c

∎ Pseudo-randomness from m ∎ PRNG should be somehow secret

slide-63
SLIDE 63

Countermeasures?

Pseudo RNG

AESk

masking, shuffling, ...

AESk

masking, shuffling, ...

m

error detection

c

On-top obfuscation

∎ Countermeasures hard to remove ∎ P-randomness / redundancy hard to detect

slide-64
SLIDE 64

Open problems

∎ How to obfuscate the countermeasures? ∎ How to generate pseudo-randomness? ∎ Resistance to higher-order DCA, multiple FA?

slide-65
SLIDE 65

White-Box Crypto Competition

slide-66
SLIDE 66
slide-67
SLIDE 67

WhibOx Contest

∎ Goal: confront designers and attackers in the

secret design paradigm

∎ Designers could submit WB AES implems: ▸ C source code ≤ 50MB ▸ executable ≤ 20MB ▸ RAM consumption ≤ 20MB ▸ running time ≤ 1sc ∎ Attackers could try to recover the keys of

submitted implems

slide-68
SLIDE 68

Score system

∎ Unbroken implem on day n

1 + 2 + ⋯ + n = n(n + 1) 2 ST

∎ Break on day n ▸ Designer gets n(n+1)

2

ST points ▸ Attacker gets n(n+1)

2

BN points ▸ Challenge score starts decreasing symmetrically

slide-69
SLIDE 69

Strawberry scores over time

Strawberry scores over time

slide-70
SLIDE 70

Strawberry scores over time

No implementation got more than 1 before 08/20

Strawberry scores over time

slide-71
SLIDE 71

Strawberry scores over time

No implementation got more than 1 before 08/20 Everything was broken in the end!

Strawberry scores over time

slide-72
SLIDE 72

Strawberry scores over time

No implementation got more than 1 before 08/20 Everything was broken in the end! Outstanding winner

Strawberry scores over time

slide-73
SLIDE 73

Strawberry scores over time

No implementation got more than 1 before 08/20 Everything was broken in the end! Outstanding winner Several challenging implementations

Strawberry scores over time

slide-74
SLIDE 74

Results

∎ 94 submitted implementations ∎ ∼ 870 breaks ∎ Socreboard:

id designer breaker score # days # breaks 777 cryptolux team cryptoexperts 406 28 1 815 grothendieck cryptolux 78 12 1 753 sebastien-riou cryptolux 66 11 3 877 chaes You! 55 10 2 845 team4 cryptolux 36 8 2

cryptolux: Biryukov, Udovenko team cryptoexperts: Goubin, Paillier, Rivain, Wang

slide-75
SLIDE 75

Implementation 777

∎ Several obfuscation layers ▸ Encoded Boolean circuit ▸ Bitslicing, error detection, dummy operations ▸ Virtualization, naming obfuscation ∎ Code size: 28 MB ∎ Code lines: 2.3 K ∎ 12 global variables ▸ pDeoW: computation state (2.1 MB) ▸ JGNNvi: program bytecode (15.3 MB)

slide-76
SLIDE 76

Implementation 777

∎ 1020 functions of the form

slide-77
SLIDE 77

Analysis of functions

∎ Table of function pointers indexed by bytecode ∎ Only 210 functions are called (over 1020) ∎ Ducplicates of 21 different functions ▸ memory reading/writing ▸ bitwise operations, bit shifts ▸ goto, conditional jump

slide-78
SLIDE 78

De-virtualisation

Simulation ⇒ equivalent program with do-while loops

  • f arithmetic instructions
slide-79
SLIDE 79

Human reverse engineering

∎ Remove some dummy loops ∎ Get sequence of 64-loops of 64-bit instructions ▸ First part: 64×64 bitslice program ▸ 3 instances with the input plaintext ▸ rest with hardcoded values ▸ Second part: (probably) error detection and extraction of the ciphertext ∎ Extract a Boolean circuit with ∼ 600K gates

slide-80
SLIDE 80

SSA form

∎ Put it in Static Single Assignment (SSA) form:

x = ... x = ... y = ... y = ... t = ¬x t1 = ¬x x = t ⊕ y ⇒ t2 = t1 ⊕ y y = y ∧ t t3 = y ∧ t1 t = x ∨ y t4 = t2 ∨ t3 ⋮ ⋮

slide-81
SLIDE 81

Circuit minimization

Detect (over many executions) and remove:

∎ Dummy variable: ti never used? ∎ Constant: ti = 0 ? t1 = 1 ? ∎ Duplicate: ti = tj ? ∎ Pseudo-randomness:

(ti → ti ⊕ 1) ⇒ same result?

∎ Several rounds: ∼600K ⇒ ∼280K gates

slide-82
SLIDE 82

Data dependency analysis

Data dependency graph (20% of the circuit):

slide-83
SLIDE 83

Data dependency analysis

Data dependency graph (10% of the circuit):

slide-84
SLIDE 84

Data dependency analysis

Data dependency graph (5% of the circuit):

slide-85
SLIDE 85

Data dependency analysis

Data dependency graph (5% of the circuit): S-boxes?

slide-86
SLIDE 86

Data dependency analysis

Data dependency graph (5% of the circuit): S-boxes? MixColumn?

slide-87
SLIDE 87

Data dependency analysis

Data dependency graph (5% of the circuit): S-boxes? MixColumn? Initial pseudo- randomness generation?

slide-88
SLIDE 88

Data dependency analysis

∎ Cluster analysis ⇒ gates within one “s-box” ∎ Identify all the outgoing variables:

s1,s2,...,sn

∎ Likely hypothesis:

S(x ⊕ k∗) = Dec(s1,s2,...,sm) for some deterministic decoding function

slide-89
SLIDE 89

Key recovery

∎ Hypothesis: linear decoding function ∎ Record the si’s over n executions

⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ s(1)

1

s(1)

2

⋯ s(1)

m

s(2)

1

s(2)

2

⋯ s(2)

m

⋮ ⋮ ⋱ ⋮ s(n)

1

s(n)

2

⋯ s(n)

m

⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ Sj(x(1) ⊕ k) Sj(x(2) ⊕ k) ⋮ Sj(x(n) ⊕ k) ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ,

slide-90
SLIDE 90

Key recovery

∎ Hypothesis: linear decoding function ∎ Record the si’s over n executions

⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ s(1)

1

s(1)

2

⋯ s(1)

m

s(2)

1

s(2)

2

⋯ s(2)

m

⋮ ⋮ ⋱ ⋮ s(n)

1

s(n)

2

⋯ s(n)

m

⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ Sj(x(1) ⊕ k) Sj(x(2) ⊕ k) ⋮ Sj(x(n) ⊕ k) ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ,

slide-91
SLIDE 91

Key recovery

∎ Hypothesis: linear decoding function ∎ Record the si’s over n executions

⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ s(1)

1

s(1)

2

⋯ s(1)

m

s(2)

1

s(2)

2

⋯ s(2)

m

⋮ ⋮ ⋱ ⋮ s(n)

1

s(n)

2

⋯ s(n)

m

⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ Sj(x(1) ⊕ k) Sj(x(2) ⊕ k) ⋮ Sj(x(n) ⊕ k) ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ,

slide-92
SLIDE 92

Key recovery

∎ Hypothesis: linear decoding function ∎ Record the si’s over n executions

⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ s(1)

1

s(1)

2

⋯ s(1)

m

s(2)

1

s(2)

2

⋯ s(2)

m

⋮ ⋮ ⋱ ⋮ s(n)

1

s(n)

2

⋯ s(n)

m

⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ Sj(x(1) ⊕ k) Sj(x(2) ⊕ k) ⋮ Sj(x(n) ⊕ k) ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ,

slide-93
SLIDE 93

Key recovery

∎ Hypothesis: linear decoding function ∎ Record the si’s over n executions

⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ s(1)

1

s(1)

2

⋯ s(1)

m

s(2)

1

s(2)

2

⋯ s(2)

m

⋮ ⋮ ⋱ ⋮ s(n)

1

s(n)

2

⋯ s(n)

m

⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ × ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ c1 c2 ⋮ cn ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ = ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ Sj(x(1) ⊕ k) Sj(x(2) ⊕ k) ⋮ Sj(x(n) ⊕ k) ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦ ,

∎ Linear system solvable for k = k∗

slide-94
SLIDE 94

Key recovery

∎ And it works! For example: ▸ s-box cluster with n = 34 outgoing variables ▸ using T = 50 executions traces ▸ one solution per Sj for k = k∗ ▸ no solutions for k ≠ k∗

j = 0: 0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 1: 0,0,0,0,0,0,1,0,0,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 2: 0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 3: 0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 4: 0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 5: 0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 6: 0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 7: 0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

slide-95
SLIDE 95

Key recovery

∎ And it works! For example: ▸ s-box cluster with n = 34 outgoing variables ▸ using T = 50 executions traces ▸ one solution per Sj for k = k∗ ▸ no solutions for k ≠ k∗

j = 0: 0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 1: 0,0,0,0,0,0,1,0,0,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 2: 0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 3: 0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 4: 0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 5: 0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 6: 0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 7: 0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

slide-96
SLIDE 96

Key recovery

∎ And it works! For example: ▸ s-box cluster with n = 34 outgoing variables ▸ using T = 50 executions traces ▸ one solution per Sj for k = k∗ ▸ no solutions for k ≠ k∗

j = 0: 0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 1: 0,0,0,0,0,0,1,0,0,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 2: 0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 3: 0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 4: 0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 5: 0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 6: 0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 7: 0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

∎ Decoding (s7,s8,...,s21 ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ

15 outgoing bits

)

× Bin. Mat.

  • → (S0(x ⊕ k∗),...,S7(x ⊕ k∗)

ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ

8 s-box coordinates

)

slide-97
SLIDE 97

Key recovery

∎ And it works! For example: ▸ s-box cluster with n = 34 outgoing variables ▸ using T = 50 executions traces ▸ one solution per Sj for k = k∗ ▸ no solutions for k ≠ k∗

j = 0: 0,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 1: 0,0,0,0,0,0,1,0,0,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 2: 0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 3: 0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 4: 0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 5: 0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 6: 0,0,0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 j = 7: 0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

∎ Decoding (s7,s8,...,s21 ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ

15 outgoing bits

)

× Bin. Mat.

  • → (S0(x ⊕ k∗),...,S7(x ⊕ k∗)

ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ

8 s-box coordinates

)

slide-98
SLIDE 98

Conclusion

∎ Theory: ▸ No provably secure constructions ▸ More work needed on security models & notions ∎ Practice: ▸ Everything broken in the literature ▸ Moving toward a secret design paradigm ▸ More work needed on generic attacks and countermeasures in the white-box context ∎ ECRYPT / CHES’17 competition: ▸ Nothing stood > 28 days ▸ Can obscurity really bring (a bit of) security?