Protecting AES with Shamirs Secret Sharing Scheme Louis Goubin and - - PowerPoint PPT Presentation

protecting aes with shamir s secret sharing scheme
SMART_READER_LITE
LIVE PREVIEW

Protecting AES with Shamirs Secret Sharing Scheme Louis Goubin and - - PowerPoint PPT Presentation

Introduction Description of the scheme Complexity analysis Security analysis Conclusion Protecting AES with Shamirs Secret Sharing Scheme Louis Goubin and Ange Martinelli CHES 2011, September 29, Nara Japan 1/26 grid Introduction


slide-1
SLIDE 1

1/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Protecting AES with Shamir’s Secret Sharing Scheme

Louis Goubin and Ange Martinelli

CHES 2011, September 29, Nara Japan

slide-2
SLIDE 2

grid

2/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Outline

1 Introduction

Context Shamir’s secret sharing scheme

2 Description of the scheme

Core Idea Masking AES: SSS masking scheme

3 Complexity analysis

Complexity of operations Overall complexity

4 Security analysis

Information Theoretic Analysis Higher-Order DPA Evaluation Attack simulations

5 Conclusion

slide-3
SLIDE 3

grid

3/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Outline

1 Introduction

Context Shamir’s secret sharing scheme

2 Description of the scheme

Core Idea Masking AES: SSS masking scheme

3 Complexity analysis

Complexity of operations Overall complexity

4 Security analysis

Information Theoretic Analysis Higher-Order DPA Evaluation Attack simulations

5 Conclusion

slide-4
SLIDE 4

grid

4/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Context

  • Block ciphers are vulnerable to SCA.
  • d-th order boolean masking is the most implemented.
  • Improve security of masking schemes against SCA:
slide-5
SLIDE 5

grid

4/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Context

  • Block ciphers are vulnerable to SCA.
  • d-th order boolean masking is the most implemented.
  • Improve security of masking schemes against SCA:

Increase the order d of the masking.

∗ +: Security of dO-masking grows exponentially with d due to intrinsic leakage noise [ChariJutlaRaoRohatgi99] ∗ –: Efficiency of dO-masking quickly decreases with d

slide-6
SLIDE 6

grid

4/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Context

  • Block ciphers are vulnerable to SCA.
  • d-th order boolean masking is the most implemented.
  • Improve security of masking schemes against SCA:

Increase the order d of the masking.

∗ +: Security of dO-masking grows exponentially with d due to intrinsic leakage noise [ChariJutlaRaoRohatgi99] ∗ –: Efficiency of dO-masking quickly decreases with d

Complicate the relation between the masks and the masked variable. ⇒ this work

slide-7
SLIDE 7

grid

5/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Shamir’s secret sharing scheme

  • a0 secret.
  • P is a polynomial s.t.

P(x) = ad · xd + ad−1 · xd−1 + · · · + a1 · x + a0

  • Each user i has (xi, yi = P(xi))xi=0
  • Reconstruction:

a0 =

d

  • yi · βi

where βi =

d

  • j=0,j=i

−xj xi − xj .

slide-8
SLIDE 8

grid

6/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Outline

1 Introduction

Context Shamir’s secret sharing scheme

2 Description of the scheme

Core Idea Masking AES: SSS masking scheme

3 Complexity analysis

Complexity of operations Overall complexity

4 Security analysis

Information Theoretic Analysis Higher-Order DPA Evaluation Attack simulations

5 Conclusion

slide-9
SLIDE 9

grid

7/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

d-th order masking scheme

  • Each sensitive variable b is shared as

(xi, yi)i=0..d

  • We only manipulate pairs (xi, yi)
  • The cipher text c verifies:

c =

d

  • yfinal

i

· βi where (xi, yfinal

i

) is the output of the last round.

slide-10
SLIDE 10

grid

8/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking linear layers

  • AddRoundKey, ShiftRows, MixColumns computed using linear
  • perations.
  • Let u ∈ GF(256) shared as (xi, ui)i=0..d, v ∈ GF(256)
slide-11
SLIDE 11

grid

8/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking linear layers

  • AddRoundKey, ShiftRows, MixColumns computed using linear
  • perations.
  • Let u ∈ GF(256) shared as (xi, ui)i=0..d, v ∈ GF(256)

b ⊕ v → (x′

i , y′ i ) = (xi, yi ⊕ v)

slide-12
SLIDE 12

grid

8/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking linear layers

  • AddRoundKey, ShiftRows, MixColumns computed using linear
  • perations.
  • Let u ∈ GF(256) shared as (xi, ui)i=0..d, v ∈ GF(256)

b ⊕ v → (x′

i , y′ i ) = (xi, yi ⊕ v)

b ⊕ u → (x′

i , y′ i ) = (xi, yi ⊕ ui)

slide-13
SLIDE 13

grid

8/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking linear layers

  • AddRoundKey, ShiftRows, MixColumns computed using linear
  • perations.
  • Let u ∈ GF(256) shared as (xi, ui)i=0..d, v ∈ GF(256)

b ⊕ v → (x′

i , y′ i ) = (xi, yi ⊕ v)

b ⊕ u → (x′

i , y′ i ) = (xi, yi ⊕ ui)

b · v → (x′

i , y′ i ) = (xi, yi · v)

slide-14
SLIDE 14

grid

9/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking AES Sbox

  • SubByte can be derived from [RivainProuff10] using

x−1 = x254.

  • Secure square: linear over GF(256):

b2 → (x′

i , y′ i ) = (x2 i , yi 2)

  • x′

i = xi ⇒ need a RefreshMasks operation.

  • Secure multiplication:

product of 2 degree d polynomials ⇒ polynomial of degree 2d

slide-15
SLIDE 15

grid

10/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

RefreshMasks operation

  • Derived from [Ben-OrGoldwasserWigderson88]

Sharing each share Reconstructing original value Algorithm 1 RefreshMasks Input: Shared representation of b, (αi, yi)i=0..d, chosen (xi)i=0..d, t such that αi = x2t

i

Output: Shared representation of b, (xi, y ′

i )i=0..d

  • 1. for i = 0 to d do

2. β′

i ← β2t i

3. Share yi in (xj, zij)j=0..d

  • 4. for i = 0 to d do

5. (xi, y ′

i ) ←

 xi,

d

  • j=0

β′

j · zji

 

  • 6. return (xi, y ′

i )i=0..d

slide-16
SLIDE 16

grid

11/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking the field multiplication

  • Two possibilities:

Adapt SMC algorithm of [Ben-OrGoldwasserWigderson88]1 ⇒ huge complexity Provide a new algorithm exploiting the SCA context ⇒ loss of known security proof

1see full version at http://eprint.iacr.org/2011/516.pdf

slide-17
SLIDE 17

grid

11/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking the field multiplication

  • Two possibilities:

Adapt SMC algorithm of [Ben-OrGoldwasserWigderson88]1 ⇒ huge complexity Provide a new algorithm exploiting the SCA context ⇒ loss of known security proof ⇒ our choice.

  • Idea : truncate the degree 2d polynomial to degree d

1see full version at http://eprint.iacr.org/2011/516.pdf

slide-18
SLIDE 18

grid

12/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking the field multiplication

  • Let βj,k(x) be defined as:

βj(x) =

d

  • l=0,l=j

x − xl xj − xl . βj(x) · βk(x) = α2dx2d + · · · + αdxd + · · · + α1x + α0 Then βj,k(x) = βk,j(x) = αdxd + · · · + α1x + α0.

  • P(x) =

d

  • j=0

d

  • k=0

yj · uk · βj,k(x) verifies:

degree(P) = d P(0) = b · u ∀x ∈ {xi}i=0..d, P(xi) = y ′

i

slide-19
SLIDE 19

grid

13/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Masking the field multiplication

Algorithm 2 Share multiplication SecMult Input: Shared representation of b, (xi, yi)i=0..d and u, (xi, ui)i=0..d Output: Shares (xi, y ′

i )i=0..d representing the product of b and u

  • 1. for j = 0 to d do

2. for k = 0 to d do 3. zj,k ← yj · uk

  • 4. for i = 0 to d do

5. (xi, y ′

i ) ←

 xi,  

d

  • j=1
  • 0≤k<j

(zj,k ⊕ zk,j) · βj,k(xi)   +

d

  • j=0

zj,j · βj,j(xi)  

  • 6. return (xi, y ′

i )i=0..d

slide-20
SLIDE 20

grid

14/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Intuition of security

  • Intuitively we have

One needs at least d + 1 shares to define a polynomial of degree d, βj,k(xi) is independent of any secret, yj · uk does not leak more information on b (resp. u) than the knowledge of yj (resp. uk),

  • No easy security proof for SecMult a order d: open work.
slide-21
SLIDE 21

grid

15/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Outline

1 Introduction

Context Shamir’s secret sharing scheme

2 Description of the scheme

Core Idea Masking AES: SSS masking scheme

3 Complexity analysis

Complexity of operations Overall complexity

4 Security analysis

Information Theoretic Analysis Higher-Order DPA Evaluation Attack simulations

5 Conclusion

slide-22
SLIDE 22

grid

16/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Complexity of the inversion

Table: Complexity of inversion algorithms

  • rder

XORs multiplications ˆ2j

  • Rand. bytes

RAM (bytes) O1-SSS 36 54 14 6 20 O2-SSS 150 165 21 18 33 Od-SSS 7d3 + 18d2 + 11d 5d3 + 18d2 + 22d + 9 7(d + 1) 3d2 + 3d d2 + 10d + 9 O1-Bool. 20 16 6 6 7 O2-Bool. 56 36 9 16 12 O3-Bool. 108 64 12 20 18 O4-Bool. 176 100 15 48 25 Od-Bool. 7d2 + 12d 4d2 + 8d + 4 3(d + 1) 2d2 + 4d

1 2d2 + 7 2d + 3

slide-23
SLIDE 23

grid

17/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Overall complexity

  • Log/alog tables based multiplication

Table: Complexity of cipher implementations

Masking XORs/ANDs Table look-ups Random bits RAM (bits) ROM (bits) 1O boolean 17640 16144 16896 312 6128 2O boolean 37800 32272 46080 352 6128 3O boolean 65640 54160 87552 400 6128 1O SSS 31760 37296 16240 400 6128

slide-24
SLIDE 24

grid

17/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Overall complexity

  • Log/alog tables based multiplication

Table: Complexity of cipher implementations

Masking XORs/ANDs Table look-ups Random bits RAM (bits) ROM (bits) 1O boolean 17640 16144 16896 312 6128 2O boolean 37800 32272 46080 352 6128 3O boolean 65640 54160 87552 400 6128 1O SSS 31760 37296 16240 400 6128

slide-25
SLIDE 25

grid

18/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Outline

1 Introduction

Context Shamir’s secret sharing scheme

2 Description of the scheme

Core Idea Masking AES: SSS masking scheme

3 Complexity analysis

Complexity of operations Overall complexity

4 Security analysis

Information Theoretic Analysis Higher-Order DPA Evaluation Attack simulations

5 Conclusion

slide-26
SLIDE 26

grid

19/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Leakage model

  • Each sensitive variable Z manipulated as

Ui = (xi, P(xi))i=0..d where P(0) = Z

  • Hamming weight model with additional Gaussian noise
slide-27
SLIDE 27

grid

19/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Leakage model

  • Each sensitive variable Z manipulated as

Ui = (xi, P(xi))i=0..d where P(0) = Z

  • Hamming weight model with additional Gaussian noise
  • No d-th order leakage thanks to Shamir’s sharing scheme
slide-28
SLIDE 28

grid

19/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Leakage model

  • Each sensitive variable Z manipulated as

Ui = (xi, P(xi))i=0..d where P(0) = Z

  • Hamming weight model with additional Gaussian noise
  • No d-th order leakage thanks to Shamir’s sharing scheme
  • What about (d + 1)-th order leakage ?
slide-29
SLIDE 29

grid

20/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Information Theoretic Analysis

  • Follows the approach of [StandaertMalkingYung09]

Mutual information evaluation Figure: Mutual Information values with respect to σ2 (logarithmic scale).

slide-30
SLIDE 30

grid

21/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Higher-Order DPA Evaluation

  • Optimal correlation [ProuffRivainB´

evan09]: ρ =

  • Var
  • E
  • i Li|Z = z
  • Var
  • i Li
  • Boolean masking [RivainProuffDoget09]:

ρbool = (−1)d √n (n + 4σ2)

d+1 2

  • 1O-SSS masking:

ρSSS =

  • n3 · (2n+1 − 4n − 1)

α2 · σ4 + α1 · σ2 + α0

slide-31
SLIDE 31

grid

22/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Higher-Order DPA Evaluation

Figure: Correlation values with respect to σ2 (logarithmic scale).

slide-32
SLIDE 32

grid

23/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Attack simulations

Table: Number of leakage measurements for a 90% success rate.

Attack \ SNR +∞ 1 1/2 1/5 1/10 Attacks against Boolean Masking 2O-DPA on 1O Boolean Masking 150 500 1500 6000 20 000 2O-MIA on 1O Boolean Masking 100 5000 15 000 50 000 160 000 3O-DPA on 2O Boolean Masking 1500 9000 35 000 280 000 > 106 3O-MIA on 2O Boolean Masking 160 160 000 650 000 > 106 > 106 Attacks against SSS Masking 2O-DPA on 1O SSS Masking > 106 > 106 > 106 > 106 > 106 2O-MIA on 1O SSS Masking 500 000 > 106 > 106 > 106 > 106 3O-DPA on 2O SSS Masking > 106 > 106 > 106 > 106 > 106 3O-MIA on 2O SSS Masking > 106 > 106 > 106 > 106 > 106

slide-33
SLIDE 33

grid

24/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Outline

1 Introduction

Context Shamir’s secret sharing scheme

2 Description of the scheme

Core Idea Masking AES: SSS masking scheme

3 Complexity analysis

Complexity of operations Overall complexity

4 Security analysis

Information Theoretic Analysis Higher-Order DPA Evaluation Attack simulations

5 Conclusion

slide-34
SLIDE 34

grid

25/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

Conclusion

  • New alternative to higher order boolean masking
  • Good complexity-security trade-off for high level security:

1O-SSS complexity ≈ 2O boolean 1O-SSS security ≈ 3O boolean

  • Open work:

Security proof for SecMult Try other secret sharing as masking scheme

slide-35
SLIDE 35

grid

26/26

Introduction Description of the scheme Complexity analysis Security analysis Conclusion

End of the talk

Thank you for your attention Questions / comments ?