reasoning about aggregation of information in timing
play

Reasoning about Aggregation of Information in Timing Attacks Boris - PowerPoint PPT Presentation

Reasoning about Aggregation of Information in Timing Attacks Boris Kpf Itsaka Rakotonirina Microsoft Research INRIA Nancy Grand-Est Choose a letter: A or B. Choose a letter: A or B. Does it occur more than 10 times in TARATATATARATATATA ?


  1. Reasoning about Aggregation of Information in Timing Attacks Boris Köpf Itsaka Rakotonirina Microsoft Research INRIA Nancy Grand-Est

  2. Choose a letter: A or B.

  3. Choose a letter: A or B. Does it occur more than 10 times in TARATATATARATATATA ?

  4. Choose a letter: A or B. Does it occur more than 10 times in TARATATATARATATATA ? 🤕

  5. Choose a letter: A or B. Does it occur more than 10 times in TARATATATARATATATA ? 🤕 No.

  6. Choose a letter: A or B. Does it occur more than 10 times in TARATATATARATATATA ? 🤕 No. Q : Which letter was chosen?

  7. Timing attacks 1996 on RSA (Kocher) 1998 on RSA (Dhem et al. ) 2005 on AES (Bernstein) 2007 on AES (Acıiçmez et al. ) 2013 Lucky Thirteen (AlFardan, Paterson) 2014 Flush+Reload (Yarom, Falkner) 2016 on ECDH (Kaufmann et al. ) 2018 Spectre (Kocher et al. ) 2018 Meltdown (Lipp et al. ) 2019 RIDL (van Schaik et al. ) 2019 ZombieLoad (Schwarz et al. ) � 3 24 …

  8. Timing attacks 1996 on RSA (Kocher) 1998 on RSA (Dhem et al. ) A long-term secret, and queries to an oracle 2005 on AES (Bernstein) O : public input ↦ execution time of a program Remote measurements 2007 on AES (Acıiçmez et al. ) 2013 Lucky Thirteen (AlFardan, Paterson) 2014 Flush+Reload (Yarom, Falkner) 2016 on ECDH (Kaufmann et al. ) 2018 Spectre (Kocher et al. ) 2018 Meltdown (Lipp et al. ) 2019 RIDL (van Schaik et al. ) 2019 ZombieLoad (Schwarz et al. ) � 3 24 …

  9. Timing attacks 1996 on RSA (Kocher) 1998 on RSA (Dhem et al. ) A long-term secret, and queries to an oracle 2005 on AES (Bernstein) O : public input ↦ execution time of a program Remote measurements 2007 on AES (Acıiçmez et al. ) 2013 Lucky Thirteen (AlFardan, Paterson) 2014 Flush+Reload (Yarom, Falkner) Exploit timing variations, and not the absolute execution time 2016 on ECDH (Kaufmann et al. ) Differential measurements 2018 Spectre (Kocher et al. ) 2018 Meltdown (Lipp et al. ) 2019 RIDL (van Schaik et al. ) 2019 ZombieLoad (Schwarz et al. ) � 3 24 …

  10. Timing attacks 1996 on RSA (Kocher) 1998 on RSA (Dhem et al. ) A long-term secret, and queries to an oracle 2005 on AES (Bernstein) O : public input ↦ execution time of a program Remote measurements 2007 on AES (Acıiçmez et al. ) 2013 Lucky Thirteen (AlFardan, Paterson) 2014 Flush+Reload (Yarom, Falkner) Exploit timing variations, and not the absolute execution time 2016 on ECDH (Kaufmann et al. ) Differential measurements 2018 Spectre (Kocher et al. ) 2018 Meltdown (Lipp et al. ) 2019 RIDL (van Schaik et al. ) The secret is recovered chunk by chunk Compositionality 2019 ZombieLoad (Schwarz et al. ) � 3 24 …

  11. Timing attacks A long-term secret, and queries to an oracle O : public input ↦ execution time of a program Remote measurements Attacker model Exploit timing variations, and not the absolute execution time Differential measurements Under what hypotheses? The secret is recovered chunk by chunk Compositionality � 4 24

  12. Contributions A model of timing attacks capturing the essence of compositional attacks Core hypotheses giving rise to efficient attacks under the form of independence properties Generic attack descriptions + cost analyses � 5 24

  13. A model for timing leakage

  14. k o Program Long-term secret Observation constant across all invocations e.g. timing as a real number of the program m Public input chosen by the attacker � 7 24

  15. A simple example for i = 0 to n — 1 do 1 if k[i] ≠ m[i] then g() 2 done 3 � 8 24

  16. A simple example for i = 0 to n — 1 do 1 if k[i] ≠ m[i] then g() 2 done 3 execution time proportional to: n t(k,m) = Σ i=1 k[i] ⊕ m[i] = nb of bits where k and m differ Hamming distance � 8 24

  17. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] Hamming distance k potential values of the long-term secret � 9 24

  18. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] Hamming distance k 000 o = t(k,000) ∈ {0,1,2,3} ⟼ potential values of the long-term secret � 9 24

  19. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] Hamming distance k 000 o = t(k,000) ∈ {0,1,2,3} ⟼ ⇒ k ∈ { k’ | t(k’,000) = o } potential values of the long-term secret � 9 24

  20. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] Hamming distance k 000 o = t(k,000) ∈ {0,1,2,3} ⟼ ⇒ k ∈ { k’ | t(k’,000) = o } potential values of the long-term secret � 9 24

  21. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] Hamming distance k 000 o = t(k,000) ∈ {0,1,2,3} ⟼ ⇒ k ∈ { k’ | t(k’,000) = o } 001 o’ = t(k,001) ⟼ potential values of the long-term secret � 9 24

  22. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] k Hamming distance 000 o = t(k,000) ∈ {0,1,2,3} ⟼ ⇒ k ∈ { k’ | t(k’,000) = o } 001 o’ = t(k,001) ⟼ potential values of the long-term secret � 9 24

  23. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] k Hamming distance 000 o = t(k,000) ∈ {0,1,2,3} ⟼ ⇒ k ∈ { k’ | t(k’,000) = o } 001 o’ = t(k,001) ⟼ potential values of 010 o’’ = t(k,010) the long-term secret ⟼ � 9 24

  24. Aggregation of information 3 t(k,m) = Σ i=1 k[i] ⊕ m[i] Hamming distance k 000 o = t(k,000) ∈ {0,1,2,3} ⟼ ⇒ k ∈ { k’ | t(k’,000) = o } 001 o’ = t(k,001) ⟼ potential values of 010 o’’ = t(k,010) the long-term secret ⟼ � 9 24

  25. Aggregation of information potential values of the long-term secret k � 10 24

  26. Aggregation of information potential values of the long-term secret k Compute this equivalence relation over the set of secrets static approach (security bounds) � 10 24

  27. Aggregation of information potential values of the long-term secret k Compute this equivalence relation Given an oracle to t(k, . ) , over the set of secrets retrieve the class enclosing k static approach dynamic approach (security bounds) (attacks) � 10 24

  28. A more practical model for timing leakage

  29. o 1 -o 2 k Program Difference of timings Long-term secret m 1 ,m 2 Two public inputs � 12 24

  30. Differential measurements Less powerful attacker, but… o 1 -o 2 k Program Closer to the models used in actual attack research m 1 ,m 2 Compositionality � 13 24

  31. Compositionality for differential measurements

  32. Compositional attacks for i = 0 to n — 1 do 1 if k[i] ≠ m[i] then g() 2 done 3 recovering k? with oracle to execution time m ↦ t(k,m) � 15 24

  33. Compositional attacks for i = 0 to n — 1 do 1 if k[i] ≠ m[i] then g() 2 done 3 recovering k? with oracle to execution time m ↦ t(k,m) if t(k,0) < t(k,2 i ) - � 15 24

  34. Compositional attacks for i = 0 to n — 1 do 1 if k[i] ≠ m[i] then g() 2 done 3 recovering k? with oracle to execution time m ↦ t(k,m) if t(k,0) < t(k,2 i ) then K := K ∩ { k | k[i] = 1 } else K := K ∩ { k | k[i] = 0 } � 15 24 Exploiting the i th iteration

  35. Sequential composition x = m 1 for i = 0 to n — 1 do 2 x = f i (k,x) 3 if Test i (k,x) = 1 then g() 4 done 5 � 16 24

  36. Sequential composition x = m 1 for i = 0 to n — 1 do 2 x = f i (k,x) 3 if Test i (k,x) = 1 then g() 4 done 5 Goal : writing this code under the form p = p 0 ; p 2 ; … ; p n-1 � 16 24

  37. Sequential composition x = m 1 for i = 0 to n — 1 do 2 x = f i (k,x) 3 if Test i (k,x) = 1 then g() 4 done 5 Goal : writing this code under the form p = p 0 ; p 2 ; … ; p n-1 p i computes f i : K x M → M with execution time Test i : K x M → {0,1} � 16 24

  38. Sequential composition p comp = p 1 ; p 2 � 17 24

  39. Sequential composition p comp = p 1 ; p 2 p ℓ computes f ℓ : K x M → M with execution time t ℓ : K x M → O � 17 24

  40. Sequential composition p comp = p 1 ; p 2 p ℓ computes f ℓ : K x M → M with execution time t ℓ : K x M → O f comp = f 2 ◦ f 1 States are composed � 17 24

  41. Sequential composition p comp = p 1 ; p 2 composition of public values, p ℓ computes f ℓ : K x M → M with i.e. (f ◦ g)(k,m) = f(k, g(k,m)) execution time t ℓ : K x M → O f comp = f 2 ◦ f 1 States are composed � 17 24

  42. Sequential composition p comp = p 1 ; p 2 composition of public values, p ℓ computes f ℓ : K x M → M with i.e. (f ◦ g)(k,m) = f(k, g(k,m)) execution time t ℓ : K x M → O f comp = f 2 ◦ f 1 t comp = t 1 + (t 2 ◦ f 1 ) States are composed Timings are summed � 17 24

  43. Key hypothesis: independence � 18 24

  44. Key hypothesis: independence Hypotheses t,t’ timing functions • Theorem Leak(t+t’) = Leak(t) ⋂ Leak(t’) � 18 24

  45. Key hypothesis: independence Hypotheses t,t’ timing functions • Theorem Leak(t+t’) = Leak(t) ⋂ Leak(t’) Leak(t) = the equivalence relation on secrets characterising timing leakage � 18 24

  46. Key hypothesis: independence Hypotheses t,t’ timing functions for all secrets k,k’, the distributions • • X distribution of public inputs t(k, X) and t’(k’, X) are independent • Theorem Leak(t+t’) = Leak(t) ⋂ Leak(t’) Leak(t) = the equivalence relation on secrets characterising timing leakage � 18 24

  47. Randomised compositional attack � 19 24

Recommend


More recommend