Garbling schemes: syntax, correctness and side information #
A garbling scheme in the sense of Bellare, Hoang and Rogaway [BHR12b],
Section 3, is a tuple (Gb, En, De, Ev, ev). The probabilistic garbling algorithm Gb maps a
security parameter and a function f to a garbled function F, encoding information e and
decoding information d; the deterministic algorithms En, Ev and De encode an input,
evaluate a garbled function and decode a garbled output; and ev gives the semantics of f.
Functions are an abstract type Fn carrying length readers, so the development is parametric in
the function representation (for a concrete point-and-permute circuit garbling construction over
Cslib.Circuits.Circuit, see CslibFrontier.Crypto.Primitives.Garbling.Basic and
CslibFrontier.Crypto.Primitives.Garbling.Privacy).
The randomness of Gb is explicit: a scheme fixes a coin-length function and a deterministic
garbling map on coin strings, and Scheme.garble samples the coins uniformly. This makes the
output distribution of garbling a PMF via ProbComp.eval, and the support of that
distribution is characterised by Scheme.mem_support_eval_garble_iff.
Side-information functions Φ : Fn → Λ ([BHR12b], Section 3.3) describe what
a garbled function is allowed to reveal about f. The side information is Φ-compatible with a
scheme when it determines the length readers, and the two inversion properties of Section 4.1
(SideInfo.IsEvInverter and SideInfo.IsInverter) are the hypotheses under which the
indistinguishability and simulation notions of
CslibFrontier.Crypto.Primitives.Garbling.Foundations coincide.
Efficiency requirements (polynomial-time algorithms, efficiently computable inverters) and the projective encoding structure of [BHR12b], Section 3.2, are not part of this module.
Main definitions #
Cslib.Crypto.Garbling.Scheme.Garbled: the garbled triple(F, e, d)output byGb.Cslib.Crypto.Garbling.Query: a query(f, x)of a function description and an input.Cslib.Crypto.Garbling.Scheme: the syntax(Gb, En, De, Ev, ev)with explicit coins.Cslib.Crypto.Garbling.Scheme.garble: the probabilistic garbling algorithmGb(1^k, f).Cslib.Crypto.Garbling.Scheme.IsValid: the length condition, non-degeneracy and correctness.Cslib.Crypto.Garbling.Scheme.WellTyped: the output-length typing ofevandDe.Cslib.Crypto.Garbling.SideInfo: side-information functions with length readers.Cslib.Crypto.Garbling.SideInfo.IsEvInverter,Cslib.Crypto.Garbling.SideInfo.IsInverter: the inversion properties of [BHR12b], Section 4.1.
Main results #
Cslib.Crypto.Garbling.Scheme.mem_support_eval_garble_iff: the garbled triples a scheme can output are exactly the images of coin strings of the right length.Cslib.Crypto.Garbling.SideInfo.circ_isInverter: the identity side information is invertible.
References #
A garbled function together with its encoding and decoding information, the output
(F, e, d) of the garbling algorithm.
The garbled function
F.The encoding information
e.The decoding information
d.
A garbling scheme over a type Fn of function descriptions, following
[BHR12b], Section 3.1. The probabilistic algorithm Gb is split into a
coin-length function and a deterministic map gb on coin strings; see Scheme.garble for the
sampled version.
- inLen : Fn → ℕ
The input length
f.nof a function description. - outLen : Fn → ℕ
The output length
f.mof a function description. - size : Fn → ℕ
The size
|f|of a function description. The semantics
ev(f, x)of a function description.The number of coins used by
Gb, as a function of the security parameter and the input length, output length and size off.The deterministic core of
Gb(1^k, f; r).The encoding algorithm
En(e, x).The evaluation algorithm
Ev(F, X).The decoding algorithm
De(d, Y), withnonefor the failure symbol⊥.
The garbled triples a scheme can output are exactly the images of coin strings of the right length.
Two function descriptions have the same shape when their length readers agree.
A garbling scheme is valid when it satisfies the length condition, non-degeneracy and correctness.
- length : G.LengthCondition
The length condition.
- nonDegenerate : G.NonDegenerate
Non-degeneracy.
- correct : G.Correct
Correctness.
A side-information function Φ : Fn → Λ together with length readers on Λ, following
[BHR12b], Section 3.3.
The side information Φ_circ revealing the function description itself.