Documentation

CslibFrontier.Crypto.Primitives.Garbling.Adaptive

Fixed-parameter Prv1 adaptive privacy game and advantage steps #

This module defines the coarse-grained adaptive privacy game Prv1 after Bellare, Hoang and Rogaway [BHR12a], Section 3.1, Figure 2, at a fixed security parameter k, together with fixed-parameter concrete advantage steps relating prv1Advantage to selective prvSimAdvantage and prvIndAdvantage. These advantage equalities and bounds are fixed-parameter steps, not asymptotic prv1 ⇒ prv.sim or prv1 ⇒ prv.ind security theorems (#5293): the library defines no asymptotic prv1 security notion against polynomial-time adversaries, and running time / strict-PPT efficiency is not tracked for prv1SimulatorToPrv or prvSimToPrv1.

In the selective privacy game PrvSim of [BHR12b], Section 3.4, the adversary submits the function description f and the input x together before seeing the garbled circuit. In Prv1 ([BHR12a], Section 3.1, Figure 2), the adversary first queries Garble(f) to obtain the garbled function and decoding information (F, d), and only then adaptively chooses the input x in a second query Input(x) to obtain the garbled input X.

In the simulated world (b = false), a two-stage stateful simulator Prv1Simulator first produces (F, d) and a simulator state from Φ(f), and then produces X from the saved state and the output y = ev(f, x) once x is chosen. The adversary has three stages—choosing f, choosing x and guessing—so unlike the selective games it is not a TwoStage adversary. Every stateful prv1 simulator S induces a selective prv.sim simulator prv1SimulatorToPrv S that runs the two simulator stages back to back, and every selective prv.sim adversary B embeds into an adaptive prv1 adversary prvSimToPrv1 B that commits to x in its first-stage state. At each fixed parameter k, this embedding preserves the experiment distribution on the nose in both worlds (eval_prv1Experiment_prvSimToPrv1), giving exact advantage equality prvSimAdvantage G Φ k (prv1SimulatorToPrv S) B = prv1Advantage G Φ k S (prvSimToPrv1 B) (prvSimAdvantage_prv1SimulatorToPrv_eq) and the factor-of-two relation prvIndAdvantage G Φ k A = 2 * prv1Advantage G Φ k S (prvSimToPrv1 (prvIndToSim G Φ A)) (prvIndAdvantage_eq_two_mul_prv1Advantage); lifting these concrete steps to asymptotic security implications remains open (#5293).

Main definitions #

Main results #

References #

The Prv1 adaptive privacy game #

The answer (F, d) to the Garble(f) query of Prv1: a garbled function and decoding information, without the garbled input.

  • fn : List Bool

    The garbled function F.

  • decInfo : List Bool

    The decoding information d.

A coarse-grained adaptive privacy (prv1) adversary at a fixed security parameter (after [BHR12a], Section 3.1, Figure 2): in stage 1 (Garble) it chooses a function f and saves a state; given (F, d), in stage 2 (Input) it adaptively chooses an input x and saves a state; finally it guesses whether the view is real or simulated from the garbled input X (or none when x has the wrong length). It has three stages, so it is not a TwoStage adversary, and running time is not tracked.

  • chooseFn : ProbComp (Fn × σ)

    Stage 1 (Garble): choose the function f and save a stage-1 state.

  • chooseInput : σ → GarbledFn → ProbComp (List Bool × τ)

    Stage 2 (Input): from (F, d), adaptively choose the input x and save a stage-2 state.

  • guess : τ → Option (List Bool) → ProbComp Bool

    Guess whether the experiment is real or simulated from the garbled input X (or ⊥).

A stateful prv1 simulator at a fixed security parameter (after [BHR12a], Section 3.1, Figure 2): in the first stage garble produces a simulated (F, d) together with a simulator state from Φ(f); in the second stage input produces a simulated garbled input X from the saved simulator state and the output y = ev(f, x). Running time is not tracked.

  • garble : Λ → ProbComp (GarbledFn × ρ)

    Stage 1 (S(1^k, φ, 0)): simulate (F, d) from Φ(f) and save a state.

  • input : ρ → List Bool → ProbComp (List Bool)

    Stage 2 (S(y, 1)): simulate X from the saved state and y = ev(f, x).

noncomputable def Cslib.Crypto.Garbling.prv1Experiment {Fn Λ σ τ ρ : Type} (G : Scheme Fn) (Φ : SideInfo Fn Λ) (k : ℕ) (S : Prv1Simulator Λ ρ) (A : Prv1Adversary Fn σ τ) (b : Bool) :

Fixed-parameter experiment b of the coarse-grained adaptive privacy game Prv1 (after [BHR12a], Section 3.1, Figure 2): at parameter k, for b = true the adversary interacts with the real garbling G.garble k f and encoding G.encode g.encInfo x; for b = false it interacts with the two-stage stateful simulator S on Φ(f) and G.ev f x. An input x of length different from G.inLen f is answered with none (⊥).

noncomputable def Cslib.Crypto.Garbling.prv1Advantage {Fn Λ σ τ ρ : Type} (G : Scheme Fn) (Φ : SideInfo Fn Λ) (k : ℕ) (S : Prv1Simulator Λ ρ) (A : Prv1Adversary Fn σ τ) :

The fixed-parameter prv1 advantage of an adaptive adversary A against a stateful simulator S at parameter k: the distinguishing advantage between the simulated (b = false) and real (b = true) experiments of Prv1.

theorem Cslib.Crypto.Garbling.prv1Advantage_le_one {Fn Λ σ τ ρ : Type} (G : Scheme Fn) (Φ : SideInfo Fn Λ) (k : ℕ) (S : Prv1Simulator Λ ρ) (A : Prv1Adversary Fn σ τ) :
prv1Advantage G Φ k S A ≤ 1

At a fixed security parameter k, the prv1 advantage is at most 1.

At a fixed security parameter k, the prv1 advantage is twice the bias of the bit-guessing experiment, matching |2 Pr[Prv1 = 1] - 1| for the game of [BHR12a], Section 3.1.

Fixed-parameter advantage steps from selective prv.sim and prv.ind to prv1 #

noncomputable def Cslib.Crypto.Garbling.prv1SimulatorToPrv {Λ ρ : Type} (S : Prv1Simulator Λ ρ) :

The fixed-parameter selective prv.sim simulator induced by a stateful prv1 simulator S (running time / PPT efficiency not tracked; #5293): it runs stage 1 of S on φ to obtain (F, d) and a state, runs stage 2 of S on the state and y to obtain X, and returns (F, X, d).

The stage-2 state saved by prvSimToPrv1: the selective adversary's state together with the answer (F, d) received in stage 1.

  • state : σ

    The state of the selective prv.sim adversary.

  • garbled : GarbledFn

    The garbled function F and decoding information d received from Garble(f).

Fixed-parameter embedding of a selective prv.sim adversary B into an adaptive prv1 adversary (running time / PPT efficiency not tracked; #5293): stage 1 runs B.choose to obtain a query (f, x) and a state st and saves (x, st); stage 2 outputs the pre-selected input x and saves st with (F, d); stage 3 hands (F, X, d) to B.guess.

theorem Cslib.Crypto.Garbling.eval_prv1Experiment_prvSimToPrv1 {Fn Λ σ ρ : Type} (G : Scheme Fn) (Φ : SideInfo Fn Λ) (k : ℕ) (S : Prv1Simulator Λ ρ) (B : PrvSimAdversary Fn σ) (b : Bool) :

Fixed-parameter distribution identity (a concrete step toward relating prv1 and prv.sim after [BHR12a], Section 3.1, not an asymptotic security theorem; #5293): at a fixed security parameter k, running prv1Experiment on prvSimToPrv1 B against S has the same output distribution as running prvSimExperiment on B against prv1SimulatorToPrv S, in both the real (b = true) and simulated (b = false) worlds.

theorem Cslib.Crypto.Garbling.prvSimAdvantage_prv1SimulatorToPrv_eq {Fn Λ σ ρ : Type} (G : Scheme Fn) (Φ : SideInfo Fn Λ) (k : ℕ) (S : Prv1Simulator Λ ρ) (B : PrvSimAdversary Fn σ) :

Fixed-parameter concrete reduction identity between prv.sim and prv1 (a step after [BHR12a], Section 3.1, not an asymptotic prv1 ⇒ prv.sim security theorem; #5293): at a fixed security parameter k, with running time / PPT efficiency untracked and no asymptotic prv1 notion applied, the prv.sim advantage of B against prv1SimulatorToPrv S equals the prv1 advantage of prvSimToPrv1 B against S.

theorem Cslib.Crypto.Garbling.prvSimAdvantage_prv1SimulatorToPrv_le {Fn Λ σ ρ : Type} (G : Scheme Fn) (Φ : SideInfo Fn Λ) (k : ℕ) (S : Prv1Simulator Λ ρ) (B : PrvSimAdversary Fn σ) :

Fixed-parameter concrete advantage bound between prv.sim and prv1 (a step after [BHR12a], Section 3.1, not an asymptotic prv1 ⇒ prv.sim security theorem; #5293): at a fixed security parameter k, the prv.sim advantage of B against prv1SimulatorToPrv S is at most the prv1 advantage of prvSimToPrv1 B against S.

theorem Cslib.Crypto.Garbling.prvIndAdvantage_eq_two_mul_prv1Advantage {Fn Λ σ ρ : Type} [DecidableEq Λ] (G : Scheme Fn) (Φ : SideInfo Fn Λ) (hCompat : Φ.Compatible G) (k : ℕ) (S : Prv1Simulator Λ ρ) (A : PrvIndAdversary Fn σ) :
prvIndAdvantage G Φ k A = 2 * prv1Advantage G Φ k S (prvSimToPrv1 (prvIndToSim G Φ A))

Fixed-parameter concrete reduction identity between prv.ind and prv1 (a step combining [BHR12b], Proposition 2(1) with [BHR12a], Section 3.1, not an asymptotic prv1 ⇒ prv.ind security theorem; #5293): at a fixed security parameter k, with running time / PPT efficiency untracked and no asymptotic prv1 notion applied, the prv.ind advantage of A equals twice the prv1 advantage of prvSimToPrv1 (prvIndToSim G Φ A) against every stateful prv1 simulator S.

theorem Cslib.Crypto.Garbling.prvIndAdvantage_le_two_mul_prv1Advantage {Fn Λ σ ρ : Type} [DecidableEq Λ] (G : Scheme Fn) (Φ : SideInfo Fn Λ) (hCompat : Φ.Compatible G) (k : ℕ) (S : Prv1Simulator Λ ρ) (A : PrvIndAdversary Fn σ) :

Fixed-parameter concrete advantage bound between prv.ind and prv1 (a step combining [BHR12b], Proposition 2(1) with [BHR12a], Section 3.1, not an asymptotic prv1 ⇒ prv.ind security theorem; #5293): at a fixed security parameter k, the prv.ind advantage of A is at most twice the prv1 advantage of prvSimToPrv1 (prvIndToSim G Φ A) against every stateful prv1 simulator S.