Simulation-based privacy of garbled circuits #
The evaluator of a garbled circuit sees a View: the garbled table, one label per input wire and
the output decoding information. Privacy in the simulation sense of Bellare, Hoang and Rogaway
[BHR12b] with topology side information asks for a simulator that produces an
indistinguishable view from the circuit's topology and its output alone. The simulator simulate
samples one uniform label per wire, writes in each gate's row named by its arguments' labels the
gate's label masked under their keys, fills every other row uniformly, and sets the decoding bits
so that the output labels decode to the output. It never sees the gate operations or the input.
The concrete per-instance step advantage_realGame_simGame_le bounds the advantage of every
distinguisher D between the real view and the simulated view, for a circuit C and an input x,
by the sum over the n + C.size wires of the PRF advantage of an explicit reduction
reduction C I F tw x D j against F, provided the tweaks of distinct argument slots are
distinct. The proof is a hybrid argument over the wires in wire-number order: hybrid j replaces
by uniform values the rows that read an inactive label on a wire numbered below j. The reduction
for wire j embeds the PRF key as the inactive key of wire j: with the keyed oracle it produces
hybrid j exactly (PRF.realExperiment side), and with a random function hybrid j + 1 exactly
(PRF.idealExperiment side).
Each reduction reads the oracle up front at the tweaks of all argument slots, with at most one
query per slot (isQueryBounded_reduction), and runs D once. Both laws hold for every j
(eval_realExperiment_reduction, eval_idealExperiment_reduction): from wire n + C.size on no
slot is a target and every hybrid is the simulated experiment (hybridGame_of_le), so a reduction
may draw its step from a range larger than the number of wires.
Tweak injectivity is needed. Take a row that reads one wire twice with the same colour. If its
two argument slots had equal tweaks, their mask terms would be equal and cancel in the Bool
component, so for a binary gate that row's colour bit would be sent in the clear. The identity on
Slot C.topology is an injective tweak map.
The simulator is correct: on an ordered topology every simulated view decodes to the output
(View.run_simulateWith).
This is the single-instance form of simulation privacy: the circuit, input and distinguisher are
fixed, so a bound uniform over a class of distinguishers follows by bounding the PRF advantage of
the corresponding reductions. No bound holds for arbitrary distinguishers, since an exhaustive
key search distinguishes once K is fixed. In the prv.sim game of [BHR12b] the
adversary itself chooses the circuit and the input, possibly at random and keeping state for its
guess. For point-and-permute garbling that game is treated in
CslibFrontier.Crypto.Primitives.Garbling.PointPermute.Reduction, which runs the hybrids and
reductions of this file on the adversary's choice (PointPermute.prvSimAdvantage_simWord_eq), and
PseudorandomFunction.prvSim_pointPermute in
CslibFrontier.Crypto.Primitives.Garbling.PointPermute.Privacy is the asymptotic prv.sim theorem
for that scheme over valid conventional circuits. Running time is not tracked here: there are no
cost bounds for garbling, evaluation, the simulator or the reductions.
Main definitions #
Cslib.Crypto.Garbling.View: what the evaluator sees.Cslib.Crypto.Garbling.simulateWith,Cslib.Crypto.Garbling.simulate: the simulator.Cslib.Crypto.Garbling.realGame,Cslib.Crypto.Garbling.simGame: the privacy experiments.Cslib.Crypto.Garbling.hybridView,Cslib.Crypto.Garbling.hybridGame: the hybrid views and experiments.Cslib.Crypto.Garbling.reduction: the PRF adversary for one hybrid step.
Main results #
Cslib.Crypto.Garbling.View.run_simulateWith: simulated views decode to the output.Cslib.Crypto.Garbling.isQueryBounded_reduction: at most one query per slot.Cslib.Crypto.Garbling.eval_realExperiment_reduction,Cslib.Crypto.Garbling.eval_idealExperiment_reduction: reductionjplays hybridjagainst the keyed function and hybridj + 1against a random function.Cslib.Crypto.Garbling.advantage_realGame_simGame_le: the concrete per-instance hybrid bound, a sum of PRF advantages.
References #
What the evaluator of a garbled circuit sees: the garbled table, one label per input wire and the output decoding information. The topology is public, as an index of the type.
The garbled table.
The label of each input wire.
The decoding bit of each output wire.
The view of a garbled circuit on an input.
Evaluate a view and decode the result.
Running the view of a garbled circuit on x is running the garbled circuit on x.
The simulated view for wire labels A and filler rows R: input wires carry their labels;
the row of each gate named by its arguments' colours holds the gate's label masked under their
keys; every other row is filler; the decoding bits make the output labels decode to y.
The simulated labels are a fixed point of one evaluation round of the simulated view: the row of a gate named by its arguments' colours unmasks to the gate's label.
Simulator correctness: on an ordered topology every simulated view decodes to y.
Hybrid views #
The active colour of each wire on input x: its plaintext value plus its permutation bit.
A row is hidden below j when it reads an inactive colour, for the active colours a, on
some wire numbered below j.
Instances For
Argument slot k of row r is a target of step j when it reads the inactive colour, for
the active colours a, of wire j.
Instances For
Hybrid view j with oracle O: rows hidden below wire j are taken from R; in the other
rows, the mask term of each target slot of step j is the oracle's answer.
Experiments #
The simulator: uniform wire labels and uniform filler rows. It sees only the topology, the public keyed function and tweaks, and the output.
The real privacy experiment: garble C, and run D on the view of the garbled circuit on
x.
The simulated privacy experiment: run D on a view simulated from the topology of C and
its output on x.
The hybrid argument #
Hybrid experiment j: uniform keys, permutation bits and filler rows, and D run on hybrid
view j with the keyed function in every slot. Hybrid 0 is the real experiment
(hybridGame_zero) and every hybrid from n + C.size on is the simulated one
(hybridGame_of_le).
The PRF adversary for hybrid step j: sample keys, permutation bits and filler rows, query
the oracle at the tweak of every argument slot, build hybrid view j with the answers in place
of the mask terms on the inactive colour of wire j, and run D on it.
Each reduction makes at most one oracle query per argument slot of the garbled table.
Against a table f, the reduction samples hybrid view j with the table at the slots' tweaks
in place of the target mask terms.
Hybrid 0 is the real experiment.
Every hybrid from n + C.size on is the simulated experiment.
Against the keyed oracle, reduction j plays hybrid j.
Against a random function, reduction j plays hybrid j + 1, when distinct slots have
distinct tweaks.
The per-instance hybrid bound: a step, not the prv.sim theorem of
[BHR12b], since the circuit, input and distinguisher are fixed and nothing is
asymptotic; for point-and-permute garbling that theorem is
PseudorandomFunction.prvSim_pointPermute. For every circuit C, input x and distinguisher
D, if distinct argument slots have distinct tweaks, the advantage of D between the real and the
simulated view is at most the sum, over the n + C.size wires, of the PRF advantage of the
reduction for that wire against F. The hypothesis htw cannot be dropped:
in a row reading one wire twice with the same colour, equal tweaks on the two slots make their
mask terms cancel in the Bool component. The identity tweak map, with T = Slot C.topology,
satisfies it.