Introduction to Side-Channel Analysis
Franรงois-Xavier Standaert
UCL Crypto Group, Belgium Summer school on real-world crypto, 2016
Introduction to Side-Channel Analysis Franois-Xavier Standaert UCL - - PowerPoint PPT Presentation
Introduction to Side-Channel Analysis Franois-Xavier Standaert UCL Crypto Group, Belgium Summer school on real-world crypto, 2016 Outline Link with linear cryptanalysis Standard Differential Power Analysis Noise-based security (is
Introduction to Side-Channel Analysis
Franรงois-Xavier Standaert
UCL Crypto Group, Belgium Summer school on real-world crypto, 2016
Outline
Outline
Linear cryptanalysis (I)
1
Linear cryptanalysis (I)
1
Linear cryptanalysis (I)
1
Linear cryptanalysis (II)
2
1 ๐2
๐
๐๐ก (๐ S-boxes in A, bias ๐๐ก)
Linear cryptanalysis (II)
2
1 ๐2
๐
๐๐ก (๐ S-boxes in A, bias ๐๐ก)
Linear cryptanalysis (II)
2
1 ๐2
๐
๐๐ก (๐ S-boxes in A, bias ๐๐ก)
๏AES: ๐ < 2โ64 after a few of rounds
Side-channel cryptanalysis
3
Differential Side-Channel Analysis
4
1 MI(๐ฟ;๐,๐)
Differential Side-Channel Analysis
4
1 MI(๐ฟ;๐,๐)
Differential Side-Channel Analysis
4
1 MI(๐ฟ;๐,๐)
Differential Side-Channel Analysis
4
1 MI(๐ฟ;๐,๐)
?
Differential Side-Channel Analysis
4
1 MI(๐ฟ;๐,๐)
?
Differential Side-Channel Analysis
4
1 MI(๐ฟ;๐,๐)
๏Unprotected implem: MI ๐ฟ; ๐, ๐ > 0.01
?
Outline
Standard DPA
5
Standard DPA
5
Standard DPA
5
Standard DPA
5
Standard DPA
5
Measurement & pre-processing
6
Prediction and modeling
7
๐ ๐๐ ๐, ๐ฆ๐
Pr[๐|๐๐, ๐ฆ๐]
Prediction and modeling
7
๐ ๐๐ ๐, ๐ฆ๐
Pr[๐|๐๐, ๐ฆ๐]
๐โ = HW(๐จ๐)
Prediction and modeling
7
๐ ๐๐ ๐, ๐ฆ๐
Pr[๐|๐๐, ๐ฆ๐]
๐โ = HW(๐จ๐)
succeed against any leaking device (!)
Exploitation
8
Exploitation
8
Illustration
9
Gaussian templates CPA
๐ = argmax E ๐ โ ๐๐โ โ E ๐ โ E(๐๐โ) ๐(๐) โ ๐(๐๐โ)
๐ = argmax
๐=1 ๐
1 2 โ ๐ โ ๐(๐) โ exp โ 1 2 โ ๐๐ โ ๐๐
๐โ
๐(๐)
2
k* k*
Outline
First-order CPA (I)
10
normally distributed random variables ๐, ๐ with means ๐๐, ๐๐ and variances ๐๐
2, ๐๐ 2 equals:
MI ๐; ๐ = โ 1 2 log2(1 โ ๐ ๐, ๐ 2)
First-order CPA (I)
10
normally distributed random variables ๐, ๐ with means ๐๐, ๐๐ and variances ๐๐
2, ๐๐ 2 equals:
MI ๐; ๐ = โ 1 2 log2(1 โ ๐ ๐, ๐ 2)
required to distinguish the corrrect key with model ๐๐ from the other key candidates with models ๐๐โ is โ
๐ ๐(๐๐,๐)2 (with c a small constant
depending on the SR & # of key candidates)
First-order CPA (II)
11
variables s.t. ๐ = ๐ + ๐1and ๐ = ๐ + ๐2 with ๐1 and ๐2 two additive noise variables. Then: ๐ ๐, ๐ = ๐(๐, ๐) โ ๐(๐, ๐)
First-order CPA (II)
11
variables s.t. ๐ = ๐ + ๐1and ๐ = ๐ + ๐2 with ๐1 and ๐2 two additive noise variables. Then: ๐ ๐, ๐ = ๐(๐, ๐) โ ๐(๐, ๐)
the sum of ๐ independent and identically distributed random variables and the sum of the first ๐ < ๐ of these equals ๐/๐
Paper & pencil estimations (I)
12
Paper & pencil estimations (I)
12
Paper & pencil estimations (II)
13
Paper & pencil estimations (II)
13
Paper & pencil estimations (II)
13
Paper & pencil estimations (II)
13
Paper & pencil estimations (II)
13
Paper & pencil estimations (II)
13
๐ ( 8/8โ๐ ๐,๐ )ยฒ = 10
Paper & pencil estimations (III)
14
Paper & pencil estimations (III)
14
Paper & pencil estimations (III)
14
Paper & pencil estimations (III)
14
Paper & pencil estimations (III)
14
32/32
Paper & pencil estimations (III)
14
32/32
Outline
CPA vs. Gaussian templates
15
๐ = argmax E ๐ โ ๐๐โ โ E ๐ โ E(๐๐โ) ๐(๐) โ ๐(๐๐โ)
k*
CPA vs. Gaussian templates
15
๐ = argmax E ๐ โ ๐๐โ โ E ๐ โ E(๐๐โ) ๐(๐) โ ๐(๐๐โ) = 0 (normalization)
k*
CPA vs. Gaussian templates
15
๐ = argmax E ๐ โ ๐๐โ โ E ๐ โ E(๐๐โ) ๐(๐) โ ๐(๐๐โ) = 0 (normalization) independent of k*
k*
CPA vs. Gaussian templates
15
๐ = argmax E ๐ โ ๐๐โ โ E ๐ โ E(๐๐โ) ๐(๐) โ ๐(๐๐โ) = 0 (normalization) independent of k* asymptotivally independent of k*
k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ = argmax
๐=1 ๐
1 2 โ ๐ โ ๐(๐) โ exp โ 1 2 โ ๐๐ โ ๐๐
๐โ
๐(๐)
2
k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ = argmax
๐=1 ๐
1 2 โ ๐ โ ๐(๐) โ exp โ 1 2 โ ๐๐ โ ๐๐
๐โ
๐(๐)
2
k*
independent of k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ โ argmax
๐=1 ๐
exp โ 1 2 โ ๐๐ โ ๐๐
๐โ
๐(๐)
2
k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ โ argmin E ๐2 โ 2 โ E ๐ โ ๐๐โ + E( ๐๐โ 2)
k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ โ argmin E ๐2 โ 2 โ E ๐ โ ๐๐โ + E( ๐๐โ 2)
k*
independent of k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ โ argmin E ๐2 โ 2 โ E ๐ โ ๐๐โ + E( ๐๐โ 2)
k*
independent of k* asymptotivally independent of k*
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ โ argmax E ๐ โ ๐๐โ
k*
๏Both attacks are asymtotically equivalent
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ โ argmax E ๐ โ ๐๐โ
k*
๏Both attacks are asymtotically equivalent
๏Gaussian templates outperforms CPA because it (usually) exploits a better (profiled) model
CPA vs. Gaussian templates
15
๐ โ argmax E ๐ โ ๐๐โ
k*
๐ โ argmax E ๐ โ ๐๐โ
k*
Outline
Exploiting offline computing power
16
CPA vs. Gaussian templates
17
Outline
Masking & 2nd-order DPA
18
More generally (I)
19
More generally (II)
20
f(a) = f(๐1) โ f(๐2) โ โฏ โ f(๐๐)
More generally (II)
20
f(a) = f(๐1) โ f(๐2) โ โฏ โ f(๐๐)
More generally (II)
20
f(a) = f(๐1) โ f(๐2) โ โฏ โ f(๐๐) ๐1๐1 ๐1๐2 ๐1๐3 ๐2๐1 ๐2๐2 ๐2๐3 ๐3๐1 ๐3๐2 ๐3๐3 + ๐
1
๐
2
โ๐
1
๐
3
โ๐
2
๐
3
โ ๐1 ๐2 ๐3 partial products
More generally (II)
20
f(a) = f(๐1) โ f(๐2) โ โฏ โ f(๐๐) ๐1๐1 ๐1๐2 ๐1๐3 ๐2๐1 ๐2๐2 ๐2๐3 ๐3๐1 ๐3๐2 ๐3๐3 + ๐
1
๐
2
โ๐
1
๐
3
โ๐
2
๐
3
โ ๐1 ๐2 ๐3 partial products refreshing
More generally (II)
20
f(a) = f(๐1) โ f(๐2) โ โฏ โ f(๐๐) ๐1๐1 ๐1๐2 ๐1๐3 ๐2๐1 ๐2๐2 ๐2๐3 ๐3๐1 ๐3๐2 ๐3๐3 + ๐
1
๐
2
โ๐
1
๐
3
โ๐
2
๐
3
โ ๐1 ๐2 ๐3 partial products refreshing compression
More generally (II)
20
๏Quadratic overheads & randomness
f(a) = f(๐1) โ f(๐2) โ โฏ โ f(๐๐) ๐1๐1 ๐1๐2 ๐1๐3 ๐2๐1 ๐2๐2 ๐2๐3 ๐3๐1 ๐3๐2 ๐3๐3 + ๐
1
๐
2
โ๐
1
๐
3
โ๐
2
๐
3
โ ๐1 ๐2 ๐3 partial products refreshing compression
Main theorem (informal)
21
๐2 (why ๐2?)
Main theorem (informal)
21
๐2 (multiplications)
Main theorem (informal)
21
๐2 (multiplications)
2)๐
SR โค 1 โ 1 โ MI(๐๐; ๐๐๐)๐ ๐
Statistical intuition
22
Statistical intuition
22
key-independent means
Information theoretic intuition
23
Wrapping up
24
Wrapping up
24
cycle count
security
Wrapping up
24
cycle count
security
Wrapping up
24
cycle count
security
Wrapping up
24
cycle count
security
Outline
Conclusions
25
Conclusions
25
against side-channel attacks always combine two ingredients: sound (falsifiable) hardware assumptions & mathematical amplification
Advanced topics
26
http://perso.uclouvain.be/fstandae/
Related publications & further readings. Standard DPA (slide 5). Stefan Mangard, Elisabeth Oswald, Franรงois-Xavier Standaert: One for all - all for one: unifying standard differential power analysis attacks. IET Information Security 5(2): 100-110 (2011). Pre-processing (slide 6). Victor Lomnรฉ, Emmanuel Prouff, Thomas Roche: Behind the Scene of Side Channel Attacks. ASIACRYPT (1) 2013: 506-525. Filtering. Santos Merino Del Pozo, Franรงois-Xavier Standaert: Blind Source Separation from Single Measurements Using Singular Spectrum Analysis. CHES 2015: 42-59. POI detection. Oscar Reparaz, Benedikt Gierlichs, Ingrid Verbauwhede: Selecting Time Samples for Multivariate DPA Attacks. CHES 2012: 155-174. Franรงois Durvaux, Franรงois-Xavier Standaert, Nicolas Veyrat-Charvillon, Jean-Baptiste Mairy, Yves Deville: Efficient Selection of Time Samples for Higher-Order DPA with Projection Pursuits. COSADE 2015: 34-50. Dimensionality reduction. Cรฉdric Archambeau, Eric Peeters, Franรงois-Xavier Standaert, Jean-Jacques Quisquater: Template Attacks in Principal Subspaces. CHES 2006: 1-14. Franรงois-Xavier Standaert, Cรฉdric Archambeau: Using Subspace-Based Template Attacks to Compare and Combine Power and Electromagnetic Information Leakages. CHES 2008: 411-425. Prediction and modeling (slide 7). Profiled DPA. Suresh Chari, Josyula R. Rao, Pankaj Rohatgi: Template Attacks. CHES 2002: 13-28. Werner Schindler, Kerstin Lemke, Christof Paar: A Stochastic Model for Differential Side Channel Cryptanalysis. CHES 2005: 30-46. Separation result. Carolyn Whitnall, Elisabeth Oswald, Franรงois-Xavier Standaert: The Myth of Generic DPA...and the Magic of Learning. CT-RSA 2014: 183-205. Exploitation (slide 8). Omar Choudary, Markus G. Kuhn: Efficient Template Attacks. CARDIS 2013: 253-270. Paul C. Kocher, Joshua Jaffe, Benjamin Jun: Differential Power Analysis. CRYPTO 1999: 388-397. Eric Brier, Christophe Clavier, Francis Olivier: Correlation Power Analysis with a Leakage Model. CHES 2004: 16-29. Julien Doget, Emmanuel Prouff, Matthieu Rivain, Franรงois-Xavier Standaert: Univariate side channel attacks and leakage modeling. J. Cryptographic Engineering 1(2): 123-144 (2011). Lejla Batina, Benedikt Gierlichs, Emmanuel Prouff, Matthieu Rivain, Franรงois-Xavier Standaert, Nicolas Veyrat-Charvillon: Mutual Information Analysis: a Comprehensive Study. J. Cryptology 24(2): 269-291 (2011). First-order CPA (slides 10-11). Stefan Mangard, Elisabeth Oswald, Franรงois-Xavier Standaert: One for all - all for one: unifying standard differential power analysis attacks. IET Information Security 5(2): 100-110 (2011). Franรงois-Xavier Standaert, Eric Peeters, Gaรซl Rouvroy, Jean-Jacques Quisquater, An Overview of Power Analysis Attacks Against Field Programmable Gate Arrays, Proceedings of the IEEE, 94(2): 383-394 (2006). Trading data for time (slide 14). Luke Mather, Elisabeth Oswald, Carolyn Whitnall: Multi-target DPA Attacks: Pushing DPA Beyond the Limits of a Desktop Computer. ASIACRYPT (1) 2014: 243-261. CPA vs. Gaussian templates (slide 15). Stefan Mangard, Elisabeth Oswald, Franรงois-Xavier Standaert: One for all - all for one: unifying standard differential power analysis attacks. IET Information Security 5(2): 100-110 (2011). Key enumeration/rank estimation (slide 16). Nicolas Veyrat- Charvillon, Benoรฎt Gรฉrard, Mathieu Renauld, Franรงois-Xavier Standaert: An Optimal Key Enumeration Algorithm and Its Application to Side-Channel Attacks. Selected Areas in Cryptography 2012: 390-406. Nicolas Veyrat-Charvillon, Benoรฎt Gรฉrard, Franรงois-Xavier Standaert: Security Evaluations Beyond Computing Power: How to Analyze Side-Channel Attacks you Cannot Mount? EUROCRYPT 2013: 126-141. Cezary Glowacz, Vincent Grosso, Romain Poussier, Joachim Schรผth, Franรงois-Xavier Standaert: Simpler and More Efficient Rank Estimation for Side-Channel Security Assessment. FSE 2015: 117-
313-337.Key enumeration/rank estimation errors (slide 17). Romain Poussier, Vincent Grosso, Franรงois-Xavier Standaert: Comparing Approaches to Rank Estimation for Side-Channel Security Evaluations. CARDIS 2015: 125-142. Masking (slides 19-20). Yuval Ishai, Amit Sahai, David Wagner: Private Circuits: Securing Hardware against Probing Attacks. CRYPTO 2003: 463-481. Matthieu Rivain, Emmanuel Prouff: Provably Secure Higher-Order Masking of
Concrete - Or How to Evaluate the Security of Any Leaking Device. EUROCRYPT (1) 2015: 401-429. Advanced topics (slide 26). Algebraic/analytical
282-296. Vincent Grosso, Franรงois-Xavier Standaert: ASCA, SASCA and DPA with Enumeration: Which One Beats the Other and When? ASIACRYPT (2) 2015: 291-312. Leakage detection. Luke Mather, Elisabeth Oswald, Joe Bandenburg, Marcin Wรณjcik: Does My Device Leak Information? An a priori Statistical Power Analysis of Leakage Detection Tests. ASIACRYPT (1) 2013: 486-505. Franรงois Durvaux, Franรงois-Xavier Standaert: From Improved Leakage Detection to the Detection of Points of Interests in Leakage Traces. EUROCRYPT (1) 2016: 240-262. Model certification. Franรงois Durvaux, Franรงois-Xavier Standaert, Nicolas Veyrat-Charvillon: How to Certify the Leakage of a Chip? EUROCRYPT 2014: 459-476. Secure and efficient masking. Inner Product Masking. Josep Balasch, Sebastian Faust, Benedikt Gierlichs: Inner Product Masking Revisited. EUROCRYPT (1) 2015: 486-510. Threshold
Cryptology 24(2): 292-321 (2011). Formal verification. Gilles Barthe, Sonia Belaรฏd, Franรงois Dupressoir, Pierre-Alain Fouque, Benjamin Grรฉgoire, Pierre- Yves Strub: Verified Proofs of Higher-Order Masking. EUROCRYPT (1) 2015: 457-485. Leakage-resilience. see next talk.