Higher-Order Side Channel Security and Mask Refreshing J.-S. - - PowerPoint PPT Presentation

higher order side channel security and mask refreshing
SMART_READER_LITE
LIVE PREVIEW

Higher-Order Side Channel Security and Mask Refreshing J.-S. - - PowerPoint PPT Presentation

Higher-Order Side Channel Security and Mask Refreshing J.-S. Coron,E. Prouff, M. Rivain and T. Roche thomas.roche@ssi.gouv.fr FSE 2013 March 2013 T. Roche, ANSSI Higher-Order Side Channel Security and Mask Refreshing Side Channel Analysis


slide-1
SLIDE 1

Higher-Order Side Channel Security and Mask Refreshing

J.-S. Coron,E. Prouff, M. Rivain and T. Roche thomas.roche@ssi.gouv.fr FSE 2013 – March 2013

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-2
SLIDE 2

Side Channel Analysis

Side Channel Attacks (SCA) appear 15 years ago

◮ 1996 : Timing Attacks ◮ 1998 : Power Analysis ◮ 2000 : Electromagnetic Analysis

Numerous attacks

◮ 1998 : (single-bit) DPA KocherJaffeJune1999 ◮ 1999 : (multi-bit) DPA Messerges99 ◮ 2000 : Higher-order SCA Messerges2000 ◮ 2002 : Template SCA ChariRaoRohatgi2002 ◮ 2004 : CPA BrierClavierOlivier2004 ◮ 2005 : Stochastic SCA SchindlerLemkePaar2006 ◮ 2008 : Mutual Information SCA GierlichsBatinaTuyls2008 ◮ etc.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-3
SLIDE 3

Side Channel Analysis

Side Channel Attacks (SCA) appear 15 years ago

◮ 1996 : Timing Attacks ◮ 1998 : Power Analysis ◮ 2000 : Electromagnetic Analysis

Numerous attacks

◮ 1998 : (single-bit) DPA KocherJaffeJune1999 ◮ 1999 : (multi-bit) DPA Messerges99 ◮ 2000 : Higher-order SCA Messerges2000 ◮ 2002 : Template SCA ChariRaoRohatgi2002 ◮ 2004 : CPA BrierClavierOlivier2004 ◮ 2005 : Stochastic SCA SchindlerLemkePaar2006 ◮ 2008 : Mutual Information SCA GierlichsBatinaTuyls2008 ◮ etc.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-4
SLIDE 4

SCA Countermeasures

Masking [IBM Team at CRYPTO 1999].

◮ Efficient against SCA in practice. ◮ Difficult to implement for non-linear

transformations.

Shuffling [Researchers from Graz University at

ACNS 2006].

◮ Less efficient against SCA in practice. ◮ Easy to implement for every

transformation.

Whitening [Kocher Jaffe June, CRYPTO 1999].

◮ Less efficient than masking when used

alone and costly in Hardware.

◮ Easy to implement for every

transformation.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-5
SLIDE 5

SCA Countermeasures

Masking [IBM Team at CRYPTO 1999].

◮ Efficient against SCA in practice. ◮ Difficult to implement for non-linear

transformations.

Shuffling [Researchers from Graz University at

ACNS 2006].

◮ Less efficient against SCA in practice. ◮ Easy to implement for every

transformation.

Whitening [Kocher Jaffe June, CRYPTO 1999].

◮ Less efficient than masking when used

alone and costly in Hardware.

◮ Easy to implement for every

transformation.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-6
SLIDE 6

SCA Countermeasures

Masking [IBM Team at CRYPTO 1999].

◮ Efficient against SCA in practice. ◮ Difficult to implement for non-linear

transformations.

Shuffling [Researchers from Graz University at

ACNS 2006].

◮ Less efficient against SCA in practice. ◮ Easy to implement for every

transformation.

Whitening [Kocher Jaffe June, CRYPTO 1999].

◮ Less efficient than masking when used

alone and costly in Hardware.

◮ Easy to implement for every

transformation.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-7
SLIDE 7

SCA Countermeasures

Masking [IBM Team at CRYPTO 1999].

◮ Efficient against SCA in practice. ◮ Difficult to implement for non-linear

transformations.

Shuffling [Researchers from Graz University at

ACNS 2006].

◮ Less efficient against SCA in practice. ◮ Easy to implement for every

transformation.

Whitening [Kocher Jaffe June, CRYPTO 1999].

◮ Less efficient than masking when used

alone and costly in Hardware.

◮ Easy to implement for every

transformation.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-8
SLIDE 8

Masking/Sharing Coutermeasures

Idea : consists in securing the implementation using secret sharing techniques. First Ideas in GoubinPatarin99 and ChariJutlaRaoRohatgi99. Soundness based on the following remark :

[Chari-Jutla-Rao-Rohatgi CRYPTO’99]

◮ Bit x masked → x0, x1, . . . , xd ◮ Leakage : Li ∼ xi + N(µ, σ2) ◮ # of leakage samples to test

  • (Li)i|x = 0
  • =
  • (Li)i|x = 1
  • :

q ≥ O(1)σd

Until now, security proofs are not unconditional and are ”limited” to so-called probing adversaries.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-9
SLIDE 9

Masking/Sharing Coutermeasures

Idea : consists in securing the implementation using secret sharing techniques. First Ideas in GoubinPatarin99 and ChariJutlaRaoRohatgi99. Soundness based on the following remark :

[Chari-Jutla-Rao-Rohatgi CRYPTO’99]

◮ Bit x masked → x0, x1, . . . , xd ◮ Leakage : Li ∼ xi + N(µ, σ2) ◮ # of leakage samples to test

  • (Li)i|x = 0
  • =
  • (Li)i|x = 1
  • :

q ≥ O(1)σd

Until now, security proofs are not unconditional and are ”limited” to so-called probing adversaries.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-10
SLIDE 10

Masking/Sharing Coutermeasures

Idea : consists in securing the implementation using secret sharing techniques. First Ideas in GoubinPatarin99 and ChariJutlaRaoRohatgi99. Soundness based on the following remark :

[Chari-Jutla-Rao-Rohatgi CRYPTO’99]

◮ Bit x masked → x0, x1, . . . , xd ◮ Leakage : Li ∼ xi + N(µ, σ2) ◮ # of leakage samples to test

  • (Li)i|x = 0
  • =
  • (Li)i|x = 1
  • :

q ≥ O(1)σd

Until now, security proofs are not unconditional and are ”limited” to so-called probing adversaries.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-11
SLIDE 11

Masking/Sharing Coutermeasures

Idea : consists in securing the implementation using secret sharing techniques. First Ideas in GoubinPatarin99 and ChariJutlaRaoRohatgi99. Soundness based on the following remark :

[Chari-Jutla-Rao-Rohatgi CRYPTO’99]

◮ Bit x masked → x0, x1, . . . , xd ◮ Leakage : Li ∼ xi + N(µ, σ2) ◮ # of leakage samples to test

  • (Li)i|x = 0
  • =
  • (Li)i|x = 1
  • :

q ≥ O(1)σd

Until now, security proofs are not unconditional and are ”limited” to so-called probing adversaries.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-12
SLIDE 12

Probing Adversary

Notion introduced in IshaiSahaiWagner, CRYPTO 2003 A dth-order probing adversary is allowed to observe at most d intermediate results during the overall algorithm processing.

◮ Hardware interpretation : d is the maximum of wires observed

in the circuit.

◮ Software interpretation : d is the maximum of different timings

during the processing.

dth-order probing adversary = dth-order SCA as introduced in

Messerges99.

Countermeasures proved to be secure against a dth-order probing adv. :

◮ d = 1 : KocherJaffeJune99, Bl¨

  • merGuajardoKrummel04,

ProuffRivain07.

◮ d = 2 : RivainDottaxProuff08. ◮ d ≥ 1 : IshaiSahaiWagner03, ProuffRoche11,

GenelleProuffQuisquater11, CarletGoubinProuffQuisquaterRivain12.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-13
SLIDE 13

Probing Adversary

Notion introduced in IshaiSahaiWagner, CRYPTO 2003 A dth-order probing adversary is allowed to observe at most d intermediate results during the overall algorithm processing.

◮ Hardware interpretation : d is the maximum of wires observed

in the circuit.

◮ Software interpretation : d is the maximum of different timings

during the processing.

dth-order probing adversary = dth-order SCA as introduced in

Messerges99.

Countermeasures proved to be secure against a dth-order probing adv. :

◮ d = 1 : KocherJaffeJune99, Bl¨

  • merGuajardoKrummel04,

ProuffRivain07.

◮ d = 2 : RivainDottaxProuff08. ◮ d ≥ 1 : IshaiSahaiWagner03, ProuffRoche11,

GenelleProuffQuisquater11, CarletGoubinProuffQuisquaterRivain12.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-14
SLIDE 14

Higher-Order Masking Schemes

Achieving security in the probing adversary model

Definition

A dth-order masking scheme for an encryption algorithm c ← E(m, k) is an algorithm (c0, c1, . . . , cd) ← E′ (m0, m1, . . . , md), (k0, k1, . . . , kd)

  • Completeness : there exists R s.t. :

R(c0, · · · , cd) = E(m, k) Security : ∀{iv1, iv2, . . . , ivd} ⊆ {intermediate var. of E′} : Pr

  • k | iv1, iv2, . . . , ivd
  • = Pr
  • k
  • For SPN (eg. DES, AES) the main issue is masking the S-box.
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-15
SLIDE 15

Higher-Order Masking Schemes

Achieving security in the probing adversary model

Definition

A dth-order masking scheme for an encryption algorithm c ← E(m, k) is an algorithm (c0, c1, . . . , cd) ← E′ (m0, m1, . . . , md), (k0, k1, . . . , kd)

  • Completeness : there exists R s.t. :

R(c0, · · · , cd) = E(m, k) Security : ∀{iv1, iv2, . . . , ivd} ⊆ {intermediate var. of E′} : Pr

  • k | iv1, iv2, . . . , ivd
  • = Pr
  • k
  • For SPN (eg. DES, AES) the main issue is masking the S-box.
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-16
SLIDE 16

Masking a S-box

Original work of Ishai, Sahai and Wagner

Main idea : split the S-box computation into elementary operations and protect each of them individually. Original idea limited to GF(2) IshaiSahaiWagner2003 Extended to any field in RivainProuff2010 and

FaustRabinReyzinTromerVaikuntanathan2011.

Data are split by bitwise addition : x − → x0, · · · , xd s.t. xi ← $, i > 0, and x0 =

i xi.

Masking of Linear Transformations L is easy : L(x) → L(x0), L(x1), · · · , L(xd)

  • L(x0)⊕L(x1)⊕···⊕L(xd)=L(x)

Masking of non-linear transformations is an issue since the

  • perations cannot be done on each shares separately.

◮ → Problem reduces to secure multiplications !

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-17
SLIDE 17

Masking a S-box

Original work of Ishai, Sahai and Wagner

Main idea : split the S-box computation into elementary operations and protect each of them individually. Original idea limited to GF(2) IshaiSahaiWagner2003 Extended to any field in RivainProuff2010 and

FaustRabinReyzinTromerVaikuntanathan2011.

Data are split by bitwise addition : x − → x0, · · · , xd s.t. xi ← $, i > 0, and x0 =

i xi.

Masking of Linear Transformations L is easy : L(x) → L(x0), L(x1), · · · , L(xd)

  • L(x0)⊕L(x1)⊕···⊕L(xd)=L(x)

Masking of non-linear transformations is an issue since the

  • perations cannot be done on each shares separately.

◮ → Problem reduces to secure multiplications !

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-18
SLIDE 18

Masking a S-box

Original work of Ishai, Sahai and Wagner

Main idea : split the S-box computation into elementary operations and protect each of them individually. Original idea limited to GF(2) IshaiSahaiWagner2003 Extended to any field in RivainProuff2010 and

FaustRabinReyzinTromerVaikuntanathan2011.

Data are split by bitwise addition : x − → x0, · · · , xd s.t. xi ← $, i > 0, and x0 =

i xi.

Masking of Linear Transformations L is easy : L(x) → L(x0), L(x1), · · · , L(xd)

  • L(x0)⊕L(x1)⊕···⊕L(xd)=L(x)

Masking of non-linear transformations is an issue since the

  • perations cannot be done on each shares separately.

◮ → Problem reduces to secure multiplications !

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-19
SLIDE 19

Masking a S-box

Original work of Ishai, Sahai and Wagner

Main idea : split the S-box computation into elementary operations and protect each of them individually. Original idea limited to GF(2) IshaiSahaiWagner2003 Extended to any field in RivainProuff2010 and

FaustRabinReyzinTromerVaikuntanathan2011.

Data are split by bitwise addition : x − → x0, · · · , xd s.t. xi ← $, i > 0, and x0 =

i xi.

Masking of Linear Transformations L is easy : L(x) → L(x0), L(x1), · · · , L(xd)

  • L(x0)⊕L(x1)⊕···⊕L(xd)=L(x)

Masking of non-linear transformations is an issue since the

  • perations cannot be done on each shares separately.

◮ → Problem reduces to secure multiplications !

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-20
SLIDE 20

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) : a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-21
SLIDE 21

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) : a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-22
SLIDE 22

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 a0b1 a0b2 a1b0 a1b1 a1b2 a2b0 a2b1 a2b2   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-23
SLIDE 23

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 a0b1 a0b2 a1b1 a1b2 a2b2   ⊕   a1b0 a2b0 a2b1   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-24
SLIDE 24

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 a0b1 a0b2 a1b1 a1b2 a2b2   ⊕   a1b0 a2b0 a2b1   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-25
SLIDE 25

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 a0b1 ⊕ a1b0 a0b2 ⊕ a2b0 a1b1 a1b2 ⊕ a2b1 a2b2   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-26
SLIDE 26

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 a0b1 ⊕ a1b0 a0b2 ⊕ a2b0 a1b1 a1b2 ⊕ a2b1 a2b2   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-27
SLIDE 27

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 a0b1 ⊕ a1b0 a0b2 ⊕ a2b0 a1b1 a1b2 ⊕ a2b1 a2b2   ⊕   r0,1 r0,2 r1,2   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-28
SLIDE 28

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 a0b1 ⊕ a1b0 a0b2 ⊕ a2b0 a1b1 a1b2 ⊕ a2b1 a2b2   ⊕   r0,1 r0,2 r0,1 r1,2 r0,2 r1,2   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-29
SLIDE 29

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 r0,1 a1b1 (a1b2 ⊕ r1,2) ⊕ a2b1 r0,2 r1,2 a2b2   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-30
SLIDE 30

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 r0,1 a1b1 (a1b2 ⊕ r1,2) ⊕ a2b1 r0,2 r1,2 a2b2   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-31
SLIDE 31

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 r0,1 a1b1 (a1b2 ⊕ r1,2) ⊕ a2b1 r0,2 r1,2 a2b2   c1 a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-32
SLIDE 32

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 r0,1 a1b1 (a1b2 ⊕ r1,2) ⊕ a2b1 r0,2 r1,2 a2b2   c1 c2 a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-33
SLIDE 33

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 r0,1 a1b1 (a1b2 ⊕ r1,2) ⊕ a2b1 r0,2 r1,2 a2b2   c1 c2 c3 a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-34
SLIDE 34

Masking Multiplications ×

Ishai-Sahai-Wagner Scheme (ISW)

Outlines of the scheme :

◮ Input : (ai)i, (bi)i s.t.

i ai = a, i bi = b

◮ Output : (ci)i s.t.

i ci = a×b

  • ici =
  • iai
  • ×
  • ibi
  • =
  • i,jai×bj

Example (d = 2) :   a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 r0,1 a1b1 (a1b2 ⊕ r1,2) ⊕ a2b1 r0,2 r1,2 a2b2   c1 c2 c3 a0b0 (a0b1 ⊕ r0,1) ⊕ a1b0 (a0b2 ⊕ r0,2) ⊕ a2b0 Ishai et al. prove (d/2)th-order security

◮ Extended to get dth-order security in RivainProuff10

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-35
SLIDE 35

Application to Secure Power Functions

... with a focus on the AES power function x → x254

Let Exp : x → xr be a power function defined over a finite field GF(2n). Split Exp into a sequence of multiplications and squarings. Squaring is a GF(2)-linear operation → easy to mask :

◮ masked square : x2 → x2

0, x2 1, · · · , x2 d

Multiplications masked with ISW Scheme To reduce the overall cost of the securing, favour squaring

  • ver multiplication in the Exp evaluation method :

◮ amount to look at small addition chains for r

For AES non-linear function (r = 254), Rivain and Prouff proves that the evaluation can be done with 4 multiplications

  • nly (optimal).
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-36
SLIDE 36

Application to Secure Power Functions

... with a focus on the AES power function x → x254

Let Exp : x → xr be a power function defined over a finite field GF(2n). Split Exp into a sequence of multiplications and squarings. Squaring is a GF(2)-linear operation → easy to mask :

◮ masked square : x2 → x2

0, x2 1, · · · , x2 d

Multiplications masked with ISW Scheme To reduce the overall cost of the securing, favour squaring

  • ver multiplication in the Exp evaluation method :

◮ amount to look at small addition chains for r

For AES non-linear function (r = 254), Rivain and Prouff proves that the evaluation can be done with 4 multiplications

  • nly (optimal).
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-37
SLIDE 37

Application to Secure Power Functions

... with a focus on the AES power function x → x254

Let Exp : x → xr be a power function defined over a finite field GF(2n). Split Exp into a sequence of multiplications and squarings. Squaring is a GF(2)-linear operation → easy to mask :

◮ masked square : x2 → x2

0, x2 1, · · · , x2 d

Multiplications masked with ISW Scheme To reduce the overall cost of the securing, favour squaring

  • ver multiplication in the Exp evaluation method :

◮ amount to look at small addition chains for r

For AES non-linear function (r = 254), Rivain and Prouff proves that the evaluation can be done with 4 multiplications

  • nly (optimal).
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-38
SLIDE 38

Application to Secure Power Functions

... with a focus on the AES power function x → x254

Let Exp : x → xr be a power function defined over a finite field GF(2n). Split Exp into a sequence of multiplications and squarings. Squaring is a GF(2)-linear operation → easy to mask :

◮ masked square : x2 → x2

0, x2 1, · · · , x2 d

Multiplications masked with ISW Scheme To reduce the overall cost of the securing, favour squaring

  • ver multiplication in the Exp evaluation method :

◮ amount to look at small addition chains for r

For AES non-linear function (r = 254), Rivain and Prouff proves that the evaluation can be done with 4 multiplications

  • nly (optimal).
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-39
SLIDE 39

Masking the S-box

RivainProuff10

Algorithmic description : Input : shares xi s.t.

i xi = x

Output : shares yi s.t.

i yi = x254

  • 1. (zi)i ← (x2

i )i

[

i zi = x2]

  • 2. RefreshMasks
  • (zi)i
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • [

i yi = x3]

  • 4. (wi)i ← (y4

i )i

[

i wi = x12]

  • 5. RefreshMasks
  • (wi)i
  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x15]

  • 7. (yi)i ← (y16

i )i

[

i yi = x240]

  • 8. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x252]

  • 9. (yi)i ← ISW
  • (yi)i, (zi)i
  • [

i yi = x254]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-40
SLIDE 40

Masking the S-box

RivainProuff10

Algorithmic description : Input : shares xi s.t.

i xi = x

Output : shares yi s.t.

i yi = x254

  • 1. (zi)i ← (x2

i )i

[

i zi = x2]

  • 2. RefreshMasks
  • (zi)i
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • [

i yi = x3]

  • 4. (wi)i ← (y4

i )i

[

i wi = x12]

  • 5. RefreshMasks
  • (wi)i
  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x15]

  • 7. (yi)i ← (y16

i )i

[

i yi = x240]

  • 8. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x252]

  • 9. (yi)i ← ISW
  • (yi)i, (zi)i
  • [

i yi = x254]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-41
SLIDE 41

Masking the S-box

RivainProuff10

Algorithmic description : Input : shares xi s.t.

i xi = x

Output : shares yi s.t.

i yi = x254

  • 1. (zi)i ← (x2

i )i

[

i zi = x2]

  • 2. RefreshMasks
  • (zi)i
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • [

i yi = x3]

  • 4. (wi)i ← (y4

i )i

[

i wi = x12]

  • 5. RefreshMasks
  • (wi)i
  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x15]

  • 7. (yi)i ← (y16

i )i

[

i yi = x240]

  • 8. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x252]

  • 9. (yi)i ← ISW
  • (yi)i, (zi)i
  • [

i yi = x254]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-42
SLIDE 42

Masking the S-box

RivainProuff10

Algorithmic description : Input : shares xi s.t.

i xi = x

Output : shares yi s.t.

i yi = x254

  • 1. (zi)i ← (x2

i )i

[

i zi = x2]

  • 2. RefreshMasks
  • (zi)i
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • [

i yi = x3]

  • 4. (wi)i ← (y4

i )i

[

i wi = x12]

  • 5. RefreshMasks
  • (wi)i
  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x15]

  • 7. (yi)i ← (y16

i )i

[

i yi = x240]

  • 8. (yi)i ← ISW
  • (yi)i, (wi)i
  • [

i yi = x252]

  • 9. (yi)i ← ISW
  • (yi)i, (zi)i
  • [

i yi = x254]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-43
SLIDE 43

Security

Security proved against a dth-order probing adversary RefreshMasks assumed to be out of the scope of the proof. A simple (and assumed to be secure) algorithm is proposed to refresh the masks : Input : shares zi s.t.

i zi = z

Output : new shares z′

i s.t. i z′ i = z

  • 1. for i = 1 to d do

2. tmp ← rand(n) 3. z0 ← z0 ⊕ tmp 4. z′

i ← zi ⊕ tmp

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-44
SLIDE 44

The Flaw

Let us focus on the three first steps of Rivain-Prouff’s scheme.

  • 1. (zi)i ← (x2

i )i

  • 2. (z′

i )i ← RefreshMasks

  • (zi)i
  • 3. (yi)i ← ISW
  • (z′

i )i, (xi)i

  • By construction, at the d/2thiteration of RefreshMasks :

By definition, ISW involves the following processings (cross-products) : z′

i × xi+d/2

for all ∈ [1; d/2]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-45
SLIDE 45

The Flaw

Let us focus on the three first steps of Rivain-Prouff’s scheme.

  • 1. (zi)i ← (x2

i )i

  • 2. (z′

i )i ← RefreshMasks

  • (zi)i
  • 3. (yi)i ← ISW
  • (z′

i )i, (xi)i

  • By construction, at the d/2thiteration of RefreshMasks :

z0 = z ⊕

  • 1≤i≤d/2

z′

i ⊕

  • d/2+1≤i≤d

zi By definition, ISW involves the following processings (cross-products) : z′

i × xi+d/2

for all ∈ [1; d/2]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-46
SLIDE 46

The Flaw

Let us focus on the three first steps of Rivain-Prouff’s scheme.

  • 1. (zi)i ← (x2

i )i

  • 2. (z′

i )i ← RefreshMasks

  • (zi)i
  • 3. (yi)i ← ISW
  • (z′

i )i, (xi)i

  • By construction, at the d/2thiteration of RefreshMasks :

z0 = z ⊕

  • 1≤i≤d/2

z′

i ⊕

  • d/2+1≤i≤d

xi 2 By definition, ISW involves the following processings (cross-products) : z′

i × xi+d/2

for all ∈ [1; d/2]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-47
SLIDE 47

The Flaw

Let us focus on the three first steps of Rivain-Prouff’s scheme.

  • 1. (zi)i ← (x2

i )i

  • 2. (z′

i )i ← RefreshMasks

  • (zi)i
  • 3. (yi)i ← ISW
  • (z′

i )i, (xi)i

  • By construction, at the d/2thiteration of RefreshMasks :

z0 = z ⊕

  • 1≤i≤d/2

z′

i ⊕

  • d/2+1≤i≤d

xi 2 By definition, ISW involves the following processings (cross-products) : z′

i × xi+d/2

for all ∈ [1; d/2]

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-48
SLIDE 48

The Flaw

z0 = z ⊕

  • 1≤i≤d/2

z′

i ⊕

  • d/2+1≤i≤d

xi 2 → ℓ0 z′

i × xi+d/2

∀i ∈ [1; d/2] → ℓi The d/2 leakage values ℓi bring information on all the shares z′

i and xi+d/2 for i ≤ d/2.

This information is combined with ℓ0 to retrieve information

  • n (a.k.a. unmask) z.

◮ Indeed Pr[z | (ℓi)i, ℓo] = Pr[z].

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-49
SLIDE 49

First (natural) Countermeasure

Replace the RefreshMasks call by a call to ISW s.t. :

◮ the first input is the sharing (of x) to refresh and ◮ the second input is a sharing of 1.

By definition, ISW will indeed outputs a new sharing of x × 1. We get :

  • 1. (zi)i ← (x2

i )i

  • 2. (zi)i ← ISW
  • (zi)i, (1i)i
  • (1i)i sharing of 1
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • 4. (wi)i ← (y4

i )i

  • 5. (wi)i ← ISW
  • (wi)i, ((1′

i)i

  • (1′

i)i sharing of 1

  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • 7. (yi)i ← (y16

i )i

  • 8. (yi)i ← ISW
  • (yi)i, (wi)i
  • 9. (yi)i ← ISW
  • (yi)i, (zi)i
  • Problem : security difficult to prove !
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-50
SLIDE 50

Second Countermeasure Proposal

Principle : Replace every processing of h(x) = x · x2j s.t.

  • 1. (zi)i ← (x2j

i )i

(zi)i sharing of x2j

  • 2. Refreshmasks((zi)i)
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • (yi)i sharing of x · x2j

by a single processing of a new algorithm ISW’ Core idea : y =

  • i ai ·

i a2j i

=

  • i a2j+1

i

i<k

  • ai · a2j

k ⊕ ak · a2j i

  • =
  • i h(ai) ⊕

i<k f (ai, ak)

involve the new function f (x, y) = x · y2j ⊕ x2j · y

◮ f is bilinear, thus we have

(Property ∗) f (x, y) = h(x ⊕ y) ⊕ h(x) ⊕ h(y)

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-51
SLIDE 51

Second Countermeasure Proposal

Principle : Replace every processing of h(x) = x · x2j s.t.

  • 1. (zi)i ← (x2j

i )i

(zi)i sharing of x2j

  • 2. Refreshmasks((zi)i)
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • (yi)i sharing of x · x2j

by a single processing of a new algorithm ISW’ Core idea : y =

  • i ai ·

i a2j i

=

  • i a2j+1

i

i<k

  • ai · a2j

k ⊕ ak · a2j i

  • =
  • i h(ai) ⊕

i<k f (ai, ak)

involve the new function f (x, y) = x · y2j ⊕ x2j · y

◮ f is bilinear, thus we have

(Property ∗) f (x, y) = h(x ⊕ y) ⊕ h(x) ⊕ h(y)

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-52
SLIDE 52

Second Countermeasure Proposal

Principle : Replace every processing of h(x) = x · x2j s.t.

  • 1. (zi)i ← (x2j

i )i

(zi)i sharing of x2j

  • 2. Refreshmasks((zi)i)
  • 3. (yi)i ← ISW
  • (zi)i, (xi)i
  • (yi)i sharing of x · x2j

by a single processing of a new algorithm ISW’ Core idea : y =

  • i ai ·

i a2j i

=

  • i a2j+1

i

i<k

  • ai · a2j

k ⊕ ak · a2j i

  • =
  • i h(ai) ⊕

i<k f (ai, ak)

involve the new function f (x, y) = x · y2j ⊕ x2j · y

◮ f is bilinear, thus we have

(Property ∗) f (x, y) = h(x ⊕ y) ⊕ h(x) ⊕ h(y)

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-53
SLIDE 53

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) : Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-54
SLIDE 54

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :    a2j+1 a0 · a2j

1

a0 · a2j

2

a1 · a2j a2j+1

1

a1 · a2j

2

a2 · a2j a2 · a2j

1

a2j+1

2

   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-55
SLIDE 55

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :    a2j+1 a0 · a2j

1

a0 · a2j

2

a2j+1

1

a1 · a2j

2

a2j+1

2

   ⊕   a1 · a2j a2 · a2j a2 · a2j

1

  Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-56
SLIDE 56

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :    a2j+1 a0 · a2j

1

a0 · a2j

2

a2j+1

1

a1 · a2j

2

a2j+1

2

   ⊕   a1 · a2j a2 · a2j a2 · a2j

1

  Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-57
SLIDE 57

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :    a2j+1 a0 · a2j

1 ⊕ a1 · a2j

a0 · a2j

2 + a2 · a2j

a2j+1

1

a1 · a2j

2 ⊕ a2 · a2j 1

a2j+1

2

   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-58
SLIDE 58

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) f (a0, a2) h(a1) f (a1, a2) h(a2)   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-59
SLIDE 59

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) f (a0, a2) h(a1) f (a1, a2) h(a2)   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-60
SLIDE 60

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) f (a0, a2) h(a1) f (a1, a2) h(a2)   ⊕   r0,1 r0,2 r1,2   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-61
SLIDE 61

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) f (a0, a2) h(a1) f (a1, a2) h(a2)   ⊕   r0,1 r0,2 r0,1 r1,2 r0,2 r1,2   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-62
SLIDE 62

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) + r0,1 f (a0, a2) + r0,2 r0,1 h(a1) f (a1, a2) + r1,2 r0,2 r1,2 h(a2)   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-63
SLIDE 63

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) + r0,1 f (a0, a2) + r0,2 r0,1 h(a1) f (a1, a2) + r1,2 r0,2 r1,2 h(a2)   Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-64
SLIDE 64

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) : by Property * on f f (ai, aj) ⊕ ri,j = h(ai ⊕ aj) ⊕ h(ai) ⊕ h(aj) ⊕ ri,j =

  • h((ai ⊕ r′

i,j) ⊕ aj) ⊕ h(r′ i,j)

  • h(ai ⊕ r′

i,j) ⊕ ri,j ⊕ h(aj ⊕ r′ i,j)

  • Security against dthorder probing adversary is given in the

paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-65
SLIDE 65

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) : f (ai, aj) ⊕ ri,j = h(ai ⊕ aj) ⊕ h(ai) ⊕ h(aj) ⊕ ri,j =

  • h((ai ⊕ r′

i,j) ⊕ aj) ⊕ h(r′ i,j)

  • h(ai ⊕ r′

i,j) ⊕ ri,j ⊕ h(aj ⊕ r′ i,j)

  • Security against dthorder probing adversary is given in the

paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-66
SLIDE 66

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) : f (ai, aj) ⊕ ri,j = h(ai ⊕ aj) ⊕ h(ai) ⊕ h(aj) ⊕ ri,j =

  • h((ai ⊕ r′

i,j) ⊕ aj) ⊕ h(r′ i,j)

  • h(ai ⊕ r′

i,j) ⊕ ri,j ⊕ h(aj ⊕ r′ i,j)

  • Security against dthorder probing adversary is given in the

paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-67
SLIDE 67

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) + r0,1 f (a0, a2) + r0,2 r0,1 h(a1) f (a1, a2) + r1,2 r0,2 r1,2 h(a2)   ↓ ↓ ↓ c0 c1 c2 Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-68
SLIDE 68

Masking of Power functions x → x2j+1

Outlines of the new scheme ISW’

I/O :

◮ Input : (ai)i s.t.

i ai = a

◮ Output : (ci)i s.t.

i ci = h(a) = a×a2j

Example (d = 2) :   h(a0) f (a0, a1) + r0,1 f (a0, a2) + r0,2 r0,1 h(a1) f (a1, a2) + r1,2 r0,2 r1,2 h(a2)   ↓ ↓ ↓ c0 c1 c2 Security against dthorder probing adversary is given in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-69
SLIDE 69

Second Countermeasure Final Proposal

We eventually get :

  • 1. (zi)i ← (x2

i )i

  • 2. (yi)i ← ISW′

(xi)i, j = 1

  • 3. (wi)i ← (y4

i )i

  • 4. (yi)i ← ISW′

(yi)i, j = 2

  • 5. (yi)i ← (y16

i )i

  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • 7. (yi)i ← ISW
  • (yi)i, (zi)i
  • It is not only more secure than the first Rivain-Prouff proposal, but

also more efficient → see timings in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-70
SLIDE 70

Second Countermeasure Final Proposal

We eventually get :

  • 1. (zi)i ← (x2

i )i

  • 2. (yi)i ← ISW′

(xi)i, j = 1

  • 3. (wi)i ← (y4

i )i

  • 4. (yi)i ← ISW′

(yi)i, j = 2

  • 5. (yi)i ← (y16

i )i

  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • 7. (yi)i ← ISW
  • (yi)i, (zi)i
  • It is not only more secure than the first Rivain-Prouff proposal, but

also more efficient → see timings in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-71
SLIDE 71

Second Countermeasure Final Proposal

We eventually get :

  • 1. (zi)i ← (x2

i )i

  • 2. (yi)i ← ISW′

(xi)i, j = 1

  • 3. (wi)i ← (y4

i )i

  • 4. (yi)i ← ISW′

(yi)i, j = 2

  • 5. (yi)i ← (y16

i )i

  • 6. (yi)i ← ISW
  • (yi)i, (wi)i
  • 7. (yi)i ← ISW
  • (yi)i, (zi)i
  • It is not only more secure than the first Rivain-Prouff proposal, but

also more efficient → see timings in the paper.

  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-72
SLIDE 72

Summary 1/2

Security enhancement

No need of the Refresh Mask Procedure Global security of the Masking Scheme yet to prove : e.g. y = x14

  • 1. (zi)i ← (x2

i )i

  • 2. (yi)i ← ISW′

(xi)i, j = 1

  • 3. (wi)i ← (y4

i )i

  • 4. (yi)i ← ISW
  • (zi)i, (wi)i
  • i.e. composable security of dth-order secure sub-routines.
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-73
SLIDE 73

Summary 1/2

Security enhancement

No need of the Refresh Mask Procedure Global security of the Masking Scheme yet to prove : e.g. y = x14

  • 1. (zi)i ← (x2

i )i

  • 2. (yi)i ← ISW′

(xi)i, j = 1

  • 3. (wi)i ← (y4

i )i

  • 4. (yi)i ← ISW
  • (zi)i, (wi)i
  • i.e. composable security of dth-order secure sub-routines.
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-74
SLIDE 74

Summary 2/2

Efficiency enhancement

h(x) = x · x2j are processed efficiently (lookup tables). ֒ → only 2 expensive secure multiplication in the AES s-box processing. can we do better ? ֒ → find the optimal expression of x → x2254 w.r.t. the number

  • f multiplications, squarings and h(·).
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing

slide-75
SLIDE 75

Summary 2/2

Efficiency enhancement

h(x) = x · x2j are processed efficiently (lookup tables). ֒ → only 2 expensive secure multiplication in the AES s-box processing. can we do better ? ֒ → find the optimal expression of x → x2254 w.r.t. the number

  • f multiplications, squarings and h(·).
  • T. Roche, ANSSI

Higher-Order Side Channel Security and Mask Refreshing