and an Application to Masking in Hardware Gatan Cassiers, - - PowerPoint PPT Presentation

β–Ά
and an application to masking in hardware
SMART_READER_LITE
LIVE PREVIEW

and an Application to Masking in Hardware Gatan Cassiers, - - PowerPoint PPT Presentation

From Trivial Composition to Full Verification and an Application to Masking in Hardware Gatan Cassiers, Franois-Xavier Standaert UCLouvain (Belgium) VeriSiCC Seminar, Paris, France, September 2019 Side-Channel Analysis Side-Channel


slide-1
SLIDE 1

From Trivial Composition to Full Verification and an Application to Masking in Hardware

GaΓ«tan Cassiers, FranΓ§ois-Xavier Standaert

UCLouvain (Belgium)

VeriSiCC Seminar, Paris, France, September 2019

slide-2
SLIDE 2

Side-Channel Analysis

slide-3
SLIDE 3

Side-Channel Analysis

slide-4
SLIDE 4

Side-Channel Analysis

slide-5
SLIDE 5

Side-Channel Analysis

slide-6
SLIDE 6

Side-Channel Analysis

slide-7
SLIDE 7

Side-Channel Analysis

slide-8
SLIDE 8

Masking (e.g., Boolean 𝑦 = 𝑦0 + 𝑦1 + β‹― + 𝑦𝑒)

Noisy leakages security: Goal (ideally): 𝑂 ∝

𝑑

MI(π‘Œ;𝑴) MI π‘Œ; 𝑴 < MI π‘Œπ‘—; 𝑀𝑗 𝑒

slide-9
SLIDE 9

Masking (e.g., Boolean 𝑦 = 𝑦0 + 𝑦1 + β‹― + 𝑦𝑒)

Noisy leakages security: Goal (ideally): 𝑂 ∝

𝑑

MI(π‘Œ;𝑴) MI π‘Œ; 𝑴 < MI π‘Œπ‘—; 𝑀𝑗 𝑒 Bounded moment security: ΰ·‘

𝑗1,𝑗2,…,π‘—π‘’βˆ’1

𝑀𝑗 π‘Œ

(𝑒-1)th order statistical moment (ideally)

slide-10
SLIDE 10

Bounded moment security: ΰ·‘

𝑗1,𝑗2,…,π‘—π‘’βˆ’1

𝑀𝑗 π‘Œ

(𝑒-1)th order statistical moment (ideally)

Masking (e.g., Boolean 𝑦 = 𝑦0 + 𝑦1 + β‹― + 𝑦𝑒)

Noisy leakages security: Goal (ideally): 𝑂 ∝

𝑑

MI(π‘Œ;𝑴) MI π‘Œ; 𝑴 < MI π‘Œπ‘—; 𝑀𝑗 𝑒 Probing security: Sets of (𝑒-1) probes are of π‘Œ (ideally)

𝑦 = 𝑦0 + 𝑦1 + β‹― + 𝑦𝑒

slide-11
SLIDE 11

Security reductions

noisy leakages bounded moment probing

abstract-qualitative physical-qualitative physical-quantitative

[Barthe et al., Eurocrypt 2017]

[Duc et al., Eurocrypt 2014]

𝑦 = 𝑦0 + 𝑦1 + β‹― + 𝑦𝑒

slide-12
SLIDE 12

What can go wrong? (e.g., when computing 𝑏. 𝑐)

𝑏1𝑐1 𝑏1𝑐2 𝑏1𝑐3 𝑏2𝑐1 𝑏2𝑐2 𝑏2𝑐3 𝑏3𝑐1 𝑏3𝑐2 𝑏3𝑐3 β‡’ 𝑑1 𝑑2 𝑑3

Example: probing 𝑑1 = 𝑏1. 𝑐1 + 𝑐2 + 𝑐3 reveals information on 𝑐 (when 𝑑1 = 1) Issue #1. Lack of randomness (can break the independence assumption)

slide-13
SLIDE 13

What can go wrong? (e.g., when computing 𝑏. 𝑐)

𝑏1𝑐1 𝑏1𝑐2 𝑏1𝑐3 𝑏2𝑐1 𝑏2𝑐2 𝑏2𝑐3 𝑏3𝑐1 𝑏3𝑐2 𝑏3𝑐3 + 𝑠

1

𝑠

2

𝑠

2

𝑠

3

𝑠

2

𝑠

3

β‡’ 𝑑1 𝑑2 𝑑3

Issue #1. Lack of randomness (can break the independence assumption)

  • mitigated by adding

Β«refreshing gadgets Β»

  • can be analyzed in

the probing model

slide-14
SLIDE 14
  • mitigated by adding

Β«refreshing gadgets Β»

  • can be analyzed in

the probing model

What can go wrong? (e.g., when computing 𝑏. 𝑐)

𝑏1𝑐1 𝑏1𝑐2 𝑏1𝑐3 𝑏2𝑐1 𝑏2𝑐2 𝑏2𝑐3 𝑏3𝑐1 𝑏3𝑐2 𝑏3𝑐3 + 𝑠

1

𝑠

2

𝑠

2

𝑠

3

𝑠

2

𝑠

3

β‡’ 𝑑1 𝑑2 𝑑3

Issue #1. Lack of randomness (can break the independence assumption) Example: glitches (transcient values) Β« re-combine Β» the shares such that:

(detected in the bounded moment model)

𝑀𝑗 = πœ€(𝑦1 βˆ™ 𝑦2 βˆ™ 𝑦3) Issue #2. Physical defaults

(can break the independence assumption)

slide-15
SLIDE 15
  • mitigated by adding

Β«refreshing gadgets Β»

  • can be analyzed in

the probing model

What can go wrong? (e.g., when computing 𝑏. 𝑐)

𝑏1𝑐1 𝑏1𝑐2 𝑏1𝑐3 𝑏2𝑐1 𝑏2𝑐2 𝑏2𝑐3 𝑏3𝑐1 𝑏3𝑐2 𝑏3𝑐3 + 𝑠

1

𝑠

2

𝑠

2

𝑠

3

𝑠

2

𝑠

3

β‡’ 𝑑1 𝑑2 𝑑3

Issue #1. Lack of randomness (can break the independence assumption)

  • mitigated by adding a Β« non-

completeness Β» property

[β‰ˆ Theshold Implementations]

  • abstract property: can be

analyzed in the probing model! Issue #2. Physical defaults

(can break the independence assumption)

slide-16
SLIDE 16

Technical challenge: scalability

𝒓-probing security [ISW, 2004]: any π‘Ÿ-tuple of shares in the protected circuit is independent

  • f any sensitive variable
slide-17
SLIDE 17

Technical challenge: scalability

𝒓-probing security [ISW, 2004]: any π‘Ÿ-tuple of shares in the protected circuit is independent

  • f any sensitive variable

Problem: the cost of testing probing security increases (very) fast with circuit size and the # of shares (since βˆƒ many tuples)

slide-18
SLIDE 18

Technical challenge: scalability

𝒓-probing security [ISW, 2004]: any π‘Ÿ-tuple of shares in the protected circuit is independent

  • f any sensitive variable

Problem: the cost of testing probing security increases (very) fast with circuit size and the # of shares (since βˆƒ many tuples)

  • Solution #1: direct verification of (weaker) circuit properties
  • [Barthe et al., 2015/2019], [Bloem et al., 2018]
  • Solution #2: composable verification with (stronger) properties
  • [Barthe et al., 2016] – but limited to β€œabstract” circuits
  • Solution #3: test more specific properties [Arribas et al., 2018]
slide-19
SLIDE 19

Technical challenge: scalability

𝒓-probing security [ISW, 2004]: any π‘Ÿ-tuple of shares in the protected circuit is independent

  • f any sensitive variable

Problem: the cost of testing probing security increases (very) fast with circuit size and the # of shares (since βˆƒ many tuples)

  • Solution #1: direct verification of (weaker) circuit properties
  • [Barthe et al., 2015/2019], [Bloem et al., 2018]
  • Solution #2: composable verification with (stronger) properties
  • [Barthe et al., 2016] – but limited to β€œabstract” circuits
  • Can be complementary: use #1 for gadgets, #2 for circuits
slide-20
SLIDE 20

Does it go wrong (for hardware masking)?

  • State-of-the-art hardware-oriented masking schemes
  • Consolidating Masking Scheme (CMS, 2015)
  • Domain-Oriented Masking (DOM, 2016)
  • Unified Masking Approach (UMA, 2017)
  • Generic Low-Latency Masking (GLM, 2018)
slide-21
SLIDE 21

Does it go wrong (for hardware masking)?

  • State-of-the-art hardware-oriented masking schemes
  • Consolidating Masking Scheme (CMS, 2015)
  • Domain-Oriented Masking (DOM, 2016)
  • Unified Masking Approach (UMA, 2017)
  • Generic Low-Latency Masking (GLM, 2018)
  • Intuitively appealing constructions
  • But no probing security proof at high orders
  • Theoretical concern or practical risk?
slide-22
SLIDE 22

Does it go wrong (for hardware masking)?

  • State-of-the-art hardware-oriented masking schemes
  • Consolidating Masking Scheme (CMS, 2015)
  • Domain-Oriented Masking (DOM, 2016)
  • Unified Masking Approach (UMA, 2017)
  • Generic Low-Latency Masking (GLM, 2018)
  • Intuitively appealing constructions
  • But no probing security proof at high orders
  • Theoretical concern or practical risk?
  • [Moos et al., 2019]: all the higher-order extensions of

these schemes are affected by concrete flaws

  • Next: CMS (local) and DOM (composability) examples…
slide-23
SLIDE 23

Consolidating Masking Scheme

  • Local flaw in the β€œring refreshing” algorithm
  • Attack with 3 probes for any d>3 shares

Problem: most of the randomness cancels out…

slide-24
SLIDE 24

Consolidating Masking Scheme

  • Local flaw in the β€œring refreshing” algorithm
  • Attack with 3 probes for any d>3 shares

Problem: most of the randomness cancels out… Fix proposed by De Cnudde (β‡’ CMS more similar to DOM) Composability remains unclear

slide-25
SLIDE 25

Composability requirements (example)

π‘Ÿ1 internal probes π‘Ÿ2 output probes π‘Ÿ1 + π‘Ÿ2 ≀ π‘Ÿ 𝒓-(Strong) Non Interference [Barthe et al., CCS 2016]: a circuit gadget (e.g., f1) is NI (SNI) any set of π‘Ÿ1 + π‘Ÿ2 probes can be simulated with at most π‘Ÿ1 + π‘Ÿ2 (only π‘Ÿ1) shares of each input D(input shares||probes) β‰ˆ D(input shares||simulation)

slide-26
SLIDE 26

Composability requirements (example)

π‘Ÿ1 internal probes π‘Ÿ2 output probes π‘Ÿ1 + π‘Ÿ2 ≀ π‘Ÿ 𝒓-(Strong) Non Interference [Barthe et al., CCS 2016]: a circuit gadget (e.g., f1) is NI (SNI) any set of π‘Ÿ1 + π‘Ÿ2 probes can be simulated with at most π‘Ÿ1 + π‘Ÿ2 (only π‘Ÿ1) shares of each input D(input shares||probes) β‰ˆ D(input shares||simulation) Theorem [trivial composition] β‰ˆ any composition of q-SNI gadget is q-SNI

slide-27
SLIDE 27

Domain Oriented Masking

  • Two algorithms: DOM-indep and DOM-dep
  • DOM-indep not sufficient to compose, e.g., z=xβŠ—x
slide-28
SLIDE 28

Domain Oriented Masking

  • Two algorithms: DOM-indep and DOM-dep
  • DOM-indep not sufficient to compose, e.g., z=xβŠ—x

β‡’ DOM-dep critical to compose but broken (& no fix)

slide-29
SLIDE 29

Domain Oriented Masking

  • Two algorithms: DOM-indep and DOM-dep
  • DOM-indep not sufficient to compose, e.g., z=xβŠ—x

β‡’ DOM-dep critical to compose but broken (& no fix)

  • SOTA (2018): βˆƒ composable masking schemes that

ignore physical defaults such as glitches & hardware-

  • riented masking schemes that mitigate glitches but

are at best probing secure (so not provably composable)

slide-30
SLIDE 30

(Refined) model and security definition

Glitch-extended probes: probing any output of a combinatorial circuit allows the adversary to

  • bserve all the circuit inputs

Example: π‘ž1 gives 𝑏, 𝑐 and 𝑑

π‘ž1

slide-31
SLIDE 31

(Refined) model and security definition

Glitch-extended probes: probing any output of a combinatorial circuit allows the adversary to

  • bserve all the circuit inputs

Example: π‘ž1 gives 𝑏, 𝑐 and 𝑑

π‘ž1

(SNI-related) clarification: the adversary can also probe the stable register output 𝑒 so both π‘ž1 and π‘ž2 appear in proofs

π‘ž2

slide-32
SLIDE 32

(Refined) model and security definition

Glitch-extended probes: probing any output of a combinatorial circuit allows the adversary to

  • bserve all the circuit inputs

Example: π‘ž1 gives 𝑏, 𝑐 and 𝑑

Definition: a gadget is glitch-robust 𝒓-SNI if it is π‘Ÿ-SNI in the β€œglitch-extended” probing model

π‘ž1

(SNI-related) clarification: the adversary can also probe the stable register output 𝑒 so both π‘ž1 and π‘ž2 appear in proofs

π‘ž2

slide-33
SLIDE 33

(Refined) model and security definition

Glitch-extended probes: probing any output of a combinatorial circuit allows the adversary to

  • bserve all the circuit inputs

Example: π‘ž1 gives 𝑏, 𝑐 and 𝑑

Definition: a gadget is glitch-robust 𝒓-SNI if it is π‘Ÿ-SNI in the β€œglitch-extended” probing model

π’’πŸ

(SNI-related) clarification: the adversary can also probe the stable register output 𝑒 so both π‘ž1 and π‘ž2 appear in proofs

β‡’ Shares’ fan in of secure gadgets should be minimum

π‘ž2

slide-34
SLIDE 34

(Refined) model and security definition

Glitch-extended probes: probing any output of a combinatorial circuit allows the adversary to

  • bserve all the circuit inputs

Example: π‘ž1 gives 𝑏, 𝑐 and 𝑑

Definition: a gadget is glitch-robust 𝒓-SNI if it is π‘Ÿ-SNI in the β€œglitch-extended” probing model

π’’πŸ

(SNI-related) clarification: the adversary can also probe the stable register output 𝑒 so both π‘ž1 and π‘ž2 appear in proofs

β‡’ Shares’ fan in of secure gadgets should be minimum β‡’ Output probes (excluded in the SNI count) must be stable

π’’πŸ‘

slide-35
SLIDE 35
  • TI gadget + SNI refresh + register: robust against

glitches & composable without glitches (not both)

  • Extended probe on c’ reveals all R’s randomness

Note: the problem must be solved jointly

slide-36
SLIDE 36
  • TI gadget + SNI refresh + register: robust against

glitches & composable without glitches (not both)

  • Extended probe on c’ reveals all R’s randomness
  • Adding a register does not help (just probe c)

Note: the problem must be solved jointly

slide-37
SLIDE 37

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

Example with:

  • 𝑒 = 3
  • π‘Ÿ = 2
slide-38
SLIDE 38

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

The adversary can observe:

  • 12 glitch-extended probes
  • 𝑣𝑗,π‘˜β€™s and 𝑑𝑗’s
  • 3 stable (output) probes 𝑑𝑗’s

β‡’ We need to describe a simulator using π‘Ÿ1 shares/input

slide-39
SLIDE 39

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 1st example: 2 extended probes
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • G 𝑑1 ≔ 𝑣1,1, 𝑣2,1, 𝑣3,1

to simul. with 2 shares/input

slide-40
SLIDE 40

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 1st example: 2 extended probes
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • G 𝑑1 ≔ 𝑣1,1, 𝑣2,1, 𝑣3,1

β–ͺ

𝑏1, 𝑐2: use a 1st share of 𝑏, 𝑐 β–ͺ 𝑠

1,2: random value

β–ͺ 𝑣1,1 (𝑏1𝑐1): use a 2nd share of 𝑐 β–ͺ 𝑣2,1 (𝑏2𝑐1): use a 2nd share of a β–ͺ 𝑣3,1 (𝑏3𝑐1 + 𝑠

1,3): random value

slide-41
SLIDE 41

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 1st example: 2 extended probes
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • G 𝑑1 ≔ 𝑣1,1, 𝑣2,1, 𝑣3,1

β–ͺ

𝑏1, 𝑐2: use a 1st share of 𝑏, 𝑐 β–ͺ 𝑠

1,2: random value

β–ͺ 𝑣1,1 (𝑏1𝑐1): use a 2nd share of 𝑐 β–ͺ 𝑣2,1 (𝑏2𝑐1): use a 2nd share of a β–ͺ 𝑣3,1 (𝑏3𝑐1 + 𝑠

1,3): random value

slide-42
SLIDE 42

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 1st example: 2 extended probes
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • G 𝑑1 ≔ 𝑣1,1, 𝑣2,1, 𝑣3,1

β–ͺ

𝑏1, 𝑐2: use a 1st share of 𝑏, 𝑐 β–ͺ 𝑠

1,2: random value

β–ͺ 𝑣1,1 (𝑏1𝑐1): use a 2nd share of 𝑐 β–ͺ 𝑣2,1 (𝑏2𝑐1): use a 2nd share of a β–ͺ 𝑣3,1 (𝑏3𝑐1 + 𝑠

1,3): random value

slide-43
SLIDE 43

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 1st example: 2 extended probes
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • G 𝑑1 ≔ 𝑣1,1, 𝑣2,1, 𝑣3,1

β–ͺ

𝑏1, 𝑐2: use a 1st share of 𝑏, 𝑐 β–ͺ 𝑠

1,2: random value

β–ͺ 𝑣1,1 (𝑏1𝑐1): use a 2nd share of 𝑐 β–ͺ 𝑣2,1 (𝑏2𝑐1): use a 2nd share of 𝑏 β–ͺ 𝑣3,1 (𝑏3𝑐1 + 𝑠

1,3): random value

slide-44
SLIDE 44

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 1st example: 2 extended probes
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • G 𝑑1 ≔ 𝑣1,1, 𝑣2,1, 𝑣3,1

β–ͺ

𝑏1, 𝑐2: use a 1st share of 𝑏, 𝑐 β–ͺ 𝑠

1,2: random value

β–ͺ 𝑣1,1 (𝑏1𝑐1): use a 2nd share of 𝑐 β–ͺ 𝑣2,1 (𝑏2𝑐1): use a 2nd share of 𝑏 β–ͺ 𝑣3,1 (𝑏3𝑐1 + 𝑠

1,3): random value

slide-45
SLIDE 45

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 2nd example: 1 extended probe
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • Non-extended 𝑑1

β–ͺ to simul. with 1 share/input

slide-46
SLIDE 46

ISW mult. is glitch-robust π‘Ÿ-SNI in 2 cycles

  • 2nd example: 1 extended probe
  • G(𝑣1,2) ≔ 𝑏1, 𝑐2, 𝑠

1,2

  • Non-extended 𝑑1

β–ͺ

𝑏1, 𝑐2: use a 1st share of 𝑏, 𝑐 β–ͺ 𝑠

1,2: random value

β–ͺ 𝑑1: random value (simulation with 1 share/input impossible with an extended probe on 𝑑1)

slide-47
SLIDE 47

DOM-indep is glitch-robust π‘Ÿ-NI in 1 cycle

  • Output probes can be extended

β‡’ simulation of G(𝑣1,2) and G(𝑑1) impossible without the three input shares of 𝑏 & 𝑐

𝑑1 𝑑2 𝑑3

slide-48
SLIDE 48
  • [Faust et al., 2018]: glitch-robust SNI mult. in 2 cycles
  • DOM-indep: glitch-robust NI mult. in 1 cycle
  • What can we construct based on that?

Approaches to composition

slide-49
SLIDE 49
  • [Faust et al., 2018]: glitch-robust SNI mult. in 2 cycles
  • DOM-indep: glitch-robust NI mult. in 1 cycle
  • What can we construct based on that?
  • [Cassiers et al., 2019] proof that any compositional

strategy that is correct in the standard probing model remains valid in the robust probing model

Approaches to composition

slide-50
SLIDE 50
  • [Faust et al., 2018]: glitch-robust SNI mult. in 2 cycles
  • DOM-indep: glitch-robust NI mult. in 1 cycle
  • What can we construct based on that?
  • [Cassiers et al., 2019] proof that any compositional

strategy that is correct in the standard probing model remains valid in the robust probing model β‡’ Both trivial composition (e.g., using only SNI gadgets)

  • r optimized composition (e.g., combining NI/SNI

multiplications with SNI refreshes) can work

β‰ˆ tradeoff between verification complexity and performance

Approaches to composition

slide-51
SLIDE 51
  • [Faust et al., 2018]: glitch-robust SNI mult. in 2 cycles
  • DOM-indep: glitch-robust NI mult. in 1 cycle
  • What can we construct based on that?
  • [Cassiers et al., 2019] proof that any compositional

strategy that is correct in the standard probing model remains valid in the robust probing model β‡’ Both trivial composition (e.g., using only SNI gadgets)

  • r optimized composition (e.g., combining NI/SNI

multiplications with SNI refreshes) can work

β‰ˆ tradeoff between verification complexity and performance

  • Next: focus on trivial composition (natural first step

& instrumental in our tool for full verification)

Approaches to composition

slide-52
SLIDE 52
  • Linear gadgets enable share isolation

β‡’ Informally we expect trivial composition for free

Improving trivial composition

slide-53
SLIDE 53
  • Linear gadgets enable share isolation

β‡’ Informally we expect trivial composition for free

  • But β€œshare-by-share” linear gadgets are only NI

β‡’ Trivial SNI composition must refresh linear gadgets

Improving trivial composition

slide-54
SLIDE 54
  • [Cassiers & Standaert, 2018]: gadgets should behave

(w.r.t. simulatability) as if shares were isolated β‡’ β€œshare-by-share” linear gadgets are PINI (formalizes the idea of circuit share in DOM/TIs)

  • Theorem: any combination of q-PINI gadgets is q-PINI

Probe Isolating Non-Interference (PINI)

slide-55
SLIDE 55
  • [Cassiers & Standaert, 2018]: gadgets should behave

(w.r.t. simulatability) as if shares were isolated β‡’ β€œshare-by-share” linear gadgets are PINI (formalizes the idea of circuit share in DOM/TIs)

  • Theorem: any combination of q-PINI gadgets is q-PINI
  • Used to prove a strategy by

[Goudarzi & Rivain, 2017]

  • But can lead to much more…

Probe Isolating Non-Interference (PINI)

is PINI

slide-56
SLIDE 56
  • (βˆƒ more efficient PINI multiplications in software)

Hardware Private Circuits

slide-57
SLIDE 57
  • (βˆƒ more efficient PINI multiplications in software)
  • Significantly improves trivial composition in hardware

Hardware Private Circuits

robust SNI Ref. robust SNI AND [Faust et al., 2018]: SNI-based PINI mult. in 4 cycles

slide-58
SLIDE 58
  • (βˆƒ more efficient PINI multiplications in software)
  • Significantly improves trivial composition in hardware

Hardware Private Circuits

robust SNI Ref. robust SNI AND [Faust et al., 2018]: SNI-based PINI mult. in 4 cycles [Cassiers et al., 2019]: PINI maintained without output register & refresh randomness can be accumulated off-path (…remember this would not work with SNI)

slide-59
SLIDE 59
  • (βˆƒ more efficient PINI multiplications in software)
  • Significantly improves trivial composition in hardware

Hardware Private Circuits

robust SNI Ref. robust SNI AND [Faust et al., 2018]: SNI-based PINI mult. in 4 cycles [Cassiers et al., 2019]: PINI maintained without output register & refresh randomness can be accumulated off-path

slide-60
SLIDE 60
  • (βˆƒ more efficient PINI multiplications in software)
  • Significantly improves trivial composition in hardware

β‰ˆ optimization of [Faust et al., 2018] or fix of DOM

Hardware Private Circuits

robust SNI Ref. robust SNI AND [Faust et al., 2018]: SNI-based PINI mult. in 4 cycles [Cassiers et al., 2019]: PINI maintained without output register & refresh randomness can be accumulated off-path

slide-61
SLIDE 61
  • First efficient glitch-resistant masking scheme

that is provably composable at arbitrary orders

  • Further improvements with optimized

composition are an interesting open problem

  • But overheads compared to 1-cycle DOM limited
  • Especially for some S-box structures that can take

advantage of the input refreshing asymmetry

Other PINI advantages

slide-62
SLIDE 62
  • First efficient glitch-resistant masking scheme

that is provably composable at arbitrary orders

  • Further improvements with optimized

composition are an interesting open problem

  • But overheads compared to 1-cycle DOM limited
  • Especially for some S-box structures that can take

advantage of the input refreshing asymmetry

  • Instrumental in the design of full verification tool
  • Composable verification like [Barthe et al., 2016]

that applies to synthetized VHDL code rather than abstract (e.g., glitch-free) circuit descriptions

  • Also captures transitions (thanks to isolation)?

Other PINI advantages

slide-63
SLIDE 63

State-of-the-art tools (roughly)

abstract concrete direct comp.-based

Barthe et al.

(Eurocrypt 2015)

maskComp.

(ACM CCS 2016)

Tight Private Circuits

(Asiacrypt 2018)

REBECCA

(Eurocrypt 2018)

maskVerif

(ESORICS 2019)

fullVerif

(new)

slide-64
SLIDE 64

State-of-the-art tools (roughly)

abstract concrete direct comp.-based

Barthe et al.

(Eurocrypt 2015)

maskComp.

(ACM CCS 2016)

Tight Private Circuits

(Asiacrypt 2018)

REBECCA

(Eurocrypt 2018)

maskVerif

(ESORICS 2019)

fullVerif

(new)

  • βˆƒ other approaches (e.g., spanning multiples cells

like the one by Eldib et al., or aiming at different, more specific, goals like the one of Arribas et al.)

slide-65
SLIDE 65

State-of-the-art tools (roughly)

abstract concrete direct comp.-based

Barthe et al.

(Eurocrypt 2015)

maskComp.

(ACM CCS 2016)

Tight Private Circuits

(Asiacrypt 2018)

REBECCA

(Eurocrypt 2018)

maskVerif

(ESORICS 2019)

fullVerif

(new)

  • βˆƒ other approaches (e.g., spanning multiples cells

like the one by Eldib et al., or aiming at different, more specific, goals like the one of Arribas et al.)

  • Next, first full verification tool that applies to synthetized

HDL code and captures all physical defaults that can be naturally modeled with probes (i.e., transitions & glitches)

slide-66
SLIDE 66

Hardware composition verification tool

Trivial composition makes it simple for the designer: "Just connect PINI gadgets together." Do you really want to write a tool to check that all gadgets are PINI ? for gadget in gadgets: assert gadget.is_pini(); // Uses maskVerif Done ?

slide-67
SLIDE 67

A masked Verilog block cipher implementation

Code:

  • ~30 files
  • ~4k LoC

Parmeters:

  • d = 2,...,16
  • roll_sb = 0, ..., 5
  • roll_lb = 0, 1, 2

15*6*3 = 270 parameter sets Complex code:

  • FSM
  • loops
  • procedurally generated

code

  • pipelining
  • thousands of gadget

instances

  • - ...

Example LoC:

rinrfrs1_chunk[Nrndrfrs1_each-1+ii*Nrndrfrs1_each -: Nrndrfrs1_each] <= {rinrfrs1[(Nrndrfrs1_each/4)*4-1+(ii+8)*Nrndrfrs1_each -: (Nrndrfrs1_each/4)],{(Nrndrfrs1_each/4){1'b0}}, rinrfrs1[(Nrndrfrs1_each/4)*2- 1+(ii+8)*Nrndrfrs1_each -: (Nrndrfrs1_each/4)],{(Nrndrfrs1_each/4){1'b0}}};

Is this thing (glitch,transition)-robust t-probing secure ?

slide-68
SLIDE 68

What could go wrong ?

  • Bad randomness input to gadgets
  • Re-order of wires in a sharing
  • Mix clock signals
  • Mix valid and invalid data
  • Output data at the right cycle
  • Keep state around after computation is over
  • …

Code written by a side-channel expert hardware designer. And no:

  • Use non-PINI gadgets

(Experiment might be biased.)

slide-69
SLIDE 69

Tool workflow

  • 2.5kLoC
  • <10s runtime

Flexible: it is easy to implement

  • ther strategies.
slide-70
SLIDE 70

Tool workflow

  • 2.5kLoC
  • <10s to check

Checking other strategies: 1 box change!

slide-71
SLIDE 71

Source annotations

slide-72
SLIDE 72

Source annotations: composite gadget

slide-73
SLIDE 73

Source annotations: flatten (for the lazy)

slide-74
SLIDE 74

THANKS

http://perso.uclouvain.be/fstandae/