Free-XOR garbling #
The Free-XOR technique of Kolesnikov and Schneider [KS08] fixes one secret
offset δ for the whole circuit: the two labels of every wire are W and W + (δ, true), the
second carrying the bit true. An XOR gate then needs no garbled rows: the sum of its arguments'
labels is a label of its output for the sum of their bits. Every other gate is garbled with
point-and-permute rows masked by a hash H : K → T → K × Bool.
A Boolean free on the gates marks the XOR gates, and the hypothesis hfree says that each
marked gate computes the sum in Bool of its arguments, for any arity. Labels live in K × Bool
for an additive group of keys K with k + k = 0 (hypothesis hK), as for bit strings under
XOR. garbleWith takes the offset and a base labelling: inputs and gates that are not free keep
their base label as their zero label, and the zero label of a free gate is the sum of its
arguments' zero labels (propagate). The garbled table has rows only for the gates that are not
free (card_garbledRow).
Main definitions #
Cslib.Crypto.Garbling.FreeXOR.GarbledRow,Cslib.Crypto.Garbling.FreeXOR.GarbledSlot: the rows of a garbled table and their argument slots;GarbledRow.gateis the gate of a row.Cslib.Crypto.Garbling.FreeXOR.garbleWith,Cslib.Crypto.Garbling.FreeXOR.garble: Free-XOR garbling, with given and with uniform offset and base labels.Cslib.Crypto.Garbling.FreeXOR.Garbled.run: evaluation and decoding.Cslib.Crypto.Garbling.FreeXOR.simulate: the simulator, from the topology and the output.Cslib.Crypto.Garbling.FreeXOR.realGame,Cslib.Crypto.Garbling.FreeXOR.simGame: the privacy experiments.Cslib.Crypto.Garbling.FreeXOR.reduction: the adversary against circular correlation robustness.
Main results #
Cslib.Crypto.Garbling.FreeXOR.Garbled.run_garbleWith: correctness.Cslib.Crypto.Garbling.FreeXOR.isTweakUnique_reduction: when distinct slots have distinct tweaks, the reduction asks every tweak at most once (CCR.IsTweakUnique).Cslib.Crypto.Garbling.FreeXOR.advantage_realGame_simGame: the per-instance concrete reduction identity (a step, not an asymptotic privacy theorem; seeCslib.Crypto.CircularCorrelationRobust.prvSim_freeXORandprvSimUniversal_freeXORinCslibFrontier.Crypto.Primitives.Garbling.FreeXOR.PrvSimfor the asymptoticprv.simtheorems). The advantage of every distinguisher between the real and the simulated view equals the circular correlation robustness advantage of the reduction, which asks one query per slot of the garbled table (isQueryBounded_reduction), with the slot's tweak (reductionQuery_tweak). The right-hand side is the key-only instanceCCR.advantage H id (·, true)ofCslib.Crypto.Garbling.CCR: the hash reads only the key, which is shifted byδ, and the answer is shifted by the label(δ, true).
Implementation notes #
The per-instance reduction identity is one exact step, with no hybrids. With the circular oracle,
the reduction builds the real view: shifting the base labels by the offset on the wires that carry
the bit true is a bijection, and after the shift every inactive label is an oracle answer. In a
row whose colours are not all active, the first slot whose colour flips asks the oracle with its
bit set to the row's output bit. With a random function the answers are uniform and independent,
so every such row is uniform: this is the simulated view. As in Cslib.Crypto.Garbling.Privacy,
this is a fixed-instance concrete reduction step: the circuit, the input, the hash and the
distinguisher are fixed, no hardness assumption is applied, and running time is not tracked. For
the word-level reduction (reusing realGame_reduction and idealGame_reduction) and asymptotic
prv.sim security of Free-XOR garbling, see
CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.Reduction and
Cslib.Crypto.CircularCorrelationRobust.prvSim_freeXOR / prvSimUniversal_freeXOR in
CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.PrvSim.
References #
Garbled tables #
The rows of a Free-XOR garbled table: one for each colour vector of the arguments of each gate that is not free.
The gate of a row.
The argument slots of the rows of a Free-XOR garbled table.
Free gates have no rows: the table has 2 ^ a rows for each gate of arity a that is not
free, and none for the others.
A Free-XOR garbled circuit: its table, input encoding and output decoding.
The garbled table.
The label of each bit of each input.
The colour of the zero label of each output wire.
What the evaluator sees: the garbled table, one label per input wire and the decoding bits.
The garbled table.
The label of each input wire.
The decoding bits.
The colour flips of a row against a labelling: slot k flips when the row's colour differs
from the colour of the label of its argument.
The output bit of a row against a labelling A on input x: whether the row's plaintext is
the label of A or the other label of its gate.
The query of the reduction for a slot: the key of the slot's argument under the labelling
A, the slot's tweak, and a bit that is set only on the first flipped slot of a row whose output
bit is set.
The query for a slot carries the slot's tweak.
Labels #
The label for the bit b of a wire with zero label W: W + bitOffset (δ, true) b.
The colour of the label for b is the colour of the zero label plus b.
Zero labels #
One round of propagation: inputs and gates that are not free read their base label, and a free gate takes the sum of its arguments' labels.
The zero labels: n + s rounds of propagation, which reach every wire of an ordered
topology.
Garbling and evaluation #
One round of evaluation: an input reads its label, a gate that is not free reads the row named by its arguments' colours and removes the mask, and a free gate adds its arguments' labels.
Evaluate a garbled table on input labels: n + s rounds, then read the output wires.
Evaluate a garbled circuit on an input and decode the result.
On an ordered topology, evaluation follows every labelling A that one round leaves
unchanged.
The row of a gate that is not free for the colours r.2 of its arguments: the label of the
gate for the bit that the colours encode, masked by the hash of the matching argument labels.
Garble a circuit with the offset δ and the base labels base.
The label of each wire that the evaluator holds on input x.
Correctness: on an encoded input, a Free-XOR garbled circuit decodes to the circuit's output, for every hash, tweaks, offset and base labels, when the free gates compute XOR and keys have characteristic two.
Views and the simulator #
Evaluate a view and decode the result.
The simulated view for the output y, the active labels A and the filler rows R: the row
named by the active colours holds the gate's active label under its mask, and every other row is
filler.
The propagated labels are fixed by one evaluation round of the simulated view.
Simulated views decode to the output, when the active labels are propagated.
The reduction's view #
The table built by the reduction from oracle answers O: in each row, the slots whose colour
flips against A read the oracle, and the others hash their label under A.
The view built by the reduction.
Privacy #
Garble a circuit with a uniform offset and uniform base labels.
The simulator: uniform base labels, propagated to every wire, and uniform filler rows. It sees only the topology, the free gates, the hash, the 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 output on x.
The adversary against circular correlation robustness: sample base labels, propagate them,
query the oracle once for each slot of the garbled table, build the view from the answers, and
run D on it.
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.
Library infrastructure (no cited result): evaluation of reduction against a fixed oracle
f samples uniform base labels and applies D to reductionView on the resulting answers.
Library infrastructure (no cited result): with the circular oracle, the reduction plays the real experiment.
Library infrastructure (no cited result): with a uniform random function, the reduction plays the simulated experiment, when distinct slots have distinct tweaks.
Per-instance concrete reduction identity for Free-XOR garbling: a step, not an asymptotic
privacy theorem, 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
theorems of Free-XOR garbling, see Cslib.Crypto.CircularCorrelationRobust.prvSim_freeXOR and
prvSimUniversal_freeXOR in CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.PrvSim. If the
free gates compute XOR, keys have characteristic two and distinct slots have distinct tweaks, then
the advantage of every distinguisher D between the real and the simulated view equals the
circular correlation robustness advantage of reduction C I H tw x D against H, which asks one
query per slot of the garbled table (isQueryBounded_reduction), with the slot's tweak
(reductionQuery_tweak).