Documentation

CslibFrontier.Crypto.Primitives.Garbling.PointPermute.Reduction

The PRF reduction for the privacy of point-and-permute garbling #

The prv.sim advantage of an adversary B against the simulator simWord of PointPermute.scheme family, with topology side information, is exactly a step range times the label advantage of an explicit, certified reduction (prvSimAdvantage_simWord_eq).

The proof is a hybrid over the wires. The garbler's coins give uniform keys and permutation bits, so the real view of a query (f, x) is the typed real view of toCircuit f written as words; the simulated view is the typed simulated view (eval_simWord). Hybrid view j on words is the typed hybrid view j of Privacy.lean, and global hybrid i runs B's choice and then hybrid i of its circuit.

The reduction prvSimReduction family B P runs B's choice of (f, x), draws a step j below dyadicSize (P k), the garbler's coins and filler labels, asks its label oracle at the tweaks of all 8 q argument slots, and runs B's guess on hybrid view j with the answers in the target slots. Against any table it runs the typed reductions of Privacy.lean (eval_run_prvSimReduction), so against the keyed label function it plays a uniform global hybrid j, and against a random function global hybrid j + 1 when distinct slots have distinct tweaks, which holds while 8 q ≤ 2 ^ k. When P k bounds the wires of every circuit B chooses, the hybrids telescope (Game.advantage_hybrid_average). The reduction is uniform strict oracle PPT for every adversary certified by TwoStage.IsPPT and every polynomial-time family (isOraclePPT_prvSimReduction); the body of its hybrid view is written by bodyWith, whose certificate it shares with the garbler and the simulator.

Main definitions #

Main results #

References #

The garbler's coins #

Hybrid views on words #

The reduction #

The PRF reduction for a prv.sim adversary B, at label parameter k, with step range dyadicSize (P k): run B's choice of a query (f, x); when x has f.n bits, draw a step j, the garbler's coins and filler labels, ask the oracle at the tweaks of the 8 q slots, and run B's guess on hybrid view j; otherwise run B's guess on ⊥.

theorem Cslib.Crypto.Garbling.PointPermute.eval_run_prvSimReduction (family : List Bool → List Bool → List Bool) {σ : Type} (B : ℕ → PrvSimAdversary ValidCircuit σ) (P : ℕ → ℕ) (k : ℕ) (T : BitString k → BitString (k + 1) × Bool) :
(((labelCodec k).adapt (prvSimReduction family B P k [])).run fun (t : BitString k) => pure (T t)).eval = ((B k).choose ()).eval.bind fun (x : Query ValidCircuit × σ) => match x with | (query, state) => if query.input.length = (↑query.fn).n then (Probability.PMF.uniformOfFintype (Fin (Probability.dyadicSize (P k)))).bind fun (j : Fin (Probability.dyadicSize (P k))) => ((reduction (ConventionalCircuit.toCircuit query.fn) Circuits.fullInterpretation (PRF.label (PRF.atLevel family (k + 1))) (slotTweak (ConventionalCircuit.toCircuit query.fn).topology k) (BitString.ofList (↑query.fn).n query.input) (fun (V : View (ConventionalCircuit.toCircuit query.fn).topology (BitString (k + 1))) => (B k).guess state (some (viewWord k (ConventionalCircuit.toCircuit query.fn).topology V))) ↑j).run fun (t : BitString k) => pure (T t)).eval else ((B k).guess state none).eval

The word reduction runs the typed reductions. Against every label table T, the reduction for B at label parameter k runs B's choice of (f, x) and, when x has f.n bits, the typed reduction for a uniform step j below dyadicSize (P k) on toCircuit f with B's guess on the words of the view; otherwise B's guess on ⊥.

The exact bound #

theorem Cslib.Crypto.Garbling.PointPermute.prvSimAdvantage_simWord_eq (family : List Bool → List Bool → List Bool) {σ : Type} (B : ℕ → PrvSimAdversary ValidCircuit σ) (P : ℕ → ℕ) (k : ℕ) (hP : ∀ (query : Query ValidCircuit) (state : σ), (query, state) ∈ ((B k).choose ()).eval.support → query.input.length = (↑query.fn).n → (↑query.fn).n + (↑query.fn).q ≤ P k) (hk : 8 * P k ≤ 2 ^ k) :
prvSimAdvantage (scheme family) phiTopo k (simWord family k) (B k) = ↑(Probability.dyadicSize (P k)) * PRF.advantage (PRF.label (PRF.atLevel family (k + 1))) ((labelCodec k).adapt (prvSimReduction family B P k []))

The prv.sim advantage against the simulator is the reduction's label advantage, times the step range. At parameter k, if every valid query B k can choose has at most P k wires and 8 P k ≤ 2 ^ k, the prv.sim advantage of B k against simWord is dyadicSize (P k) times the finite PRF advantage of prvSimReduction family B P at label parameter k, read through labelCodec k, against the label function of family at parameter k + 1.

Efficiency #

Efficiency of the reduction. For every family computed in polynomial time, every uniform strict PPT prv.sim adversary B and every step range P computed in polynomial time in unary, prvSimReduction family B P is uniform strict oracle PPT.