Improved Side-Channel Analysis of Finite-Field Multiplication Sonia - - PowerPoint PPT Presentation

improved side channel analysis of finite field
SMART_READER_LITE
LIVE PREVIEW

Improved Side-Channel Analysis of Finite-Field Multiplication Sonia - - PowerPoint PPT Presentation

Improved Side-Channel Analysis of Finite-Field Multiplication Sonia Belad 1 Jean-Sbastien Coron 2 Pierre-Alain Fouque 3 Benot Grard 4 Jean-Gabriel Kammerer 5 Emmanuel Prouff 6 1cole normale suprieure and Thales Communications &


slide-1
SLIDE 1

09-15-2015 1 / 20

Improved Side-Channel Analysis of Finite-Field Multiplication

Sonia Belaïd1 Jean-Sébastien Coron2 Pierre-Alain Fouque3 Benoît Gérard4 Jean-Gabriel Kammerer5 Emmanuel Prouff6

1École normale supérieure and Thales Communications & Security, 2University of Luxembourg 3Université de Rennes 1 and Institut Universitaire de France 4DGA.MI and IRISA 5DGA.MI and IRMAR 6ANSSI

slide-2
SLIDE 2

09-15-2015 2 / 20

Outline

Introduction Side-Channel Attacks Classical Power-Analysis Attacks Hidden Multiplier Problem State of The Art New Attack Main Idea Filtering Solving the System with Errors Extension to Chosen Inputs Conclusion

slide-3
SLIDE 3

09-15-2015 3 / 20

Outline

Introduction Side-Channel Attacks Classical Power-Analysis Attacks Hidden Multiplier Problem State of The Art New Attack Main Idea Filtering Solving the System with Errors Extension to Chosen Inputs Conclusion

slide-4
SLIDE 4

09-15-2015 4 / 20

➜ Black-box cryptanalysis ➜ Side-channel analysis

slide-5
SLIDE 5

09-15-2015 4 / 20

➜ Black-box cryptanalysis: A ← (mi, ci) ➜ Side-Channel Analysis mi k ci

slide-6
SLIDE 6

09-15-2015 4 / 20

➜ Black-box cryptanalysis ➜ Side-Channel Analysis: A ← (mi, ci, Li) mi k ci Li

slide-7
SLIDE 7

09-15-2015 4 / 20

➜ Black-box cryptanalysis ➜ Side-Channel Analysis: A ← (mi, ci, Li) mi k ci Li

slide-8
SLIDE 8

09-15-2015 4 / 20

➜ Black-box cryptanalysis ➜ Side-Channel Analysis: A ← (mi, ci, Li) mi k ci Li

slide-9
SLIDE 9

09-15-2015 4 / 20

➜ Black-box cryptanalysis ➜ Side-Channel Analysis: A ← (mi, ci, Li) mi k ci Li

slide-10
SLIDE 10

09-15-2015 4 / 20

➜ Black-box cryptanalysis ➜ Side-Channel Analysis: A ← (mi, ci, Li) mi k ci Li

slide-11
SLIDE 11

09-15-2015 5 / 20

Classical Power-Analysis Attack against AES

128-bit input m

  • k0

S-box 8-bit v

– 8 bits Attack on 8 bits

◮ prediction of the outputs for the

256 possible 8-bit secret

◮ correlation between predictions

and leakage

◮ selection of the best correlation to

find the correct 8-bit secret Attack on 128 bits

◮ repetition of the attack on 8 bits

  • n each S-box
slide-12
SLIDE 12

09-15-2015 6 / 20

Power-Analysis Attack against AES-GCM authentication, multiplication-based fresh re-keying, ...

➜ k is only manipulated in multiplications

128-bit input m 128-bit key k

×8 ×8 ... ×8

128-bit output v

slide-13
SLIDE 13

09-15-2015 6 / 20

Power-Analysis Attack against AES-GCM authentication, multiplication-based fresh re-keying, ...

➜ k is only manipulated in multiplications

128-bit input m 128-bit key k

×8 ×8 ... ×8

128-bit output v 128-bit input m 128-bit key k

×128

128-bit output v

slide-14
SLIDE 14

09-15-2015 7 / 20

Hidden Multiplier Problem

Definition

Let k ← GF(2n). Let ℓ ∈ N. Given a sequence {mi, Li}1≤i≤ℓ where

◮ mi ← GF(2n) ◮ Li = HW(vi)+εi, εi ∼ N(0, σ2)

recover k.

n-bit input m n-bit key k

×n

n-bit output v

slide-15
SLIDE 15

09-15-2015 8 / 20

State of The Art

Sonia Belaïd, Pierre-Alain Fouque, and Benoît Gérard. Side-channel analysis of multiplications in GF(2128) - application to AES-GCM. In Asiacrypt 2014, Proceedings, Part II, pages 306–325.

➜ use Hamming Weights’ LSB ➜ solve a system with errors

Signal-to-Noise Ratio = signal variance

noise variance = 32/σ2

Method 3.200 800 200 128 Naive method (Cs, Ct) (28, 221) (28, 221) (28, 265) (28, 2107) LPN (LF Algo) (Cs, Ct) (211, 214) (220, 222) (232, 234) (248, 250) Linear decoding (Cs, Ct) (26, 26) (26, 27) (28, 225) (29, 262)

slide-16
SLIDE 16

09-15-2015 8 / 20

State of The Art

Sonia Belaïd, Pierre-Alain Fouque, and Benoît Gérard. Side-channel analysis of multiplications in GF(2128) - application to AES-GCM. In Asiacrypt 2014, Proceedings, Part II, pages 306–325.

➜ use Hamming Weights’ LSB ➜ solve a system with errors

Signal-to-Noise Ratio = signal variance

noise variance = 32/σ2

Method 3.200 800 200 128 Naive method (Cs, Ct) (28, 221) (28, 221) (28, 265) (28, 2107) LPN (LF Algo) (Cs, Ct) (211, 214) (220, 222) (232, 234) (248, 250) Linear decoding (Cs, Ct) (26, 26) (26, 27) (28, 225) (29, 262)

✘ specific to multiplication in GF(2128) ✘ highly impacted by noise

slide-17
SLIDE 17

09-15-2015 9 / 20

Outline

Introduction Side-Channel Attacks Classical Power-Analysis Attacks Hidden Multiplier Problem State of The Art New Attack Main Idea Filtering Solving the System with Errors Extension to Chosen Inputs Conclusion

slide-18
SLIDE 18

09-15-2015 10 / 20

Contributions

New Attack: ➜ filter the multiplication’s outputs leakage to extract high and low Hamming weights ➜ solve a system with errors

slide-19
SLIDE 19

09-15-2015 10 / 20

Contributions

New Attack: ➜ filter the multiplication’s outputs leakage to extract high and low Hamming weights ➜ solve a system with errors ✔ less impacted by noise ✔ more generic

slide-20
SLIDE 20

09-15-2015 11 / 20

Main Idea of The Attack

Reminder: L(v) = HW(v) + ε = HW(m · k) + ε Extreme cases: HW(v) = 0 ➜ v = 0                            v0 =

  • 0j<n
  • i∈I(0,j) mi
  • kj = 0

v1 =

  • 0j<n
  • i∈I(1,j) mi
  • kj = 0

. . . . . . . . . vn−1 =

  • 0j<n
  • i∈I(n−1,j) mi
  • kj = 0

HW(v) = n ➜ v = 2n − 1                            v0 =

  • 0j<n
  • i∈I(0,j) mi
  • kj = 1

v1 =

  • 0j<n
  • i∈I(1,j) mi
  • kj = 1

. . . . . . . . . vn−1 =

  • 0j<n
  • i∈I(n−1,j) mi
  • kj = 1
slide-21
SLIDE 21

09-15-2015 11 / 20

Main Idea of The Attack

Reminder: L(v) = HW(v) + ε = HW(m · k) + ε Usual cases: L(v) low ➜ v ≈ 0                            v0 =

  • 0j<n
  • i∈I(0,j) mi
  • kj = 0

v1 =

  • 0j<n
  • i∈I(1,j) mi
  • kj = 0

. . . . . . . . . vn−1 =

  • 0j<n
  • i∈I(n−1,j) mi
  • kj = 0

L(v) high ➜ v ≈ 2n − 1                            v0 =

  • 0j<n
  • i∈I(0,j) mi
  • kj = 1

v1 =

  • 0j<n
  • i∈I(1,j) mi
  • kj = 1

. . . . . . . . . vn−1 =

  • 0j<n
  • i∈I(n−1,j) mi
  • kj = 1

with an error probability p

slide-22
SLIDE 22

09-15-2015 12 / 20

Two Steps

1. filter the lowest and highest Hamming weights with a limited number of consumption traces to limit the error probability p

➜ obtain a linear system with errors

2. solve the system with the error probability p

➜ recover the secret key k

slide-23
SLIDE 23

09-15-2015 13 / 20

Step 1: Filtering

20 40 60 80 100 0.0 2.0 4.0 6.0 ·10−2 50 78 B(128, 0.5) HW < n

2 − λ √n 2

HW > n

2 + λ √n 2

SNR = 128 n = 128 λ ≈ 2.5      filtering: 1 trace over 25 error probability: p ≈ 0.38

slide-24
SLIDE 24

09-15-2015 14 / 20

Step 1: Filtering

Proportion of filtered acquisitions: F(λ, σ) = 1 − 2−n

n

  • y=0

n y n/2+λs

  • n/2−λs

φy,σ(t)dt, with s = √ n/2 Error probability: p(λ, σ) = 1 F(λ, σ)

n

  • y=0

n

y

  • 2n

        y n

n/2−λs

  • −∞

φy,σ(t)dt

  • low Hamming weights

+

  • 1 − y

n

  • +∞
  • n/2+λs

φy,σ(t)dt

  • high Hamming weights

       

slide-25
SLIDE 25

09-15-2015 15 / 20

Step 1: Filtering

log2(1/F(λ)) 30 25 20 15 10 5 SNR = 128, σ = 0.5 λ 6.00 5.46 4.85 4.15 3.29 2.16 p 0.23 0.25 0.28 0.31 0.34 0.39 p [BFG14] 0.31 SNR = 8, σ = 2 λ 6.37 5.79 5.14 4.39 3.48 2.28 p 0.25 0.27 0.29 0.32 0.35 0.40 p [BFG14] > 0.49 SNR = 2, σ = 4 λ 7.42 6.73 5.97 5.09 4.03 2.64 p 0.28 0.30 0.32 0.34 0.37 0.41 p [BFG14] > 0.49 SNR = 0.5, σ = 8 λ 10.57 9.58 8.48 7.21 5.71 3.73 p 0.34 0.36 0.37 0.39 0.41 0.44 p [BFG14] > 0.49

slide-26
SLIDE 26

09-15-2015 16 / 20

Step 2: Solving the System with Errors

Classical LPN problem: recover the secret key from a noisy system

  • limited memory
  • limited computational power

Specific constraints:

  • limited number of equations/consumption traces
  • key size n (e.g., 128)
  • probability of errors dependent on the filtering and on the noise
slide-27
SLIDE 27

09-15-2015 17 / 20

Experiments

◮ Filtering on a Virtex 5 (128 bits) : SNR = 8.21, σ = 7.11 1 1.5 2 2.5 3 3.5 4 0.36 0.38 0.4 0.42 0.44 filtering (λ) error probabilities ptheoretical pexperimental ◮ Expected complexities to recover k with 220 traces (p ≈ 0.29)

(time , memory )

  • 259.31, 227.00
  • 251.68, 236.00
  • 250.00, 244.00
slide-28
SLIDE 28

09-15-2015 18 / 20

Extension: Chosen Inputs in GF(2128)

  • 1. Exhibit the noisy system:

◮ MSB(m · k) = 0 ➜ HW((2 · m) · k) = HW(m · k) ◮ MSB(m · k) = 1 ➜

|HW((2 · m) · k) − HW(m · k)| =

  • 1 with probability = 3/4

3 with probability = 1/4

SNR (σ) 128 (0.5) 8 (2) 2 (4) 0.5 (8) p 0.003 0.27 0.39 0.46

slide-29
SLIDE 29

09-15-2015 18 / 20

Extension: Chosen Inputs in GF(2128)

  • 1. Exhibit the noisy system:

◮ MSB(m · k) = 0 ➜ HW((2 · m) · k) = HW(m · k) ◮ MSB(m · k) = 1 ➜

|HW((2 · m) · k) − HW(m · k)| =

  • 1 with probability = 3/4

3 with probability = 1/4

SNR (σ) 128 (0.5) 8 (2) 2 (4) 0.5 (8) p 0.003 0.27 0.39 0.46

  • 2. Solve the noisy system:

◮ only 128 equations ◮ repetitions to obtain a system with almost no error

Example:

➜ SNR of 128 can be achieved from an SNR of 2 and 64 repetitions ➜ 128 × 0.003 = 0.384 errors ➜ solving the system with a single error: 27 key verifications

slide-30
SLIDE 30

09-15-2015 19 / 20

Outline

Introduction Side-Channel Attacks Classical Power-Analysis Attacks Hidden Multiplier Problem State of The Art New Attack Main Idea Filtering Solving the System with Errors Extension to Chosen Inputs Conclusion

slide-31
SLIDE 31

09-15-2015 20 / 20

Conclusion

Summary ⋆ attack on multiplications without looking inside the multiplication ⋆ less noise sensitive than [BFG14] ⋆ practical for n = 128 Further Work ⋆ application of similar attacks to other primitives ⋆ deeper analysis of LPN techniques to improve solving in side-channel contexts

slide-32
SLIDE 32

09-15-2015 20 / 20

Conclusion

Summary ⋆ attack on multiplications without looking inside the multiplication ⋆ less noise sensitive than [BFG14] ⋆ practical for n = 128 Further Work ⋆ application of similar attacks to other primitives ⋆ deeper analysis of LPN techniques to improve solving in side-channel contexts Thank you for your attention.