Leakage Assessment Methodology - a clear roadmap for side-channel - - PowerPoint PPT Presentation

leakage assessment methodology
SMART_READER_LITE
LIVE PREVIEW

Leakage Assessment Methodology - a clear roadmap for side-channel - - PowerPoint PPT Presentation

Leakage Assessment Methodology - a clear roadmap for side-channel evaluations - Tobias Schneider and Amir Moradi Wednesday, September 16 th , 2015 Motivation Security Evaluation Leakage Assessment Methodology | CHES 2015 | Tobias Schneider 2


slide-1
SLIDE 1

Leakage Assessment Methodology

  • a clear roadmap for side-channel evaluations -

Tobias Schneider and Amir Moradi Wednesday, September 16th, 2015

slide-2
SLIDE 2

2

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Motivation Security Evaluation

slide-3
SLIDE 3

3

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Motivation Security Evaluation

slide-4
SLIDE 4

4

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Motivation Security Evaluation

slide-5
SLIDE 5

5

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Motivation Security Evaluation

Problem: Evaluation is not trivial. Does the chip leak information?

slide-6
SLIDE 6

6

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Motivation Security Evaluation

Problem: Evaluation is not trivial. Does the chip leak information? Non-Invasive Attack Testing Workshop, 2011 Establish testing methodology capable of robustly assessing the physical vulnerability of cryptographic devices. Goal:

slide-7
SLIDE 7

7

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Perform state-of-the-art attacks on the device under test (DUT)

Attacks Types:

  • DPA
  • CPA
  • MIA

Intermediate Values:

  • Sbox In
  • Sbox Out
  • Sbox In/Out

Leakage Models:

  • HW
  • HD
  • Bit

× ×

Motivation Attack-based Testing

slide-8
SLIDE 8

8

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Perform state-of-the-art attacks on the device under test (DUT)

Attacks Types:

  • DPA
  • CPA
  • MIA

Intermediate Values:

  • Sbox In
  • Sbox Out
  • Sbox In/Out

Leakage Models:

  • HW
  • HD
  • Bit

× ×

Problems:

  • High computational complexity
  • Requires lot of expertise
  • Does not cover all possible attack vectors

Motivation Attack-based Testing

slide-9
SLIDE 9

9

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Tries to detect any type of leakage at a certain order

  • Proposed by CRI at NIST workshop

Advantages:

  • Independent of architecture
  • Independent of attack model
  • Fast & simple
  • Versatile

Motivation Testing based on t-Test

slide-10
SLIDE 10

10

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Tries to detect any type of leakage at a certain order

  • Proposed by CRI at NIST workshop

Advantages:

  • Independent of architecture
  • Independent of attack model
  • Fast & simple
  • Versatile

Problems:

  • No information about hardness of attack
  • Possible false positives if no care about

evaluation setup

Motivation Testing based on t-Test

slide-11
SLIDE 11

11

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Contribution

  • 1. Explain statistical background in a (hopefully) more

understandable way

  • 2. More detailed discussion of higher-order testing
  • 3. Hints how to design fast & correct measurement setup
  • 4. Optimization of analysis phase
slide-12
SLIDE 12

12

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Statistical Background

  • t-Test
slide-13
SLIDE 13

13

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Statistical Background t-Test

slide-14
SLIDE 14

14

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Statistical Background t-Test

Sample 𝑅0 Sample 𝑅1

slide-15
SLIDE 15

15

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Statistical Background t-Test

Sample 𝑅0 Sample 𝑅1

Null Hypothesis: Two population means are equal.

slide-16
SLIDE 16

16

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Sample 𝑅0 Sample 𝑅1

Statistical Background t-Test

slide-17
SLIDE 17

17

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Sample 𝑅0 Sample 𝑅1

Statistical Background t-Test

Sample mean: Sample variance: Sample size: 𝜈0 𝑡0

2

𝑜0 𝜈1 𝑡1

2

𝑜1

slide-18
SLIDE 18

18

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Sample 𝑅0 Sample 𝑅1

Statistical Background t-Test

Sample mean: Sample variance: Sample size: 𝜈0 𝑡0

2

𝑜0 𝜈1 𝑡1

2

𝑜1

t = 𝜈0 − 𝜈1 𝑡0

2

𝑜0 + 𝑡1

2

𝑜1 v = 𝑡0

2

𝑜0 + 𝑡1

2

𝑜1

2

𝑡0

2

𝑜0

2

𝑜0 − 1 + 𝑡1

2

𝑜1

2

𝑜1 − 1

Degree of freedom 𝑢-test statistic

slide-19
SLIDE 19

19

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Estimate the probability to accept null hypothesis with Student’s 𝑢 distribution:

𝑔 𝑢, 𝑤 = Γ 𝑤 + 1 2 𝜌𝑤 Γ 𝑤 2 1 + 𝑢2 𝑤

−𝑤+1 2

𝑞 = 2

|𝑢| ∞

𝑔 t, v 𝑒𝑢

Statistical Background t-Test

Compute:

𝑤 𝑢

slide-20
SLIDE 20

20

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Estimate the probability to accept null hypothesis with Student’s 𝑢 distribution:

𝑔 𝑢, 𝑤 = Γ 𝑤 + 1 2 𝜌𝑤 Γ 𝑤 2 1 + 𝑢2 𝑤

−𝑤+1 2

𝑞 = 2

|𝑢| ∞

𝑔 t, v 𝑒𝑢

Statistical Background t-Test

Compute: Small 𝑞 values give evidence to reject the null hypothesis

𝑤 𝑢

slide-21
SLIDE 21

21

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

  • For testing usually only the 𝑢-value is estimated
  • Compared to a threshold of t > 4.5
  • 𝑞 = 2𝐺 −4.5, 𝑤 > 1000 < 0.00001
  • Confidence of > 0.99999 to reject the null hypothesis

Statistical Background t-Test

slide-22
SLIDE 22

22

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Testing Methodology

  • Specific 𝒖-Test
  • Non-Specific t-Test
slide-23
SLIDE 23

23

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Measurements 𝑈𝑗 With Associated Data 𝐸𝑗

Testing Methodology Specific t-Test

Specific t-Test:

  • Key is known to enable correct partitioning
  • Test is conducted at each sample point separately (univariate)
  • If corresponding 𝑢-test exceeds threshold ⇒ DPA probable
slide-24
SLIDE 24

24

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Measurements 𝑈𝑗 With Associated Data 𝐸𝑗

Testing Methodology Specific t-Test

𝑅0

𝑢𝑏𝑠𝑕𝑓𝑢 𝑐𝑗𝑢 𝐸𝑗 = 0

Specific t-Test:

  • Key is known to enable correct partitioning
  • Test is conducted at each sample point separately (univariate)
  • If corresponding 𝑢-test exceeds threshold ⇒ DPA probable
slide-25
SLIDE 25

25

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Measurements 𝑈𝑗 With Associated Data 𝐸𝑗

Testing Methodology Specific t-Test

𝑅0

𝑢𝑏𝑠𝑕𝑓𝑢 𝑐𝑗𝑢 𝐸𝑗 = 0

𝑅1

𝑢𝑏𝑠𝑕𝑓𝑢 𝑐𝑗𝑢 𝐸𝑗 = 1

Specific t-Test:

  • Key is known to enable correct partitioning
  • Test is conducted at each sample point separately (univariate)
  • If corresponding 𝑢-test exceeds threshold ⇒ DPA probable
slide-26
SLIDE 26

26

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Non-Specific t-Test:

  • fixed vs. random t-test
  • Avoids being dependent on any intermediate value/model
  • Detected leakage of single test is not always exploitable
  • Semi-fixed vs. random t-test useful in certain cases

Testing Methodology Non-Specific t-Test

slide-27
SLIDE 27

27

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Non-Specific t-Test:

  • fixed vs. random t-test
  • Avoids being dependent on any intermediate value/model
  • Detected leakage of single test is not always exploitable
  • Semi-fixed vs. random t-test useful in certain cases

Testing Methodology Non-Specific t-Test

Measurements 𝑈

𝑘

With Fixed Associated Data D

𝑅0

slide-28
SLIDE 28

28

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Non-Specific t-Test:

  • fixed vs. random t-test
  • Avoids being dependent on any intermediate value/model
  • Detected leakage of single test is not always exploitable
  • Semi-fixed vs. random t-test useful in certain cases

Testing Methodology Non-Specific t-Test

Measurements 𝑈

𝑘

With Fixed Associated Data D

𝑅0

Measurements 𝑈𝑗 With Random Associated Data D𝑗

𝑅1

slide-29
SLIDE 29

29

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Higher-Order Testing

  • Multivariate
  • Univariate
slide-30
SLIDE 30

30

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Higher-Order Testing Multivariate

Multivariate:

  • Sensitive variable is shared: 𝑇 = 𝑇1 ∘ 𝑇2
  • Shares are processed at different time instances (SW)
  • Leakages at different time instances need to be combined first
slide-31
SLIDE 31

31

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Higher-Order Testing Multivariate

Multivariate:

  • Sensitive variable is shared: 𝑇 = 𝑇1 ∘ 𝑇2
  • Shares are processed at different time instances (SW)
  • Leakages at different time instances need to be combined first

𝑇1

slide-32
SLIDE 32

32

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Higher-Order Testing Multivariate

Multivariate:

  • Sensitive variable is shared: 𝑇 = 𝑇1 ∘ 𝑇2
  • Shares are processed at different time instances (SW)
  • Leakages at different time instances need to be combined first

𝑇1 𝑇2

slide-33
SLIDE 33

33

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Higher-Order Testing Multivariate

Multivariate:

  • Sensitive variable is shared: 𝑇 = 𝑇1 ∘ 𝑇2
  • Shares are processed at different time instances (SW)
  • Leakages at different time instances need to be combined first

𝑇1 𝑇2

Centered Product: 𝑦′ = 𝑦1 − 𝜈1 ⋅ 𝑦2 − 𝜈2

slide-34
SLIDE 34

34

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Higher-Order Testing Univariate

Univariate:

  • Shares are processed in parallel (HW)
  • Leakages at the same time instance need to be combined first

𝑇1 𝑇2

slide-35
SLIDE 35

35

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Higher-Order Testing Univariate

Univariate:

  • Shares are processed in parallel (HW)
  • Leakages at the same time instance need to be combined first

𝑇1 𝑇2

Variance: 𝑦′ = 𝑦 − 𝜈 2 In general: 𝑦′ = 𝑦 − 𝜈 𝑒 In some cases: 𝑦′ =

𝑦−𝜈 𝑡 𝑒

slide-36
SLIDE 36

36

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement

  • Setup
  • Case Study: Microcontroller
  • Case Study: FPGA
slide-37
SLIDE 37

37

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement Setup

PC Oscilloscope Control Target

Plaintext Ciphertext Measure Trigger

Pitfalls:

  • Order of fixed and random inputs should

be random as well

  • Communication between Control and

Target should be masked (if possible)

slide-38
SLIDE 38

38

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement Setup

PC Oscilloscope Control Target

Plaintext Ciphertext Measure Trigger

Pitfalls:

  • Order of fixed and random inputs should

be random as well

  • Communication between Control and

Target should be masked (if possible)

slide-39
SLIDE 39

39

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement CS: Microcontroller

  • AES with masking & shuffling (DPA contest v4.2)
  • No shared communication
  • First-order test
slide-40
SLIDE 40

40

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement CS: Microcontroller

  • AES with masking & shuffling (DPA contest v4.2)
  • No shared communication
  • First-order test
  • Leakage associated to unmasked plaintext
slide-41
SLIDE 41

41

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement CS: Microcontroller

Detectable first order leakage

slide-42
SLIDE 42

42

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement CS: FPGA

A note on the security of Higher-Order Threshold Implementations Oscar Reparaz, ePrint Report 2015/001

First Order Second Order

slide-43
SLIDE 43

43

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement CS: FPGA

A note on the security of Higher-Order Threshold Implementations Oscar Reparaz, ePrint Report 2015/001

First Order Second Order

slide-44
SLIDE 44

44

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Correct Measurement CS: FPGA

A note on the security of Higher-Order Threshold Implementations Oscar Reparaz, ePrint Report 2015/001

First Order Second Order Fifth Order Second Order (bivariate)

slide-45
SLIDE 45

45

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation

  • Classical Approach
  • Incremental
  • Multivariate
  • Parallelization
slide-46
SLIDE 46

46

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

Measurement Phase 𝑈 Time

slide-47
SLIDE 47

47

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

Measurement Phase 𝑈

1

𝑈 Time

slide-48
SLIDE 48

48

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

Measurement Phase 𝑈

𝑜−1

… 𝑈

2

𝑈

1

𝑈 Time

slide-49
SLIDE 49

49

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

Measurement Phase Analysis Phase 𝑈

𝑜−1

… 𝑈

2

𝑈

1

𝑈 Time t-Test

slide-50
SLIDE 50

50

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

Measurement Phase Analysis Phase 𝑈

𝑜−1

… 𝑈

2

𝑈

1

𝑈 Time t-Test Result

slide-51
SLIDE 51

51

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

t = 𝜈0 − 𝜈1 𝑡0

2

𝑜0 + 𝑡1

2

𝑜1 𝜈1, 𝑡1

2

𝜈0, 𝑡0

2

Requires estimation of: Reminder:

  • 𝜈 = 𝐹 𝑈
  • 𝑡2 = 𝐹

𝑈 − 𝜈 2

t-Test

slide-52
SLIDE 52

52

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

t = 𝜈0 − 𝜈1 𝑡0

2

𝑜0 + 𝑡1

2

𝑜1 𝜈1, 𝑡1

2

𝜈0, 𝑡0

2

Requires estimation of: Reminder:

  • 𝜈 = 𝐹 𝑈
  • 𝑡2 = 𝐹

𝑈 − 𝜈 2

𝑈

𝑜−1

… 𝑈

1

𝑈 t-Test

slide-53
SLIDE 53

53

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

t = 𝜈0 − 𝜈1 𝑡0

2

𝑜0 + 𝑡1

2

𝑜1 𝜈1, 𝑡1

2

𝜈0, 𝑡0

2

Requires estimation of: Reminder:

  • 𝜈 = 𝐹 𝑈
  • 𝑡2 = 𝐹

𝑈 − 𝜈 2

𝑈

𝑜−1

… 𝑈

1

𝑈 t-Test Pass 1

𝜈 = 𝐹 𝑈

slide-54
SLIDE 54

54

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

t = 𝜈0 − 𝜈1 𝑡0

2

𝑜0 + 𝑡1

2

𝑜1 𝜈1, 𝑡1

2

𝜈0, 𝑡0

2

Requires estimation of: Reminder:

  • 𝜈 = 𝐹 𝑈
  • 𝑡2 = 𝐹

𝑈 − 𝜈 2

𝑈

𝑜−1

… 𝑈

1

𝑈 t-Test Pass 1

𝜈 = 𝐹 𝑈

Pass 2

𝑡2 = 𝐹 𝑈 − 𝜈 2

slide-55
SLIDE 55

55

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

t = 𝜈0 − 𝜈1 𝑡0

2

𝑜0 + 𝑡1

2

𝑜1 𝜈1, 𝑡1

2

𝜈0, 𝑡0

2

Requires estimation of: Reminder:

  • 𝜈 = 𝐹 𝑈
  • 𝑡2 = 𝐹

𝑈 − 𝜈 2

𝑈

𝑜−1

… 𝑈

1

𝑈 t-Test Pass 1

𝜈 = 𝐹 𝑈

Pass 2

𝑡2 = 𝐹 𝑈 − 𝜈 2

Pass 3

Required for certain higher-order tests

slide-56
SLIDE 56

56

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Classical Approach

Problems:

1) Measurement phase need to be completed 2) All measurements need to be stored 3) Traces need to be loaded multiple times

Solution: Incremental Computation

slide-57
SLIDE 57

57

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Idea: Update intermediate values for each new trace

𝑈

slide-58
SLIDE 58

58

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Idea: Update intermediate values for each new trace

𝑈 𝜈, 𝑡2

slide-59
SLIDE 59

59

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Idea: Update intermediate values for each new trace

𝑈 𝜈, 𝑡2 𝑈

1

𝜈, 𝑡2

slide-60
SLIDE 60

60

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Idea: Update intermediate values for each new trace

𝑈 𝜈, 𝑡2 𝑈

1

𝜈, 𝑡2 … 𝜈, 𝑡2 𝑈

𝑜−1

𝜈, 𝑡2

Higher-order tests require the computation of additional values

slide-61
SLIDE 61

61

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Idea: Update intermediate values for each new trace

𝑈 𝜈, 𝑡2 𝑈

1

𝜈, 𝑡2 … 𝜈, 𝑡2 𝑈

𝑜−1

𝜈, 𝑡2

Advantages:

1) Can be run in parallel to measurement phase 2) Does not require that all measurements are stored 3) Loads each trace only once

Higher-order tests require the computation of additional values

slide-62
SLIDE 62

62

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Problem: Computation of intermediate values

slide-63
SLIDE 63

63

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Problem: Computation of intermediate values Approach 1: Use raw moments dth-order raw moment: 𝑁𝑒 = 𝐹 𝑈𝑒 Given: 𝑁1 𝑁2 𝜈 = 𝑁1 𝑡2 = 𝑁2 − 𝑁1 2 Compute:

slide-64
SLIDE 64

64

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Problem: Computation of intermediate values Approach 1: Use raw moments dth-order raw moment: 𝑁𝑒 = 𝐹 𝑈𝑒 Given: 𝑁1 𝑁2 𝜈 = 𝑁1 𝑡2 = 𝑁2 − 𝑁1 2 Compute: Higher-order test require additional moments Example: Univariate 1st-5th order tests require 𝑁1 − 𝑁10

slide-65
SLIDE 65

65

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

𝑈 𝑁1 − 𝑁10 𝑈

1

… 𝑈

𝑜−1

𝑁1 − 𝑁10 𝑁1 − 𝑁10 𝑁1 − 𝑁10

slide-66
SLIDE 66

66

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

𝑈 𝑁1 − 𝑁10 𝑈

1

… 𝑈

𝑜−1

𝑁1 − 𝑁10 𝑁1 − 𝑁10 𝑁1 − 𝑁10 t-Test Result

slide-67
SLIDE 67

67

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

𝑈 𝑁1 − 𝑁10 𝑈

1

… 𝑈

𝑜−1

𝑁1 − 𝑁10 𝑁1 − 𝑁10 𝑁1 − 𝑁10 t-Test Result t-Test Result

slide-68
SLIDE 68

68

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

𝑈 𝑁1 − 𝑁10 𝑈

1

… 𝑈

𝑜−1

𝑁1 − 𝑁10 𝑁1 − 𝑁10 𝑁1 − 𝑁10 t-Test Result

Easy to find update formulas for: 𝑁𝑒 =

𝑗=0 𝑜−1 𝑈𝑗 𝑒

𝑜 Problem: Numerical unstable for large number of traces

slide-69
SLIDE 69

69

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

𝑈 𝑁1 − 𝑁10 𝑈

1

… 𝑈

𝑜−1

𝑁1 − 𝑁10 𝑁1 − 𝑁10 𝑁1 − 𝑁10 t-Test Result

Easy to find update formulas for: 𝑁𝑒 =

𝑗=0 𝑜−1 𝑈𝑗 𝑒

𝑜 Problem: Numerical unstable for large number of traces

Method Order 1 Order 2 Order 3 Order 4 Order 5 3-Pass 25.08399 1258.18874 15.00039 96.08342 947.25523 Raw 25.08399 1258.14132 14.49282

  • 1160.83799
  • 1939218.83401

Example: Computation of variance based on simulations (100M traces ) with 𝒪 100,25

slide-70
SLIDE 70

70

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Approach 2: Use central moments (and 𝑁1) dth-order central moment: 𝐷𝑁𝑒 = 𝐹 (𝑈 − 𝜈)𝑒 Given: 𝑁1 C𝑁2 𝜈 = 𝑁1 𝑡2 = 𝐷𝑁2 Compute:

slide-71
SLIDE 71

71

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Incremental

Approach 2: Use central moments (and 𝑁1) dth-order central moment: 𝐷𝑁𝑒 = 𝐹 (𝑈 − 𝜈)𝑒 Given: 𝑁1 C𝑁2 𝜈 = 𝑁1 𝑡2 = 𝐷𝑁2 Compute: Not that easy to find update formulas for: 𝐷𝑁𝑒 =

𝑗=0 𝑜−1 𝑈𝑗 − 𝜈 𝑒

𝑜 Multivariate tests require adjusted formulas

slide-72
SLIDE 72

72

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Comparison to the raw moments approach:

  • Slightly higher computational effort
  • Less numerical problems, higher accuracy

Efficient Computation Incremental

Method Order 1 Order 2 Order 3 Order 4 Order 5 3-Pass 25.08399 1258.18874 15.00039 96.08342 947.25523 Raw 25.08399 1258.14132 14.49282

  • 1160.83799
  • 1939218.83401

Ours 25.08399 1258.18874 15.00039 96.08342 947.25523

Incremental formulas for tests at arbitrary orders can be found in the paper.

slide-73
SLIDE 73

73

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

𝑢𝑜,0 𝑢𝑜,1 𝑢𝑜,2 𝑢𝑜,3 𝑢𝑜,4

Trace n

Efficient Computation Parallelization

𝑢𝑜+1,0 𝑢𝑜+1,1 𝑢𝑜+1,2 𝑢𝑜+1,3 𝑢𝑜+1,4

Trace n+1

slide-74
SLIDE 74

74

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

𝑢𝑜,0 𝑢𝑜,1 𝑢𝑜,2 𝑢𝑜,3 𝑢𝑜,4

Trace n

Thread Thread 1 Thread 2 Thread 3 Thread 4

Efficient Computation Parallelization

𝑢𝑜+1,0 𝑢𝑜+1,1 𝑢𝑜+1,2 𝑢𝑜+1,3 𝑢𝑜+1,4

Trace n+1

slide-75
SLIDE 75

75

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

𝑢𝑜,0 𝑢𝑜,1 𝑢𝑜,2 𝑢𝑜,3 𝑢𝑜,4

Trace n

Thread Thread 1 Thread 2 Thread 3 Thread 4

Efficient Computation Parallelization

𝑢𝑜+1,0 𝑢𝑜+1,1 𝑢𝑜+1,2 𝑢𝑜+1,3 𝑢𝑜+1,4

Trace n+1

𝑢𝑜,0 𝑢𝑜,1 𝑢𝑜,2 𝑢𝑜,3 𝑢𝑜,4

Trace n

Thread

𝑢𝑜+1,0 𝑢𝑜+1,1 𝑢𝑜+1,2 𝑢𝑜+1,3 𝑢𝑜+1,4

Trace n+1

Thread 1

slide-76
SLIDE 76

76

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Efficient Computation Parallelization

𝑢𝑜,0 𝑢𝑜,1 𝑢𝑜,2 𝑢𝑜,3 𝑢𝑜,4

Trace n

Thread

𝑢𝑜+1,0 𝑢𝑜+1,1 𝑢𝑜+1,2 𝑢𝑜+1,3 𝑢𝑜+1,4

Trace n+1

Thread 1 Thread 2 Thread 3

Example:

  • 1st-5th order t-test
  • 100,000,000 traces (each with 3,000 sample points)
  • 9h on 2 x Intel Xeon X5670 CPUs @ 2.93 GHz (24 hyper-threading cores)
slide-77
SLIDE 77

77

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Conclusion

  • Recommendations
  • Summary
  • Future Work
slide-78
SLIDE 78

78

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Conclusion Recommendations

Fixed vs. random:

  • DUT with masking countermeasure
  • With masked communication

Semi-fixed vs. random:

  • DUT with hiding countermeasure
  • Without masked communication

Specific t-test:

  • DUT with no countermeasures
  • Failed in former non-specific tests
  • Identify suitable intermediate values for key recovery
slide-79
SLIDE 79

79

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

  • Testing based on the t-test is simple and fast
  • Has become popular in recent years

Things to consider:

  • Correct measurement phase is critical
  • Analysis phase can be strongly optimized
  • Higher-order testing easily possible

Additional important aspects:

  • Alignment and signal processing is necessary
  • Finding of points of interest

Conclusion Summary

slide-80
SLIDE 80

80

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

  • Incremental computing for other attacks/evaluation techniques

Conclusion Future Work

Robust and One-Pass Parallel Computation of Correlation-Based Attacks at Arbitrary Order Tobias Schneider, Amir Moradi, Tim Güneysu, ePrint Report 2015/571

MCP-DPA MCC-DPA CPA

slide-81
SLIDE 81

81

Leakage Assessment Methodology | CHES 2015 | Tobias Schneider

Thanks for Listening!

Any Questions?