Computing on Secrets Together
Part 5 of 6. Ideal-world security, oblivious transfer, Yao’s garbled circuits, GMW, and privacy-preserving applications.
Outline — prose not written
Use one AND gate as the concrete walkthrough. Keep the broader protocols at comparison level.
Throughline
Several parties can compute a function of private inputs while revealing no more than the function's output already implies.
1. The dating problem
- Start with two private bits and the desired output .
- Explain unavoidable leakage: if and the output is , then follows from the output.
- Define the goal correctly: learn nothing beyond one's own input and the prescribed output.
- Use the five-card AND protocol as a no-hardness-assumption warm-up.
Reference: Evans–Kolesnikov–Rosulek ch. 1
2. Defining secure computation
- Introduce the ideal world: a trusted party receives inputs and returns only the allowed outputs.
- Define real-world security through simulation of the adversary's view.
- Separate:
- semi-honest: follows the protocol but inspects everything
- malicious: deviates, lies, aborts, or sends malformed values
- Ground the goal with Yao's millionaires and private set intersection.
Reference: Evans–Kolesnikov–Rosulek ch. 2; Lindell, “How to Simulate It”
3. Oblivious transfer
- Define 1-out-of-2 OT:
- sender holds
- receiver holds
- receiver learns only
- sender learns nothing about
- Sketch a DH-based construction without proving it.
- Explain OT extension: a small number of public-key OTs bootstrap many symmetric-key OTs.
- State why it matters: garbled circuits need one OT per evaluator input bit.
Reference: Evans–Kolesnikov–Rosulek §3.7; IKNP (2003)
4. Yao's garbled circuits
- Express the function as a Boolean circuit.
- Assign two random labels to each wire.
- Garble each truth-table row under its input labels.
- Give evaluator input labels through OT.
- Walk one AND gate:
| Output label | ||
|---|---|---|
| 0 | 0 | |
| 0 | 1 | |
| 1 | 0 | |
| 1 | 1 |
- Explain why exactly one row decrypts and why intermediate labels reveal no bit values.
Practical optimizations
Build these in order so each optimization has a visible target:
| Optimization | What it changes |
|---|---|
| Point-and-permute | Adds a selection bit to each label so the evaluator opens one row instead of trying all four. |
| Free-XOR | Correlates labels with a global offset so XOR gates need no garbled rows. |
| Half-gates | Reduces each AND gate from four ciphertexts to two while remaining compatible with free-XOR. |
| OT extension | Replaces most public-key input OTs with cheap symmetric operations. |
- Use a tiny before/after circuit to count garbled ciphertexts.
- Mention the extra assumptions behind free-XOR and the hash/cipher instantiation.
- Keep row reduction as a historical footnote; half-gates are the cleaner modern endpoint.
Reference: Evans–Kolesnikov–Rosulek §3.1–3.4
Optimization reference: Kolesnikov–Schneider (2008); Zahur–Rosulek–Evans (2015)
5. GMW and the tradeoff
- Secret-share each wire: .
- XOR gates are local; AND gates require interaction.
- Compare the two approaches:
| Yao | GMW | |
|---|---|---|
| Rounds | Constant | One per circuit layer |
| Bandwidth | Higher | Lower |
| Natural setting | Two parties, high latency | Many parties or low latency |
- Explain the malicious-security compiler at a high level: commitments and zero-knowledge proofs enforce honest execution.
Reference: Evans–Kolesnikov–Rosulek §3.5 and ch. 6; GMW (1987)
6. Applications
- Private set intersection: compromised-credential checks.
- Privacy-preserving ML: inner products are cheap; comparisons and nonlinear activations dominate cost.
- Joint analytics: aggregate across organizations without pooling raw records.
- Keep performance caveats explicit: circuit size, communication, malicious security, and aborts.
Assumptions introduced
- No new canonical assumption for the chosen presentation.
- Garbling uses symmetric primitives; the sketched OT reuses DDH.
- Other OT constructions can rely on different assumptions.
Go deeper
- Evans, Kolesnikov, and Rosulek, A Pragmatic Introduction to Secure Multi-Party Computation
- Lindell, How to Simulate It
- Yao (1986) and Goldreich–Micali–Wigderson (1987)
- Scribed applied cryptography notes, §16–20