Harnessing Biased Faults in Attacks on ECC-based Signature Schemes - - PowerPoint PPT Presentation

harnessing biased faults in attacks on ecc based
SMART_READER_LITE
LIVE PREVIEW

Harnessing Biased Faults in Attacks on ECC-based Signature Schemes - - PowerPoint PPT Presentation

Harnessing Biased Faults in Attacks on ECC-based Signature Schemes Kimmo Jrvinen 1 , Cline Blondeau 1 , Dan Page 2 , Michael Tunstall 2 1 Aalto University, Department of Information and Computer Science, Finland 2 University of Bristol,


slide-1
SLIDE 1

Harnessing Biased Faults in Attacks on ECC-based Signature Schemes

Kimmo Järvinen1, Céline Blondeau1, Dan Page2, Michael Tunstall2

1Aalto University, Department of Information and Computer Science, Finland 2University of Bristol, Department of Computer Science, UK

FDTC 2012, Leuven, Belgium, September 9, 2012

slide-2
SLIDE 2

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

2/16

Outline

Background Existing attacks Our attack using biased faults Results & discussion Demo

slide-3
SLIDE 3

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

3/16

Introduction

◮ We build upon the attack presented by Giraud, Knudsen,

and Tunstall in ACISP 2004 and CARDIS 2010

◮ We show that the attack becomes much more powerful if

faults are biased (that is, distributed nonuniformly) and the attacker knows or can accurately estimate the biases

◮ Literature suggests that such phenomena can be produced

50 100 150 200 250 0.005 0.01 0.015 0.02 0.025 Fault value Probability

0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5

50 100 150 200 250 0.005 0.01 0.015 0.02 0.025 Fault value Probability

0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4

50 100 150 200 250 0.005 0.01 0.015 0.02 0.025 Fault value Probability

0.43, 0.42, 0.32, 0.41, 0.29, 0.49, 0.28, 0.33

slide-4
SLIDE 4

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

4/16

Outline of the attack(s)

  • 1. Compute Q = dP
  • 2. Inject a w-bit fault f into d so d′ = d ⊕ (f · 2m)
  • 3. Compute Q′ = d′P
  • 4. Calculate δ = (d − d′)/2m from Q and Q′ by solving

ECDLP δP = (Q − Q′)/2m

  • 5. Recover information about d using δ (and δ from any

previous iterations)

  • 6. Halt if enough information is recovered, otherwise repeat

from Step 2 We assume that the attacker has a direct access to Q

slide-5
SLIDE 5

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

5/16

The attack of Bao et al.

◮ 1-bit faults ◮ Q − Q′ = (d − d′)P =

  • −2mP

if di = 0 +2mP if di = 1

◮ One fault reveals one key bit ◮ Difficult fault injection

slide-6
SLIDE 6

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

6/16

The attack of Giraud et al.

◮ w-bit faults (in their paper: w = 8) ◮ Because d, d′ ∈ [0, 2w − 1] with d = d′, for the difference

δ = d − d′ we have δ ∈ [−2w + 1, 2w − 1] \ 0

◮ But with a specific fixed d, we have δ ∈ [d − 2w + 1, d] \ 0 −2w + 1 2w − 1

slide-7
SLIDE 7

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

6/16

The attack of Giraud et al.

◮ w-bit faults (in their paper: w = 8) ◮ Because d, d′ ∈ [0, 2w − 1] with d = d′, for the difference

δ = d − d′ we have δ ∈ [−2w + 1, 2w − 1] \ 0

◮ But with a specific fixed d, we have δ ∈ [d − 2w + 1, d] \ 0 ◮ When we observe δ, we learn information about d:

max(0, δ) ≤ d ≤ min(2w − 1, δ + 2w − 1)

◮ We generate faults until we have enough information −2w + 1 2w − 1

slide-8
SLIDE 8

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

6/16

The attack of Giraud et al.

◮ w-bit faults (in their paper: w = 8) ◮ Because d, d′ ∈ [0, 2w − 1] with d = d′, for the difference

δ = d − d′ we have δ ∈ [−2w + 1, 2w − 1] \ 0

◮ But with a specific fixed d, we have δ ∈ [d − 2w + 1, d] \ 0 ◮ When we observe δ, we learn information about d:

max(0, δ) ≤ d ≤ min(2w − 1, δ + 2w − 1)

◮ We generate faults until we have enough information −2w + 1 2w − 1 δ[0]

slide-9
SLIDE 9

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

6/16

The attack of Giraud et al.

◮ w-bit faults (in their paper: w = 8) ◮ Because d, d′ ∈ [0, 2w − 1] with d = d′, for the difference

δ = d − d′ we have δ ∈ [−2w + 1, 2w − 1] \ 0

◮ But with a specific fixed d, we have δ ∈ [d − 2w + 1, d] \ 0 ◮ When we observe δ, we learn information about d:

max(0, δ) ≤ d ≤ min(2w − 1, δ + 2w − 1)

◮ We generate faults until we have enough information −2w + 1 2w − 1 δ[1]

slide-10
SLIDE 10

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N δ dmin dmax 15

−15 −10 −5 15 10 5

slide-11
SLIDE 11

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 δ 6 dmin 6 dmax 15 15

−15 −10 −5 15 10 5 δ[0]

slide-12
SLIDE 12

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 δ 6 −2 dmin 6 6 dmax 15 15 13

−15 −10 −5 15 10 5 δ[1]

slide-13
SLIDE 13

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 δ 6 −2 8 dmin 6 6 8 dmax 15 15 13 13

−15 −10 −5 15 10 5 δ[2]

slide-14
SLIDE 14

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 4 δ 6 −2 8 3 dmin 6 6 8 8 dmax 15 15 13 13 13

−15 −10 −5 15 10 5 δ[3]

slide-15
SLIDE 15

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 4 5 δ 6 −2 8 3 1 dmin 6 6 8 8 8 dmax 15 15 13 13 13 13

−15 −10 −5 15 10 5 δ[4]

slide-16
SLIDE 16

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 4 5 6 δ 6 −2 8 3 1 4 dmin 6 6 8 8 8 8 dmax 15 15 13 13 13 13 13

−15 −10 −5 15 10 5 δ[6]

slide-17
SLIDE 17

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 4 5 6 7 δ 6 −2 8 3 1 4 1 dmin 6 6 8 8 8 8 8 dmax 15 15 13 13 13 13 13 13

−15 −10 −5 15 10 5 δ[7]

slide-18
SLIDE 18

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 4 5 6 7 8 δ 6 −2 8 3 1 4 1 12 dmin 6 6 8 8 8 8 8 12 dmax 15 15 13 13 13 13 13 13 13

−15 −10 −5 15 10 5 δ[8]

slide-19
SLIDE 19

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 4 5 6 7 8 9 δ 6 −2 8 3 1 4 1 12 5 dmin 6 6 8 8 8 8 8 12 12 dmax 15 15 13 13 13 13 13 13 13 13

−15 −10 −5 15 10 5 δ[9]

slide-20
SLIDE 20

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

7/16

Example: Giraud’s attack

N 1 2 3 4 5 6 7 8 9 10 δ 6 −2 8 3 1 4 1 12 5 13 dmin 6 6 8 8 8 8 8 12 12 13 dmax 15 15 13 13 13 13 13 13 13 13 13

−15 −10 −5 15 10 5 13 δ[10]

slide-21
SLIDE 21

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

8/16

Biased faults

Definition

A fault f is biased iff Pr[f = x] = |F|−1 for some x. That is, some values are more probable than others.

◮ We consider a bias where the flipping probability of the ith

key bit is determined by ǫi: Pr[fi = 1] = 1

2 + ǫi ◮ Hence,

Pr[f = x] = w−1

i=0

1

2 + (−1)xiǫi

  • 1 − w−1

i=0

1

2 − ǫi

  • ◮ The attack applies also for other kind of biases. For

instance, if faults are biased by the values of key bits

◮ We assume that the attacker knows ǫi’s

slide-22
SLIDE 22

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

9/16

Probability of a key candidate

◮ From Pr[f]’s, we get Pr[δ | d] for all possible observations

and key values

◮ Observations are collected in ∆ = δ[0], δ[1], . . . , δ[N − 1] ◮ We can then calculate Pr[d | ∆] for all key candidates by

using Bayesian deduction: Pr[d | ∆] = N−1

i=0 Pr[δ[i] | d]

  • j∈K

N−1

i=0 Pr[δ[i] | j] ◮ Let ˆ

d be the most probable candidate

slide-23
SLIDE 23

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15

slide-24
SLIDE 24

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11

slide-25
SLIDE 25

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18

slide-26
SLIDE 26

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21

slide-27
SLIDE 27

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21 4 3 . . . 0.19 0.11 0.07 0.11 0.32 0.19

slide-28
SLIDE 28

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21 4 3 . . . 0.19 0.11 0.07 0.11 0.32 0.19 5 1 . . . 0.07 0.19 0.07 0.19 0.19 0.31

slide-29
SLIDE 29

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21 4 3 . . . 0.19 0.11 0.07 0.11 0.32 0.19 5 1 . . . 0.07 0.19 0.07 0.19 0.19 0.31 6 4 . . . 0.05 0.14 0.05 0.14 0.23 0.39

slide-30
SLIDE 30

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21 4 3 . . . 0.19 0.11 0.07 0.11 0.32 0.19 5 1 . . . 0.07 0.19 0.07 0.19 0.19 0.31 6 4 . . . 0.05 0.14 0.05 0.14 0.23 0.39 7 1 . . . 0.01 0.18 0.04 0.18 0.11 0.49

slide-31
SLIDE 31

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21 4 3 . . . 0.19 0.11 0.07 0.11 0.32 0.19 5 1 . . . 0.07 0.19 0.07 0.19 0.19 0.31 6 4 . . . 0.05 0.14 0.05 0.14 0.23 0.39 7 1 . . . 0.01 0.18 0.04 0.18 0.11 0.49 8 12 . . . 0.18 0.82

slide-32
SLIDE 32

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21 4 3 . . . 0.19 0.11 0.07 0.11 0.32 0.19 5 1 . . . 0.07 0.19 0.07 0.19 0.19 0.31 6 4 . . . 0.05 0.14 0.05 0.14 0.23 0.39 7 1 . . . 0.01 0.18 0.04 0.18 0.11 0.49 8 12 . . . 0.18 0.82 9 5 . . . 0.11 0.89

slide-33
SLIDE 33

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

10/16

Example

w = 4 and ǫ = −1/8

−15 −10 −5 5 10 15 2 4 6 8 10 12 14 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1

δ d Pr[δ | d]

d N δ[i] . . . 5 6 7 8 9 10 11 12 13 14 15 1 6 . . . 0.11 0.11 0.11 0.11 0.07 0.07 0.11 0.11 0.11 0.11 2 −2 . . . 0.07 0.07 0.18 0.18 0.07 0.07 0.18 0.18 3 8 . . . 0.21 0.21 0.08 0.08 0.21 0.21 4 3 . . . 0.19 0.11 0.07 0.11 0.32 0.19 5 1 . . . 0.07 0.19 0.07 0.19 0.19 0.31 6 4 . . . 0.05 0.14 0.05 0.14 0.23 0.39 7 1 . . . 0.01 0.18 0.04 0.18 0.11 0.49 8 12 . . . 0.18 0.82 9 5 . . . 0.11 0.89 10 13 . . . 1.00

slide-34
SLIDE 34

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

11/16

Results: Index of the correct key

10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60

N Remaining candidates / index

ǫ = 0 ǫ = −1/16 ǫ = −1/8 ǫ = −1/4 ǫ = −3/8

w = 8, averages from 1000 experiments for each bias

slide-35
SLIDE 35

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

12/16

Results: Probabability of the best candidate

10 20 30 40 50 60 70 80 90 100 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

N Probability of ˆ d

ǫ = 0 ǫ = −1/16 ǫ = −1/8 ǫ = −1/4 ǫ = −3/8

w = 8, averages from 1000 experiments for each bias

slide-36
SLIDE 36

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

13/16

How realistic it is to assume biased faults?

Clock glitches (Balasch et al., FDTC 2011)

◮ Faults on data loaded from memory are biased by the

position and value of the data

Voltage depletion (Barenghi et al., IACR ePrint 2010/130)

◮ Faults on data loaded from memory are biased by the

position and value (1 → 0 flips) of the data

Laser shots (Canivert et al., e.g. IEEE VLSI Test Symp. 2009)

◮ Faults are biased by the value of data

slide-37
SLIDE 37

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

14/16

How to obtain the biases?

Estimates of the biases can be obtained in two ways:

  • 1. Fault a public value on the targeted device (or a similar

device) and calculate the biases

◮ Critical that faults are similar to those targeted to d

  • 2. Fault d and deduct the biases from the distribution of δ’s

◮ These faults can be reused in the actual attack

slide-38
SLIDE 38

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

15/16

Conclusions & future work

Summary

◮ We presented a very powerful fault attack on public-key

cryptosystems that uses biased faults

◮ More theoretical analysis, countermeasures, etc. are

available in the paper

Suggestions for future work

◮ Fault injection experiments in order to verify the fault model

and to receive information on what kind of biases are

  • btainable in practice

◮ Further analysis: at least varying biases for different bits

(ǫi = ǫj) and faults biased by the value

slide-39
SLIDE 39

Fault Diagnosis and Tolerance in Cryptography (FDTC 2012)

  • Sept. 9, 2012, Leuven, Belgium

16/16

Demo

◮ Programmed by our summer student Juan Francisco

Muñoz Castro