Per-instance reduction step for half-gates garbling #
The evaluator of a half-gates garbled circuit sees a View: the two ciphertexts of each AND gate,
one label per input wire and the output decoding bits. Privacy in the simulation sense of
[ZRE15] asks for a simulator that produces an indistinguishable view from the
circuit and its output alone. The simulator simulate samples uniform input labels and a uniform
table, and sets the decoding bits so that the evaluated output labels decode to the output.
The reduction targets circular correlation robustness of the hash H [ZRE15]:
for a uniform offset Δ = (R, true), the oracle (a, t, b) ↦ H(a + Δ, t) + bΔ is compared
against a random function for adversaries that never query both (a, t, 0) and (a, t, 1). This
is Cslib.Crypto.Garbling.CCR with a hash that reads the whole label and both offsets
CCR.offset R: the oracle is CCR.keyed H CCR.offset CCR.offset R and the advantage is
CCR.advantage H CCR.offset CCR.offset.
The per-instance concrete reduction identity advantage_realGame_simGame (a step, not an
asymptotic privacy theorem) states that the advantage of every distinguisher D between the real
and the simulated view, for a fixed circuit C and input x, equals the advantage
CCR.advantage H CCR.offset CCR.offset of an explicit reduction reduction C H tw x D, provided
the tweaks of distinct slots are distinct. The reduction knows x, so it knows the bit v_w every
wire carries; it samples the input labels the evaluator holds and builds the table gate by gate in
wire order. For an AND gate whose arguments carry labels A_a, A_b it queries (A_a, t, p_b) for
the generator half, where p_b = col(A_b) + v_b is the colour of the zero label of b, and
(A_b, t', v_a) for the evaluator half, and adds the parts of the two ciphertexts the evaluator
can compute itself (slotKnown). With the CCR oracle this is the real table, by the half-gates
identity; with a random function every query has a distinct tweak, so the table is uniform. Each
slot is queried once (isQueryBounded_reduction), at its own tweak, so when distinct slots have
distinct tweaks the reduction never queries both (a, t, 0) and (a, t, 1)
(isTweakUnique_reduction).
This is a fixed-instance concrete reduction step, not the prv.sim theorem of
[ZRE15]: the circuit, the input, the hash and the distinguisher are fixed, the
simulator receives the whole circuit C (the side information Φ(C) of [ZRE15]),
no hardness assumption is applied, and running time is not tracked. For the word-level reduction
(which reuses realGame_reduction and simGame_reduction) and the asymptotic prv.sim theorem
under CircularCorrelationRobust, see
CslibFrontier.Crypto.Primitives.Garbling.HalfGates.Reduction and
Cslib.Crypto.CircularCorrelationRobust.prvSim_halfGates in
CslibFrontier.Crypto.Primitives.Garbling.HalfGates.PrvSim.
Main definitions #
Cslib.Crypto.Garbling.HalfGates.View: what the evaluator sees.Cslib.Crypto.Garbling.HalfGates.simulateWith,Cslib.Crypto.Garbling.HalfGates.simulate: the simulator.Cslib.Crypto.Garbling.HalfGates.realGame,Cslib.Crypto.Garbling.HalfGates.simGame: the privacy experiments.Cslib.Crypto.Garbling.HalfGates.reduction: the CCR adversary.
Main results #
Cslib.Crypto.Garbling.HalfGates.View.run_simulateWith: simulated views decode to the output.Cslib.Crypto.Garbling.HalfGates.isQueryBounded_reduction,Cslib.Crypto.Garbling.HalfGates.isTweakUnique_reduction: query budget and tweak uniqueness of the reduction.Cslib.Crypto.Garbling.HalfGates.map_oracleTable: against a random function the reduction's table is uniform.Cslib.Crypto.Garbling.HalfGates.advantage_realGame_simGame: the per-instance concrete reduction identity (a step, not an asymptotic privacy theorem; seeCslib.Crypto.CircularCorrelationRobust.prvSim_halfGatesinCslibFrontier.Crypto.Primitives.Garbling.HalfGates.PrvSim), equating distinguishing advantage with the CCR advantage of the reduction.
References #
What the evaluator of a half-gates garbled circuit sees: the garbled table, one label per input wire and the output decoding bits. The circuit 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 input labels X and table ct: the decoding bits make the evaluated
output labels decode to y.
Simulator correctness: every simulated view decodes to y.
The reduction's table #
The CCR query for a slot, from the labels E the evaluator holds on input x: (A_a, t, p_b)
for the generator half and (A_b, t', v_a) for the evaluator half.
The part of a slot's ciphertext the evaluator computes from its own labels: H(A_a, t) for
the generator half and H(A_b, t') + A_a for the evaluator half.
The reduction's ciphertext for a slot, with oracle f, from the labels E.
The labels the evaluator holds when every ciphertext is the reduction's entry.
The reduction's table with oracle f and input labels X.
Tables agreeing on the gates below k give the same labels on the wires below n + k.
Against a fixed function the reduction's table is oracleTable: the fibre of a table
ct is the set of functions taking the prescribed values at the queries made from the labels
ct itself gives the evaluator.
The real table #
With the CCR oracle and the labels of the bits every wire carries, the reduction's entry is the real half-gates ciphertext.
With the CCR oracle for offset key R, the reduction's table on the labels Z + x Δ the
evaluator holds is the real garbled table for input zero labels Z.
The real view is the simulated view built from the evaluator's input labels and the reduction's table with the CCR oracle.
Building the table with the oracle #
The ciphertexts of gate k: query the oracle at the two slots of gate k, from the labels
the evaluator holds with the table ct built so far, and keep ct elsewhere.
The table built from the gates below k against a fixed function.
Against a fixed function, building the table computes detRun.
Building the ciphertexts of gate k makes at most one query per slot of gate k.
Building the table up to gate k makes at most one query per slot below k.
Experiments #
The simulator: uniform input labels and a uniform table. It sees the circuit and the output
y, but not the input.
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 C and its output on
x.
The reduction #
The CCR adversary: sample the input labels the evaluator holds, build the table gate by gate
with the oracle, and run D on the resulting simulated view.
The reduction asks at most one query per slot of the garbled table.
When distinct slots have distinct tweaks, the reduction makes at most one query with each tweak.
The real experiment is the CCR game with the reduction and the keyed oracle.
Against a random function the reduction's table is uniform, for each choice of input labels, when distinct slots have distinct tweaks.
The simulated experiment is the CCR game with the reduction and a random function.
Per-instance concrete reduction identity for half-gates garbling: a step, not the
prv.sim theorem of [ZRE15], since the circuit C, input x, hash H and
distinguisher D are fixed, no hardness assumption is applied, and running time is not tracked;
for the asymptotic prv.sim security of half-gates garbling under CircularCorrelationRobust,
see Cslib.Crypto.CircularCorrelationRobust.prvSim_halfGates in
CslibFrontier.Crypto.Primitives.Garbling.HalfGates.PrvSim. For every circuit C, input x and
distinguisher D, if distinct slots have distinct tweaks and every element of K is its own
negative, the advantage of D between the real and the simulated view equals the circular
correlation robustness advantage CCR.advantage H CCR.offset CCR.offset of the reduction. The
identity tweak map, with T = Slot C, has distinct tweaks.