VerMI & VerFI Verification Tools for Masked Implementations - - PowerPoint PPT Presentation

vermi verfi verification tools for masked implementations
SMART_READER_LITE
LIVE PREVIEW

VerMI & VerFI Verification Tools for Masked Implementations - - PowerPoint PPT Presentation

VerMI & VerFI Verification Tools for Masked Implementations Svetla Nikova, Victor Arribas COSIC, KULeuven Joint work with Vincent Rijmen (KU Leuven), Felix Wegener, Amir Moradi (RU Bochum) 1 Verification Tools Why do we need


slide-1
SLIDE 1

VerMI & VerFI Verification Tools for Masked Implementations

Svetla Nikova, Victor Arribas COSIC, KULeuven

Joint work with Vincent Rijmen (KU Leuven), Felix Wegener, Amir Moradi (RU Bochum)

1

slide-2
SLIDE 2

Verification Tools

  • Why do we need verification tools?
  • When should we test implementations?
  • What kind of tools we need?

2

slide-3
SLIDE 3

Side-channel attacks: what to verify?

3

(Source: [DBR19])

Necessary conditions [ANR18] vs. Sufficient conditions [DBR19] e.g.: Non-completeness e.g.: !"(glitch-extended probes, secret) = 0 #$%&'('%) %* $+%,-& ≈ #/'+-& &-01+'(2 %+3-+ 3

slide-4
SLIDE 4

SCA verification tools

Closer to reality As accurate as the model Technology specific Technology independent Noisy Noise free Theory Reality

Small gadgets Complete ciphers

[ANR18] [BGI+18, BBF+18, C18] [DBR19] [SBY+18] [BCD+13, MRS+18] Efficient Exhaustive

slide-5
SLIDE 5

SCA verification: how-to

Theory Reality Small gadgets Complete ciphers [ANR18] Design & Implementation [BGI+18, BBF+18, C18] [DBR19] [SBY+18] [BCD+13, MRS+18]

Verification mechanisms – the more the better! One does NOT suffice

slide-6
SLIDE 6

References

[ANR18] V. Arribas, S. Nikova, V. Rijmen: VerMI: Verification Tool for Masked Implementations. ICECS 2018 [BCD+13] G. Becker, J. Cooper, E. De Mulder, et al: Test vector leakage assessment (TVLA) methodology in

  • practice. ICMC 2013

[BBF+18] G. Barthe, S. Belaid, P.-A. Fouque, B. Gregoire: maskVerif: a formal tool for analyzing software and hardware masked implementations. ESORICS 2019 [BGI+18] R. Bloem, H. Gros, R. Iusupov, B. Konighofer, S. Mangard, J. Winter: Formal Verification of Masked Hardware Implementations in the Presence of Glitches. EUROCRYPT 2018 [C18] J.-S. Coron: Formal Verication of Side-channel Countermeasures via Elementary Circuit Transformations. ACNS 2018 [DBR19] L. De Meyer, B. Bilgin, O. Reparaz: Consolidating Security Notions in Hardware Masking. CHES 2019 [MRS+18] A. Moradi, B. Richter, T. Schneider, F.-X. Standaert: Leakage Detection with the chi-squared-Test. CHES 2018 [SBY+18] D. Sijacic, J. Balasch, B. Yang, S. Ghosh, I. Verbauwhede: Towards Efficient and Automated Side Channel Evaluations at Design Time. PROOFS@CHES 2018

slide-7
SLIDE 7

VerMI

Verification Tool for Masked Implementations

slide-8
SLIDE 8

VerMI - outline

  • VerMI
  • Threshold Implementations
  • Non-Completeness
  • Sequential Logic
  • Uniformity

8

slide-9
SLIDE 9

VerMI

9

slide-10
SLIDE 10

FPGA ASIC

Verification Tool

  • C++
  • Synopsys DC Compiler

10

slide-11
SLIDE 11

Structural Model

11

slide-12
SLIDE 12

Threshold Implementations

12 Side-Channel Analysis (SCA) countermeasure Provable security with minimal assumptions on the HW Security in the presence of glitches

slide-13
SLIDE 13

Threshold Implementations (1st order)

  • Correctness
  • Non-completeness
  • Uniformity

13 Secret sharing and multi-party computation techniques Boolean masking scheme

S

(x, y, z, ...) (a, b, c , ...)

S1

(x1,y1,z1, ...) (a1,b1,c1, ...)

S2

(x2,y2,z2, ...) (a2,b2,c2, ...)

Ss

(xs,ys,zs, ...) (as,bs,cs, ...) … … … ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ = = (x, y, z, ...) (a, b, c, ...)

slide-14
SLIDE 14

Tree Search

14

1

slide-15
SLIDE 15

Non-completeness

15

1

slide-16
SLIDE 16

Non-completeness

16 !" = $

" %", %', (", (' = %"(" ⊕ %"(' ⊕ %'("

!' = $

' %', %*, (', (* = %'(' ⊕ %'(* ⊕ %*('

!* = $

* %", %*, (", (* = %*(* ⊕ %"(* ⊕ %*("

E.g.: Multiplier Sensitive data Dependencies

Shares Vars.

%" %' %* (" (' (* !" %" %' (" (' !' %' %* (' (* !* %" %* (" (*

slide-17
SLIDE 17

Non-completeness

17 !" = $

" %", %', (", (' = %"(" ⊕ %"(' ⊕ %*("

!' = $

' %', %*, (', (* = %'(' ⊕ %'(* ⊕ %*('

!* = $

* %", %*, (", (* = %*(* ⊕ %"(* ⊕ %'("

E.g.: Multiplier Sensitive data Dependencies

Shares Vars.

%" %' %* (" (' (* !" %" %* (" (' !' %' %* (' (* !* %" %' %* (" (*

slide-18
SLIDE 18

HO Non-completeness

18 !" = $

" %", %', (", (' = %"(" ⊕ %"(' ⊕ %'("

!' = $

' %', %*, (', (* = %'(' ⊕ %'(* ⊕ %*('

!* = $

* %", %*, (", (* = %*(* ⊕ %"(* ⊕ %*("

E.g.: Multiplier (1st order) Sensitive data Dependencies

Shares Vars.

%" %' %* (" (' (* (!",, !') %" %' %* (" (' (* (!", !* ) %" %' %* (" (' (* (!', !*) %" %' %* (" (' (*

slide-19
SLIDE 19

HO Non-completeness

19 E.g.: Multiplier (2nd order) Sensitive data

Shares

Vars.

!" !# !$ !% !& !' (" (# ($ (% (& ('

[BGN+] B. Bilgin, B. Gierlichs, S. Nikova, V. Nikov, V. Rijmen, Higher-Order Threshold Implementations. In Asiacryopt 2014

)" = !#(# ⊕ !"(# ⊕ !#(" ⊕ !"($ ⊕ !$(" ⊕ !#($ ⊕ !$(# )# = !$($ ⊕ !$(% ⊕ !%($ ⊕ !$(& ⊕ !&($ )$ = !%(% ⊕ !#(% ⊕ !%(# ⊕ !#(' ⊕ !'(# )% = !&(& ⊕ !"(% ⊕ !%(" ⊕ !"(& ⊕ !&(" )& = !#(& ⊕ !&(# ⊕ !%(& ⊕ !&(% )' = !'(' ⊕ !$(' ⊕ !'($ ⊕ !%(' ⊕ !'(% ), = !"(" ⊕ !"(' ⊕ !'(" ⊕ !&(' ⊕ !'(&

slide-20
SLIDE 20

HO Non-completeness

20

!" = $%&% ⊕ $"&% ⊕ $%&" ⊕ $"&( ⊕ $(&" ⊕ $%&( ⊕ $(&% !% = $(&( ⊕ $(&) ⊕ $)&( ⊕ $(&* ⊕ $*&( !( = $)&) ⊕ $%&) ⊕ $)&% ⊕ $%&+ ⊕ $+&%

E.g.: Multiplier (2nd order) [BGN+] Dependencies

!) = $*&* ⊕ $"&) ⊕ $)&" ⊕ $"&* ⊕ $*&" !* = $%&* ⊕ $*&% ⊕ $)&* ⊕ $*&) !+ = $+&+ ⊕ $(&+ ⊕ $+&( ⊕ $)&+ ⊕ $+&) !, = $"&" ⊕ $"&+ ⊕ $+&" ⊕ $*&+ ⊕ $+&*

(!", !%)

$" $% $( $) $* &" &% &( &) &*

(!%, !*)

$% $( $) $* &% &( &) &*

[BGN+] B. Bilgin, B. Gierlichs, S. Nikova, V. Nikov, V. Rijmen, Higher-Order Threshold Implementations. In Asiacryopt 2014

(!), !,)

$" $) $* $+ &" &) &* &+

ALL possible combinations must be checked

slide-21
SLIDE 21

Subcircuit

21

slide-22
SLIDE 22

AES Sbox

22

[CRB+]

[CRB+] T. D. Cnudde, O. Reparaz, B. Bilgin, S. Nikova, V. Nikov, and V. Rijmen. Masking aes with d+1 shares in hardware. In CHES 2016.

slide-23
SLIDE 23

AES Sbox

23

Shares Variables

!"3_1 0 !"3_2 0 !"3_3 0 !"3_4 0 !"3_1 1 !"3_2 1 !"3_3 1 !"3_4 1 !"3_1 2 !"3_2 2 !"3_3 2 !"3_4 2 !"3_1 3 !"3_2 3 !"3_3 3 !"3_4 3 !"3_)*+_1 0 !"3_)*+_2 0 !"3_)*+_1 1 !"3_)*+_2 1 !"3_)*+_1 2 !"3_)*+_2 2 !"3_)*+_1 3 !"3_)*+_2 3 !"3_,*"_1 0 !"3_,*"_2 0 !"3_,*"_1 1 !"3_,*"_2 1 !"3_,*"_1 2 !"3_,*"_2 2 !"3_)*+_1 3 !"3_)*+_2 3

slide-24
SLIDE 24

Uniformity (1st order)

24 E.g.: Multiplier !" = $

" %", %', (", (' = %"(" ⊕ %"(' ⊕ %'("

!' = $

' %', %*, (', (* = %'(' ⊕ %'(* ⊕ %*('

!* = $

* %", %*, (", (* = %*(* ⊕ %"(* ⊕ %*("

slide-25
SLIDE 25

Simulation

25

Event-Driven simulation Flip-Flops treated as buffers

slide-26
SLIDE 26

Uniformity

26 Three shares implementation by G. Bertoni et. al. [BDP+] Four shares implementation by B. Bilgin et. al. [BDN+] Changing of the Guards by J. Daemen [Daemen]

[BDP+] G. Bertoni, J. Daemen, M. Peeters, and G. V. Assche. Building power analysis resistant implementations of Keccak. Second SHA-3 candidate conference, August 2010. [BDN+] B. Bilgin, J. Daemen, V. Nikov, S. Nikova, V. Rijmen, and G. V. Assche. Efficient and First-order DPA resistant implementations of Keccak. In CARDIS, volume 8419 of LNCS. June 2014. [Daemen] J. Daemen. Changing of the guards: A simple and efficient method for achieving uniformity in threshold sharing. In CHES, volume 10529 of LNCS. September 2017.

slide-27
SLIDE 27

Uniformity

27

slide-28
SLIDE 28

VerFI

Verification Tool for Fault Injection

slide-29
SLIDE 29

Evaluation

29

SIDE-CHANNEL EVALUATION

FAULT EVALUATION

maskVerif: automated analysis of software and hardware higher-order masked implementations [Barthe et al. ePrint 2018/562] Framework for the analysis and evaluation of algebraic fault attacks [Zhang et al. IEEE Trans. on Information Forensics And Security 2016] Formal Verification of Masked Hardware Implementations in the Presence of Glitches [Bloem et al. EUROCRYPT2018] XFC: A Framework for eXploitable Fault Characterization in Block Ciphers. [Khanna et al. DAC 2017] VerMI: Verification Tool for Masked Implementations [Arribas et al. ICECS 2018] ExpFault: An Automated Framework for Exploitable Fault Characterization in Block Ciphers [Saha et al. CHES 2018] Towards Efficient and Automated Side Channel Evaluations at Design Time CASCADE [Šijačić et al. PROOFS 2018] TVLA [Cooper et al. International Cryptographic Module Conference 2013]

slide-30
SLIDE 30

Framework

30

VerFI

slide-31
SLIDE 31

Ø Create faults Ø Fault free simulation Ø Fault injection Ø Fault simulation Ø Fault classification

Faults Machine

31

slide-32
SLIDE 32

Ø Create faults Ø Fault free simulation Ø Fault injection Ø Fault simulation Ø Fault classification

Faults Machine

32

slide-33
SLIDE 33

Fault Simulator

33

slide-34
SLIDE 34

Fault

34 Ø Type Ø Active Ø Cycle

slide-35
SLIDE 35

Fault Simulator

35

1

slide-36
SLIDE 36

Fault Simulator

36

1 1

slide-37
SLIDE 37

Fault Models

37

1 1 9 11 10 1/0

Output Gate faults Input Gate faults

1 1/0 9 11 10 1/0

# Gates to fault Type of fault

slide-38
SLIDE 38

Fault Models

38 Gate faults Wire faults

H1 H2 H3 H1 H2 H3

slide-39
SLIDE 39

Ø Create faults Ø Fault free simulation Ø Fault injection Ø Fault simulation Ø Fault classification

Faults Machine

39

slide-40
SLIDE 40

Fault Injection

40

  • Fault: gate, cycle and type tuple

! = {$%&', #*+*,', #type}

  • Allowed faults vector

2 = [!4, … , !678]

slide-41
SLIDE 41

Ø Create faults Ø Fault free simulation Ø Fault injection Ø Fault simulation Ø Fault classification

Faults Machine

41

slide-42
SLIDE 42

Inputs

42 Ø Same fault evaluation per input Ø User defines the inputs Ø Inputs dependent countermeasure

slide-43
SLIDE 43

Detected

43

1 1 0/1 0/1 9 11 10 Check 1

Abort = 1

slide-44
SLIDE 44

Detected

44

1 1 0/1 0/1 9 11 10 Check 1

slide-45
SLIDE 45

Not Detected

45

1 1 0/1 0/1 9 11 10 Check 1 1 1

Abort = 0

slide-46
SLIDE 46

Ineffective

46

1 1 9 11 10 Check

Abort = 0

1/0

slide-47
SLIDE 47

Coverage

47

  • !"# =

%&'&('&) *+,%&'&('&)-%&'&('&)

  • . =

/,&00&('12& *+,%&'&('&)-%&'&('&)

.: Fault ineffective rate

slide-48
SLIDE 48

Conclusions

Ø Practical SCA Verification Tool at synthesis level

Ø Necessary condition Ø Univariate assessment Ø Fault evaluation tool VerFI (in submission) Ø Successful performance in practice

48

slide-49
SLIDE 49

Future Work

Ø Multivariate analysis Ø Combined evaluations Ø Improved performance

49

slide-50
SLIDE 50

Thank you!

50

https://github.com/vmarribas Tools to be released by 31st October: