Understanding the Reasons for the Side-Channel Leakage is Indispensable for Secure Design
Werner Schindler Federal Office for Information Security (BSI), Bonn, Germany
Leuven, September 13, 2012
Understanding the Reasons for the Side-Channel Leakage is - - PowerPoint PPT Presentation
Understanding the Reasons for the Side-Channel Leakage is Indispensable for Secure Design Werner Schindler Federal Office for Information Security (BSI), Bonn, Germany Leuven, September 13, 2012 Outline Introduction and motivation
Leuven, September 13, 2012
Schindler September 13, 2012 Slide 2
Introduction and motivation Goals of a security evaluation The Stochastic Approach
basics in a nutshell
How to obtain relevant design information Conclusions
Schindler September 13, 2012 Slide 3
Side-channel analysis has been a hot topic in
In the early years the applied mathematical methods
In the meanwhile the mathematical methods have
The time has been ripe for systematic methods!
Schindler September 13, 2012 Slide 4
In 1999 I gave a course “Selected Topics in Modern
I had to bridge a “gap” of one and a half 90 minute
I studied the paper and was quickly convinced that
Schindler September 13, 2012 Slide 5
I contacted Jean-Jacques and proposed a new
For the same hardware the number of traces per
New stochastic methods made this improvement
I thought it might be a good idea to write one paper
Schindler September 13, 2012 Slide 6
The resistance of smart cards, or more generally, of
It is very important for evaluators and designers to
Usually several side-channel attacks are applied
Schindler September 13, 2012 Slide 7
A successful attack shows that the device is
But …
What are the consequences (countermeasures,
limitation of the number of operations, re-design)?
What is the conclusion if all attacks have been
Schindler September 13, 2012 Slide 8
It is clearly desirable
to have reliable security evaluations to get more than a one-bit information (successful
attack is known / is not known).
Reliable and trustworthy evaluation methods are
Ideally, a security evaluation should disclose
Schindler September 13, 2012 Slide 9
DPA and CPA are the „classics“ in power analysis. DPA and CPA are correlation attacks
+ easy to apply, no profiling
Schindler September 13, 2012 Slide 10
exploit power information from several time instants
electrical current vectors are interpreted as realizations
probability distribution.
These random vector may depend on
(x,k): part of the plaintext / ciphertext x, subkey k (x,z,k): part of the plaintext / ciphertext x, masking
value z, and subkey k
f(x,k): e.g., f(x,k):= ham(x⊕k) (model-based
templates)
Schindler September 13, 2012 Slide 11
profiling phase (training device): estimation of a probability density for each (x,k),
attack (target device) substitution of the measured current values into
Schindler September 13, 2012 Slide 12
Schindler September 13, 2012 Slide 13
target: block cipher exploits power measurements at several time
The measurement values are interpreted as values
The stochastic approach combines engineers’
Schindler September 13, 2012 Slide 14
Pioneer work:
Theoretical foundations and attack efficiency:
Design aspects:
Schindler September 13, 2012 Slide 15
target algorithm: block cipher (e.g., AES; no masking) x ∈ {0,1}p (known) part of the plaintext or ciphertext k ∈ {0,1}s subkey [AES: (typically) s = 8 ] t time instant
deterministic part = leakage function (depends on x and k)
quantifies the random- ness of the side-channel signal at time t random variable (depends on x and k)
noise (centered) random variable
E(Rt) = 0
Schindler September 13, 2012 Slide 16
x ∈ {0,1}p (known) part of the plaintext or ciphertext z ∈ M masking value k ∈ {0,1}s subkey [AES: (typically) s = 8 ] t ∈ {t1,t2,...,tm} time instant
deterministic part = leakage function (depends on x,z,k)
quantifies the random- ness of the side-channel signal at time t random variable (depends on x,z,k)
noise (centered) random variable
E(Rt) = 0
Schindler September 13, 2012 Slide 17
The leakage functions
the probability distribution of the random vector
Schindler September 13, 2012 Slide 18
Fix a subkey k ∈ {0,1}s. The unknown function
Goal: Approximate ht;k by its image h*t;k under the
Schindler September 13, 2012 Slide 19
*
Schindler September 13, 2012 Slide 20
(masking case)
Schindler September 13, 2012 Slide 21
Schindler September 13, 2012 Slide 22
Schindler September 13, 2012 Slide 23
Schindler September 13, 2012 Slide 24
k t j u j k t j k t
; , 1 ; , ;
− =
Task: Estimate the unknown coefficients β*0,t;k,
N1 measurement values from the training device
Least-square estimation:
Schindler September 13, 2012 Slide 25
Estimate the covariance matrix C (multivariate
→ prob. density fx,z;k(⋅) for It(x,z,k)
Schindler September 13, 2012 Slide 26
Perform N3 measurements on the target device Apply the maximum likelihood principle
(analogous to template attacks) NOTE: The random vector It(x,Z,k) (unknown masking value) has density
; ' , M z'
∈ k z x
Schindler September 13, 2012 Slide 27
Within long measurement series the environmental
0:00 am +24h (time-local average power consumption)
Example:
Schindler September 13, 2012 Slide 28
The average electrical current shows a periodic drift
This drift in particular influences the data-
All profiling-based attacks suffer from this problem.
Schindler September 13, 2012 Slide 29
exhanced stochastic model
Observation: θv+1 - θv ≈ 0
drifting offset
Solution: Consider overlapping differences
use subspaces °u,t;k without g0,t;k = 1 additional mathematical problems
Schindler September 13, 2012 Slide 30
Phase 1: 2s ( = # subkeys) measurement series;
Phase 2: 1 measurement serie no additional steps in case of masking
Schindler September 13, 2012 Slide 31
The attack efficiency depends on the choice of the
For suitable subspaces the attack efficiency should
more efficient than DPA and CPA
Schindler September 13, 2012 Slide 32
; , 1 * ; , * ;
k t j u j k t j k t
− =
Schindler September 13, 2012 Slide 33
To obtain design information only the first profiling
t,k(⋅,⋅)).
These following results were obtained together with
For our experiments we used the SASEBO G-I
Schindler September 13, 2012 Slide 34
Schindler September 13, 2012 Slide 35
Schindler September 13, 2012 Slide 36
AES TBL, k(1) = 19: |β β β β1|,...,|β β β β8| für t1,..,t20
AES TBL, k(1) = 209: |β β β β1|,...,|β β β β8| für t1,..,t20
Schindler September 13, 2012 Slide 37
Part of the SBox after the
synthesis process and the place & route process (Virtex-II pro family)
The first layer of the multiplexer
network is switched by the 5th bit
Different propagation delays
caused by LUT to the multiplexer produces data-dependent glitches.
This implies bit-specific higher
power consumption.
Schindler September 13, 2012 Slide 38
Schindler September 13, 2012 Slide 39
… g’j_i,t;k(2)– (0.5)i | 1 ≤ j1 <…< ji ≤ 8}
Schindler September 13, 2012 Slide 40
The subspaces °u,t;k are spanned by the following
1
(dim = 8)
1 ∪ 2
(dim = 36)
1 ∪ 2 ∪ 3
(dim = 92)
1 ∪ 2 ∪ 3 ∪ 4
(dim = 162)
1 ∪ 2 ∪ 3 ∪ 4 ∪ 5
(dim = 218)
1 ∪ 2 ∪ 3 ∪ 4 ∪ 5 ∪ 6
(dim = 246)
1 ∪ 2 ∪ 3 ∪ 4 ∪ 5 ∪ 6 ∪7
(dim = 254)
1 ∪ 2 ∪ 3 ∪ 4 ∪ 5 ∪ 6 ∪7 ∪8
(dim = 255) For the ‘standard method’ ‘0’ is added to these bases, which increases the dimension by 1.
Schindler September 13, 2012 Slide 41
|βj,t;k|
index j
Schindler September 13, 2012 Slide 42
DPA contest v2: also SASEBO-G-II board with
Schindler September 13, 2012 Slide 43
dim (°u,t;k) PSR > 80 % GSR > 80 % 8 8781 13020 36 5876 7533 92 5159 6734 162 4353 6144 218 (up to 5-fold products) 3552 4564 246 3769 4691 254 3720 4740 255 3718 4748 255 (with vertical trace alignment) 2682 3836
Schindler September 13, 2012 Slide 44
Even some 5-fold products have significant
Crossover effects between neighboured bit lines
What is the reason for this behaviour? Glitches due
Do other designs of the S-Box show qualitatively
Schindler September 13, 2012 Slide 45
High-dimensional subspaces u,t;k may provide
An important question remains: Is the choice of the
Schindler September 13, 2012 Slide 46
Schindler September 13, 2012 Slide 47
This reduces the argument of the leakage function
… and the dimension of the relevant (large) vector
If the symmetry assumption (expressed by ϕ) is valid
Schindler September 13, 2012 Slide 48
In case of a (perfect) symmetry ϕ it suffices to
t,k for any single subkey k.
Any power curve related to some subkey k‘ can be
Schindler September 13, 2012 Slide 49
Any symmetry assumption influences the choice of
The suitability of the basis is very important for both
How can a symmetry assumption be verified?
Schindler September 13, 2012 Slide 50
Crucial property: If the symmetry assumption is valid
1st approach:
If the β- estimates are ‘almost’ equal:
If the β- estimates are very unequal:
Schindler September 13, 2012 Slide 51
Schindler September 13, 2012 Slide 52
under the multiplication of the leakage function by
under all orthonormal bases of u,t;k with g0,t;k=1
Schindler September 13, 2012 Slide 53
Schindler September 13, 2012 Slide 54
Schindler September 13, 2012 Slide 55
Schindler September 13, 2012 Slide 56
Round 10
Schindler September 13, 2012 Slide 57
EX( (ht;k(X,k) – h*t;k(X,k))2 ),
the signal-to-noise ratio
Schindler September 13, 2012 Slide 58
Masked implementations can be handled similarly
Additionally, it might be necessary to rate the
Schindler September 13, 2012 Slide 59
is an efficient attack tool provides a representation of the leakage with
regard to a vector basis
identify and quantify properties / weaknesses,
which (might) be relevant for the leakage
to verify or falsify leakage models (within the
limits of statistics)
to support target-oriented (re-)design
(constructive side-channel analysis)
Schindler September 13, 2012 Slide 60
Federal Office for Information Security (BSI) Werner Schindler Godesberger Allee 185-189 53175 Bonn, Germany Tel: +49 (0)228-9582-5652 Fax: +49 (0)228-10-9582-5652 Werner.Schindler@bsi.bund.de www.bsi.bund.de www.bsi-fuer-buerger.de