Security games for garbling schemes #
The security notions of [BHR12b], Sections 3.4 to 3.6, for a garbling scheme
G with side information Φ. Each game has one two-stage adversary (Cslib.Crypto.TwoStage)
who makes a single query and keeps a state between its stages, as in the single-query games of
the paper. Each experiment is a program (Cslib.Crypto.Experiment) at a fixed security
parameter k. On an invalid query the adversary receives ⊥, which is none.
- Privacy (
prv) asks that the view(F, X, d)reveal nothing about the query(f, x)beyondΦ(f)andev(f, x). In the indistinguishability gamePrvIndthe adversary chooses a pair of queries(f₀, x₀)and(f₁, x₁)withΦ(f₀) = Φ(f₁)andev(f₀, x₀) = ev(f₁, x₁)and must tell which one was garbled. In the simulation gamePrvSimit must tell the real view from the output of a simulator that sees onlyev(f, x)andΦ(f). - Obliviousness (
obv) withholds the decoding informationd, so the view(F, X)reveals nothing about(f, x)beyondΦ(f). The gamesObvIndandObvSimdrop the condition onev, and the simulator no longer receivesev(f, x). - Authenticity (
aut) asks that no adversary given(F, X)can produce a garbled output other thanEv(F, X)that decodes successfully.
Advantages are the Experiment.advantage between the two experiments of a game, or the success
probability for authenticity. The bit-guessing form Experiment.guessBit of an
indistinguishability game draws a uniform hidden bit; the advantage is twice its bias, which is
the formulation 2 Pr[PrvInd = 1] − 1 of the paper up to sign. The relations between the
indistinguishability and simulation notions are in
CslibFrontier.Crypto.Primitives.Garbling.Foundations.
Main definitions #
Cslib.Crypto.Garbling.PrvView,Cslib.Crypto.Garbling.ObvView: the views(F, X, d)and(F, X)handed to the adversary, andCslib.Crypto.Garbling.Scheme.prvView,Cslib.Crypto.Garbling.Scheme.obvView, the real views of a query.Cslib.Crypto.Garbling.PrvIndAdversary,Cslib.Crypto.Garbling.prvIndExperiment,Cslib.Crypto.Garbling.prvIndAdvantage: the gamePrvIndand its advantage.Cslib.Crypto.Garbling.PrvSimAdversary,Cslib.Crypto.Garbling.PrvSimulator,Cslib.Crypto.Garbling.prvSimExperiment,Cslib.Crypto.Garbling.prvSimAdvantage: the gamePrvSim.Cslib.Crypto.Garbling.obvIndExperiment,Cslib.Crypto.Garbling.obvIndAdvantage,Cslib.Crypto.Garbling.obvSimExperiment,Cslib.Crypto.Garbling.obvSimAdvantage: the gamesObvIndandObvSim.Cslib.Crypto.Garbling.autExperiment,Cslib.Crypto.Garbling.autAdvantage: the gameAut.
Main results #
Cslib.Crypto.Garbling.prvIndAdvantage_eq_two_mul_guessingAdvantage: theprv.indadvantage is twice the bias of the bit-guessing experiment.Cslib.Crypto.Garbling.prvIndAdvantage_eq_zero_of_invalid: an adversary whose queries are always invalid has no advantage.
References #
Views #
Privacy: indistinguishability #
A prv.ind adversary: it chooses a pair of queries and keeps a state, then guesses the hidden
bit from the view (F, X, d), or from ⊥ when its pair was invalid.
Validity of a prv.ind pair (f₀, x₀), (f₁, x₁): Φ(f₀) = Φ(f₁), both inputs have f₀.n
bits and ev(f₀, x₀) = ev(f₁, x₁).
Instances For
Experiment b of the game PrvInd, [BHR12b], Section 3.4: on a valid pair,
hand the adversary the real view of the query selected by b; otherwise hand it ⊥.
The prv.ind advantage of an adversary: the distinguishing advantage between the two
experiments of PrvInd.
Privacy: simulation #
A prv.sim adversary: it chooses a query and keeps a state, then guesses whether the view
(F, X, d) is real or simulated, or guesses from ⊥ when its query was invalid.
A prv.sim simulator S(1^k, y, φ) at a fixed security parameter: it produces a view
(F, X, d) from the output y = ev(f, x) and the side information φ = Φ(f).
Experiment b of the game PrvSim, [BHR12b], Section 3.4: when x has
f.n bits, b = true hands the adversary the real view of (f, x) and b = false the output of
the simulator on (ev(f, x), Φ(f)); otherwise it hands the adversary ⊥.
The prv.sim advantage of an adversary against a simulator: the distinguishing advantage
between the two experiments of PrvSim.
Obliviousness: indistinguishability #
An obv.ind adversary: it chooses a pair of queries and keeps a state, then guesses the
hidden bit from the view (F, X), or from ⊥ when its pair was invalid.
Validity of an obv.ind pair (f₀, x₀), (f₁, x₁): Φ(f₀) = Φ(f₁) and both inputs have
f₀.n bits. The outputs ev(f₀, x₀) and ev(f₁, x₁) need not agree.
Instances For
Experiment b of the game ObvInd, [BHR12b], Section 3.5: on a valid pair,
hand the adversary the real view (F, X) of the query selected by b, withholding d;
otherwise hand it ⊥.
The obv.ind advantage of an adversary: the distinguishing advantage between the two
experiments of ObvInd.
Obliviousness: simulation #
An obv.sim adversary: it chooses a query and keeps a state, then guesses whether the view
(F, X) is real or simulated, or guesses from ⊥ when its query was invalid.
An obv.sim simulator S(1^k, φ) at a fixed security parameter: it produces a view (F, X)
from the side information φ = Φ(f) alone.
Experiment b of the game ObvSim, [BHR12b], Section 3.5: when x has
f.n bits, b = true hands the adversary the real view (F, X) of (f, x) and b = false the
output of the simulator on Φ(f); otherwise it hands the adversary ⊥.
The obv.sim advantage of an adversary against a simulator: the distinguishing advantage
between the two experiments of ObvSim.
Authenticity #
An aut adversary: it chooses a query and keeps a state, then forges a garbled output from
the view (F, X).
The game Aut, [BHR12b], Section 3.6: when x has f.n bits, the
adversary receives (F, X) and wins when its forgery differs from Ev(F, X) and decodes
successfully; otherwise the game outputs false.
The aut advantage of an adversary: its probability of winning Aut.
Elementary bounds #
The prv.ind advantage is twice the bias of the bit-guessing experiment, the absolute value
of 2 Pr[PrvInd = 1] − 1 in [BHR12b], Section 3.4.
An adversary whose pair is never valid has prv.ind advantage 0: both experiments hand it
⊥.
Library infrastructure (no cited result): rewrite the PrvSim experiment distribution
on a predicate P holding on all valid queries in the support of B.choose (), replacing the
real-or-simulated view computation by rhs.