leakage resilient masking schemes
play

Leakage Resilient Masking Schemes Sebastian Faust Ruhr University - PowerPoint PPT Presentation

Leakage Resilient Masking Schemes Sebastian Faust Ruhr University Bochum 1 Modern cryptography Until 1970s: Design crypto algorithm secure against one attack Find attack C Find attack B Crypto Crypto algorithm A algorithm B secure against


  1. Leakage Resilient Masking Schemes Sebastian Faust Ruhr University Bochum 1

  2. Modern cryptography Until 1970s: Design crypto algorithm secure against one attack Find attack C Find attack B Crypto Crypto … algorithm A algorithm B secure against attack B secure against attack A Cat and mouse game between designer and attacker Modern crypto: Stop cat-and-mouse game Find attack B Main tool: security proofs ¡ Secure against all attacks within a model ¡ 2

  3. Black-box Model Adversaries in Black-box Model Key Attack algorithm Crypto algorithms ¡ ¡ Provable secure in black-box model ≈ unbreakable? 3 3

  4. oken No! C o! Crypto rypto im imple plementa ntations tions g get br t brok Smart Cards broken by side-channel attacks Much more efficient than traditional attacks on the algorithm Adversaries in Black-box Model Key Attack algorithm Crypto Crypto algorithms implementation May reveal secret key k Side-channel attacks Power analysis exploits leakage Weaknesses outside of Black-box Model 4 4

  5. The Problem Cat and mouse game at implementation level Find weakness Find weakness Crypto Crypto … implementation A implementation B Goal of leakage resilient crypto Extend the Black-box model Design algorithms with better security at implementation-level 5

  6. Rest of this talk: Example for using proofs to design better countermeasures 6

  7. Masking countermeasure 7

  8. Masking countermeasure Masking 8

  9. Important countermeasure Masking : ¡Protect ¡all ¡intermediate ¡values ¡of ¡computa4on ¡ with ¡randomized ¡encoding ¡ Enc ¡ Protected Crypto algorithm ¡ algorithms Computes ¡algorithm ¡ Descrip4on ¡as, ¡ ¡ Harder ¡to ¡exploit ¡leakage ¡ on ¡ encoded ¡values ¡ e.g., ¡circuit ¡ from ¡protected ¡algorithm ¡ Circuit ¡compiler ¡(think ¡of ¡it ¡as ¡ fabrica4on ¡of ¡the ¡chip) ¡ Two ¡ingredients ¡of ¡a ¡masking ¡scheme ¡ Robust ¡encoding ¡func4on ¡ K ¡ Enc(K) ¡ Leaks ¡less ¡about ¡ K ¡ 9

  10. Important countermeasure Masking : ¡Protect ¡all ¡intermediate ¡values ¡of ¡computa4on ¡ with ¡randomized ¡encoding ¡ Enc ¡ Protected Crypto algorithm ¡ algorithms Computes ¡algorithm ¡ Descrip4on ¡as, ¡ ¡ Harder ¡to ¡exploit ¡leakage ¡ on ¡ encoded ¡values ¡ e.g., ¡circuit ¡ from ¡protected ¡algorithm ¡ Two ¡ingredients ¡of ¡a ¡masking ¡scheme ¡ Robust ¡encoding ¡func4on ¡ Opera4ons ¡compu4ng ¡with ¡encoded ¡values ¡ Enc(X) ¡ Compute ¡on ¡encoded ¡values ¡ Enc(X*Y) ¡ Enc(Y) ¡ 10

  11. Masking countermeasure Security definition 11

  12. What does security mean? Adversary learns no more than by black-box access In other words: leakage is „useless“ to the adversary Ideal: Real: Crypto Protected What function can the algorithms algorithm leakage f be? Repeat many X, X Y Y, f(state) times f output indis4nguishable ¡ output Continuous leakage: many observations are possible What does it mean? For unbounded adversary: MI(Key ; f(.), ... f(.)) < negl Even more: It is as secure as in the black-box world! 12

  13. Masking countermeasure Common: Bounded leakage models 13

  14. n-Probing adversary [ISW03]* Adversary gets t intermediate values of computation è L = { values on t adversarial chosen wires } ● ¡ + ¡ C ¡ ● ¡ M t -probing attack formalization of t -variate attacks … Learns nothing if t < n Basic ingredient: Boolean masking Encode K ¡ K ¡:= ¡(K 1 …K n ) ¡s.t. ¡K=K 1 +...+ ¡K n ¡ Drawback: leakage oblivious of many wires! 14 *Ishai, Sahai, Wagner (CRYPTO-03)

  15. Bounded independent leakages [DF12]* Circuit ¡C’ ¡ input ¡ output ¡ L ¡ R ¡ T g(R,T) f(L,T) Processors can communicate with each other – Think of it as a 2-party protocol! Bounded leakage function: Assumption: Processors leak independently! t bits - Arbitrary efficient functions m bits f è Everything that is touched on a processor leaks! - Ony restriction: input shrinking, i.e., t < m Realistic? Includes many functions, e.g. weighted sums Additive masking? Insecure: learn parities of L & R 15 *Dziembowski-F(TCC-12) inspired from Dziembowski-Pietrzak (FOCS-08) for stream ciphers

  16. Inner Product Masking Sample L,R uniformly in {0,1} n s.t. S= <L,R> = Σ L i *R i and store parts separately on two processors n ¡ n ¡ g(R) ¡ ? L ¡ R ¡ f(L) ¡ Thm [DDV10]* : if leakage is bounded in total to t bits then adversary learns nothing about S L ¡ High min-entropy and ̴ ¡ uniform ¡ Extract ¡ independent sources R ¡ 16 *Davi-Dziembowski-Venturi (SCN-12)

  17. We know how to encode! Next: How to compute! 17

  18. High level idea of compiler output ¡ output ¡ Dec ¡ D ¡ and ¡ and ¡ Crypto Protected neg ¡ algorithms algorithm C ¡s.t. ¡Dec(C)=a ∧ s ¡ neg ¡ C ¡s.t.Dec(C)=s ∧ s’ ¡ and ¡ and ¡ and ¡ and ¡ s’ ¡ s ¡ a ¡ S’ ¡ S ¡ A ¡ Enc ¡ 1. Memory: a ¡ Encoded with coding scheme, A bit s i.e., S = (S 1 … S n ) such that s = Dec(S 1 , … ,S n ) 18

  19. High level idea of compiler output ¡ output ¡ Dec ¡ K’ D ¡ and ¡ K C’ C and ¡ neg ¡ C ¡s.t. ¡Dec(C)=a ∧ s ¡ neg ¡ C ¡s.t.Dec(C)=s ∧ s’ ¡ and ¡ and ¡ and ¡ and ¡ s’ ¡ s ¡ a ¡ S’ ¡ S ¡ A ¡ Enc ¡ 2. Wires: a ¡ Wire bundle carrying encoding Each wire C such that w = Dec(C) w = a ∧ ! !b Main challenge: computing on encoded inputs! 19

  20. High level idea of compiler output ¡ output ¡ Dec ¡ D ¡ and ¡ and ¡ neg ¡ C ¡s.t. ¡Dec(C)=a ∧ s ¡ neg ¡ C ¡s.t.Dec(C)=s ∧ s’ ¡ and ¡ and ¡ and ¡ * and ¡ s’ ¡ s ¡ a ¡ S’ ¡ S ¡ A ¡ Enc ¡ a ¡ Gadgets built from standard 3. Gates: gates operating on encodings Main challenge: algorithm to securely compute AND! 20

  21. Compiler results Theorem [ISW03]: A compiler that makes any C resilient to adversary that probes up to t < n wires in C’ Protected Algorithm C algorithm C’ Blow-up in size: O(n 2 ) Leakage bounded per observation: t ¡< ¡n ¡wires ¡ for each AND gate in C 21

  22. Compiler results Theorem [ISW03]: A compiler that makes any C resilient to adversary that probes up to t < n wires in C’ Theorem [DF12]: A compiler that makes any C resilient to adversary that learns bounded independent leakage from C’ Protected Algorithm C algorithm C’ Blow-up in size: O(n 2 ) Leakage bounded per exec.: for each AND gate in C t ¡bits ¡from ¡each ¡processor ¡ Boolean vs. IP masking in practice? 22

  23. Masking countermeasure Implementations? 23

  24. Boolean vs. IP? (BFGV12, BFG15)* Black ¡curve: ¡Boolean ¡masking ¡ with ¡2 ¡random ¡shares ¡in ¡GF(2 8 ) ¡ Analyzed for small security parameter n – Red ¡curve: ¡IP ¡masking ¡with ¡2 ¡ Security outperforms Boolean masking random ¡shares ¡in ¡GF(2 8 ) ¡ Mutual information between HW leakage and secret x Weaker dependency between leakage & secret for IP masking Main reason: Higher algebraic complexity Performance: Full AES implementation for n=2 • IP masking: 300k clock cycles • Boolean masking: 100k clock cycles 24 *Balasch-F-Gierlichs-Verbauwhede (ASIACRYPT-12), Balasch-F-Gierlichs (EUROCRYPT-15)

  25. Masking countermeasure Noisy leakages 25

  26. Bounded leakage? Beautiful theory! Q: Does it match practice? Models do not match with my engineering experience Leakages are not quantitatively bounded Physical leakages are inherently noisy Difficulty in many attacks: how to eliminate the noise? 26

  27. Noisy leakages [CJRR99] No quantitative bound on leakage, but leakage is noisy b 1 ¡ b 2 ¡ For bit b: Leakage is b i + Gaussian noise Enc(b) … ¡ ... ... ¡ b n ¡ Chari et al. only consider security of a single masked bit p-noisy functions N(.): More general noise distribution [PR13] uniform 1. b ç {0,1} 2. N(X b ) X 0 , X 1 N(X 0 ), X 0 , X 1 N(X 1 ), X 0 , X 1 ≈ N is p -noisy if statistical distance < p 27 *Chari-Jutla-Rao-Rohatgi (CRYPTO-99), Prouff-Rivain (EUROCRYPT-13)

  28. Some examples ( F = GF(2) ) Pr[Noise(x)=y] Noise(0) Noise(1) Noise(x)=y No noise p ≈ 1 : very informative leakage è Adv. learns Noise(x) : full knowledge about x Pr[Noise(1)=y] Pr[Noise(0)=y] y y High noise p = 0 : non-informative leakage è Adv. learns Noise(x) : no knowledge about x 28

  29. Some examples ( F = GF(2) ) Interesting case: „some noise“ Pr[Noise(x)=y] Noise(x)=y Some noise p < 1 : information depends on p è Adv. learns Noise(x) : some knowledge about x Can we construct compilers for noisy leakages? (for interesting values of p ) 29

  30. Compilers for noisy leakage Protected Algorithm C algorithm C’ Compiler of ISW03 Adversary obtains p -noisy version of each wire: N(w i ) (for non-trivial p ) No quantitative bound on amount of leakage Two proof techniques: 1. Direct proof [PR13] : very technical proof, only random message security 2. Leakage reductions [DDF14, DFS15]* : simpler proofs, full simulation-based security 30 *Duc-Dziembowski-F (EUROCRYPT-14), Dziembowski-F-Skorski (EUROCRYPT-15)

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