Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Garbling Techniques

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Garbling Techniques

Tutorial at Summer School on Secure and Oblivious Computation and Outsourcing
Notre Dame University, 9 May 2016

Avatar for David Evans

David Evans

May 09, 2016
Tweet

More Decks by David Evans

Other Decks in Education

Transcript

  1. Recap: Garbled Table Inputs Output x a b a1 b0

    Ea1 ,b0 (x0 ) a0 b1 Ea0 ,b1 (x0 ) a1 b1 Ea1 ,b1 (x1 ) a0 b0 Ea0 ,b0 (x0 ) a0 or a1 x AND b0 or b1
  2. This Lecture Inputs Output x a b a1 b0 Ea1

    ,b0 (x0 ) a0 b1 Ea0 ,b1 (x0 ) a1 b1 Ea1 ,b1 (x1 ) a0 b0 Ea0 ,b0 (x0 ) 2 ciphertexts (AND) 0 ciphertexts (XOR) What to use for E Open Research Questions
  3. Garble Encode Evaluate Decode f garbled circuit F encoding info

    e garbled input X garbled output Y z decoding info d x
  4. Garble Encode Evaluate Decode f garbled circuit F e X

    Y f(x) d x Security properties Privacy: F, X, and d leak reveals nothing beyond f(x) Obliviousness: F, X reveals nothing (new) Authenticity: given F, X, hard to find Y’ such that: Decode(Y’, d) ∉ { f(x), error }
  5. Garble Encode Evaluate Decode f garbled circuit F e X

    Y f(x) d x Cost of Garbling Storage and Bandwidth: large functions: dominated by size of F small functions: encode also matters Computation: Garble, Evaluate Encode, Decode
  6. Yao’s Garbling Scheme? FOCS 1982 FOCS 1986 Neither paper (or

    any other by Yao) actually describes Yao’s Garbled Circuits
  7. Inputs Output x a b a1 b0 Ea1 ,b0 (x0

    ) a0 b1 Ea0 ,b1 (x0 ) a1 b1 Ea1 ,b1 (x1 ) a0 b0 Ea0 ,b0 (x0 ) Simple Garbling
  8. Ea1 ,b0 (x0 ) Ea0 ,b1 (x0 ) Ea1 ,b1

    (x1 ) Ea0 ,b0 (x0 ) Simple Garbling
  9. Ea1 ,b0 (x0 ) Ea0 ,b1 (x0 ) Ea1 ,b1

    (x1 ) Ea0 ,b0 (x0 ) Simple Garbling Try all four, can tell valid encryption output
  10. Ea1 ,b0 (x0 ) Ea0 ,b1 (x0 ) Ea1 ,b1

    (x1 ) Ea0 ,b0 (x0 ) Single Hash Garbling
  11. Ea1 ,b0 (x0 ) Ea0 ,b1 (x0 ) Ea1 ,b1

    (x1 ) Ea0 ,b0 (x0 ) Single Hash Garbling How can the evaluator know which row to decrypt?
  12. Point-and-Permute Enca0,,b0, (c0 ) Enca0,,b1 (c0 ) Enca0,,b0 (c0 )

    Enca1,b1 (c1 ) Beaver, Micali and Rogaway [STOC 1990] Select random bit for each wire: rw Set last bit of w0 to rw , w1 to ¬ra ra = 0, rb = 0
  13. Point-and-Permute Enca1,,b1, (c1 ) Enca1,,b0 (c0 ) Enca0,,b1 (c0 )

    Enca0,b0 (c0 ) Beaver, Micali and Rogaway [STOC 1990] Select random bit for each wire: rw Set last bit of w0 to rw , w1 to ¬ra Order table canonically: 00/01/10/11 ra = 1, rb = 1
  14. Point-and-Permute Encoding garble table entries: Input wire labels (with selection

    bits) Output wire label Beaver, Micali and Rogaway [STOC 1990] Enca1,,b1, (c1 ) Enca1,,b0 (c0 ) Enca0,,b1 (c0 ) Enca0,b0 (c0 ) ra = 1, rb = 1
  15. Garble Encode Evaluate Decode f garbled circuit F e X

    Y f(x) d x Bandwidth: 4 ciphertexts per gate Compute: 4 hashes per gate Compute: 1 hash per gate
  16. Garble Encode Evaluate Decode f garbled circuit F e X

    Y f(x) d x Bandwidth: 4 ciphertexts per gate Compute: 4 hashes per gate Compute: 1 hash per gate Basic Scheme Garbled Row Reduction
  17. Garble Encode Evaluate Decode f garbled circuit F e X

    Y f(x) d x Bandwidth: 4 ciphertexts per gate Compute: 4 hashes per gate Compute: 1 hash per gate Basic Scheme Garbled Row Reduction Bandwidth: 3 ciphertexts per gate
  18. Security Assumptions for Free-XOR ICALP 2008 Proved secure in Random

    Oracle model Speculated that Correlation Robustness was sufficient TCC 2012 Correlation Robustness is not enough Proved secure with related-key and circularity assumption
  19. Basic Point-and- Permute Garbled Row Reduction Free XOR Odd (AND)

    Generator Encryptions (H) 4 4 4 4 Evaluator Encryptions (H) 4 1 1 1 Ciphertexts Transmitted 4 4 3 3 Even (XOR) Generator Encryptions (H) 4 4 4 0 Evaluator Encryptions (H) 4 1 1 0 Ciphertexts Transmitted 4 4 3 0
  20. Double Garbled Row Reduction (GRR2) Pinkas, Schneider, Smart, Williams 2009

    EA0 ,B0 (C0 ) EA0 ,B1 (C1 ) EA1 ,B0 (C0 ) EA1 ,B1 (C0 ) Instead of learning output directly, need to do more work to find it
  21. Pinkas, Schneider, Smart, Williams 2009 GRR2 C0 = P(0) C1

    = P(1) P(5) P(6) Garbled table: Incompatible with free-XOR
  22. Basic Point-and- Permute GRR-1 Free XOR + GRR-1 + PnP

    GRR-2 Odd (AND) Generator Encryptions (H) 4 4 4 4 4+ Evaluator Encryptions (H) 4 1 1 1 1+ Ciphertexts Transmitted 4 4 3 3 2 Even (XOR) Generator Encryptions (H) 4 4 4 0 4+ Evaluator Encryptions (H) 4 1 1 0 1+ Ciphertexts Transmitted 4 4 3 0 2
  23. Basic Free XOR + GRR-1 + PnP GRR-2 FleXOR Odd

    (AND) Generator Encryptions (H) 4 4 4+ 4+ Evaluator Encryptions (H) 4 1 1+ 1+ Ciphertexts Transmitted 4 3 2 2 Even (XOR) Generator Encryptions (H) 4 0 4+ {0, 1, 2} Evaluator Encryptions (H) 4 0 1+ {0, 1, 2} Ciphertexts Transmitted 4 0 2 {0, 1, 2}
  24. Basic Free XOR + GRR-1 + PnP GRR-2 FleXOR Odd

    (AND) Generator Encryptions (H) 4 4 4+ 4+ Evaluator Encryptions (H) 4 1 1+ 1+ Ciphertexts Transmitted 4 3 2 2 Even (XOR) Generator Encryptions (H) 4 0 4+ {0, 1, 2} Evaluator Encryptions (H) 4 0 1+ {0, 1, 2} Ciphertexts Transmitted 4 0 2 {0, 1, 2} What cost should we be focusing on?
  25. Cost of Garbling HA,B (C) SHA-256(A || B || gateID)

    ⊕ C ~2000/1000 ns (including network) Garbling/evaluating time per gate
  26. Cost of Garbling HA,B (C) AES(kconst , K ) ⊕

    K ⊕ C where K =2A⊕ 4B ⊕ gateID SHA-256(A || B || gateID) ⊕ C ~2000/1000 ns Bellare, Hoang, Keelveedhi, Rogaway 2013 “Fixed-key AES” using AES-NI ~ 15/7 ns Garbling/evaluating time per gate Actual computation cost: 12 cycles/byte ⇝ 200ns/50ns
  27. Cost of Garbling HA,B (C) AES(kconst , K ) ⊕

    K ⊕ C where K =2A⊕ 4B ⊕ gateID SHA-256(A || B || gateID) ⊕ C ~2000/1000 ns Bellare, Hoang, Keelveedhi, Rogaway 2013 “Fixed-key AES” using AES-NI ~ 15/7 ns Garbling/evaluating time per gate Time to transmit 80-bits at 1Gbps: 80ns Actual computation cost: 12 cycles/byte ⇝ 200ns/50ns
  28. Basic Free XOR + GRR-1 + PnP GRR-2 FleXOR Odd

    (AND) Generator Encryptions (H) 4 4 4+ 4+ Evaluator Encryptions (H) 4 1 1+ 1+ Ciphertexts Transmitted 4 3 2 2 Even (XOR) Generator Encryptions (H) 4 0 4+ {0, 1, 2} Evaluator Encryptions (H) 4 0 1+ {0, 1, 2} Ciphertexts Transmitted 4 0 2 {0, 1, 2}
  29. Half Gates Yan Huang, David Evans, and Jonathan Katz. Private

    Set Intersection: Are Garbled Circuits Better than Custom Protocols? [NDSS 2012]
  30. Yan Huang, David Evans, and Jonathan Katz. Private Set Intersection:

    Are Garbled Circuits Better than Custom Protocols? [NDSS 2012]
  31. Yan Huang, David Evans, and Jonathan Katz. Private Set Intersection:

    Are Garbled Circuits Better than Custom Protocols? [NDSS 2012] Journal of the ACM, January 1968 swap gates, configured (by generator) to do random permutation
  32. Swapper: “Generator Half Gate” Known to generator (but secret to

    evaluator) With Garbled Row Reduction: Only need to send one ciphertext!
  33. Generator Half-Gates Generator knows a Evaluator Half-Gates Evaluator knows b

    Implementing But, we need a gate where both inputs are secret…
  34. Half + Half = Full Secret Gate random bit selected

    by generator “leaked” unknown known unknown
  35. Half + Half = Full Secret Gate random bit selected

    by generator “leaked” unknown known unknown
  36. Half + Half = Full Secret Gate random bit selected

    by generator “leaked” unknown known unknown
  37. Half + Half = Full Secret Gate random bit selected

    by generator generator half gate evaluator half gate “leaked” unknown known unknown 2 ciphertexts total!
  38. How to leak r ⊕ b? random bit selected by

    generator generator half gate evaluator half gate “leaked” unknown known unknown 2 ciphertexts total! Use r as point-and-permute bit for B (false) Evaluator has r ⊕ b on obtained wire!
  39. Basic Free XOR + GRR-1 + PnP FleXOR Half- Gates

    Odd (AND) Generator Encryptions (H) 4 4 4+ 4 Evaluator Encryptions (H) 4 1 1+ 2 Ciphertexts Transmitted 4 3 2 2 Even (XOR) Generator Encryptions (H) 4 0 {0, 1, 2} 0 Evaluator Encryptions (H) 4 0 {0, 1, 2} 0 Ciphertexts Transmitted 4 0 {0, 1, 2} 0
  40. Edit distance: Levenstein distance between two 200-byte strings AES: 1

    block of encryption and key expansion, iterated 10 times Set intersection: 1024, 32-bit integers, iterated 10 times Zahur, Rosulek, and Evans [EuroCrypt 2015]
  41. Free-XOR+GRR+PnP Half Gates Generator Encryptions (H) 4 4 Evaluator Encryptions

    (H) 1 2 Ciphertexts Transmitted 3 2 XORs Free ✓ ✓ Bandwidth ê33% Execution Time (edit distance) ê25% Energy ê21%
  42. Optimality of Two Ciphertexts Theorem (proof in ZER15 paper): Garbling

    a single AND gate requires 2 ciphertexts if garbling scheme is “linear”. “linear” operations: xor, polynomial interpolation
  43. How to Do Better? • Non-linear operations • Gates that

    are not binary – chunk-ing circuit • Boolean logic • Reusable ciphertexts • Different security assumptions • …
  44. Garble Encode Evaluate Decode f garbled circuit F e X

    Y f(x) d x Security properties Privacy: F, X, and d leak reveals nothing beyond f(x) Obliviousness: F, X reveals nothing (new) Authenticity: given F, X, hard to find Y’ such that: Decode(Y’, d) ∉ { f(x), error }