Side Channel Analysis & Countermeasures
Begül Bilgin
27 Dec. 2014 - IAM Alumni Meeting
Side Channel Analysis & Countermeasures Begl Bilgin 27 Dec. - - PowerPoint PPT Presentation
Side Channel Analysis & Countermeasures Begl Bilgin 27 Dec. 2014 - IAM Alumni Meeting Adversary Models 2 Adversary Models 2 Adversary Models Black-box Gray-box White-box 3 Adversary Models Black-box Gray-box White-box Key
Begül Bilgin
27 Dec. 2014 - IAM Alumni Meeting
2
2
Black-box Gray-box White-box
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
#Cryptanalysis
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
#Cryptanalysis
#Differential Cryp. #Linear Cryp. #Brute Force Att.
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
#Cryptanalysis
#Differential Cryp. #Linear Cryp. #Brute Force Att.
#Cube Att. #Related Key Att. #Meet-in-the-Middle Att. #Boomerang Att. #Impossible Diff. Att.
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
Crypto Algorithm
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
Crypto Algorithm
#Game Consoles #Set-top Boxes
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
Crypto Algorithm Crypto Algorithm
3
Black-box Gray-box White-box
Crypto Algorithm
Key Ini Outi
Crypto Algorithm Crypto Algorithm
3
Black-box Gray-box White-box Non-invasive (Semi)-invasive
4
Black-box Gray-box White-box Non-invasive (Semi)-invasive
4
Black-box Gray-box White-box Non-invasive (Semi)-invasive
4
Black-box Gray-box White-box Non-invasive (Semi)-invasive
Active Passive
4
Black-box Gray-box White-box Non-invasive (Semi)-invasive
Active Passive
Active Passive
analysis
4
Black-box Gray-box White-box Non-invasive (Semi)-invasive
Active Passive
Active Passive
analysis
Timing EM, Power Analysis
Simple Differential
4
Black-box Gray-box White-box Non-invasive (Semi)-invasive
Active Passive
Active Passive
analysis
Timing EM, Power Analysis
Simple Differential Smart Card Protocol Testing Reverse Engineering Code Review
4
Black-box Gray-box White-box Non-invasive (Semi)-invasive
Active Passive
Active Passive
analysis
Timing EM, Power Analysis
Simple Differential Smart Card Protocol Testing Reverse Engineering Code Review
Passive EM, Power Analysis
Differential
4
5
6
Oscilloscope Clock Gen. & Power Supply Device Under Test
6
Oscilloscope Clock Gen. & Power Supply Device Under Test
6
Oscilloscope Clock Gen. & Power Supply Device Under Test
6
Oscilloscope Clock Gen. & Power Supply Device Under Test
6
Oscilloscope Clock Gen. & Power Supply Device Under Test
7
7
7
7
creates a fingerprint
[courtesy: P . Kocher]
8
8
8
8
8
[courtesy: C.Clavier]
9
[courtesy: L.Batina]
9
Symmetric-key algorithm
[courtesy: L.Batina]
9
Symmetric-key algorithm
AES
[courtesy: L.Batina]
9
Symmetric-key algorithm
AES
[courtesy: L.Batina]
9
Symmetric-key algorithm
AES
[courtesy: L.Batina]
9
Symmetric-key algorithm
AES
[courtesy: L.Batina]
9
Symmetric-key algorithm
AES
[courtesy: L.Batina]
9
Symmetric-key algorithm
AES
[courtesy: L.Batina]
9
Symmetric-key algorithm
AES
[courtesy: L.Batina]
10
10
10
Sbox pti keyi ⊕
10
Sbox pti keyi ⊕
10
Sbox pti keyi ⊕
10
Sbox pti keyi ⊕
10
Sbox pti keyi ⊕
10
Sbox pti keyi ⊕
10
Sbox pti keyi ⊕
11
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e...
[courtesy: B.Gierlichs]
11
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1 1
key1=00
[courtesy: B.Gierlichs]
11
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1 1
key1=00
[courtesy: B.Gierlichs]
11
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... Take means S(pt1 ⊕ key1)&1 1 1 1 1
key1=00
[courtesy: B.Gierlichs]
11
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... Take means Take difference S(pt1 ⊕ key1)&1 1 1 1 1
key1=00
[courtesy: B.Gierlichs]
12
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e...
[courtesy: B.Gierlichs]
12
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1
key1=2b
[courtesy: B.Gierlichs]
12
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1
key1=2b
[courtesy: B.Gierlichs]
12
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1
key1=2b
Take means
[courtesy: B.Gierlichs]
12
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1
key1=2b
Take means Take difference
[courtesy: B.Gierlichs]
12
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1
key1=2b
Take means Take difference
[courtesy: B.Gierlichs]
12
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1)&1 1 1 1
key1=2b
Take means Take difference
[courtesy: B.Gierlichs]
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e...
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) 82 62 7e 7b f6 e8 f3
key1=00
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) 82 62 7e 7b f6 e8 f3
key1=00
Corr.
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) 82 62 7e 7b f6 e8 f3
key1=00
Corr.
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) 82 62 7e 7b f6 e8 f3
key1=00
Corr.
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) 82 62 7e 7b f6 e8 f3
key1=00
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) 82 62 7e 7b f6 e8 f3
key1=00
S(pt1 ⊕ key1) 12 cd 32 34 4a 11 fc
key1=2b
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) HW(82) HW(62) HW(7e) HW(7b) HW(f6) HW(e8) HW(f3)
key1=00
S(pt1 ⊕ key1) HW(12) HW(cd) HW(32) HW(34) HW(4a) HW(11) HW(fc)
key1=2b
13
pt 1234… abcd… 8aef… 0354... 7791… c80d… 7e9e... S(pt1 ⊕ key1) HW(82) HW(62) HW(7e) HW(7b) HW(f6) HW(e8) HW(f3)
key1=00
S(pt1 ⊕ key1) HW(12) HW(cd) HW(32) HW(34) HW(4a) HW(11) HW(fc)
key1=2b
Better leakage model → better attack
14
14
14
14
14
14
15
16
16
16
16
16
16
16
16
16
16
17
S
(x ,y ,z , ...) (a ,b ,c , ...)
18
18
(x1,y1,z1, ...)
18
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...)
18
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
18
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
18
Random input/output shares ➡ Random intermediate values
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
18
Random input/output shares ➡ Random intermediate values
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
unshared shares mean var 0,0=0 1,5 1,5 1,1=3 1,5 1,5 1 0,1=1 1,5 0.5 1 1,0=2 1,5 0.5
18
Random input/output shares ➡ Random intermediate values
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
unshared shares mean var 0,0=0 1,5 1,5 1,1=3 1,5 1,5 1 0,1=1 1,5 0.5 1 1,0=2 1,5 0.5
18
Random input/output shares ➡ Random intermediate values
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
unshared shares mean var 0,0=0 1,5 1,5 1,1=3 1,5 1,5 1 0,1=1 1,5 0.5 1 1,0=2 1,5 0.5
✓ 1st-order DPA security x 2nd-order DPA security
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
dth-order DPA ⇄ d probing model
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
dth-order DPA ⇄ d probing model
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
dth-order DPA ⇄ d probing model
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
dth-order DPA ⇄ d probing model
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
dth-order DPA ⇄ d probing model #shares > d
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
dth-order DPA ⇄ d probing model # of traces increase exponentially with attack order #shares > d
19
(x1,y1,z1, ...) (x2,y2,z2, ...) ⊕ = (x, y, z, ...) = (a, b, c, ...)
S1
(a1,b1,c1, ...)
S2
(a2,b2,c2, ...) ⊕
dth-order DPA ⇄ d probing model # of traces increase exponentially with attack order glitches reduce the security #shares > d
20
S1 (x1,y1,z1, ...) (a1,b1,c1, ...) S2 (x2,y2,z2, ...) (a2,b2,c2, ...) Ss (xs,ys,zs, ...) (as,bs,cs, ...) … … … ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ = = (x, y, z, ...) (a, b, c, ...)
20
S1 (x1,y1,z1, ...) (a1,b1,c1, ...) S2 (x2,y2,z2, ...) (a2,b2,c2, ...) Ss (xs,ys,zs, ...) (as,bs,cs, ...) … … … ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ = = (x, y, z, ...) (a, b, c, ...)
20
S1 (x1,y1,z1, ...) (a1,b1,c1, ...) S2 (x2,y2,z2, ...) (a2,b2,c2, ...) Ss (xs,ys,zs, ...) (as,bs,cs, ...) … … … ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ = = (x, y, z, ...) (a, b, c, ...)
20
S1 (x1,y1,z1, ...) (a1,b1,c1, ...) S2 (x2,y2,z2, ...) (a2,b2,c2, ...) Ss (xs,ys,zs, ...) (as,bs,cs, ...) … … … ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ = = (x, y, z, ...) (a, b, c, ...)
Such as:
20
S1 (x1,y1,z1, ...) (a1,b1,c1, ...) S2 (x2,y2,z2, ...) (a2,b2,c2, ...) Ss (xs,ys,zs, ...) (as,bs,cs, ...) … … … ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ = = (x, y, z, ...) (a, b, c, ...)
Such as:
20
S1 (x1,y1,z1, ...) (a1,b1,c1, ...) S2 (x2,y2,z2, ...) (a2,b2,c2, ...) Ss (xs,ys,zs, ...) (as,bs,cs, ...) … … … ⊕ ⊕ ⊕ ⊕ ⊕ ⊕ = = (x, y, z, ...) (a, b, c, ...)
Such as:
21
22
23
Participation