On the spectral features of robust probing security Maria Chiara - - PowerPoint PPT Presentation

on the spectral features of robust probing security
SMART_READER_LITE
LIVE PREVIEW

On the spectral features of robust probing security Maria Chiara - - PowerPoint PPT Presentation

Context Theoretical contribution Applications Complexity Conclusion On the spectral features of robust probing security Maria Chiara Molteni 1 Vittorio Zaccaria 2 1 Dipartimento di Informatica Giovanni Degli Antoni Universit` a degli


slide-1
SLIDE 1

Context Theoretical contribution Applications Complexity Conclusion

On the spectral features of robust probing security

Maria Chiara Molteni1 Vittorio Zaccaria2

1Dipartimento di Informatica ”Giovanni Degli Antoni”

Universit` a degli Studi di Milano

2Department of Electronics, Information and Bioengineering

Politecnico di Milano

Cryptographic Hardware and Embedded Systems (CHES) September 2020

1 / 39

slide-2
SLIDE 2

Context Theoretical contribution Applications Complexity Conclusion

Overview

Context Theoretical contribution Applications Complexity Conclusion

2 / 39

slide-3
SLIDE 3

Context Theoretical contribution Applications Complexity Conclusion

d-probing security

3 / 39

slide-4
SLIDE 4

Context Theoretical contribution Applications Complexity Conclusion

d-probing security

3 / 39

slide-5
SLIDE 5

Context Theoretical contribution Applications Complexity Conclusion

d-probing security

3 / 39

slide-6
SLIDE 6

Context Theoretical contribution Applications Complexity Conclusion

d-probing security

Probing attack

The attacker places a probe on a wire of interest and recover some information about the value carried along that wire during computation.

3 / 39

slide-7
SLIDE 7

Context Theoretical contribution Applications Complexity Conclusion

d-probing security

Definition

A gadget is d-probing secure if, given at most d probes, it is impossible to derive information about the secret values, also encoded in the masks/shares.

Example

x secret, x0 and x1 shares such that x = x0 + x1 1-probing secure NOT 1-probing secure

4 / 39

slide-8
SLIDE 8

Context Theoretical contribution Applications Complexity Conclusion

d-Non Interference security

Definition

A gadget is d-NI if, given at most d probes, it is possible to derive information about at most d masks/shares of any secret value.

Example

x secret, x0 and x1 shares such that x = x0 + x1 1-NI

5 / 39

slide-9
SLIDE 9

Context Theoretical contribution Applications Complexity Conclusion

d-Strong Non Interference security

Definition

A gadget is d-SNI if, given at most d1 internal probes and d2

  • utput probes such that d1 + d2 = d, it is possible to derive

information about at most d1 masks/shares of any secret value.

Example

x secret, x0 and x1 shares such that x = x0 + x1 NOT 1-SNI

6 / 39

slide-10
SLIDE 10

Context Theoretical contribution Applications Complexity Conclusion

d-Strong Non Interference security

Definition

A gadget is d-SNI if, given at most d1 internal probes and d2

  • utput probes such that d1 + d2 = d, it is possible to derive

information about at most d1 secret values, also encoded in the masks/shares.

Example

x secret, x0 and x1 shares such that x = x0 + x1 1-SNI

Internal probe Output probe

7 / 39

slide-11
SLIDE 11

Context Theoretical contribution Applications Complexity Conclusion

Robust Probing Security

Extended Probes

Probes that model the leakage situation in presence of some physical defaults.

Types od Extended probes1

◮ Modelling glitches, i.e. combinatorial recombination ◮ Modelling transitions, i.e. memory recombinations ◮ Modelling couplings, i.e.routing recombinations

  • 1S. Faust et Al., Composable Masking Schemes in the Presence of Physical

Defaults and the Robust Probing Model

8 / 39

slide-12
SLIDE 12

Context Theoretical contribution Applications Complexity Conclusion

Motivation: mathematical improvement

Research standpoint

◮ Previous works: instance-by-instance approaches or tools (maskVerif2) ◮ Our work: new conceptual tools to derive general solutions and rules

Development standpoint

◮ Previous works: efficient approaches might need validation ◮ Our work: further verification approach based on the exact theory of Boolean Functions

  • 2G. Barthe et Al., maskVerif: automated analysis of software and hardware

higher-order masked implementations.

9 / 39

slide-13
SLIDE 13

Context Theoretical contribution Applications Complexity Conclusion

Our contribution

Exploited tools

◮ Boolean Function Theory

◮ Walsh Matrices ◮ Tensor Product ◮ String Diagrams

New contributions

◮ Vulnerability Profile ◮ Composition Rules ◮ Classification of Extended Probes

10 / 39

slide-14
SLIDE 14

Context Theoretical contribution Applications Complexity Conclusion

Our method

Walsh Matrix

◮ Given a Boolean function f , with m inputs and n outputs, any element of its Walsh matrix is: ˆ fω,α =

  • x∈Fn

2

(−1)ωT f (x)⊕αT x ◮ Matrix that describes the results profile of a Boolean Function ◮ To any matrix corresponds only one function and viceversa ◮ Its dimension is 2n × 2m

Correlation Matrix

Matrix computed from the Walsh matrix:

  • Wf (ω, α) := (ˆ

fω,α = 0)

11 / 39

slide-15
SLIDE 15

Context Theoretical contribution Applications Complexity Conclusion

Our method

Example

f (a0, a1, r0, r1) =  

  • 1

p0   =   a0 + r0 + r1 a1 + r0 + r1 a1 + r0   Correlation matrix Wf :

1 1 1 1 1 1 1 1 γr1 1 1 1 1 1 1 1 1 γr0 1 1 1 1 1 1 1 1 γa1 1 1 1 1 1 1 1 1 γa0 γp0 γo1 γo0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 12 / 39

slide-16
SLIDE 16

Context Theoretical contribution Applications Complexity Conclusion

Our method

Compact representation of Wf

Reshaping of the Correlation matrix Wf , by compacting the spectral coefficients, taking into account only the number of shares

  • f each original variable.

Example

1 1 1 2 2 2 ρ 1 2 1 2 1 2 α π ω 1 1 1 2 1 1 1 1 1 1 1 1 2 1

α,ρ, ω and φ are called the compact spectral indexes of the input, randoms, output and probe respectively

13 / 39

slide-17
SLIDE 17

Context Theoretical contribution Applications Complexity Conclusion

Vulnerability Profile

Vulnerability Profile of a function

Tensor product of the regular Walsh transform of a function f and

  • f its probes fπ, multiplied by Wδ

Function f

Wδ f∆ If

Wfπ Wf

Ofπ Of

Composition h • k

I ⊗ k∆ k∆ h∆ Ih Whπ Wh Wkπ Wk Ohπ Okπh Okh

14 / 39

slide-18
SLIDE 18

Context Theoretical contribution Applications Complexity Conclusion

Classification of the Extended Probes

Classification

  • 1. Pure Probe (◦): placed on a wire computing w(x), it gives

information about all the inputs of the function: wπ(x) =

  • xi∈support(w)

xi

15 / 39

slide-19
SLIDE 19

Context Theoretical contribution Applications Complexity Conclusion

Classification of the Extended Probes

Classification

  • 2. Composed Probe (♠): placed on a wire computing

w(x) = wa • wb, it gives information about the values: wk(x) = (wa

π • wb)(x)

where wb(x) is different from the identity.

16 / 39

slide-20
SLIDE 20

Context Theoretical contribution Applications Complexity Conclusion

Classification of the Extended Probes

Classification

  • 3. Output Probe (↑): placed on an actual output of the function;

during composition of functions, it could produce new probes

17 / 39

slide-21
SLIDE 21

Context Theoretical contribution Applications Complexity Conclusion

Classification of the Extended Probes

Classification

  • 4. Internal Probe: placed on an internal wire; it couldn’t produce

new probes when composing functions

18 / 39

slide-22
SLIDE 22

Context Theoretical contribution Applications Complexity Conclusion

Applications

Applications to multiplication gadgets

◮ CMS: analysis and improvement ◮ DOM-indep: analysis

19 / 39

slide-23
SLIDE 23

Context Theoretical contribution Applications Complexity Conclusion

Consolidating Masking Scheme

CMS3 multiplication scheme

◮ Evolution of the ISW scheme, meant to provide d-probing security and protection against glitches ◮ s = d + 1 is the number of shares, ai and bi are the inputs’ shares and ci are the output’s shares ◮ Every ci is computed in a logic cone, which involves s pairs (ai, bh) ◮ Adjacent cones share only a random bit ◮ Internal bits within a cone preserve uniformity ◮ Three layers: non-linear (N), refresh (R) and compression (C), the latter two separated by a register

  • 3O. Reparaz et Al., Consolidating Masking Schemes

20 / 39

slide-24
SLIDE 24

Context Theoretical contribution Applications Complexity Conclusion

CMS and probing security

Problem

This scheme is not robust-d-probing secure for d ≥ 3 4

⊕ r1 a0 b0 ⊕ r2 a0 b1 ⊕ r3 a0 b2 ⊕ r4 a0 b3 ⊕ r5 a1 b0 ⊕ r6 a1 b1 ⊕ r7 a1 b2 ⊕ r8 a1 b3 ⊕ r9 a2 b0 ⊕ r10 a2 b1 ⊕ r11 a2b2 ⊕ r12 a2b3 ⊕ r13 a3 b0 ⊕ r14 a3b1 ⊕ r15 a3b2 ⊕ r0 a3 b3 ⊕ c0 ⊕ c1 ⊕ c2 ⊕ c3 compression layer C refsesh layer R non-linear layer N

  • 4T. Moos et Al., Glitch-Resistant Masking Revisited

21 / 39

slide-25
SLIDE 25

Context Theoretical contribution Applications Complexity Conclusion

Analysis of the CMS probing security

through our classification of extended probes

Types of probes

◮ Pure internal probes at the output of R: information about {ai, bj, rh1, rh2} ◮ Composed output probes at the output of C: information about d values computed as ai · bj + rh1 + rh2

Fail of CMS, for d ≥ 3

b0 b1 b2 . . . bd a0 c0 c0 c0 . . . c0 a1 c1 c1 c1 . . . c1 a2 c2 c2 c2 . . . c2 . . . ad cd cd cd . . . cd

Secret b placing only one composed probe and two pure probes

22 / 39

slide-26
SLIDE 26

Context Theoretical contribution Applications Complexity Conclusion

Analysis of the CMS probing security

through our classification of extended probes

Example

⊕ r1 a0 b0 ⊕ r2 a0 b1 ⊕ r3 a0 b2 ⊕ r4 a0 b3 ⊕ r5 a1 b0 ⊕ r6 a1 b1 ⊕ r7 a1 b2 ⊕ r8 a1 b3 ⊕ r9 a2 b0 ⊕ r10 a2 b1 ⊕ r11 a2b2 ⊕ r12 a2b3 ⊕ r13 a3 b0 ⊕ r14 a3b1 ⊕ r15 a3b2 ⊕ r0 a3 b3 ⊕ c0 ⊕ c1 ⊕ c2 ⊕ c3 compression layer C refsesh layer R non-linear layer N

b0 b1 b2 b3 a0 c0 c0 c0 c0 a1 c1 c1 c1 c1 a2 c2 c2 c2 c2 a3 c3 c3 c3 c3

◮ Output composed probe c0 ◮ Internal pure probes to recover r0 and r4

23 / 39

slide-27
SLIDE 27

Context Theoretical contribution Applications Complexity Conclusion

1st solution: CMS robust-d-probing secure

Non-completeness

Example

⊕ r1 a1 b2 ⊕ r2 a1 b0 ⊕ r3 a3 b0 ⊕ r4 a3 b2 ⊕ r5 a1 b3 ⊕ r6 a1 b1 ⊕ r7 a3 b1 ⊕ r8 a3 b3 ⊕ r9 a0 b1 ⊕ r10 a0 b0 ⊕ r11 a2b0 ⊕ r12 a2b1 ⊕ r13 a0 b3 ⊕ r14 a0b2 ⊕ r15 a2b2 ⊕ r0 a2 b3 ⊕ c0 ⊕ c1 ⊕ c2 ⊕ c3

b0 b1 b2 b3 a0 c2 c2 c3 c3 a1 c0 c1 c0 c1 a2 c2 c2 c3 c3 a3 c0 c1 c0 c1

◮ No information from any combination of 3 probes

24 / 39

slide-28
SLIDE 28

Context Theoretical contribution Applications Complexity Conclusion

1st solution: CMS robust-d-probing secure

Non-completeness

Example

The Compact correlation matrix highlights that, in our first solution, the scheme with s = 4 is robust-3-probing secure but not robust-3-SNI

. . . ρ 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 . . . β 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 . . . α ωfπ ωgπf . . . . . . 3 . . . . . . 1 2 . . . . . . 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 . . . . . . 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 . . . . . . 25 / 39

slide-29
SLIDE 29

Context Theoretical contribution Applications Complexity Conclusion

2nd solution: CMS robust-d-SNI

Non-completeness + more randoms

Example

⊕ r1 a1 b2 ⊕ r2 a1 b0 q0 ⊕ r3 a3 b0 q1 ⊕ r4 a3 b2 ⊕ r5 a1 b3 ⊕ r6 a1 b1 q1 ⊕ r7 a3 b1 q2 ⊕ r8 a3 b3 ⊕ r9 a0 b1 ⊕ r10 a0 b0 q2 ⊕ r11 a2b0 q3 ⊕ r12 a2b1 ⊕ r13 a0 b3 ⊕ r14 a0b2 q3 ⊕ r15 a2b2 q0 ⊕ r0 a2 b3 ⊕ c0 ⊕ c1 ⊕ c2 ⊕ c3 26 / 39

slide-30
SLIDE 30

Context Theoretical contribution Applications Complexity Conclusion

2nd solution: CMS robust-d-SNI

Non-completeness + more randoms

Example

The Compact correlation matrix highlights that, in our second solution, the scheme with s = 4 is robust-3-SNI

. . . ρ 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 . . . β 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 . . . α ωfπ ωgπf . . . . . . 3 . . . . . . 1 2 . . . . . . 2 1 . . . . . . 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 . . . . . . 27 / 39

slide-31
SLIDE 31

Context Theoretical contribution Applications Complexity Conclusion

2nd solution: CMS robust-d-SNI

Non-completeness + more randoms

Generalization for any d

Let s be the number of shares (s ≥ 4); any generalized CMS scheme can become robust-(s − 1)-SNI by adding s · (⌊ s

2⌋ − 1)

randoms to the refresh layer such that each pair of adjacent cones shares ⌊ s

2⌋ − 1 of them

28 / 39

slide-32
SLIDE 32

Context Theoretical contribution Applications Complexity Conclusion

Domain Oriented Masking

DOM5 multiplication scheme

◮ d-probing security by using d(d+1)

2

random bits ◮ s = d + 1 is the number of shares, ai and bi are the inputs’ shares and ci are the output’s shares ◮ DOM with independent shares is called DOM-indep ◮ Terms in the DOM-indep equations are inner-domain terms (aibi) and cross-domain (aibj); cross-domain are masked by random bits ◮ Before the compression phase, partial solutions are saved in registers

  • 5H. Gross et Al., Domain-Oriented Masking: Compact Masked Hardware

Implementations with Arbitrary Protection Order.

29 / 39

slide-33
SLIDE 33

Context Theoretical contribution Applications Complexity Conclusion

DOM-indep and probing security

Problem

This scheme is not robust-d-SNI, for any d 6

Example

⊕ a1 b0 a1 b1 a0 b0 ⊕ r0 a0 b1 ⊕ c0 ⊕ c1

  • 6T. Moos et Al., Glitch-Resistant Masking Revisited

30 / 39

slide-34
SLIDE 34

Context Theoretical contribution Applications Complexity Conclusion

DOM-indep and probing security

Example

The Compact correlation matrix highlights that the scheme with s = 2 is robust-1-probing secure but not robust-1-SNI

1 1 1 1 1 1 1 1 1 ρ 1 1 1 2 2 2 1 1 1 2 2 2 β 1 2 1 2 1 2 1 2 1 2 1 2 α ωi ωo 1 1 1 1 1 1 1 1 1 1 1 1 . . . . . . 4 4 1 1 1 1 1 31 / 39

slide-35
SLIDE 35

Context Theoretical contribution Applications Complexity Conclusion

DOM-indep robust-d-SNI

Output registers7

Example

The Compact correlation matrix highlights that, with an output register, the scheme with s = 2 is robust-1-SNI

1 1 1 1 1 1 1 1 1 ρ 1 1 1 2 2 2 1 1 1 2 2 2 β 1 2 1 2 1 2 1 2 1 2 1 2 α ωi ωo 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 . . . . . . 6 2 1 1 1 1 1

  • 7S. Faust et Al., Composable Masking Schemes in the Presence of Physical

Defaults and the Robust Probing Model

32 / 39

slide-36
SLIDE 36

Context Theoretical contribution Applications Complexity Conclusion

Trade off randomness / registers

To ensure the robust-d-SNI: ◮ CMS: addition of random bits ◮ DOM-indep: addition of output registers

33 / 39

slide-37
SLIDE 37

Context Theoretical contribution Applications Complexity Conclusion

Trade off randomness / registers

To ensure the robust-d-SNI: ◮ CMS: addition of random bits ◮ DOM-indep: addition of output registers

Example

With d = 3: register random (per bit) CMS +4 +0 DOM +0 +4

33 / 39

slide-38
SLIDE 38

Context Theoretical contribution Applications Complexity Conclusion

Trade off randomness / registers

To ensure the robust-d-SNI: ◮ CMS: addition of random bits ◮ DOM-indep: addition of output registers

Example

With d = 3: register random (per bit) CMS +4 +0 DOM +0 +4

Ratio of random usage

2

  • s2

2 +

s

2 + 1

  • s
  • (s − 1) s

33 / 39

slide-39
SLIDE 39

Context Theoretical contribution Applications Complexity Conclusion

Complexity of the proposed approach

Complexity problem

With the increasing of the variables, the number of elements in the Walsh matrices becomes too large → its complete computation becomes impracticable

34 / 39

slide-40
SLIDE 40

Context Theoretical contribution Applications Complexity Conclusion

Complexity of the proposed approach

Complexity problem

With the increasing of the variables, the number of elements in the Walsh matrices becomes too large → its complete computation becomes impracticable

Solution

◮ Store only the rows that refer to single outputs and probes

34 / 39

slide-41
SLIDE 41

Context Theoretical contribution Applications Complexity Conclusion

Complexity of the proposed approach

Complexity problem

With the increasing of the variables, the number of elements in the Walsh matrices becomes too large → its complete computation becomes impracticable

Solution

◮ Store only the rows that refer to single outputs and probes ◮ Compute on-demand the remaining rows by using convolution

34 / 39

slide-42
SLIDE 42

Context Theoretical contribution Applications Complexity Conclusion

Complexity of the proposed approach

Complexity problem

With the increasing of the variables, the number of elements in the Walsh matrices becomes too large → its complete computation becomes impracticable

Solution

◮ Store only the rows that refer to single outputs and probes ◮ Compute on-demand the remaining rows by using convolution ◮ Exploit the sparsity of the correlation matrices

34 / 39

slide-43
SLIDE 43

Context Theoretical contribution Applications Complexity Conclusion

Scalability of the proposed approach

Security verification of χ of Keccak with DOM-indep

1 2 3 4 5 d 1 ms 1 sec 1 hour 1 day 1 week 1 month time DOM for Keccak DOM for Kecak, maskVerif

35 / 39

slide-44
SLIDE 44

Context Theoretical contribution Applications Complexity Conclusion

Scalability of the proposed approach

Estimated time to compute the compact correlation matrix for gadgets

1 2 3 4 5 d 1 ms 1 sec 1 hour 1 day 1 week 1 month time ISW CMS modified CMS DOM DOM for Keccak

36 / 39

slide-45
SLIDE 45

Context Theoretical contribution Applications Complexity Conclusion

Conclusion

◮ Alternative view of robust probing security

37 / 39

slide-46
SLIDE 46

Context Theoretical contribution Applications Complexity Conclusion

Conclusion

◮ Alternative view of robust probing security ◮ New mathematical framework and approach, based on the Walsh matrices

37 / 39

slide-47
SLIDE 47

Context Theoretical contribution Applications Complexity Conclusion

Conclusion

◮ Alternative view of robust probing security ◮ New mathematical framework and approach, based on the Walsh matrices ◮ Classification of extended probes, to deal with gadget composability

37 / 39

slide-48
SLIDE 48

Context Theoretical contribution Applications Complexity Conclusion

Conclusion

◮ Alternative view of robust probing security ◮ New mathematical framework and approach, based on the Walsh matrices ◮ Classification of extended probes, to deal with gadget composability ◮ Applications to multiplication gadgets:

◮ improvement of CMS ◮ analysis of DOM-indep

37 / 39

slide-49
SLIDE 49

Context Theoretical contribution Applications Complexity Conclusion

Future Works

◮ More efficient computations, with the use of sparse matrices properties

38 / 39

slide-50
SLIDE 50

Context Theoretical contribution Applications Complexity Conclusion

Future Works

◮ More efficient computations, with the use of sparse matrices properties ◮ Inquire the minimum number of randoms to achieve robust-d-SNI

38 / 39

slide-51
SLIDE 51

Context Theoretical contribution Applications Complexity Conclusion

Future Works

◮ More efficient computations, with the use of sparse matrices properties ◮ Inquire the minimum number of randoms to achieve robust-d-SNI ◮ Investigate the ring structure of multiplication gadgets: more efficient refresh layers?

38 / 39

slide-52
SLIDE 52

Context Theoretical contribution Applications Complexity Conclusion

THANK YOU FOR THE ATTENTION

Any question?

You can also write to me at the address maria.molteni@unimi.it

39 / 39