Projective encoding of garbled inputs on words, with tokens of one width #
[BHR12b], §3.2 (p. 8), calls a garbling scheme projective when, for inputs x
and x' of n bits, En(e, x) and En(e, x') are vectors (X₁, …, Xₙ) and (X₁', …, Xₙ') with
|Xᵢ| = |Xᵢ'|, and Xᵢ = Xᵢ' whenever x and x' have the same bit i. The section first
describes the common way to meet this, which §7.1 (p. 35) also uses: e lists a pair of tokens for
each input bit, e = (X₁⁰, X₁¹, …, Xₙ⁰, Xₙ¹), and En(e, x) selects (X₁^{x₁}, …, Xₙ^{xₙ}).
projectiveEncode is that token-list form on words, in the layout of the point-and-permute and
half-gates schemes: e is the concatenation of the 2 n tokens, all of one width |e| / (2 n),
and the garbled input is the concatenation of the selected tokens. projectiveToken e n i b is the
token of bit b of input i. The layout is narrower than the definition of §3.2, which allows
tokens of different widths at different coordinates and fixes no layout of e.
Yao's protocol over a garbling scheme with this encoding sends each token on its own: the
garbler's tokens in its message and the evaluator's through oblivious transfer.
projectiveEncode_polyTime certifies the encoding and projectiveEncode_eq_flatten_ofFn writes it
as the concatenation of the tokens of the bits of x.
Main definitions #
Cslib.Crypto.Garbling.projectiveToken: the token of one bit of one input.Cslib.Crypto.Garbling.projectiveEncode: the projective encodingEn(e, x)on words, with tokens of one width.
References #
The projective encoding En(e, x) on words, with tokens of one width: the concatenation of
the tokens of the bits of x, read from e as two tokens per input, each |e| / (2 |x|) bits. It
is projective in the sense of [BHR12b], §3.2, in one fixed layout.
En runs in polynomial time.
The projective encoding of x is the concatenation of the tokens of its bits.