Skip to content
Chaoran Huang
Applied Cryptography

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 a,ba,b and the desired output aba\land b.
  • Explain unavoidable leakage: if a=1a=1 and the output is 00, then b=0b=0 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 (m0,m1)(m_0,m_1)
    • receiver holds bb
    • receiver learns only mbm_b
    • sender learns nothing about bb
  • 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:
uuvvOutput label
00Encku0,kv0(kw0)\mathsf{Enc}_{k_u^0,k_v^0}(k_w^0)
01Encku0,kv1(kw0)\mathsf{Enc}_{k_u^0,k_v^1}(k_w^0)
10Encku1,kv0(kw0)\mathsf{Enc}_{k_u^1,k_v^0}(k_w^0)
11Encku1,kv1(kw1)\mathsf{Enc}_{k_u^1,k_v^1}(k_w^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:

OptimizationWhat it changes
Point-and-permuteAdds a selection bit to each label so the evaluator opens one row instead of trying all four.
Free-XORCorrelates labels with a global offset so XOR gates need no garbled rows.
Half-gatesReduces each AND gate from four ciphertexts to two while remaining compatible with free-XOR.
OT extensionReplaces 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: x=x1x2x=x_1\oplus x_2.
  • XOR gates are local; AND gates require interaction.
  • Compare the two approaches:
YaoGMW
RoundsConstantOne per circuit layer
BandwidthHigherLower
Natural settingTwo parties, high latencyMany 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