Documentation

CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.Propagate

Shared zero-label and active-label propagation on words #

The topology-and-flag propagation traversal simPropWords shared between the Free-XOR garbler (CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.Scheme) and simulator (CslibFrontier.Crypto.Primitives.Garbling.FreeXOR.Simulator), together with its word-length bounds and word-to-typed correctness lemma (simPropWords_eq_propagate).

The garbler supplies the coin tape after the k + 1 offset bits and the XOR flags computed from its gates (List.ofFn (isXorGate f)), while the simulator supplies its raw coin tape and the XOR flags from side information.

Main definitions #

Main results #

Whether gate g of f computes XOR.

Whether each gate of toCircuit f is free (computes XOR).

The wire label words of the first n + s wires read/propagated from coins over topology t and XOR flags free: inputs and non-XOR gates read PointPermute.simLabel k coins, and XOR gates add their arguments' labels.

A base label read from coins at wire w.

theorem Cslib.Crypto.Garbling.FreeXOR.length_simPropWords (k : ℕ) (t : Topo) (free coins : List Bool) {s : ℕ} (hs : s ≤ t.q) :
(simPropWords k t free coins s).length = t.n + s

After s ≤ t.q gates, simPropWords holds t.n + s label words.

theorem Cslib.Crypto.Garbling.FreeXOR.length_le_of_mem_simPropWords (k : ℕ) (t : Topo) (free coins : List Bool) (s : ℕ) (w : List Bool) :
w ∈ simPropWords k t free coins s → w.length ≤ k + 2

Every word in simPropWords k t free coins s has length at most k + 2.

theorem Cslib.Crypto.Garbling.FreeXOR.simPropWords_eq_propagate (k : ℕ) (f : ValidCircuit) (free coins : List Bool) (hfree : ∀ (g : Fin (↑f).q), free.getD (↑g) false = isXorGate (↑f) g) {s : ℕ} (hs : s ≤ (↑f).q) :

On a valid circuit f and any flag list free agreeing with isXorGate f.1 on Fin f.1.q, the first n + s words of simPropWords are the typed propagated simBaseLabels.