Documentation

CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.Efficient

Free-XOR garbling is efficient #

FreeXOR.scheme hash of CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.Scheme is an efficient garbling scheme (Scheme.IsEfficient) for valid conventional circuits encoded by encValidCircuit whenever the hash family hash is computed in polynomial time (FreeXOR.scheme_isEfficient).

En, De and ev reuse projectiveEncode_polyTime, PointPermute.decodeWord_polyTime and evalCirc_polyTime. The garbler propagates zero labels by a fold over the gates, writes the body of F with PointPermute.bodyWith, and reads the decoding bits from the zero labels. The evaluator is a fold over the gates whose state is the labels so far and the position of the next gate's block.

We also define the Free-XOR side information phiXor : SideInfo ValidCircuit XorTopology, which exposes the circuit topology together with one boolean per gate indicating whether the gate computes XOR while hiding the truth tables of all non-XOR gates, together with its polynomial-time projection certificate phiXor_polyTime.

Main definitions #

Main results #

Side information #

Side information for Free-XOR garbling: the circuit's valid topology topo together with the list of booleans recording which gates compute XOR.

  • topo : ValidTopo

    The circuit topology (input/output counts and argument wires).

  • free : List Bool

    For each gate g, whether it computes XOR.

theorem Cslib.Crypto.Garbling.FreeXOR.encXorTopology_topo_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → XorTopology} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ encXorTopology S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).topo) encIn✝ encValidTopo S✝
theorem Cslib.Crypto.Garbling.FreeXOR.encXorTopology_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → ValidTopo} {T0 S0 : γ → ℕ} {x1 : γ → List Bool} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn encValidTopo T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encBits T1 S1) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { topo := x0 x, free := x1 x }) encIn encXorTopology (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
theorem Cslib.Crypto.Garbling.FreeXOR.encXorTopology_free_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → XorTopology} :
theorem Cslib.Crypto.Garbling.FreeXOR.encXorTopology_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → ValidTopo} {x1 : γ → List Bool} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn encValidTopo budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encBits budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { topo := x0 x, free := x1 x }) encIn encXorTopology budget

Free-XOR side information Φ_xor(f): reveals f's valid topology and which gates compute XOR, while hiding the truth tables of all non-XOR gates.

phiXor is compatible with FreeXOR.scheme hash.

Library construction (no cited definition): XOR-gate flags projected from four-bit gate records (A, B, tt) via isXorTable.

Library infrastructure (no cited result): xorFlags on a valid circuit's gate list equals (phiXor.phi f).free.

Lengths of labels #

Zero-label propagation as a fold #

Evaluator as a fold with bounded growth #

The garbled function from gate data #

Certificates #

Free-XOR garbling is efficient for every hash family computed in polynomial time (CircularCorrelationRobust.polyTime supplies hf): the length readers n and m, the number of coins and the garbler on (1^k, f, r), and En, Ev, De and ev on their encoded arguments, run in polynomial time, for valid conventional circuits encoded by encValidCircuit.