masking against side channel attacks a formal security
play

Masking against Side-Channel Attacks: a Formal Security Proof - PowerPoint PPT Presentation

Masking against Side-Channel Attacks: a Formal Security Proof Matthieu Rivain Joint work with Emmanuel Prouff EUROCRYPT 2013 May 27th Outline 1 Introduction and Previous Works 2 Our Contribution 3 Model of Leaking Computation 4


  1. Masking against Side-Channel Attacks: a Formal Security Proof Matthieu Rivain Joint work with Emmanuel Prouff EUROCRYPT 2013 – May 27th

  2. Outline 1 � Introduction and Previous Works 2 � Our Contribution 3 � Model of Leaking Computation 4 � Overview of the Proof 5 � Conclusion and Perspectives

  3. Outline 1 � Introduction and Previous Works 2 � Our Contribution 3 � Model of Leaking Computation 4 � Overview of the Proof 5 � Conclusion and Perspectives

  4. Side-Channel Attacks � Attacks exploiting physical information leakage ◮ timing [Kocher. CRYPTO’96] ◮ power consumption [Kocher et al. CRYPTO’99] ◮ electromagnetic emanations [Gandolfi et al. CHES’01] Secret key Leakage measurements Statistical treatment

  5. Masking � [Chari et al. CRYPTO’99] [Goubin-Patarin. CHES’99] � Apply secret sharing to internal variables � A sensitive variable x is shared into d + 1 variables x 0 ⊕ x 1 ⊕ · · · ⊕ x d = x � Computing on each share separately

  6. Masking Schemes � A lot of first-order masking schemes have been published ◮ [Kocher et al. US Patent 1999] [Goubin-Patarin. CHES’99] [Messerges. FSE’00] [Akkar-Giraud. CHES’01] [Blomer et al. SAC’04] [Oswald et al. FSE’05] [Prouff et al. CHES’06] [Prouff-Rivain. WISA’07] � Used in current smart cards products � Limitation: vulnerable to second-order SCA

  7. Masking Schemes � Increasing masking order ⇒ increasing attack order ⇒ increasing attack difficulty � Soundness [Chari et al. CRYPTO’99] ◮ Noisy leakage model: L i ∼ x i + N ( µ, σ 2 ) � � � � ◮ Distinguishing ( L i ) i | x = 0 from ( L i ) i | x = 1 takes q samples: q ≥ cst · σ d � Higher-order masking schemes ◮ [Rivain-Prouff. CHES’10] [Kim et al. CHES’11] [Carlet et al. FSE’12] [Coron et al. FSE’13] � Limitation: no security proof against an adversary using the whole leakage of the computation

  8. Physically Observable Cryptography � [Micali-Reyzin. TCC’04] � Framework for leaking computation � Assumption: Only Computation Leaks (OCL) � Computation divided into subcomputations y ← C ( x ) � Each subcomputation leaks a function of its input f ( x )

  9. Leakage Functions � Leakage-Resilience model [Dziembowski-Pietrzak. STOC’08] ◮ bounded-range leakage functions f : { 0 , 1 } n → { 0 , 1 } λ with λ ≪ n � Leakage model for circuits [Faust et al. EUROCRYPT’10] ◮ computationally bounded leakage functions: f ∈ AC 0 (computable by a circuit of constant depth) ◮ noisy leakage functions: f ( x ) = x ⊕ ε with ε being some sparse error vector

  10. Limitations � In practice the leakage is far bigger than n bits ( λ ≫ n ) Figure: Power consumption of a DES computation. � The leakage result from the switching activity of logic gates ◮ it can hardly be modeled by an AC 0 function ◮ noise can hardly be modeled as the xor of an error vector

  11. State of the Art � Lack of practically relevant leakage models � Masking widely used without formal proof My leakage model My leakage model is practically relevant looks relevant My implementation My implementation looks secure is provably secure PRACTITIONER THEORETICIAN THOUGHTS THOUGHTS

  12. Our Goal � A step toward: Our leakage model is practically relevant Our implementation is provably secure

  13. Outline 1 � Introduction and Previous Works 2 � Our Contribution 3 � Model of Leaking Computation 4 � Overview of the Proof 5 � Conclusion and Perspectives

  14. Our Contribution � Leakage model ◮ OCL assumption [Micali-Reyzin. TCC’04] ◮ subcomputations = elementary calculations (a few CPU intructions, small inputs) � New class of noisy leakage functions ◮ f ( x ) implies a bounded bias in the distribution of x

  15. Our Contribution � Formal security proof for a block cipher computation ◮ negligible entropy loss on the key (w.r.t. masking order) � Need for a leak-free component (for mask refreshing) x ′ = ( x ′ 0 , x ′ 1 , . . . , x ′ x = ( x 0 , x 1 , . . . , x d ) �− → d ) � �� � � �� � � � i x ′ i x i = x i = x with ( x | x ) and ( x ′ | x ) mutually independent.

  16. Outline 1 � Introduction and Previous Works 2 � Our Contribution 3 � Model of Leaking Computation 4 � Overview of the Proof 5 � Conclusion and Perspectives

  17. Notion of Bias � Bias of X given Y = y : β ( X | Y = y ) = � P[ X ] − P[ X | Y = y ] � with � · � = Euclidean norm. � Bias of X given Y : � β ( X | Y ) = P[ Y = y ] β ( X | Y = y ) . y ∈Y � Related to MI by: MI( X ; Y ) ≤ N ln 2 β ( X | Y ) (with N = |X| )

  18. Model of Leaking Computation � Every elementary calculation leaks a noisy function of its input ◮ noise modeled by a fresh random tape argument � f adaptively chosen by the adversary in N (1 /ψ ) < 1 � � β X | f ( X ) ψ � ψ is some noise parameter � Capture any form of noisy leakage � Assumtpion: ψ can be set by the designer (linear in the security parameter)

  19. Outline 1 � Introduction and Previous Works 2 � Our Contribution 3 � Model of Leaking Computation 4 � Overview of the Proof 5 � Conclusion and Perspectives

  20. Overview of the Proof � Consider a SPN computation Figure: Example of SPN round.

  21. Overview of the Proof � Classical implementation protected with masking Figure: Example of SPN round protected with masking.

  22. S-Box Computation � [Carlet et al. FSE’12] � Polynomial evaluation over GF (2 n ) � Two types of elementary calculations: ◮ linear functions (additions, squares, multiplication by coefficients) ◮ multiplications over GF (2 n )

  23. Linear Functions � Given a sharing X = X 0 ⊕ X 1 ⊕ · · · ⊕ X d X 0 X 1 X d · · · λ λ λ λ ( X d ) λ ( X 0 ) λ ( X 1 ) � Apply mask-refreshing on output sharing

  24. Linear Functions � Given a sharing X = X 0 ⊕ X 1 ⊕ · · · ⊕ X d X 0 X 1 X d · · · λ λ λ λ ( X d ) λ ( X 0 ) λ ( X 1 ) f d ( X d ) f 0 ( X 0 ) f 1 ( X 1 ) � Apply mask-refreshing on output sharing

  25. Linear Functions � For f 0 , f 1 , . . . , f d ∈ N (1 /ψ ) , we show d ≤ N � � � 2 β X � f 0 ( X 0 ) , f 1 ( X 1 ) , . . . , f d ( X d ) ψ d +1 . 1 � Taking ψ ∼ N 2 ω we get 1 � � MI X ; ( f 0 ( X 0 ) , f 1 ( X 1 ) , . . . , f d ( X d )) ≤ ω d +1 � Result in accordance with [Chari et al. CRYPTO’99]

  26. Multiplications � Given two sharings A = � i A i and B = � i B i �� ��� � � A × B = i A i i B i = i,j A i B j � First step: cross-products A 0 × B 0 A 0 × B 1 · · · A 0 × B d A 1 × B 0 A 1 × B 1 · · · A 1 × B d . . ... . . . . . . . · · · A d × B 0 A d × B 1 A d × B d

  27. Multiplications � Given two sharings A = � i A i and B = � i B i �� ��� � � A × B = i A i i B i = i,j A i B j � First step: cross-products A 0 × B 0 A 0 × B 1 · · · A 0 × B d A 1 × B 0 A 1 × B 1 · · · A 1 × B d . . ... . . . . . . . · · · A d × B 0 A d × B 1 A d × B d f 0 , 0 ( A 0 , B 0 ) f 0 , 1 ( A 0 , B 1 ) · · · f 0 ,d ( A 0 , B d ) · · · f 1 , 0 ( A 1 , B 0 ) f 1 , 1 ( A 1 , B 1 ) f 1 ,d ( A 1 , B d ) . . . ... . . . . . . f d, 0 ( A d , B 0 ) f d, 1 ( A d , B 1 ) · · · f d,d ( A d , B d )

  28. Multiplications � We have A = g ( X ) and B = h ( X ) where X = s-box input � Bias given cross-product leakages: For f i,j ∈ N (1 /ψ ) we show � λ 1 d + λ 0 � d +1 � � 3 d +7 X | ( f i,j ( A i , B j )) i,j ≤ 2 N β 2 ψ with λ 1 ∈ [1; 2] and λ 2 ∈ [1; 3] . 3 � Taking ψ ∼ N 2 ( λ 1 d + λ 0 ) ω we get 1 � � MI X ; ( f i,j ( A i , B j )) i,j ≤ ω d +1 � The noise parameter must be roughly multiplied by d

  29. Multiplications � Second step: refreshing � Apply on each column and one row of A 0 × B 0 A 0 × B 1 · · · A 0 × B d A 1 × B 0 A 1 × B 1 · · · A 1 × B d . . ... . . . . . . . A d × B 0 A d × B 1 · · · A d × B d � We get a fresh ( d + 1) 2 -sharing of A × B V 0 , 0 V 0 , 1 · · · V 0 ,d V 1 , 0 V 1 , 1 · · · V 1 ,d . . . ... . . . . . . V d, 0 V d, 1 · · · V d,d

  30. Multiplications � Third step: summing rows Z i ← V i, 0 ⊕ V i, 1 ⊕ · · · ⊕ V i,d � Takes d elementary calculations (XORs) per row: T i, 1 ← V i, 0 ⊕ V i, 1 T i, 2 ← T i, 1 ⊕ V i, 2 . . . T i,d ← T i,d − 1 ⊕ V i,d (with Z i = T i,d ) � Then ( Z 0 , Z 1 , . . . , Z d ) is a sharing of A × B ◮ Apply mask-refreshing

  31. Multiplications � Third step: summing rows Z i ← V i, 0 ⊕ V i, 1 ⊕ · · · ⊕ V i,d � Takes d elementary calculations (XORs) per row: T i, 1 ← V i, 0 ⊕ V i, 1 T i, 2 ← T i, 1 ⊕ V i, 2 f i, 1 ( V i, 0 , V i, 1 ) . . . . f i, 2 ( T i, 1 , V i, 2 ) . . T i,d ← T i,d − 1 ⊕ V i,d f i,d ( T i,d − 1 , V i,d ) (with Z i = T i,d ) � Then ( Z 0 , Z 1 , . . . , Z d ) is a sharing of A × B ◮ Apply mask-refreshing

  32. Multiplications � For f i,j ∈ N (1 /ψ ) we show � 2 � d +1 � � 3 d +5 X | F 0 ( Z 0 ) , F 1 ( Z 1 ) , . . . , F d ( Z d ) ≤ N β 2 ψ � � where F i ( Z i ) = f i, 1 ( V i, 0 , V i, 1 ) , f i, 2 ( T i, 1 , V i, 2 ) , . . . , f i,d ( T i,d − 1 , V i,d ) 3 � Taking ψ ∼ 2 N 2 ω we get 1 � � MI X ; ( F 0 ( Z 0 ) , F 1 ( Z 1 ) , . . . , F d ( Z d )) ≤ ω d +1

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend