Elliptic Curve Cryptography on Embedded Devices Scalar - - PowerPoint PPT Presentation

elliptic curve cryptography on embedded devices
SMART_READER_LITE
LIVE PREVIEW

Elliptic Curve Cryptography on Embedded Devices Scalar - - PowerPoint PPT Presentation

Elliptic Curves Side-Channel Countermeasures Conclusion Elliptic Curve Cryptography on Embedded Devices Scalar Multiplication and Side-Channel Attacks Vincent Verneuil 1 , 2 1 Inside Secure 2 Institut de Math ematiques de Bordeaux S


slide-1
SLIDE 1

Elliptic Curves Side-Channel Countermeasures Conclusion

Elliptic Curve Cryptography on Embedded Devices

Scalar Multiplication and Side-Channel Attacks Vincent Verneuil1,2

1Inside Secure 2Institut de Math´

ematiques de Bordeaux

S´ eminaire Arithm´ etique et Th´ eorie de l’Information Institut de Math´ ematiques de Luminy 01 / 2011

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-2
SLIDE 2

Elliptic Curves Side-Channel Countermeasures Conclusion

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-3
SLIDE 3

Elliptic Curves Side-Channel Countermeasures Conclusion

Inside Secure in (very) short

✲ ✲ Manufacturer Chip Embedder Issuer

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-4
SLIDE 4

Elliptic Curves Side-Channel Countermeasures Conclusion

Inside Secure in (very) short

✲ ✲ Manufacturer Chip Embedder Issuer

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-5
SLIDE 5

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-6
SLIDE 6

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-7
SLIDE 7

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Equation

Considering a field Fp, p > 3, the points (x,y) of E/Fp : y2 = x3 +ax +b and the “point at infinity” O form a group.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-8
SLIDE 8

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Equation

Considering a field Fp, p > 3, the points (x,y) of E/Fp : y2 = x3 +ax +b and the “point at infinity” O form a group.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-9
SLIDE 9

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Equation

Considering a field Fp, p > 3, the points (x,y) of E/Fp : y2 = x3 +ax +b and the “point at infinity” O form a group.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-10
SLIDE 10

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Scalar Multiplication

Given a point P in E(Fp) and an integer k, we fix k ·P = P +P +···+P

  • k times

.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-11
SLIDE 11

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Scalar Multiplication

Given a point P in E(Fp) and an integer k, we fix k ·P = P +P +···+P

  • k times

.

Elliptic Curve Discrete Logarithm Problem (ECDLP)

Given P in E(Fp) and α·P, 1 ≤ α ≤ #E(Fp), find α ? Much harder than DLP on finite fields, or factoring.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-12
SLIDE 12

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Scalar Multiplication

Given a point P in E(Fp) and an integer k, we fix k ·P = P +P +···+P

  • k times

.

Elliptic Curve Discrete Logarithm Problem (ECDLP)

Given P in E(Fp) and α·P, 1 ≤ α ≤ #E(Fp), find α ? Much harder than DLP on finite fields, or factoring.

Security 280 2112 2128 2192 ElGamal p/q 160/1024 224/2048 256/3072 384/8192 RSA 1024 2048 3072 8192 ECC 160 224 256 384 Keylengths for roughly equivalent security

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-13
SLIDE 13

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Two Levels Arithmetic

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-14
SLIDE 14

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Two Levels Arithmetic

Points group of the elliptic curve

  • E (Fp) : point set
  • additive law
  • point additions and doublings
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-15
SLIDE 15

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Two Levels Arithmetic

Points group of the elliptic curve

  • E (Fp) : point set
  • additive law
  • point additions and doublings

Base field

  • Fp : equivalence classes of integers modulo p
  • additive and multiplicative laws
  • modular additions and multiplications
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-16
SLIDE 16

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Embedded Devices Constraints

Efficiency

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-17
SLIDE 17

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Embedded Devices Constraints

Efficiency

  • Most transactions have to take less than 500 ms
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-18
SLIDE 18

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Embedded Devices Constraints

Efficiency

  • Most transactions have to take less than 500 ms
  • Small amount of RAM
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-19
SLIDE 19

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Embedded Devices Constraints

Efficiency

  • Most transactions have to take less than 500 ms
  • Small amount of RAM
  • Very low power (then frequency) for contactless devices
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-20
SLIDE 20

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Embedded Devices Constraints

Efficiency

  • Most transactions have to take less than 500 ms
  • Small amount of RAM
  • Very low power (then frequency) for contactless devices

Arithmetic optimizations

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-21
SLIDE 21

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Embedded Devices Constraints

Efficiency

  • Most transactions have to take less than 500 ms
  • Small amount of RAM
  • Very low power (then frequency) for contactless devices

Arithmetic optimizations

  • At the base field level (addition formulas, points representation)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-22
SLIDE 22

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Embedded Devices Constraints

Efficiency

  • Most transactions have to take less than 500 ms
  • Small amount of RAM
  • Very low power (then frequency) for contactless devices

Arithmetic optimizations

  • At the base field level (addition formulas, points representation)
  • At the points group level (scalar multiplication algorithm)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-23
SLIDE 23

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Fp Operations Theoretical Cost

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-24
SLIDE 24

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Fp Operations Theoretical Cost

Expensive operations

  • Inversion (I)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-25
SLIDE 25

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Fp Operations Theoretical Cost

Expensive operations

  • Inversion (I)

Significant operations

  • Multiplication (M)
  • Squaring (S, S/M ≈ 0.8)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-26
SLIDE 26

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Fp Operations Theoretical Cost

Expensive operations

  • Inversion (I)

Significant operations

  • Multiplication (M)
  • Squaring (S, S/M ≈ 0.8)

Negligible operations

  • Addition (A)
  • Subtraction (S)
  • Negation (N)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-27
SLIDE 27

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Fp Operations Theoretical Cost

Expensive operations

  • Inversion (I)

Significant operations

  • Multiplication (M)
  • Squaring (S, S/M ≈ 0.8)

Negligible operations

  • Addition (A)

A/M ≈ 0.2 on most smart cards

  • Subtraction (S)
  • Negation (N)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-28
SLIDE 28

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-29
SLIDE 29

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Digital Signature Algorithm (ECDSA)

Public : E(a,b,p,n = #E), P ∈ E(Fp), H INPUT : d and m OUTPUT : (r,s) Choose at random k in [1,n −1] P1 ← k ·P r ← xP1 mod n If r ≡ 0 mod n restart from the beginning s ← k−1 (H(m)+dr) mod n If s ≡ 0 mod n restart from the beginning Return (r,s)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-30
SLIDE 30

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Digital Signature Algorithm (ECDSA)

Public : E(a,b,p,n = #E), P ∈ E(Fp), H INPUT : d and m OUTPUT : (r,s) Choose at random k in [1,n −1] P1 ← k ·P r ← xP1 mod n If r ≡ 0 mod n restart from the beginning s ← k−1 (H(m)+dr) mod n If s ≡ 0 mod n restart from the beginning Return (r,s)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-31
SLIDE 31

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Digital Signature Algorithm (ECDSA)

Public : E(a,b,p,n = #E), P ∈ E(Fp), H INPUT : d and m OUTPUT : (r,s) Choose at random k in [1,n −1] P1 ← k ·P r ← xP1 mod n If r ≡ 0 mod n restart from the beginning s ← k−1 (H(m)+dr) mod n If s ≡ 0 mod n restart from the beginning Return (r,s) d = s·k −H(m) r mod n

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-32
SLIDE 32

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Diffie-Hellman (ECDH) Key Exchange

E(a,b,p,n), P ∈ E(Fp)

Alice Bob Choose at random a ∈ [1,n−1] Choose at random b ∈ [1,n−1] Pa = a·P ✲ Pa Pb ✛ Pb = b ·P Pab = a·Pb Pab = b ·Pa

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-33
SLIDE 33

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Diffie-Hellman (ECDH) Key Exchange

E(a,b,p,n), P ∈ E(Fp)

Card Terminal Choose at random a ∈ [1,n−1] Choose at random b ∈ [1,n−1] Pa = a·P ✲ Pa Pb ✛ Pb = b ·P Pab = a·Pb Pab = b ·Pa

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-34
SLIDE 34

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Diffie-Hellman (ECDH) Key Exchange

E(a,b,p,n), P ∈ E(Fp)

Card Terminal Choose at random a ∈ [1,n−1] Choose at random b ∈ [1,n−1] Pa = a·P ✲ Pa Pb ✛ Pb = b ·P Pab = a·Pb Pab = b ·Pa

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-35
SLIDE 35

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Standards over Fp

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-36
SLIDE 36

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Standards over Fp

NIST (U.S.)

Keylengths : 192, 224, 256, 384, and 521 bits.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-37
SLIDE 37

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Standards over Fp

NIST (U.S.)

Keylengths : 192, 224, 256, 384, and 521 bits.

Brainpool (BSI, Germany)

Keylengths : 160, 192, 224, 256, 320, 384, and 512 bits.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-38
SLIDE 38

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Elliptic Curve Standards over Fp

NIST (U.S.)

Keylengths : 192, 224, 256, 384, and 521 bits.

Brainpool (BSI, Germany)

Keylengths : 160, 192, 224, 256, 320, 384, and 512 bits. Other standards (ANSI, ISO, IEEE, SECG) → NIST curves

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-39
SLIDE 39

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-40
SLIDE 40

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Affine Representation

A point of the curve E : y2 = x3 +ax +b is represented as (x,y). No representation for O

  • Add. : 1I + 2M + 1S, Doubl. : 1I + 2M + 2S
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-41
SLIDE 41

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Affine Representation

A point of the curve E : y2 = x3 +ax +b is represented as (x,y). No representation for O

  • Add. : 1I + 2M + 1S, Doubl. : 1I + 2M + 2S
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-42
SLIDE 42

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Homogeneous Projective Representation

A point is represented by an equivalence class (X : Y : Z). (X : Y : Z) and (λX : λY : λZ), λ = 0 represent the same point

O = (0 : 1 : 0)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-43
SLIDE 43

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Homogeneous Projective Representation

A point is represented by an equivalence class (X : Y : Z). (X : Y : Z) and (λX : λY : λZ), λ = 0 represent the same point

O = (0 : 1 : 0)

  • Aff. → Hom. conversion :

(x,y) → (x : y : 1)

  • Hom. → Aff. conversion :

(X : Y : Z = 0) → (X/Z,Y/Z)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-44
SLIDE 44

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Homogeneous Projective Representation

A point is represented by an equivalence class (X : Y : Z). (X : Y : Z) and (λX : λY : λZ), λ = 0 represent the same point

O = (0 : 1 : 0)

  • Aff. → Hom. conversion :

(x,y) → (x : y : 1)

  • Hom. → Aff. conversion :

(X : Y : Z = 0) → (X/Z,Y/Z)

  • Add. : 12M + 2S, Doubl. : 6M + 6S
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-45
SLIDE 45

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Jacobian Projective Representation

A point is represented by an equivalence class (X : Y : Z). (X : Y : Z) and (λ2X : λ3Y : λZ), λ = 0 represent the same point

O = (1 : 1 : 0)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-46
SLIDE 46

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Jacobian Projective Representation

A point is represented by an equivalence class (X : Y : Z). (X : Y : Z) and (λ2X : λ3Y : λZ), λ = 0 represent the same point

O = (1 : 1 : 0)

  • Aff. → Jac. conversion :

(x,y) → (x : y : 1)

  • Jac. → Aff. conversion :

(X : Y : Z = 0) → (X/Z 2,Y/Z 3)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-47
SLIDE 47

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Jacobian Projective Representation

A point is represented by an equivalence class (X : Y : Z). (X : Y : Z) and (λ2X : λ3Y : λZ), λ = 0 represent the same point

O = (1 : 1 : 0)

  • Aff. → Jac. conversion :

(x,y) → (x : y : 1)

  • Jac. → Aff. conversion :

(X : Y : Z = 0) → (X/Z 2,Y/Z 3)

  • Add. : 11M + 5S, Doubl. : 2M + 8S
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-48
SLIDE 48

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Modified Jacobian Projective Representation

Introduced in [Cohen, Miyaji & Ono, Efficient elliptic curve exponentiation using mixed coordinates, Asiacrypt 1998].

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-49
SLIDE 49

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Modified Jacobian Projective Representation

Introduced in [Cohen, Miyaji & Ono, Efficient elliptic curve exponentiation using mixed coordinates, Asiacrypt 1998].

Based on the Jacobian projective representation. Plus an extra coordinate (X : Y : Z : aZ 4).

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-50
SLIDE 50

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Modified Jacobian Projective Representation

Introduced in [Cohen, Miyaji & Ono, Efficient elliptic curve exponentiation using mixed coordinates, Asiacrypt 1998].

Based on the Jacobian projective representation. Plus an extra coordinate (X : Y : Z : aZ 4). Faster doubling than Jacobian projective : 3M + 5S But slower addition : 13M + 7S

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-51
SLIDE 51

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-52
SLIDE 52

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Double & Add Algorithm

Left-to-Right

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INPUT : P ∈ E (Fp), k = (kℓ−1 ...k1k0)2 OUTPUT : k ·P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Return Q

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-53
SLIDE 53

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Double & Add Algorithm

Left-to-Right

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INPUT : P ∈ E (Fp), k = (kℓ−1 ...k1k0)2 OUTPUT : k ·P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Return Q On average : ℓ·dbl+ ℓ 2 ·add

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-54
SLIDE 54

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

NAF Multiplication

NAF Representation

Signed binary representation. Minimize the number of non-zero digits (1/3 vs 1/2). Example : 187 = 10111011(2) = 10¯ 1000¯ 10¯ 1(NAF)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-55
SLIDE 55

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

NAF Multiplication

NAF Representation

Signed binary representation. Minimize the number of non-zero digits (1/3 vs 1/2). Example : 187 = 10111011(2) = 10¯ 1000¯ 10¯ 1(NAF)

Interest

  • Minimize the number of additions
  • P → −P is cheap : (X : Y : Z) → (X : −Y : Z)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-56
SLIDE 56

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

NAF Multiplication

Right-to-Left

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INPUT : P ∈ E (Fp), k = (kℓ−1 ...k1k0)NAF OUTPUT : k ·P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ← O R ← P For i from 0 to ℓ−1 do If ki = 1 then Q ← Q +R If ki = −1 then Q ← Q +(−R) R ← 2R Return Q

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-57
SLIDE 57

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

NAF Multiplication

Right-to-Left

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INPUT : P ∈ E (Fp), k = (kℓ−1 ...k1k0)NAF OUTPUT : k ·P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ← O R ← P For i from 0 to ℓ−1 do If ki = 1 then Q ← Q +R If ki = −1 then Q ← Q +(−R) R ← 2R Return Q Cost : ℓ·dbl+ ℓ 3 ·add

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-58
SLIDE 58

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

NAF Multiplication

Right-to-Left

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INPUT : P ∈ E (Fp), k = (kℓ−1 ...k1k0)NAF OUTPUT : k ·P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ← O R ← P For i from 0 to ℓ−1 do If ki = 1 then Q ← Q +R If ki = −1 then Q ← Q +(−R) R ← 2R Return Q Cost : ℓ·dbl+ ℓ 3 ·add

Variant introduced in [Joye, Fast point multiplication on elliptic curves without precomputation, WAIFI 2008] :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-59
SLIDE 59

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

NAF Multiplication

Right-to-Left

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INPUT : P ∈ E (Fp), k = (kℓ−1 ...k1k0)NAF OUTPUT : k ·P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ← O R ← P For i from 0 to ℓ−1 do If ki = 1 then Q ← Q +R If ki = −1 then Q ← Q +(−R) R ← 2R Return Q Cost : ℓ·dbl+ ℓ 3 ·add

Variant introduced in [Joye, Fast point multiplication on elliptic curves without precomputation, WAIFI 2008] :

  • Q in Jacobian coordinates
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-60
SLIDE 60

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

NAF Multiplication

Right-to-Left

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . INPUT : P ∈ E (Fp), k = (kℓ−1 ...k1k0)NAF OUTPUT : k ·P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Q ← O R ← P For i from 0 to ℓ−1 do If ki = 1 then Q ← Q +R If ki = −1 then Q ← Q +(−R) R ← 2R Return Q Cost : ℓ·dbl+ ℓ 3 ·add

Variant introduced in [Joye, Fast point multiplication on elliptic curves without precomputation, WAIFI 2008] :

  • Q in Jacobian coordinates
  • R in modified Jacobian

coordinates

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-61
SLIDE 61

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Other algorithms

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-62
SLIDE 62

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Other algorithms

Sliding window algorithms

Precompute 3P,5P,... to process several scalar bits at a time. Can be combined with the NAF method.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-63
SLIDE 63

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Other algorithms

Sliding window algorithms

Precompute 3P,5P,... to process several scalar bits at a time. Can be combined with the NAF method.

DBNS, multibase NAF...

Heavy precomputations. Too expensive for the ECDSA in the embedded context.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-64
SLIDE 64

Elliptic Curves Side-Channel Countermeasures Conclusion Generalities Protocols Points Representation Algorithms

Other algorithms

Sliding window algorithms

Precompute 3P,5P,... to process several scalar bits at a time. Can be combined with the NAF method.

DBNS, multibase NAF...

Heavy precomputations. Too expensive for the ECDSA in the embedded context.

Co-Z Addition

Euclidean Addition Chains [Meloni, WAIFI 2007] Co-Z binary ladder [Goundar, Joye & Miyaji, CHES 2010]

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-65
SLIDE 65

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-66
SLIDE 66

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-67
SLIDE 67

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

A chip in details

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-68
SLIDE 68

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

A chip in details

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-69
SLIDE 69

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Attack Bench

Non Invasive Attacks

Computer ✡ ✡ ✡ ✡ ✢ ✡ ✡ ✡ ✡ ✣ ❏ ❏ ❏ ❏ ❫ ❏ ❏ ❏ ❏ ❪ ✲ ✛ Card Reader Oscilloscope

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-70
SLIDE 70

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Simple Analyse Example

Leakage on Performed Operations

RSA exponentiation

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-71
SLIDE 71

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Simple Analyse Example

Leakage on Manipulated Data

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-72
SLIDE 72

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Milestones

  • Timing Attacks [Kocher, Timing Attacks on Implementations of

Diffie-Hellman, RSA, DSS, and Other Systems, Crypto 1996]

  • Fault Attacks [Boneh et al., On the Importance of Checking

Cryptographic Protocols for Faults, Eurocrypt 1997]

  • SPA and DPA [Kocher et al., Differential Power Analysis, Crypto 1999]
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-73
SLIDE 73

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Milestones

  • Timing Attacks [Kocher, Timing Attacks on Implementations of

Diffie-Hellman, RSA, DSS, and Other Systems, Crypto 1996]

  • Fault Attacks [Boneh et al., On the Importance of Checking

Cryptographic Protocols for Faults, Eurocrypt 1997]

  • SPA and DPA [Kocher et al., Differential Power Analysis, Crypto 1999]
  • DFA on ECC [Biehl et al., Differential Fault Attacks on Elliptic Curve

Cryptosystems, Crypto 2000]

  • DPA on RSA [den Boer et al., A DPA Attack Against the Modular

Reduction within a CRT Implementation of RSA, CHES 2002]

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-74
SLIDE 74

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Milestones

  • Timing Attacks [Kocher, Timing Attacks on Implementations of

Diffie-Hellman, RSA, DSS, and Other Systems, Crypto 1996]

  • Fault Attacks [Boneh et al., On the Importance of Checking

Cryptographic Protocols for Faults, Eurocrypt 1997]

  • SPA and DPA [Kocher et al., Differential Power Analysis, Crypto 1999]
  • DFA on ECC [Biehl et al., Differential Fault Attacks on Elliptic Curve

Cryptosystems, Crypto 2000]

  • DPA on RSA [den Boer et al., A DPA Attack Against the Modular

Reduction within a CRT Implementation of RSA, CHES 2002]

  • CPA [Brier et al., Correlation Power Analysis with a Leakage Model,

CHES 2004]

  • CPA on PK [Amiel et al., Power Analysis for Secret Recovering and

Reverse Engineering of Public Key Algorithms, SAC 2007]

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-75
SLIDE 75

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-76
SLIDE 76

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Simple Analysis Principle

Measure one side-channel leakage s function of t and consider the curve s(t).

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-77
SLIDE 77

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Simple Analysis Principle

Measure one side-channel leakage s function of t and consider the curve s(t).

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-78
SLIDE 78

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Simple Analysis Principle

Measure one side-channel leakage s function of t and consider the curve s(t).

SPA/SEMA

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-79
SLIDE 79

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Simple Analysis Principle

Measure one side-channel leakage s function of t and consider the curve s(t).

SPA/SEMA

  • depicts the behavior of the chip depending on the performed
  • perations / manipulated data
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-80
SLIDE 80

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Simple Analysis Principle

Measure one side-channel leakage s function of t and consider the curve s(t).

SPA/SEMA

  • depicts the behavior of the chip depending on the performed
  • perations / manipulated data
  • each measure enables direct reading
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-81
SLIDE 81

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Example

Left-to-Right Double & add Algorithm Analysis

Q ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Return Q

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-82
SLIDE 82

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Example

Left-to-Right Double & add Algorithm Analysis

Q ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Return Q

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-83
SLIDE 83

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-84
SLIDE 84

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis Principle

Measure n times a side-channel leakage s function of t and consider the curves s1(t),s2(t),...,sn(t).

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-85
SLIDE 85

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis Principle

Measure n times a side-channel leakage s function of t and consider the curves s1(t),s2(t),...,sn(t).

  • targets a same operation
  • n all curves but involving

different data

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-86
SLIDE 86

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis Principle

Measure n times a side-channel leakage s function of t and consider the curves s1(t),s2(t),...,sn(t).

  • targets a same operation
  • n all curves but involving

different data

  • align vertically the curves
  • n the targeted operation
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-87
SLIDE 87

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis Principle

Measure n times a side-channel leakage s function of t and consider the curves s1(t),s2(t),...,sn(t).

  • targets a same operation
  • n all curves but involving

different data

  • align vertically the curves
  • n the targeted operation
  • process the curves with

statistical treatment

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-88
SLIDE 88

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-89
SLIDE 89

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input.

Original DPA/DEMA

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-90
SLIDE 90

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input.

Original DPA/DEMA

  • For each possible value (guess) :
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-91
SLIDE 91

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input.

Original DPA/DEMA

  • For each possible value (guess) :
  • sort the curves into two sets S0 and S1 depending of some

intermediate result

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-92
SLIDE 92

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input.

Original DPA/DEMA

  • For each possible value (guess) :
  • sort the curves into two sets S0 and S1 depending of some

intermediate result

  • average and subtract : < S0 > − < S1 >, and look for peaks
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-93
SLIDE 93

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input.

Original DPA/DEMA

  • For each possible value (guess) :
  • sort the curves into two sets S0 and S1 depending of some

intermediate result

  • average and subtract : < S0 > − < S1 >, and look for peaks
  • Iterate until peaks are found
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-94
SLIDE 94

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-95
SLIDE 95

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

C1 C2 . . . CN

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-96
SLIDE 96

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

C1 P1 C2 P2 . . . . . . CN PN

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-97
SLIDE 97

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 0 C1 P1 C2 P2 . . . . . . CN PN

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-98
SLIDE 98

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 0 C1 P1 Qi

1

C2 P2 Qi

2

. . . . . . . . . CN PN Qi

N

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-99
SLIDE 99

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 0 C1 P1 Qi

1

→ S0 C2 P2 Qi

2

→ S0 . . . . . . . . . . . . CN PN Qi

N

→ S1

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-100
SLIDE 100

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 0 C1 P1 Qi

1

→ S0 C2 P2 Qi

2

→ S0 . . . . . . . . . . . . CN PN Qi

N

→ S1 Compute < S0 > − < S1 > :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-101
SLIDE 101

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 0 C1 P1 Qi

1

→ S0 C2 P2 Qi

2

→ S0 . . . . . . . . . . . . CN PN Qi

N

→ S1 Compute < S0 > − < S1 > :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-102
SLIDE 102

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 1 C1 P1 Qi

1

C2 P2 Qi

2

. . . . . . . . . CN PN Qi

N

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-103
SLIDE 103

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 1 C1 P1 Qi

1

→ S1 C2 P2 Qi

2

→ S0 . . . . . . . . . . . . CN PN Qi

N

→ S0

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-104
SLIDE 104

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 1 C1 P1 Qi

1

→ S1 C2 P2 Qi

2

→ S0 . . . . . . . . . . . . CN PN Qi

N

→ S0 Compute < S0 > − < S1 > :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-105
SLIDE 105

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Example

Guess : ki = 1 C1 P1 Qi

1

→ S1 C2 P2 Qi

2

→ S0 . . . . . . . . . . . . CN PN Qi

N

→ S0 Compute < S0 > − < S1 > :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-106
SLIDE 106

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input (as DPA).

CPA/CEMA

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-107
SLIDE 107

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input (as DPA).

CPA/CEMA

  • For each possible value (guess) :
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-108
SLIDE 108

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input (as DPA).

CPA/CEMA

  • For each possible value (guess) :
  • compute correlation curves between si and HW of some

intermediate result depending on the guess

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-109
SLIDE 109

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Differential Analysis

Statistical Treatment

Depending on some known and variable input of the algorithm and of a few bits of the secret input (as DPA).

CPA/CEMA

  • For each possible value (guess) :
  • compute correlation curves between si and HW of some

intermediate result depending on the guess

  • average the correlation curves and apply a threshold
  • Iterate until the threshold is reached
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-110
SLIDE 110

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-111
SLIDE 111

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Fault Attacks on Scalar Multiplication

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-112
SLIDE 112

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Fault Attacks on Scalar Multiplication

  • Inject a fault : xP ← xP′
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-113
SLIDE 113

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Fault Attacks on Scalar Multiplication

  • Inject a fault : xP ← xP′
  • Since b is not involved in the scalar multiplication,

P′ ∈ E′(Fp), with E′ : y2 = x3 +ax +b′ and b′ = yP2 −x′

P 3 −ax′ P

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-114
SLIDE 114

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Fault Attacks on Scalar Multiplication

  • Inject a fault : xP ← xP′
  • Since b is not involved in the scalar multiplication,

P′ ∈ E′(Fp), with E′ : y2 = x3 +ax +b′ and b′ = yP2 −x′

P 3 −ax′ P

  • Then the scalar multiplication Q′ = k ·P′ takes place on E′
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-115
SLIDE 115

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Fault Attacks on Scalar Multiplication

  • Inject a fault : xP ← xP′
  • Since b is not involved in the scalar multiplication,

P′ ∈ E′(Fp), with E′ : y2 = x3 +ax +b′ and b′ = yP2 −x′

P 3 −ax′ P

  • Then the scalar multiplication Q′ = k ·P′ takes place on E′
  • DLP for Q′ = k ·P′ is easy to solve if ordE′(P′) is small
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-116
SLIDE 116

Elliptic Curves Side-Channel Countermeasures Conclusion Introduction SPA DPA FA

Fault Attacks on Scalar Multiplication

  • Inject a fault : xP ← xP′
  • Since b is not involved in the scalar multiplication,

P′ ∈ E′(Fp), with E′ : y2 = x3 +ax +b′ and b′ = yP2 −x′

P 3 −ax′ P

  • Then the scalar multiplication Q′ = k ·P′ takes place on E′
  • DLP for Q′ = k ·P′ is easy to solve if ordE′(P′) is small
  • Iterate and apply the chinese reminder theorem to recover k.
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-117
SLIDE 117

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-118
SLIDE 118

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-119
SLIDE 119

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-120
SLIDE 120

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-121
SLIDE 121

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-122
SLIDE 122

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-123
SLIDE 123

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-124
SLIDE 124

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • Unified formulas
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-125
SLIDE 125

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • Unified formulas
  • Homogeneous projective coordinates [Brier & Joye, 2002]
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-126
SLIDE 126

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • Unified formulas
  • Homogeneous projective coordinates [Brier & Joye, 2002]
  • Specific curves formulas (Hessian, Edwards, etc.)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-127
SLIDE 127

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • Unified formulas
  • Homogeneous projective coordinates [Brier & Joye, 2002]
  • Specific curves formulas (Hessian, Edwards, etc.)
  • Atomicity
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-128
SLIDE 128

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • Unified formulas
  • Homogeneous projective coordinates [Brier & Joye, 2002]
  • Specific curves formulas (Hessian, Edwards, etc.)
  • Atomicity
  • Original ECC pattern [Chevallier et al., 2003]
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-129
SLIDE 129

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • Unified formulas
  • Homogeneous projective coordinates [Brier & Joye, 2002]
  • Specific curves formulas (Hessian, Edwards, etc.)
  • Atomicity
  • Original ECC pattern [Chevallier et al., 2003]
  • Longa ECC patterns [Longa, 2007]
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-130
SLIDE 130

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

SPA/SEMA Protection

Mostly three kinds of countermeasures :

  • Regular algorithms
  • Dummy curve operations : Double and Add Always [Coron, 1999]
  • Highly regular : Montgomery ladder [Montgomery, 1987]
  • Unified formulas
  • Homogeneous projective coordinates [Brier & Joye, 2002]
  • Specific curves formulas (Hessian, Edwards, etc.)
  • Atomicity
  • Original ECC pattern [Chevallier et al., 2003]
  • Longa ECC patterns [Longa, 2007]
  • Improved ECC pattern [Giraud and Verneuil, 2010]
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-131
SLIDE 131

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Regular Algorithms

Double & add always

Q,T ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Else T ← Q +P Return Q

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-132
SLIDE 132

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Regular Algorithms

Double & add always

Q,T ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Else T ← Q +P Return Q

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-133
SLIDE 133

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Regular Algorithms

Double & add always

Q,T ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Else T ← Q +P Return Q On average : ℓ·dbl+ℓ·add

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-134
SLIDE 134

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Regular Algorithms

Double & add always

Q,T ← O For i from ℓ−1 to 0 do Q ← 2Q If ki = 1 then Q ← Q +P Else T ← Q +P Return Q On average : ℓ·dbl+ℓ·add Prone to safe errors.

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-135
SLIDE 135

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Regular Algorithms

Montgomery ladder

Q1 ← P Q2 ← 2P For i from l −2 to 0 do Q1−ki ← Q1 +Q2 Qki ← 2Qi Return Q1

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-136
SLIDE 136

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Regular Algorithms

Montgomery ladder

Q1 ← P Q2 ← 2P For i from l −2 to 0 do Q1−ki ← Q1 +Q2 Qki ← 2Qi Return Q1

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-137
SLIDE 137

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Regular Algorithms

Montgomery ladder

Q1 ← P Q2 ← 2P For i from l −2 to 0 do Q1−ki ← Q1 +Q2 Qki ← 2Qi Return Q1 Trick : Y1 and Y2 computation can be avoided.

  • Brier & Joye, PKC 2002
  • Izu & Takagi, PKC 2002
  • Fischer et al., ePrint 2002
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-138
SLIDE 138

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Unified Formulas

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-139
SLIDE 139

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Unified Formulas

A single formula for addition and doubling

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-140
SLIDE 140

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Unified Formulas

A single formula for addition and doubling

  • Homogeneous projective coordinates : 12M + 6S
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-141
SLIDE 141

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Unified Formulas

A single formula for addition and doubling

  • Homogeneous projective coordinates : 12M + 6S
  • Edwards curves : 10M + 1S
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-142
SLIDE 142

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Unified Formulas

A single formula for addition and doubling

  • Homogeneous projective coordinates : 12M + 6S
  • Edwards curves : 10M + 1S in Fp6 with standard curves :(
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-143
SLIDE 143

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Unified Formulas

A single formula for addition and doubling

  • Homogeneous projective coordinates : 12M + 6S
  • Edwards curves : 10M + 1S in Fp6 with standard curves :(
  • Twisted Edwards curves : 9M + 1S
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-144
SLIDE 144

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Unified Formulas

A single formula for addition and doubling

  • Homogeneous projective coordinates : 12M + 6S
  • Edwards curves : 10M + 1S in Fp6 with standard curves :(
  • Twisted Edwards curves : 9M + 1S in Fp3 with standard curves :(
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-145
SLIDE 145

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity

Introduced in [Chevallier-Mames, Ciet & Joye, Low-cost solutions for preventing simple side-channel analysis..., ePrint 2003].

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-146
SLIDE 146

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity

Introduced in [Chevallier-Mames, Ciet & Joye, Low-cost solutions for preventing simple side-channel analysis..., ePrint 2003].

Idea : always repeat the same pattern of operations

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-147
SLIDE 147

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity

Introduced in [Chevallier-Mames, Ciet & Joye, Low-cost solutions for preventing simple side-channel analysis..., ePrint 2003].

Idea : always repeat the same pattern of operations Example : RSA (square & multiply)

  • S, M, S, S, S, M, S, S, M, S, M, ...
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-148
SLIDE 148

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity

Introduced in [Chevallier-Mames, Ciet & Joye, Low-cost solutions for preventing simple side-channel analysis..., ePrint 2003].

Idea : always repeat the same pattern of operations Example : RSA (square & multiply)

  • S, M, S, S, S, M, S, S, M, S, M, ...
  • M, M, M, M, M, M, M, M, M, M, M, ...
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-149
SLIDE 149

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity

Introduced in [Chevallier-Mames, Ciet & Joye, Low-cost solutions for preventing simple side-channel analysis..., ePrint 2003].

Idea : always repeat the same pattern of operations Example : RSA (square & multiply)

  • S, M, S, S, S, M, S, S, M, S, M, ...
  • M, M, M, M, M, M, M, M, M, M, M, ...

→ Cost

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-150
SLIDE 150

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-151
SLIDE 151

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

Principle

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-152
SLIDE 152

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

Principle

Always repeat the same pattern :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-153
SLIDE 153

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

Principle

Always repeat the same pattern :     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-154
SLIDE 154

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

Principle

Always repeat the same pattern :     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-155
SLIDE 155

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

Principle

Always repeat the same pattern :     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition ...

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-156
SLIDE 156

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

Principle

Always repeat the same pattern :     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition ... No more squarings :(

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-157
SLIDE 157

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity for Elliptic Curves

Principle

Always repeat the same pattern :     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition     ◮ Multiplication ◮ Addition ◮ Negation ◮ Addition ... No more squarings :( Many dummy additions/negations :(

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-158
SLIDE 158

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Longa Atomicity

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-159
SLIDE 159

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Longa Atomicity

Other patterns

In [Longa, Accelerating the Scalar Multiplication on Elliptic Curve Cryptosystems over Prime Fields, 2007] are proposed 2 new patterns :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-160
SLIDE 160

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Longa Atomicity

Other patterns

In [Longa, Accelerating the Scalar Multiplication on Elliptic Curve Cryptosystems over Prime Fields, 2007] are proposed 2 new patterns :           ◮ Multiplication ◮ Negation ◮ Addition ◮ Multiplication ◮ Negation ◮ Addition ◮ Addition

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-161
SLIDE 161

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Longa Atomicity

Other patterns

In [Longa, Accelerating the Scalar Multiplication on Elliptic Curve Cryptosystems over Prime Fields, 2007] are proposed 2 new patterns :           ◮ Multiplication ◮ Negation ◮ Addition ◮ Multiplication ◮ Negation ◮ Addition ◮ Addition           ◮ Squaring ◮ Negation ◮ Addition ◮ Multiplication ◮ Negation ◮ Addition ◮ Addition

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-162
SLIDE 162

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity Improvement

Full paper : [Giraud & Verneuil, Atomicity Improvement for Elliptic Curve Scalar Multiplication, CARDIS 2010]

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-163
SLIDE 163

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity Improvement

Full paper : [Giraud & Verneuil, Atomicity Improvement for Elliptic Curve Scalar Multiplication, CARDIS 2010]

Two steps

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-164
SLIDE 164

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity Improvement

Full paper : [Giraud & Verneuil, Atomicity Improvement for Elliptic Curve Scalar Multiplication, CARDIS 2010]

Two steps

  • First define the largest atomic pattern possible
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-165
SLIDE 165

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity Improvement

Full paper : [Giraud & Verneuil, Atomicity Improvement for Elliptic Curve Scalar Multiplication, CARDIS 2010]

Two steps

  • First define the largest atomic pattern possible
  • Then remove as many possible dummy operations
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-166
SLIDE 166

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity Improvement

Full paper : [Giraud & Verneuil, Atomicity Improvement for Elliptic Curve Scalar Multiplication, CARDIS 2010]

Two steps

  • First define the largest atomic pattern possible
  • Then remove as many possible dummy operations

Advantages

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-167
SLIDE 167

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity Improvement

Full paper : [Giraud & Verneuil, Atomicity Improvement for Elliptic Curve Scalar Multiplication, CARDIS 2010]

Two steps

  • First define the largest atomic pattern possible
  • Then remove as many possible dummy operations

Advantages

  • Potentially applicable to every algorithm (no curve restriction)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-168
SLIDE 168

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomicity Improvement

Full paper : [Giraud & Verneuil, Atomicity Improvement for Elliptic Curve Scalar Multiplication, CARDIS 2010]

Two steps

  • First define the largest atomic pattern possible
  • Then remove as many possible dummy operations

Advantages

  • Potentially applicable to every algorithm (no curve restriction)
  • Prevents from the SPA at a lower cost than classical atomicity
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-169
SLIDE 169

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Atomic Joye’s Multiplication

Best pattern

  • Add. 1
  • Add. 2

Dbl. Sq. Add. Mult. Add. Mult. Add. Mult. Add. Add. Sq. Mult. Add. Sub. Mult. Sub. Sub. Mult. Sub.                                 R1 ← Z22 ⋆ R2 ← Y1 ·Z2 ⋆ R5 ← Y2 ·Z1 ⋆ R3 ← R1 ·R2 ⋆ ⋆ R4 ← Z12 R2 ← R5 ·R4 ⋆ R2 ← R2 −R3 R5 ← R1 ·X1 ⋆ ⋆ R6 ← X2 ·R4 R6 ← R6 −R5                                 R1 ← R62 ⋆ R4 ← R5 ·R1 ⋆ R5 ← R1 ·R6 ⋆ R1 ← Z1 ·R6 ⋆ ⋆ R6 ← R22 Z3 ← R1 ·Z2 R1 ← R4 +R4 R6 ← R6 −R1 R1 ← R5 ·R3 X3 ← R6 −R5 R4 ← R4 −X3 R3 ← R4 ·R2 Y3 ← R3 −R1                                 R1 ← X12 R2 ← Y1 +Y1 Z2 ← R2 ·Z1 R4 ← R1 +R1 R3 ← R2 ·Y1 R6 ← R3 +R3 R2 ← R6 ·R3 R1 ← R4 +R1 R1 ← R1 +W1 R3 ← R12 R4 ← R6 ·X1 R5 ← W1 +W1 R3 ← R3 −R4 W2 ← R2 ·R5 X2 ← R3 −R4 R6 ← R4 −X2 R4 ← R6 ·R1 Y2 ← R4 −R2

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-170
SLIDE 170

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-171
SLIDE 171

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

DPA/DEMA Protection

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-172
SLIDE 172

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

DPA/DEMA Protection

Classical countermeasures :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-173
SLIDE 173

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

DPA/DEMA Protection

Classical countermeasures :

  • Scalar blinding : k′ = k +r#E (Fp)
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-174
SLIDE 174

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

DPA/DEMA Protection

Classical countermeasures :

  • Scalar blinding : k′ = k +r#E (Fp)
  • Point coordinates blinding : (X : Y : Z) = (r 2X : r 3Y : rZ), r = 0
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-175
SLIDE 175

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

DPA/DEMA Protection

Classical countermeasures :

  • Scalar blinding : k′ = k +r#E (Fp)
  • Point coordinates blinding : (X : Y : Z) = (r 2X : r 3Y : rZ), r = 0
  • Random curve isomorphism :

a′ ← r 4a b′ ← r 6b P′ ← (r 2XP,r 3YP,rZP) Q ← (xQ′/r 2,yQ′/r 3)

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-176
SLIDE 176

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-177
SLIDE 177

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Fault Protection

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-178
SLIDE 178

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Fault Protection

Classical countermeasures :

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-179
SLIDE 179

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Fault Protection

Classical countermeasures :

  • Redundancy, verification...
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-180
SLIDE 180

Elliptic Curves Side-Channel Countermeasures Conclusion SSCA DSCA FA

Fault Protection

Classical countermeasures :

  • Redundancy, verification...
  • Verify that P,Q ∈ E (Fp).
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-181
SLIDE 181

Elliptic Curves Side-Channel Countermeasures Conclusion

Outline

1

Elliptic Curve Cryptography Generalities Protocols Points Representation and Formulas Scalar Multiplication Algorithms

2

Side-Channel Analysis Introduction Simple Side-Channel Analysis Differential Side-Channel Analysis Fault Analysis

3

Countermeasures SSCA Countermeasures DSCA Countermeasures FA Countermeasures

4

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-182
SLIDE 182

Elliptic Curves Side-Channel Countermeasures Conclusion

Conclusion

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-183
SLIDE 183

Elliptic Curves Side-Channel Countermeasures Conclusion

Conclusion

  • Scalar multuplication efficiency has been extensively studied.
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-184
SLIDE 184

Elliptic Curves Side-Channel Countermeasures Conclusion

Conclusion

  • Scalar multuplication efficiency has been extensively studied.
  • Edwards curve standardization ?
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-185
SLIDE 185

Elliptic Curves Side-Channel Countermeasures Conclusion

Conclusion

  • Scalar multuplication efficiency has been extensively studied.
  • Edwards curve standardization ?
  • Research on side-channel attacks keeps progressing.
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-186
SLIDE 186

Elliptic Curves Side-Channel Countermeasures Conclusion

Conclusion

  • Scalar multuplication efficiency has been extensively studied.
  • Edwards curve standardization ?
  • Research on side-channel attacks keeps progressing.
  • Using security models for proving the resistance against attacks ?
  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-187
SLIDE 187

Elliptic Curves Side-Channel Countermeasures Conclusion

Thank you for your attention !

Contact : vverneuil@insidefr.com www.math.u-bordeaux1.fr/~vverneui/

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices

slide-188
SLIDE 188

Elliptic Curves Side-Channel Countermeasures Conclusion

Additions Cost on a Chip

192-bit integers A/M ≈ 0.2, S = A, and N/M ≈ 0.1

  • V. Verneuil

Elliptic Curve Cryptography on Embedded Devices