Very High-Order Masking: Efficient Implementation and Security - - PowerPoint PPT Presentation

β–Ά
very high order masking efficient
SMART_READER_LITE
LIVE PREVIEW

Very High-Order Masking: Efficient Implementation and Security - - PowerPoint PPT Presentation

Very High-Order Masking: Efficient Implementation and Security Evaluation Anthony Journault and Franois-Xavier Standaert UCL (Louvain-la-Neuve, Belgium) CHES 2017, Taipei, Taiwan Outline Background Masking Barthe et al. masking


slide-1
SLIDE 1

Very High-Order Masking: Efficient Implementation and Security Evaluation

Anthony Journault and FranΓ§ois-Xavier Standaert UCL (Louvain-la-Neuve, Belgium)

CHES 2017, Taipei, Taiwan

slide-2
SLIDE 2
  • Background
  • Masking
  • Barthe et al. masking scheme
  • How fast can be very high-order masking ?
  • Data representation
  • AES results and discussion
  • How can we evaluate security at very high order ?
  • Limitation of leakage detection strategy
  • Multi-model approach
  • Conclusion/Open problems

Outline

slide-3
SLIDE 3
  • Background
  • Masking
  • Barthe et al. masking scheme
  • How fast can be very high-order masking ?
  • Data representation
  • AES results and discussion
  • How can we evaluate security at very high order ?
  • Limitation of leakage detection strategy
  • Multi-model approach
  • Conclusion/Open problems

Outline

slide-4
SLIDE 4

Masking 1

  • Masking (e.g. Boolean encoding)
  • With 𝑏2, β‹― , 𝑏𝑒 random

𝑏 = 𝑏1⨁𝑏2⨁ β‹― ⨁𝑏𝑒

slide-5
SLIDE 5

Masking 1

  • Masking (e.g. Boolean encoding)
  • With 𝑏2, β‹― , 𝑏𝑒 random

𝑏 = 𝑏1⨁𝑏2⨁ β‹― ⨁𝑏𝑒

  • Abstract security
  • Probing model
  • Security order

𝑒 βˆ’ 1 (at best)

slide-6
SLIDE 6

Masking 1

  • Masking (e.g. Boolean encoding)
  • With 𝑏2, β‹― , 𝑏𝑒 random

𝑏 = 𝑏1⨁𝑏2⨁ β‹― ⨁𝑏𝑒

  • Abstract security
  • Probing model
  • Security order

𝑒 βˆ’ 1 (at best)

  • Concrete security
  • Noisy leakage

model

  • 𝑂 = (𝜏2)π‘’βˆ’1

(under assumptions)

slide-7
SLIDE 7

Barthe et al. 2017 masking scheme 2

  • Parallel masking scheme by design
  • All shares manipulated at once
slide-8
SLIDE 8

Barthe et al. 2017 masking scheme 2

  • Parallel masking scheme by design
  • All shares manipulated at once

3 2 1 2 1 3 3 2 2 1 1 3 2 3 1 2 3 1 3 2 1 3 3 2 2 1 1

c c c r r r b a b a b a b a b a b a r r r b a b a b a ο‚Ί οƒ… οƒ… οƒ… οƒ…

  • Example of mult. 𝑏 βˆ— 𝑐 = 𝑑 for 𝑒 = 3
slide-9
SLIDE 9
  • Background
  • Masking
  • Barthe et al. masking scheme
  • How fast can be very high-order masking ?
  • Data representation
  • AES results and discussion
  • How can we evaluate security at very high order ?
  • Limitation of leakage detection strategy
  • Multi-model approach
  • Conclusion/Open problems

Outline

slide-10
SLIDE 10

Data representation and implementation 3

a1

Secret bit + sum random bits Random bit

………

  • 32-bit register

a2 a3 a30 a31 a32

Random bit Random bit Random bit Random bit

slide-11
SLIDE 11

Data representation and implementation 3

a1

Secret bit + sum random bits Random bit

………

  • 32-bit register
  • Use bitwise operators (XOR, AND, …)

a2 a3 a30 a31 a32

Random bit Random bit Random bit Random bit

slide-12
SLIDE 12

Data representation and implementation 3

a1

Secret bit + sum random bits Random bit

………

  • Implementation on 32-bit ARM
  • Optimal case: register size = nb of shares
  • 32-bit register
  • Use bitwise operators (XOR, AND, …)

a2 a3 a30 a31 a32

Random bit Random bit Random bit Random bit

slide-13
SLIDE 13

Data representation and implementation 3

a1

Secret bit + sum random bits Random bit

………

  • Implementation on 32-bit ARM
  • Optimal case: register size = nb of shares
  • 32-bit register
  • Use bitwise operators (XOR, AND, …)
  • Well suited for bitslice ciphers 

a2 a3 a30 a31 a32

Random bit Random bit Random bit Random bit

slide-14
SLIDE 14

Implementation Results: AES 4

Time Spent (%)

Randomness Non-linear op Linear op

  • Application to AES
  • Gate level

representation of AES S-box (Boyar, Peralta 2010)

10 cycles to generate 32-bit random value Total = 2 800 000 cycles

slide-15
SLIDE 15

Implementation Results: AES 4

Time Spent (%)

Randomness Non-linear op Linear op

  • Application to AES
  • Gate level

representation of AES S-box (Boyar, Peralta 2010)

  • SNI refreshing of one

input of each multiplication (conservative)

10 cycles to generate 32-bit random value Total = 2 800 000 cycles

slide-16
SLIDE 16

Implementation Results: AES 4

  • Application to AES
  • Gate level

representation of AES S-box (Boyar, Peralta 2010)

  • SNI refreshing of one

input of each multiplication (conservative)

Time Spent (%)

Randomness Non-linear op Linear op

80 cycles to generate 32-bit random value Total = 9 700 000 cycles

slide-17
SLIDE 17

Goudarzi-Rivain This paper 3,821,312 2,783,510

  • Goudarzi-Rivain 2017: Generic ISW

implementation and application to bitsliced AES

Comparison with Goudarzi-Rivain 5

slide-18
SLIDE 18

Goudarzi-Rivain This paper 3,821,312 2,783,510

  • Same order of magnitude of cycles
  • Very high-order masking is not out of reach !
  • Goudarzi-Rivain 2017: Generic ISW

implementation and application to bitsliced AES

Comparison with Goudarzi-Rivain 5

slide-19
SLIDE 19
  • Background
  • Masking
  • Barthe et al. masking scheme
  • How fast can be very high-order masking ?
  • Data representation
  • AES results and discussion
  • How can we evaluate security at very high order ?
  • Limitation of leakage detection strategy
  • Multi-model approach
  • Conclusion/Open problems

Outline

slide-20
SLIDE 20

Limitations of leakage detection strategy 6

  • Evaluator power =

2^30

  • If security <= 2^30,

security level

  • What if security >

2^30 ?

  • Security claims

bounded by evaluator power

slide-21
SLIDE 21

Limitations of leakage detection strategy 6

  • Evaluator power =

2^30

  • If security <= 2^30,

security level

  • What if security >

2^30 ?

  • Security claims

bounded by evaluator power We expect 31th-security order (or 31/f-security

  • rder)
slide-22
SLIDE 22

Multi-Model Approach 7

slide-23
SLIDE 23

Probing model Abstract Qualitative Algorithmic security

  • rder

d Risk captured: Lack of refreshing

Multi-Model Approach 7

slide-24
SLIDE 24

Bounded-Moment Model Physical Qualitative Physical security

  • rder

f Risk captured: Share recombination Probing model Abstract Qualitative Algorithmic security

  • rder

d Risk captured: Lack of refreshing

Multi-Model Approach 7

slide-25
SLIDE 25

Bounded-Moment Model Physical Qualitative Physical security

  • rder

f Risk captured: Share recombination Noisy Leakage Model Physical Quantitative Physical security

  • rder

MI,SNR Risk captured: Lack of noise Probing model Abstract Qualitative Algorithmic security

  • rder

d Risk captured: Lack of refreshing

Multi-Model Approach 7

slide-26
SLIDE 26

Bounded-Moment Model Physical Qualitative Physical security

  • rder

f Risk captured: Share recombination Noisy Leakage Model Physical Quantitative Physical security

  • rder

MI,SNR Risk captured: Lack of noise Probing model Abstract Qualitative Algorithmic security

  • rder

d Risk captured: Lack of refreshing

Multi-Model Approach 7 d + f + SNR + MI => Security level

slide-27
SLIDE 27

Probing security (state of the art) 8

  • 2 possible options:
  • Composable gadgets (SNI)
  • Simple to analyse
  • Implementation becomes expensive
  • Full code evaluation
  • Hard to analyse
  • Reduced implementation cost
slide-28
SLIDE 28

Bounded-Moment security 9

slide-29
SLIDE 29
  • Leakage detection hard in practice with 32 shares

Bounded-Moment security 9

slide-30
SLIDE 30
  • Leakage detection hard in practice with 32 shares
  • Idea similar to symmetric cryptanalysis: security based
  • n reduced version
  • Leakage detection on small order (e.g. on 4 shares)

Bounded-Moment security 9

slide-31
SLIDE 31
  • Leakage detection hard in practice with 32 shares
  • Idea similar to symmetric cryptanalysis: security based
  • n reduced version
  • Leakage detection on small order (e.g. on 4 shares)
  • Extraction of a risk factor f from possible share

recombination

  • Extrapolation of security

Bounded-Moment security 9

slide-32
SLIDE 32

Leakage detection results 10

slide-33
SLIDE 33

Leakage detection results 11

slide-34
SLIDE 34
  • SNR(=0,05)

computed with linear regression

  • MI of the

encoding

  • 31/15/7-order

security if flaw f=1/2/4

Noisy Leakage Model 12

slide-35
SLIDE 35
  • SNR(=0,05)

computed with linear regression

  • MI of the

encoding

  • 31/15/7-order

security if flaw f=1/2/4

Noisy Leakage Model 12

slide-36
SLIDE 36
  • SNR(=0,05)

computed with linear regression

  • MI of the

encoding

  • 31/15/7-order

security if flaw f=1/2/4

Noisy Leakage Model 12

slide-37
SLIDE 37
  • SNR(=0,05)

computed with linear regression

  • MI of the

encoding

  • 31/15/7-order

security if flaw f=1/2/4

  • Averaging:

multiple apparition of sensitive values

Noisy Leakage Model 12

slide-38
SLIDE 38

Putting things together 13

slide-39
SLIDE 39

Putting things together 13

Horizontal SCA

slide-40
SLIDE 40

Putting things together 13

Horizontal SCA Worst case

slide-41
SLIDE 41

Putting things together 13

Horizontal SCA Worst case

Order reduction from flaw f Order reduction from noise

slide-42
SLIDE 42
  • Background
  • Masking
  • Barthe et al. masking scheme
  • How fast can be very high-order masking ?
  • Data representation
  • AES results and discussion
  • How can we evaluate security at very high order ?
  • Limitation of leakage detection strategy
  • Multi-model approach
  • Conclusion/Open problems

Outline

slide-43
SLIDE 43

Conclusion 14

slide-44
SLIDE 44

Conclusion 14

  • Very high order (32 shares) implementation is not out of

reach !

slide-45
SLIDE 45

Conclusion 14

  • Very high order (32 shares) implementation is not out of

reach !

  • Multi-model approach proposed to evaluate very HO

masked implementations (security level)

slide-46
SLIDE 46

Conclusion 14

  • Very high order (32 shares) implementation is not out of

reach !

  • Multi-model approach proposed to evaluate very HO

masked implementations (security level)

  • Based on falsifiable assumptions
slide-47
SLIDE 47

Conclusion 14

  • Very high order (32 shares) implementation is not out of

reach !

  • Multi-model approach proposed to evaluate very HO

masked implementations (security level)

  • Based on falsifiable assumptions
  • Open problems:
  • Implem. when size register β‰  number of shares ?
  • Full code analysis to reduce refreshing
  • Thwart averaging with better S-box representation ?
slide-48
SLIDE 48

Conclusion 14

  • Very high order (32 shares) implementation is not out of

reach !

  • Multi-model approach proposed to evaluate very HO

masked implementations (security level)

  • Based on falsifiable assumptions
  • Open problems:
  • Implem. when size register β‰  number of shares ?
  • Full code analysis to reduce refreshing
  • Thwart averaging with better S-box representation ?

Thanks for your attention