Multiplicative Masking for AES in Hardware CHES 2018 Lauren De - - PowerPoint PPT Presentation
Multiplicative Masking for AES in Hardware CHES 2018 Lauren De - - PowerPoint PPT Presentation
Multiplicative Masking for AES in Hardware CHES 2018 Lauren De Meyer, Oscar Reparaz, Begl Bilgin P ROBLEM : SIDE - CHANNEL ANALYSIS 2 S OLUTION : M ASKING 3 E XTRA P ROBLEM : G LITCHES ! 4 B OOLEAN M ASKING ! = # $ , # & , , # (
PROBLEM: SIDE-CHANNEL ANALYSIS
2
SOLUTION: MASKING
3
EXTRA PROBLEM: GLITCHES!
4
BOOLEAN MASKING
5
! = #$, #&, … , #( ⇔ # = *
+
#+
Tricky: Nonlinear functions
MUSEUM OF CRYPTO ART
6
Bilgin et al. De Cnudde et al. Gross et al. Moradi et al.
OUR RESULT:
7
- 1st order S-box:
- 2nd order S-box:
2348 GE 2432 GE 1685 GE De Cnudde et al. 2016 Gross et al. 2017 This Work 2018 4744 GE 4759 GE 3891 GE
0.71x 0.82x
HOW?
BACK TO THE BEGINNING
9
SubBytes ShiftRows MixColumns AddRoundKey
BACK TO THE BEGINNING
10
SubBytes ShiftRows MixColumns AddRoundKey Boolean → Multiplicative Multiplicative → Boolean Akkar-Giraud 2001 Genelle et al. 2010
PROBLEM
11
Akkar-Giraud 2001 Golić-Tymen 2002
The Zero Problem
! = #$, #&, … , #( ⇔ 0 = +
,
#, #, = 0
SOLUTION
12
Damgård-Keller 2010 Genelle et al. 2010
! " = $1 if " = 0 if " ≠ 0 1 1
GF Inversion !(") Akkar-Giraud 2001 Golić-Tymen 2002
MASKED GF INVERSION
13
! "
Boolean to Multiplicative Multiplicative to Boolean
Local Inversion
MASKED GF INVERSION
14
! "
Boolean to Multiplicative Multiplicative to Boolean
Local Inversion
FIRST-ORDER MASKED CONVERSIONS
15
!" #" #$ %$ %" !
$
#$
&
#"
&
%$
'$ '$
( ( ( (
! = # ⊕ %
% #
FIRST-ORDER MASKED CONVERSIONS
16
!" #" #$ %$ %" !
$
#$
&
#"
&
%$
'$ '$
( ( ( (
! = #$% ⋅ (( ⊕ *)
* ( #
- 1. Expansion
FIRST-ORDER MASKED CONVERSIONS
17
! " #
$ = #&' ⋅ (" ⊕ !)
- 2. Synchronization
FIRST-ORDER MASKED CONVERSIONS
18
! "
# = "%& ⋅ !
- 3. Compression
FIRST-ORDER MASKED CONVERSIONS
19
! "
# = "%& ⋅ ! #%& = " ⋅ !%&
⇔
- 3. Compression
FIRST-ORDER MASKED CONVERSIONS
20
!"# $
% = $"# ⋅ ! %"# = $ ⋅ !"#
⇔
FIRST-ORDER MASKED CONVERSIONS
21
! "
#$% = " ⋅ (! ⊕ *)
*
- 1. Expansion
FIRST-ORDER MASKED CONVERSIONS
22
! "
#$% = " ⋅ (! ⊕ *)
*
- 2. Synchronization
FIRST-ORDER MASKED CONVERSIONS
23
!
"#$ = ! ⊕ '
'
- 3. Compression
SECOND-ORDER MASKED CONVERSIONS
24
1 2 3 1 2 3 1 2 3 1 2 3
SECOND-ORDER MASKED CONVERSIONS
25
Extra Remasking Required 1 2 3 1 2 3 1 2 3 1 2 3
SECOND-ORDER MASKED CONVERSIONS
26
Extra Remasking Required Still only 1 inversion! 1 2 3 1 2 3 1 2 3 1 2 3
MASKED GF INVERSION
27
! "
Boolean to Multiplicative Multiplicative to Boolean
Local Inversion
MASKED KRONECKER DELTA
28
! "# ! "$ ! "% ! "& ! "' ! "( ! ") ! "* +(") .
/
.0 .1 .
2
.3 .4 .5
6 7 = 79 7/ 70 71 72 73 74 75
AN INTERESTING OBSERVATION
29
Gross et al. 2016
!" = $"%" ⊕ $"%' ⊕ ( = $"% ⊕ ( !' = $'% ⊕ ( $" %" ( %' $'
× × × ×
!" !'
MASKED KRONECKER DELTA
30
! "# ! "$ ! "% ! "& ! "' ! "( ! ") ! "* +(") .
/
.0 .1 .
2
.3 .4 .5
Independent of . Independent of .
2
MASKED KRONECKER DELTA
31
! "# ! "$ ! "% ! "& ! "' ! "( ! ") ! "* +(") .
/
.0 .
/
.0 .1 .1 ⊕ .0 .
/
MASKED KRONECKER DELTA
32
! "# ! "$ ! "% ! "& ! "' ! "( ! ") ! "* +(") .
/, .1, .2
.
3, .4, .5
.6, .7, .8 .
/9, . //, . /1
.6, .
//, .8 ⊕ . /1
.
/, .4, .2 ⊕ .5
.1 ⊕ .7, .
3 ⊕ . /9, . /2
MASKED GF INVERSION
33
! "
Boolean to Multiplicative Multiplicative to Boolean
Local Inversion No registers Precompute
RESULTS
S-BOX AREA
35
- 1st order:
- 2nd order:
2348 GE 2432 GE 1685 GE De Cnudde et al. 2016 Gross et al. 2017 This Work 2018 4744 GE 4759 GE 3891 GE
0.71x 0.82x
AES AREA
36
- 1st order:
- 2nd order:
7682 GE 7337 GE 6557 GE De Cnudde et al. 2016 Gross et al. 2017 This Work 2018 12640 GE 12024 GE 10931 GE
0.89x 0.91x
RANDOMNESS PER S-BOX
37
- 1st order:
- 2nd order:
De Cnudde et al. 2016 Gross et al. 2017 This Work 2018 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅ 54 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 18 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 19 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 54 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 53 ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 162
LATENCY PER ENCRYPTION
38
De Cnudde et al. 2016 Gross et al. 2017 This Work 2018 # clock cycles 276 246 256
TVLA: 1ST ORDER AES
39 First Order Second Order
TVLA: 2ND ORDER AES
40 First Order Third Order
TVLA: BIVARIATE
41
200 400 600 800 1000 200 400 600 800 1000 5 10 15 20 25 30 35 40 45 200 400 600 800 1000 200 400 600 800 1000 5 10 15 20 25 30 35 40 45
ü Keep it Simple J ü Find inspiration in early works ü Push the limits:
ü Reuse Randomness ü Customize!
42