Efficiently Enforcing Input Validity in Secure Two-party Computation

Jonathan Katz, Alex J. Malozemoff, Xiao Wang

TL;DR

Secure two-party computation (2PC) usually requires replicating circuits dozens of times (the "cut-and-choose" overhead) to protect against malicious cheaters, making input validation—like checking a digital signature—prohibitively expensive. This paper introduces a novel protocol that garbles validation predicates only once while only replicating the core logic, achieving up to an 80× reduction in communication and a 56× reduction in computation for complex real-world tasks.

What Problem Does This Paper Address?

In Secure Two-Party Computation (2PC), two parties want to compute a function on their private inputs without revealing anything else. While "semi-honest" protocols (where parties follow the rules but try to learn extra info) are efficient, "malicious" protocols (where parties can cheat) typically rely on cut-and-choose. In cut-and-choose, the generator creates $\rho$ copies of a garbled circuit (usually $\rho=40$); the evaluator checks some for correctness and evaluates the rest.

A major bottleneck arises with input validity. In many real-world scenarios, you only want to run a computation if the inputs are "valid"—for example, if an input is signed by a trusted authority or falls within a specific range. Using standard malicious 2PC, these validation predicates must also be replicated $\rho$ times. If the validation (like RSA signature verification) is more complex than the actual computation, the overhead becomes massive, often making the protocol impractical.

Methods

The authors propose a protocol designed for functions of the form: "If $f_1(x)$ and $f_2(y)$ are true, then compute $g(x, y)$, else return $\perp$."

Their key innovation is a hybrid approach that treats the predicates ($f_1, f_2$) and the core function ($g$) differently:

  • Garble-Once Predicates: They use a Zero-Knowledge Proof-of-Knowledge (ZKPoK) technique based on garbled circuits (specifically the Jawurek et al. [JKO13] approach). This allows the parties to prove their inputs satisfy a predicate using only a single garbled circuit.
  • Cut-and-Choose Core: They use an optimized cut-and-choose protocol (Afshar et al. [AMPR14]) for the underlying function $g$, which still requires $\rho$ circuits.
  • Half-Committed OT: The "secret sauce" is a new building block called half-committed Oblivious Transfer. This ensures that the inputs used in the "garble-once" predicate phase are strictly consistent with the inputs used in the "garble-$\rho$" computation phase. It uses ElGamal-based commitments to tie the wire labels of the different circuits together without revealing the actual input bits.

Datasets

As a theoretical and systems-oriented cryptography paper, it does not use traditional machine learning datasets. Instead, it evaluates the protocol using several "realistic" computational benchmarks:

  • Signature Verification: RSA-512, RSA-1024, and RSA-2048 circuits (compiled using the PCF framework).
  • Private Edit Distance Approximation: Comparing genome sequences.
  • Linear Systems: Solving $Ax = b$ where $A$ is an invertible matrix.
  • Private Set Intersection (PSI): Finding common elements in two sets.

Key Insights and Ideas

  • Asymmetry of Cost: The authors realized that while the core computation needs protection against a generator providing "bad" circuits, the predicate check only needs to ensure the evaluator knows a valid witness. By decoupling these, they move the bulk of the "malicious overhead" away from the (often large) predicate circuits.
  • Consistency is the Hardest Part: The primary technical challenge wasn't running the two protocols, but ensuring a malicious party couldn't use "Input A" to pass the signature check and "Input B" for the actual computation. The use of half-committed OT solves this by committing the sender to only the first half of the OT inputs (the wire labels for the predicate), which are then mathematically linked to the labels for the main computation.
  • Local Computation Benefits: In the semi-honest model, parties often perform "local computation" to shrink the circuit size. In the malicious model, this is usually impossible because you can't trust the local result. This paper allows "local computation" to return to the malicious setting: a party computes something locally and then uses a "garble-once" predicate to prove the local result was computed correctly.

Key Results

The authors compared their "Input Checking" approach against the "Generic Solution" (where everything is garbled $\rho$ times):

  • Massive Speedups: For RSA-2048 signature verification followed by a million-gate circuit, they achieved a 56× improvement in computation and an 80× improvement in communication.
  • Asymptotic Efficiency: As the size of the predicate circuit grows, the speedup approaches the statistical security parameter $\rho$ (e.g., 40 or 80).
  • Specific Use Cases:
    • Edit Distance: Achieved ~79× communication improvement.
  • Linear Systems: Reached the theoretical 56×/80× bounds once the matrix dimension exceeded 1,000.
  • PSI: Showed a more modest 1.3× improvement, as the computation circuit in PSI is already quite large relative to the input size.

Limitations and Future Work

  • Reactive Functionality Leakage: The authors acknowledge that their protocol realizes a "reactive" functionality. This means if Party 1's input is invalid, the protocol halts, and Party 2 learns that Party 1's input was invalid. In most scenarios, this is acceptable, but in highly sensitive contexts, even this 1-bit leak might be undesirable.
  • Public Key Overhead: The protocol relies heavily on public-key operations (ElGamal) to ensure consistency. While they provide optimizations (like fixed-base exponentiation), the computational cost of these operations can become a bottleneck if the number of input bits is extremely high (e.g., tens of millions of bits).
  • Single-Execution Focus: The paper focuses on the single-execution case. While amortized 2PC exists, the authors suggest that their techniques could potentially be combined with amortized approaches for even greater efficiency.

Summary updated

BibTeX
@article{katz2016efficiently,
  author = {Jonathan Katz and Alex J. Malozemoff and Xiao Wang},
  title = {{Efficiently Enforcing Input Validity in Secure Two-party Computation}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2016},
  url = {https://openreview.net/forum?id=Yki4lMm2yc_},
}
Figure