Behind the Scene of Side Channel Attacks
ASIACRYPT 2013
Victor LOMNE, Emmanuel PROUFF and Thomas ROCHE
ANSSI (French Network and Information Security Agency) Thursday, December 3rd, 2013
Behind the Scene of Side Channel Attacks ASIACRYPT 2013 Victor - - PowerPoint PPT Presentation
Behind the Scene of Side Channel Attacks ASIACRYPT 2013 Victor LOMNE, Emmanuel PROUFF and Thomas ROCHE ANSSI (French Network and Information Security Agency) Thursday, December 3rd, 2013 Side Channel Attacks (SCA)| Linear Regression Attack
ASIACRYPT 2013
Victor LOMNE, Emmanuel PROUFF and Thomas ROCHE
ANSSI (French Network and Information Security Agency) Thursday, December 3rd, 2013
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion|
1
2
3
4
1/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
1
2
3
4
2/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
◮ 7G smartcards sold in 2012 (SIM, banking, pay-TV, ID, ✿ ✿ ✿)
3/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
PLAINTEXT
blablablablablabla blibliblibliblibliblibl bloblobloblobloblo blublublublublublu blyblyblyblyblybly
CIPHERTEXT
tO^à@:/!uYe#&²é" ccGt*µ$Bg;./rSdrtg ([jKé~-|kLm%*ø$tf vB:!§eR'{qZé~rt6- phçö^$"NhR([qSrT
CRYPTOSYSTEM
gray-box model (spy the computation)
time power electromagnetic radiations vibrations light ...
4/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
t1 ✦ Enc✭p1❀ k✮❀ ✿ ✿ ✿ ❀ tN ✦ Enc✭pN ❀ k✮
e.g. AES Sbox output ✦ v
❫ k i ❂ S✭pi ✟ ❫
k✮
e.g. Hamming Weight (H)
❫ k ❂ 0 ✦ H✭v
❫ k❂0 1
✮❀ ✿ ✿ ✿ ❀ H✭v
❫ k❂0 N
✮ ✿ ✿ ✿ ❫ k ❂ 255 ✦ H✭v
❫ k❂255 1
✮❀ ✿ ✿ ✿ ❀ H✭v
❫ k❂255 N
✮
5/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
◮ Hamming Weight, Hamming Distance ◮ Used in classical SCA (DPA, CPA, MIA, ✿ ✿ ✿)
◮ Attack will guess the correct model in selected space ◮ Used in Linear Regression Attack (LRA)
◮ A preliminary step is performed on an open copy of the
device to build a leakage model for each key value
◮ Used in Template Attack (TA) 6/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
1
2
3
4
7/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
◮ Nb. of transistors on ICs doubles approx. every two years ◮ CMOS processes decrease
1995 ✦ CMOS process 350nm / 2013 ✦ CMOS process 22nm
◮ intra-chip variability increases
✮ bits leak differently ones from others
◮ inter-chip variability increases
✮ two identical ICs behave differently
8/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Background| Contributions|
◮ Linear Regression Attack (LRA) ◮ Template Attack (TA)
◮ Device A - CMOS process 350nm - AES128 enc.
51600 points per trace - highest SNR1: 0✿3
◮ Device B - CMOS process 130nm - AES128 enc.
16800 points per trace - highest SNR1: 0✿6
◮ Device C - CMOS process 90nm
12800 points per trace - highest SNR1: 0✿09
1SNR: Signal-to-Noise Ratio 9/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
1
2
3
4
10/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
⑤ ④③ ⑥
linear part
⑤ ④③ ⑥
quadratic part
⑤④③⑥
etc
11/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
12/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
◮ the distance score✭k✮ E❬score✭k✮] is large ◮ Var❬score✭k✮❪ is small
◮ center the scores ◮ divide by their variance ◮ normalized_score✭k✮ ❂ score✭k✮E❬score✭k✮❪
Var❬score✭k✮❪
13/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
1
2
3
4
14/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
100 200 300 400 500 600 700 800 900 1000 20 40 60 80 100 120 140 160
number of traces average rank of the correct key
LRA normalized LRA
Figure: Correct key rank evolution vs. nb. of traces
15/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
100 200 300 400 500 600 700 800 900 1000 20 40 60 80 100 120 140 160
number of traces average rank of the correct key
LRA normalized LRA
Figure: Correct key rank evolution vs. nb. of traces
16/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
500 1000 1500 2000 2500 3000 3500 4000 20 40 60 80 100 120 140 160
number of traces average rank of the correct key
LRA normalized LRA
Figure: Correct key rank evolution vs. nb. of traces
17/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| LRA Basics| Experimental Results|
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 50 100 150 200 250 mean of the rank of the correct key byte for uC 90nm (average over the 3 samples) number of traces mean of the rank of the correct key absolute CPA normalized LR
Figure: Correct key rank evolution vs. nb. of traces
18/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
1
2
3
4
19/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
1.1 Collect M side channel traces w. known inputs & keys
t1 ✦ Enc✭p1❀ k1✮❀ ✿ ✿ ✿ ❀ tN ✦ Enc✭pM ❀ kM ✮
1.2 Choose sensitive variable depend. on input & secret
e.g. AES Sbox output ✦ v
❫ k i ❂ S✭pi ✟ ❫
k✮
1.3 Compute the pdf of the leakage for each key value
pdf❫
k❂0❀ ✿ ✿ ✿ ❀ pdf❫ k❂255
2.1 Collect N side channel traces w. diff. inputs
t1 ✦ Enc✭p1❀ k✮❀ ✿ ✿ ✿ ❀ tN ✦ Enc✭pN ❀ k✮
2.2 Use a maximum likelihood test to discriminate the correct key by comparing the N traces and the pdfs
20/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
1
2
3
4
21/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
20 40 60 80 100 120 140 160 180 200 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10
4
number of traces used for the attack phase number of traces used for the profiling phase
10 20 30 40 50 60 70
Figure: Correct key rank evolution vs. nb. of traces for the profiling phase (y-axis) and the attack phase (x-axis)
22/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
20 40 60 80 100 120 140 160 180 200 1 1.5 2 2.5 3 3.5 4 4.5 5 x 10
4
number of traces used for the attack phase number of traces used for the profiling phase
10 20 30 40 50 60 70 80 90 100
Figure: Correct key rank evolution vs. nb. of traces for the profiling phase (y-axis) and the attack phase (x-axis)
23/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
10 20 30 40 50 60 70 80 90 100 0.5 1 1.5 2 2.5 3 x 10
4
number of traces used for the attack phase number of traces used for the profiling phase
20 40 60 80 100 120 140
Figure: Correct key rank evolution vs. nb. of traces for the profiling phase (y-axis) and the attack phase (x-axis)
24/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
10 20 30 40 50 60 70 80 90 100 0.5 1 1.5 2 2.5 3 x 10
4
number of traces used for the attack phase number of traces used for the profiling phase
20 40 60 80 100 120
Figure: Correct key rank evolution vs. nb. of traces for the profiling phase (y-axis) and the attack phase (x-axis)
25/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
100 200 300 400 500 600 700 800 900 1000 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10
5
number of traces used for the attack phase number of traces used for the profiling phase
20 40 60 80 100 120 140 160
Figure: Correct key rank evolution vs. nb. of traces for the profiling phase (y-axis) and the attack phase (x-axis)
26/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion| Template Attack Basics| Experimental Results|
100 200 300 400 500 600 700 800 900 1000 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 10
5
number of traces used for the attack phase number of traces used for the profiling phase
20 40 60 80 100 120 140
Figure: Correct key rank evolution vs. nb. of traces for the profiling phase (y-axis) and the attack phase (x-axis)
27/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion|
1
2
3
4
28/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion|
◮ even if both phases are performed on diff. device copies ◮ TA effectiveness outperforms unprofiled SCA
◮ algo. complexity does not depend from nb. of traces
(not described in this presentation)
29/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion|
Table: average nb. of traces to retrieve the correct key
2Template Attack inter-chip 3Template Attack intra-chip 30/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks
Side Channel Attacks (SCA)| Linear Regression Attack (LRA)| Template Attack (TA)| Conclusion|
31/31 Victor LOMNE - ANSSI / Behind the Scene of Side Channel Attacks