Changing of the Guards . Joan Daemen CHES 2017 Taipei, September - - PowerPoint PPT Presentation

changing of the guards
SMART_READER_LITE
LIVE PREVIEW

Changing of the Guards . Joan Daemen CHES 2017 Taipei, September - - PowerPoint PPT Presentation

Changing of the Guards . Joan Daemen CHES 2017 Taipei, September 26, 2017 Radboud University STMicroelectronics 1 / 18 Disclaimer . This is not a talk about higher-order countermeasures 2 / 18 Iterative cryptographic permutation . 3 /


slide-1
SLIDE 1

Changing of the Guards

.

Joan Daemen CHES 2017 Taipei, September 26, 2017

Radboud University STMicroelectronics 1 / 18

slide-2
SLIDE 2

Disclaimer . This is not a talk about higher-order countermeasures

2 / 18

slide-3
SLIDE 3

Iterative cryptographic permutation .

3 / 18

slide-4
SLIDE 4

Three-stage round function: wide trail .

4 / 18

slide-5
SLIDE 5

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi xi xi

1

1 xi

2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-6
SLIDE 6

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi xi xi

1

1 xi

2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-7
SLIDE 7

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi xi xi

1

1 xi

2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-8
SLIDE 8

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi xi xi

1

1 xi

2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-9
SLIDE 9

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi xi xi

1

1 xi

2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-10
SLIDE 10

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi ← xi + (xi+1 + 1)xi+2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-11
SLIDE 11

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi ← xi + (xi+1 + 1)xi+2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-12
SLIDE 12

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi ← xi + (xi+1 + 1)xi+2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n = 5)

RadioGatun (n 19), Panama (n 17), BaseKing, 3-Way (n 3), Subterranean, Cellhash (n 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-13
SLIDE 13

Nonlinear layer χ . X[i] ^= (~X[i+1]) & X[i+2]

xi ← xi + (xi+1 + 1)xi+2

Invertible for odd length n Used in Ketje, Keyak, Keccak (n = 5)

RadioGatun (n = 19), Panama (n = 17), BaseKing, 3-Way (n = 3), Subterranean, Cellhash (n = 257)

[Daemen, Govaerts, Vandewalle, WIC Benelux 1991]

5 / 18

slide-14
SLIDE 14

Masking of χ as DPA/DEMA countermeasure . x0 ← x0 + (x1 + 1)x2 ai bi xi with ai random a0 a0 a1 1 a2 a1b2 b0 b0 b1 1 b2 b1a2

[Daemen, Peeters, Van Assche, FSE 2000]

6 / 18

slide-15
SLIDE 15

Masking of χ as DPA/DEMA countermeasure . x0 ← x0 + (x1 + 1)x2 ai + bi = xi with ai random a0 a0 a1 1 a2 a1b2 b0 b0 b1 1 b2 b1a2

[Daemen, Peeters, Van Assche, FSE 2000]

6 / 18

slide-16
SLIDE 16

Masking of χ as DPA/DEMA countermeasure . x0 ← x0 + (x1 + 1)x2 ai + bi = xi with ai random a0 ←a0 + (a1 + 1)a2 + a1b2 b0 ←b0 + (b1 + 1)b2 + b1a2

[Daemen, Peeters, Van Assche, FSE 2000]

6 / 18

slide-17
SLIDE 17

χ′: a three-share masking of χ . x0 ← x0 + (x1 + 1)x2 ai + bi + ci = xi with ai and bi random a0 b0 b1 1 b2 b1c2 b2c1 b0 c0 c1 1 c2 c1a2 c2a1 c0 a0 a1 1 a2 a1b2 a2b1

[Bertoni, Daemen, Peeters, Van Assche, 2nd SHA-3, 2010]

7 / 18

slide-18
SLIDE 18

χ′: a three-share masking of χ . x0 ← x0 + (x1 + 1)x2 ai + bi + ci = xi with ai and bi random a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

[Bertoni, Daemen, Peeters, Van Assche, 2nd SHA-3, 2010]

7 / 18

slide-19
SLIDE 19

Threshold masking schemes [Nikova, Rijmen, Rechberger, Schläffer, ’06 - ’08] .

x = f y = xa + fa ya + xb + fb yb + xc fc yc

Scheme at the right computes f securely against 1st order DPA if: fa fb fc is a correct sharing of f fa fb fc is incomplete: requires shares d 1 xa xb xc is a uniform sharing of x: all values xa xb xc with xa xb xc x equiprobable x xa xb xc 0 0 0 1 1 0 1 0 1 0 1 1 x 1 xa xb xc 1 1 1 0 0 1 0 1 0 1 0 0

8 / 18

slide-20
SLIDE 20

Threshold masking schemes [Nikova, Rijmen, Rechberger, Schläffer, ’06 - ’08] .

x = f y = xa + fa ya + xb + fb yb + xc fc yc

Scheme at the right computes f securely against 1st order DPA if: ◮ (fa, fb, fc) is a correct sharing of f fa fb fc is incomplete: requires shares d 1 xa xb xc is a uniform sharing of x: all values xa xb xc with xa xb xc x equiprobable x xa xb xc 0 0 0 1 1 0 1 0 1 0 1 1 x 1 xa xb xc 1 1 1 0 0 1 0 1 0 1 0 0

8 / 18

slide-21
SLIDE 21

Threshold masking schemes [Nikova, Rijmen, Rechberger, Schläffer, ’06 - ’08] .

x = f y = xa + fa ya + xb + fb yb + xc fc yc

Scheme at the right computes f securely against 1st order DPA if: ◮ (fa, fb, fc) is a correct sharing of f ◮ (fa, fb, fc) is incomplete: requires # shares ≥ d + 1 xa xb xc is a uniform sharing of x: all values xa xb xc with xa xb xc x equiprobable x xa xb xc 0 0 0 1 1 0 1 0 1 0 1 1 x 1 xa xb xc 1 1 1 0 0 1 0 1 0 1 0 0

8 / 18

slide-22
SLIDE 22

Threshold masking schemes [Nikova, Rijmen, Rechberger, Schläffer, ’06 - ’08] .

x = f y = xa + fa ya + xb + fb yb + xc fc yc

Scheme at the right computes f securely against 1st order DPA if: ◮ (fa, fb, fc) is a correct sharing of f ◮ (fa, fb, fc) is incomplete: requires # shares ≥ d + 1 ◮ (xa, xb, xc) is a uniform sharing of x:

  • all values (xa, xb, xc) with xa + xb + xc = x equiprobable

x xa xb xc 0 0 0 1 1 0 1 0 1 0 1 1 x 1 xa xb xc 1 1 1 0 0 1 0 1 0 1 0 0

8 / 18

slide-23
SLIDE 23

Threshold masking schemes [Nikova, Rijmen, Rechberger, Schläffer, ’06 - ’08] .

x = f y = xa + fa ya + xb + fb yb + xc fc yc

Scheme at the right computes f securely against 1st order DPA if: ◮ (fa, fb, fc) is a correct sharing of f ◮ (fa, fb, fc) is incomplete: requires # shares ≥ d + 1 ◮ (xa, xb, xc) is a uniform sharing of x:

  • all values (xa, xb, xc) with xa + xb + xc = x equiprobable
  • x = 0 : (xa, xb, xc) ∈ {(0, 0, 0)(1, 1, 0)(1, 0, 1)(0, 1, 1)}
  • x = 1 : (xa, xb, xc) ∈ {(1, 1, 1)(0, 0, 1)(0, 1, 0)(1, 0, 0)}

8 / 18

slide-24
SLIDE 24

Uniformity of a threshold masking scheme .

x f y f z xa fa ya xb fb yb xc fc yc fa za fb zb fc zc

◮ Sharing (fa, fb, fc) of f is called uniform if it preserves uniformity If f is invertible, for fa fb fc uniformity invertibility

9 / 18

slide-25
SLIDE 25

Uniformity of a threshold masking scheme .

x f y f z xa fa ya xb fb yb xc fc yc fa za fb zb fc zc

◮ Sharing (fa, fb, fc) of f is called uniform if it preserves uniformity ◮ If f is invertible, for (fa, fb, fc) uniformity = invertibility

9 / 18

slide-26
SLIDE 26

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? Correct? Yes! Incomplete? Yes! Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-27
SLIDE 27

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! Incomplete? Yes! Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-28
SLIDE 28

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! Incomplete? Yes! Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-29
SLIDE 29

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-30
SLIDE 30

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-31
SLIDE 31

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! ◮ Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-32
SLIDE 32

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! ◮ Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-33
SLIDE 33

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! ◮ Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-34
SLIDE 34

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! ◮ Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-35
SLIDE 35

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! ◮ Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: no uniform d 1-share threshold schemes are known it is an active research area to find the best compromise

10 / 18

slide-36
SLIDE 36

Back to χ′ . a0 ←b0 + (b1 + 1)b2 + b1c2 + b2c1 b0 ←c0 + (c1 + 1)c2 + c1a2 + c2a1 c0 ←a0 + (a1 + 1)a2 + a1b2 + a2b1

Is this a secure threshold masking scheme of χ? ◮ Correct? Yes! ◮ Incomplete? Yes! ◮ Uniform? Yes! …but wait …we may have a problem here it isn’t In general, for many S-boxes: ◮ no uniform d + 1-share threshold schemes are known ◮ it is an active research area to find the best compromise

10 / 18

slide-37
SLIDE 37

An out-of-the-box approach to achieving uniformity .

xa Sa ya rb rc xb Sb yb Rb xc Sc yc Rc

(1) Build (Sa, Sb, Sc): a correct and incomplete sharing of S

  • straightforward and generalizes to d + 1 shares for d > 2

(2) Mask output with rb rc that has uniform distribution correctness and incompleteness are preserved

  • utput ya yb yc becomes uniform sharing of y

(3) Chain this But where does leftmost rb rc come from?

11 / 18

slide-38
SLIDE 38

An out-of-the-box approach to achieving uniformity .

xa Sa ya rb rc xb Sb yb Rb xc Sc yc Rc

(1) Build (Sa, Sb, Sc): a correct and incomplete sharing of S

  • straightforward and generalizes to d + 1 shares for d > 2

(2) Mask output with (rb, rc) that has uniform distribution correctness and incompleteness are preserved

  • utput ya yb yc becomes uniform sharing of y

(3) Chain this But where does leftmost rb rc come from?

11 / 18

slide-39
SLIDE 39

An out-of-the-box approach to achieving uniformity .

xa Sa ya rb rc xb Sb yb Rb xc Sc yc Rc

(1) Build (Sa, Sb, Sc): a correct and incomplete sharing of S

  • straightforward and generalizes to d + 1 shares for d > 2

(2) Mask output with (rb, rc) that has uniform distribution

  • correctness and incompleteness are preserved
  • utput ya yb yc becomes uniform sharing of y

(3) Chain this But where does leftmost rb rc come from?

11 / 18

slide-40
SLIDE 40

An out-of-the-box approach to achieving uniformity .

xa Sa ya rb rc xb Sb yb Rb xc Sc yc Rc

(1) Build (Sa, Sb, Sc): a correct and incomplete sharing of S

  • straightforward and generalizes to d + 1 shares for d > 2

(2) Mask output with (rb, rc) that has uniform distribution

  • correctness and incompleteness are preserved
  • output (ya, yb, yc) becomes uniform sharing of y

(3) Chain this But where does leftmost rb rc come from?

11 / 18

slide-41
SLIDE 41

An out-of-the-box approach to achieving uniformity .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2

(1) Build (Sa, Sb, Sc): a correct and incomplete sharing of S

  • straightforward and generalizes to d + 1 shares for d > 2

(2) Mask output with (rb, rc) that has uniform distribution

  • correctness and incompleteness are preserved
  • output (ya, yb, yc) becomes uniform sharing of y

(3) Chain this But where does leftmost rb rc come from?

11 / 18

slide-42
SLIDE 42

An out-of-the-box approach to achieving uniformity .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2

(1) Build (Sa, Sb, Sc): a correct and incomplete sharing of S

  • straightforward and generalizes to d + 1 shares for d > 2

(2) Mask output with (rb, rc) that has uniform distribution

  • correctness and incompleteness are preserved
  • output (ya, yb, yc) becomes uniform sharing of y

(3) Chain this But where does leftmost (rb, rc) come from?

11 / 18

slide-43
SLIDE 43

Attempt 1: injecting fresh randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

rb rc are generated freshly every round For n-bit S-box, this requires 2n random bits per round Downsides: real-world: requires random generation during operation academic: no uniform sharing is obtained

[Bilgin, Daemen, Nikova, Nikov, Rijmen, Van Assche, Cardis ’13]

12 / 18

slide-44
SLIDE 44

Attempt 1: injecting fresh randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ (rb, rc) are generated freshly every round For n-bit S-box, this requires 2n random bits per round Downsides: real-world: requires random generation during operation academic: no uniform sharing is obtained

[Bilgin, Daemen, Nikova, Nikov, Rijmen, Van Assche, Cardis ’13]

12 / 18

slide-45
SLIDE 45

Attempt 1: injecting fresh randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ (rb, rc) are generated freshly every round ◮ For n-bit S-box, this requires 2n random bits per round Downsides: real-world: requires random generation during operation academic: no uniform sharing is obtained

[Bilgin, Daemen, Nikova, Nikov, Rijmen, Van Assche, Cardis ’13]

12 / 18

slide-46
SLIDE 46

Attempt 1: injecting fresh randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ (rb, rc) are generated freshly every round ◮ For n-bit S-box, this requires 2n random bits per round ◮ Downsides:

  • real-world: requires random generation during operation
  • academic: no uniform sharing is obtained

[Bilgin, Daemen, Nikova, Nikov, Rijmen, Van Assche, Cardis ’13]

12 / 18

slide-47
SLIDE 47

Attempt 1: injecting fresh randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ (rb, rc) are generated freshly every round ◮ For n-bit S-box, this requires 2n random bits per round ◮ Downsides:

  • real-world: requires random generation during operation
  • academic: no uniform sharing is obtained

[Bilgin, Daemen, Nikova, Nikov, Rijmen, Van Assche, Cardis ’13]

12 / 18

slide-48
SLIDE 48

Attempt 2: cycling randomness .

a0 Sa A0 b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ S-boxes are arranged in circle: (rb, rc) = (Rb, Rc) No more need for generating randomness during operation The remaining amount of non-uniformity is negligible Downsides: real-world: hard to explain why that is the case … academic: it is simply not uniform! I presented this at [Shonan, Sep.’14] [ESC, Jan.’15] [TI Day, May’15]

13 / 18

slide-49
SLIDE 49

Attempt 2: cycling randomness .

a0 Sa A0 b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ S-boxes are arranged in circle: (rb, rc) = (Rb, Rc) ◮ No more need for generating randomness during operation The remaining amount of non-uniformity is negligible Downsides: real-world: hard to explain why that is the case … academic: it is simply not uniform! I presented this at [Shonan, Sep.’14] [ESC, Jan.’15] [TI Day, May’15]

13 / 18

slide-50
SLIDE 50

Attempt 2: cycling randomness .

a0 Sa A0 b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ S-boxes are arranged in circle: (rb, rc) = (Rb, Rc) ◮ No more need for generating randomness during operation ◮ The remaining amount of non-uniformity is negligible ◮ Downsides:

  • real-world: hard to explain why that is the case …
  • academic: it is simply not uniform!

I presented this at [Shonan, Sep.’14] [ESC, Jan.’15] [TI Day, May’15]

13 / 18

slide-51
SLIDE 51

Attempt 2: cycling randomness .

a0 Sa A0 b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 c2 Sc C2

◮ S-boxes are arranged in circle: (rb, rc) = (Rb, Rc) ◮ No more need for generating randomness during operation ◮ The remaining amount of non-uniformity is negligible ◮ Downsides:

  • real-world: hard to explain why that is the case …
  • academic: it is simply not uniform!

I presented this at [Shonan, Sep.’14] [ESC, Jan.’15] [TI Day, May’15]

13 / 18

slide-52
SLIDE 52

Attempt 3: recycling randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 Rc c2 Sc C2 Rb

We make Rb Rc part of the shared state: the Guards input Guards rb rc are previous-round output Guards Rb Rc Achieves uniformity if S-box is invertible Cost: 4 additional XORs per native bit shared state extended by 2n additional bits (for n-bit S-box)

14 / 18

slide-53
SLIDE 53

Attempt 3: recycling randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 Rc c2 Sc C2 Rb

◮ We make (Rb, Rc) part of the shared state: the Guards ◮ input Guards (rb, rc) are previous-round output Guards (Rb, Rc) Achieves uniformity if S-box is invertible Cost: 4 additional XORs per native bit shared state extended by 2n additional bits (for n-bit S-box)

14 / 18

slide-54
SLIDE 54

Attempt 3: recycling randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 Rc c2 Sc C2 Rb

◮ We make (Rb, Rc) part of the shared state: the Guards ◮ input Guards (rb, rc) are previous-round output Guards (Rb, Rc) ◮ Achieves uniformity if S-box is invertible Cost: 4 additional XORs per native bit shared state extended by 2n additional bits (for n-bit S-box)

14 / 18

slide-55
SLIDE 55

Attempt 3: recycling randomness .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 Rc c2 Sc C2 Rb

◮ We make (Rb, Rc) part of the shared state: the Guards ◮ input Guards (rb, rc) are previous-round output Guards (Rb, Rc) ◮ Achieves uniformity if S-box is invertible ◮ Cost:

  • 4 additional XORs per native bit
  • shared state extended by 2n additional bits (for n-bit S-box)

14 / 18

slide-56
SLIDE 56

Proof of uniformity .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 Rc c2 Sc C2 Rb

Computing (a, b, c) and (rb, rc) from (A, B, C) and (Rb, Rc) Initial step: b2 Rc and c2 Rb Iteration: compute ai bi

1 ci 1 from Ai Bi Ci and bi ci

ai S

1 Ai

Bi Ci bi ci bi

1

Sc ai bi Ci ci

1

Sb ai bi Bi Final step: rb b

1 and rc

c

1

Invertibility implies uniformity: QED

15 / 18

slide-57
SLIDE 57

Proof of uniformity .

a0 Sa A0 rb rc b0 Sb B0 c0 Sc C0 a1 Sa A1 b1 Sb B1 c1 Sc C1 a2 Sa A2 b2 Sb B2 Rc c2 Sc C2 Rb

Computing (a, b, c) and (rb, rc) from (A, B, C) and (Rb, Rc) ◮ Initial step: b2 ← Rc and c2 ← Rb ◮ Iteration: compute (ai, bi−1, ci−1) from (Ai, Bi, Ci) and (bi, ci)

  • ai = S−1(Ai + Bi + Ci) + bi + ci
  • bi−1 = Sc(ai, bi) + Ci
  • ci−1 = Sb(ai, bi) + Bi

◮ Final step: rb ← b−1 and rc ← c−1 ◮ Invertibility implies uniformity: QED

15 / 18

slide-58
SLIDE 58

Optimization for χ′ .

Multi-transformation property of χ′: Assume we know bits of a b c with indices 0 and 1 bits of A B C with indices 2 3 m then we can compute bits of a b c with index m, m 1, …2 Am bm b0 1 b1 b0c1 b1c0 Bm cm c0 1 c1 c0a1 c1a0 Cm am a0 1 a1 a0b1 a1b0 This allows us to reduce output masking to bits with indices in 0 and 1 shrink rb and rc to two bits each

16 / 18

slide-59
SLIDE 59

Optimization for χ′ .

Multi-transformation property of χ′: ◮ Assume we know

  • bits of (a, b, c) with indices 0 and 1
  • bits of (A, B, C) with indices 2, 3, . . . m

then we can compute bits of a b c with index m, m 1, …2 Am bm b0 1 b1 b0c1 b1c0 Bm cm c0 1 c1 c0a1 c1a0 Cm am a0 1 a1 a0b1 a1b0 This allows us to reduce output masking to bits with indices in 0 and 1 shrink rb and rc to two bits each

16 / 18

slide-60
SLIDE 60

Optimization for χ′ .

Multi-transformation property of χ′: ◮ Assume we know

  • bits of (a, b, c) with indices 0 and 1
  • bits of (A, B, C) with indices 2, 3, . . . m

◮ then we can compute bits of (a, b, c) with index m, m − 1, …2 Am =bm + (b0 + 1)b1 + b0c1 + b1c0 Bm =cm + (c0 + 1)c1 + c0a1 + c1a0 Cm =am + (a0 + 1)a1 + a0b1 + a1b0 This allows us to reduce output masking to bits with indices in 0 and 1 shrink rb and rc to two bits each

16 / 18

slide-61
SLIDE 61

Optimization for χ′ .

Multi-transformation property of χ′: ◮ Assume we know

  • bits of (a, b, c) with indices 0 and 1
  • bits of (A, B, C) with indices 2, 3, . . . m

◮ then we can compute bits of (a, b, c) with index m, m − 1, …2 Am =bm + (b0 + 1)b1 + b0c1 + b1c0 Bm =cm + (c0 + 1)c1 + c0a1 + c1a0 Cm =am + (a0 + 1)a1 + a0b1 + a1b0 ◮ This allows us to

  • reduce output masking to bits with indices in 0 and 1
  • shrink rb and rc to two bits each

16 / 18

slide-62
SLIDE 62

Generalization for invertible n-bit S-box of degree d .

◮ Guards: d shares of n bits ◮ each guard share of S-box i − 1 is added to 2 shares of S-box i ◮ Total cost (worst case) feedforward: 2d XORs per native bit state expansion by d n bits Cost is reduced if shared S-box has multi-transformation property

17 / 18

slide-63
SLIDE 63

Generalization for invertible n-bit S-box of degree d .

◮ Guards: d shares of n bits ◮ each guard share of S-box i − 1 is added to 2 shares of S-box i ◮ Total cost (worst case)

  • feedforward: 2d XORs per native bit

state expansion by d n bits Cost is reduced if shared S-box has multi-transformation property

17 / 18

slide-64
SLIDE 64

Generalization for invertible n-bit S-box of degree d .

◮ Guards: d shares of n bits ◮ each guard share of S-box i − 1 is added to 2 shares of S-box i ◮ Total cost (worst case)

  • feedforward: 2d XORs per native bit
  • state expansion by d × n bits

Cost is reduced if shared S-box has multi-transformation property

17 / 18

slide-65
SLIDE 65

Generalization for invertible n-bit S-box of degree d .

◮ Guards: d shares of n bits ◮ each guard share of S-box i − 1 is added to 2 shares of S-box i ◮ Total cost (worst case)

  • feedforward: 2d XORs per native bit
  • state expansion by d × n bits

◮ Cost is reduced if shared S-box has multi-transformation property

17 / 18

slide-66
SLIDE 66

Conclusions .

◮ Solution for achieving uniformity for invertible S-box layers

  • only d + 1 shares for S-boxes of degree d
  • uniformity achieved outside the S-box

Real-world relevance: sharing (Keccak) made uniform at little overhead Academic relevance: non-uniformity problem essentially solved search multi-transformation sharing of low-degree S-boxes Thanks for your attention!

Q?

18 / 18

slide-67
SLIDE 67

Conclusions .

◮ Solution for achieving uniformity for invertible S-box layers

  • only d + 1 shares for S-boxes of degree d
  • uniformity achieved outside the S-box

◮ Real-world relevance:

  • sharing χ′ (Keccak) made uniform at little overhead

Academic relevance: non-uniformity problem essentially solved search multi-transformation sharing of low-degree S-boxes Thanks for your attention!

Q?

18 / 18

slide-68
SLIDE 68

Conclusions .

◮ Solution for achieving uniformity for invertible S-box layers

  • only d + 1 shares for S-boxes of degree d
  • uniformity achieved outside the S-box

◮ Real-world relevance:

  • sharing χ′ (Keccak) made uniform at little overhead

◮ Academic relevance: non-uniformity problem essentially solved search multi-transformation sharing of low-degree S-boxes Thanks for your attention!

Q?

18 / 18

slide-69
SLIDE 69

Conclusions .

◮ Solution for achieving uniformity for invertible S-box layers

  • only d + 1 shares for S-boxes of degree d
  • uniformity achieved outside the S-box

◮ Real-world relevance:

  • sharing χ′ (Keccak) made uniform at little overhead

◮ Academic relevance:

  • non-uniformity problem essentially solved

search multi-transformation sharing of low-degree S-boxes Thanks for your attention!

Q?

18 / 18

slide-70
SLIDE 70

Conclusions .

◮ Solution for achieving uniformity for invertible S-box layers

  • only d + 1 shares for S-boxes of degree d
  • uniformity achieved outside the S-box

◮ Real-world relevance:

  • sharing χ′ (Keccak) made uniform at little overhead

◮ Academic relevance:

  • non-uniformity problem essentially solved
  • search multi-transformation sharing of low-degree S-boxes

Thanks for your attention!

Q?

18 / 18

slide-71
SLIDE 71

Conclusions .

◮ Solution for achieving uniformity for invertible S-box layers

  • only d + 1 shares for S-boxes of degree d
  • uniformity achieved outside the S-box

◮ Real-world relevance:

  • sharing χ′ (Keccak) made uniform at little overhead

◮ Academic relevance:

  • non-uniformity problem essentially solved
  • search multi-transformation sharing of low-degree S-boxes

Thanks for your attention!

Q?

18 / 18