Improved Blind Side-Channel Analysis by Exploitation of Joint Distributions of Leakages Christophe Clavier, L´ eo Reynaud Universit´ e de Limoges - XLIM
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Table of contents 1. Introduction 2. Joint distributions and maximum of likelihood 3. Extension to masked implementations 4. Conclusion 1
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Side Channel attacks Common non profiled side channel attacks k • DPA guess y m x • CPA known predicted ⊕ S • MIA Figure 1: Internal states variables Needs • Leakage on some internal state • Knowledge and variability of plain/ciphertext 2
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Side Channel attacks Common non profiled side channel attacks k • DPA guess y m x • CPA known predicted ⊕ S • MIA Figure 1: Internal states variables Needs • Leakage on some internal state • Knowledge and variability of plain/ciphertext How to attack with no or not variable plain/ciphertext ? 2
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion EMV : no exploitable plain/ciphertext ... ATC ATC 0x00 0x00 0x00 high low AES master key session key M 1 M 2 M n ⊕ ⊕ ⊕ IV AES AES AES cryptogram Figure 2: EMV session key derivation 3
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion What is available ? We only have access to consumptions k y m x unpredictable unknown ⊕ S Figure 3: Leakages 4
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion What is available ? We only have access to consumptions k y m x unpredictable unknown ⊕ S Figure 3: Leakages Joint distributions 4
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion 5
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Joint distributions : theoretical distributions For each key, we can count couples (HW( m ),HW( y )) when exhausting all inputs m Figure 4: Theoretical distribution Figure 5: Theoretical distribution k = 126 k = 39 6
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Joint distributions : theoretical distributions For each key, we can count couples (HW( m ),HW( y )) when exhausting all inputs m Figure 4: Theoretical distribution Figure 5: Theoretical distribution k = 126 k = 39 ⇒ All theoretical distributions are different 6
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Joint distributions : theoretical distributions For each key, we can count couples (HW( m ),HW( y )) when exhausting all inputs m Figure 4: Theoretical distribution Figure 5: Theoretical distribution k = 126 k = 39 ⇒ All theoretical distributions are different ⇒ Discrimination of the key 6
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Joint distributions in a nutshell Cons • Need to locate the points of interest (PoI) • Use HW instead of consumption Pros • Work without plain/ciphertext • Any round can be attacked 7
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Joint distributions : steps Step 1 Locate the PoI where the variables considered leak Step 2 Infer HW from the leakages observed at the PoI Step 3 Build the joint distribution for each key Step 4 Select the key whose distribution best fits the observations 8
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Contribution Prior work Le Bouder Linge • Maximum of likelihood • Slice method → HW (Step 2) → key • Distances between histograms (Step 4) → key (Step 4) Our contribution • Variance method → HW (Step 2) • Improvement on the maximum of likelihood (Step 4) • Extension to masked implementations (Step 3) 9
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Slice method to infer HW (Linge) Consumption model ℓ = α HW( v ) + β + ω Slice method • Sort the N leakages by ascending order • Assign HW = 0 to the N · C 0 lowest 8 2 8 ⇒ Integer valued HW • Assign HW = 1 to the N · C 1 next ... 8 2 8 Leakages . . . N ∗ C 2 HW = 2 8 • ... 2 8 • • • • • • N ∗ C 1 HW = 1 • • • 8 • • 2 8 • • • • • • • • • • • • HW = 0 • • • N ∗ C 0 8 2 8 Figure 6: Slice method to infer HW 10
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Variance method to infer HW Variance Goal : infer α and β in order to inverse the leakage function Var( ℓ ) = Var( α HW( v ) + β ) + Var( ω ) 11
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Variance method to infer HW Variance Goal : infer α and β in order to inverse the leakage function Var( ℓ ) = Var( α HW( v ) + β ) + Var( ω ) = α 2 Var(HW( v )) + Var( ω ) 11
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Variance method to infer HW Variance Goal : infer α and β in order to inverse the leakage function Var( ℓ ) = Var( α HW( v ) + β ) + Var( ω ) = α 2 Var(HW( v )) + Var( ω ) = 2 α 2 + Var( ω ) 11
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Variance method to infer HW Variance Goal : infer α and β in order to inverse the leakage function � Var( ℓ ) − Var( ω ) Var( ℓ ) = Var( α HW( v ) + β ) + Var( ω ) α = ± 2 = α 2 Var(HW( v )) + Var( ω ) = 2 α 2 + Var( ω ) PoI � Var ( ℓ ) � Var ( ω ) Figure 7: Standard deviation trace 11
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Variance method to infer HW Variance Goal : infer α and β in order to inverse the leakage function � Var( ℓ ) − Var( ω ) Var( ℓ ) = Var( α HW( v ) + β ) + Var( ω ) α = ± 2 = α 2 Var(HW( v )) + Var( ω ) β = E( ℓ ) − α E(HW( v )) = 2 α 2 + Var( ω ) PoI � Var ( ℓ ) � Var ( ω ) Figure 7: Standard deviation trace 11
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Variance method to infer HW Variance Goal : infer α and β in order to inverse the leakage function � Var( ℓ ) − Var( ω ) Var( ℓ ) = Var( α HW( v ) + β ) + Var( ω ) α = ± 2 = α 2 Var(HW( v )) + Var( ω ) β = E( ℓ ) − α E(HW( v )) = 2 α 2 + Var( ω ) PoI � Var ( ℓ ) Once α and β are known : HW( v ) = ℓ − β α � Var ( ω ) ⇒ Real valued HW Figure 7: Standard deviation trace 11
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Distinguisher : maximum of likelihood Observations h m = h ∗ h y = h ∗ m + ω m y + ω y h ∗ m , h ∗ y : correct HW (integer) ω m , ω y : noise Bayes Pr( k | ( h m , h y )) = Pr(( h m , h y ) | k ) · Pr( k ) ∼ Pr(( h m , h y ) | k ) · Pr( k ) Pr(( h m , h y )) Law of total probability Pr(( h m , h y ) | ( h ∗ m , h ∗ y )) · Pr(( h ∗ m , h ∗ Pr(( h m , h y ) | k ) = � y ) | k ) h ∗ m , h ∗ y Noise probability Pr(( h m , h y ) | ( h ∗ m , h ∗ y )) = Pr( ω m = h m − h ∗ m ) · Pr( ω y = h y − h ∗ y ) 12
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Improvements on basic attack Key likelihood can be computed Attack on the HW of the key for other/more observed HW Attack on m and x : Better results with new/more • Only gives information about variables : the HW of k • m - x - y • Very efficient • m - x - y -3 · y • HW of all extended key bytes • m -3 · y sufficient to retrieve the key • ... Every combination of m and other variables (not involving other keys) HW( k )=0 HW( k )=2 may bring information 13
Introduction Joint distributions and maximum of likelihood Extension to masked implementations Conclusion Simulation results 120 m-y σ =0.7 m-y σ =1.0 100 m-y σ =1.5 m-x-y σ =0.7 m-x-y σ =1.0 Rank of HW of the correct key Correct key rank 2 80 m-x-y σ =1.5 m-x σ =0.7 m-x σ =1.0 60 1.5 m-x σ =1.5 1 40 20 0.5 0 0 0 500 1000 1500 2000 0 100 200 300 400 500 Number of observations Number of observations Figure 8: Improvements using m - x - y Figure 9: m - x attack 14
Recommend
More recommend