Steps for Yao's protocol in the ideal oblivious-transfer hybrid model #
CslibFrontier/Crypto/Protocols/MPC/Yao/Family.lean runs Yao's protocol over a garbling scheme G
in the ideal batchOTWorld (batchOTSpec) oblivious-transfer hybrid model (#6045) as both the
one-sided protocol family Yao.oneSidedFamily G ([BHR12b], §7.1, Fig. 16, p. 34)
and the two-output protocol family Yao.family G ([LP09], Protocol 2, §4.2, p. 15),
proving the corrupted-garbler steps (Yao.hybridSemiHonestSecure_oneSided_garbler,
Yao.hybridSemiHonestSecure_garbler). This module proves the corrupted-evaluator steps from
simulation privacy of G
(Scheme.PrvSimSecureUniversal.yaoOneSidedHybridSemiHonestSecure_evaluator,
Scheme.PrvSimSecureUniversal.yaoHybridSemiHonestSecure_evaluator) and combines the cases into
Scheme.PrvSimSecureUniversal.yaoOneSidedHybridSemiHonestSecure (across all static coalitions
I : Finset (Fin 2)) and Scheme.PrvSimSecureUniversal.yaoHybridSemiHonestSecure, rather than
plain-model Theorem 7 of [LP09] (ePrint 2004/175, §4.2, p. 15) or Theorem 14 of
[BHR12b] (§7.1, p. 35), which compose with a concrete semi-honest 1-out-of-2
oblivious-transfer protocol.
The assumption. ProtocolFamily.SemiHonestSecure asks for one simulator family for every
environment, and the reductions below build one garbling adversary per environment. So the scheme
needs one prv.sim simulator for every adversary, Scheme.PrvSimSecureUniversal.
Scheme.PrvSimSecure, with the quantifiers ∀ B ∃ S of [BHR12b] (§3.4, p. 9),
would give one simulator per environment. For arbitrary side information the one-simulator form is
novel to this library; [ZRE15] (§2, p. 5) state it for the side information
Φ_circ. So the theorems of this module rest on a novel assumption and are steps, named after it.
Point-and-permute and half-gates garbling satisfy it
(CslibFrontier/Crypto/Protocols/MPC/Yao/Instances.lean), so the instances there rest only on the
standard assumptions PseudorandomFunction and CircularCorrelationRobust.
The simulators. Yao.oneSidedEvaluatorSim G Φ S and Yao.evaluatorSim G Φ S run a garbling
simulator S on the security parameter, the evaluator's output and Φ(f), and read the
evaluator's view from the simulated (F, X, d) (Yao.oneSidedViewOfPrvView,
Yao.viewOfPrvView): X splits into G.inLen f tokens of equal width, the first garblerLen of
which go into the garbler's message with F and d, and the others are the tokens that the
oblivious transfer delivers. They play the role of the simulator S₂ of Case 2 of the proof of
Theorem 7 of [LP09] (pp. 18–19), with the garbling simulator in place of their fake
garbled circuit; in the hybrid model their first step, simulating the evaluator's view of the
oblivious-transfer protocol, is empty. Both are PPT when S is, Φ is computed in polynomial time
and G reads input lengths in polynomial time (Yao.isPPT_oneSidedEvaluatorSim,
Yao.isPPT_evaluatorSim).
The reductions. Yao.oneSidedEvaluatorToPrvSim samp Z and Yao.evaluatorToPrvSim samp Z turn
an environment Z into a prv.sim adversary, sharing the state Yao.ReductionState and its
encoding Yao.encReductionState. Their choice stages draw the public parameters with samp, run
Z.choose and query the function on the garbler's bits followed by the evaluator's; their guess
stages read the evaluator's view from (F, X, d) and run Z.guess, with Yao.oneSidedOutputs
([] for the garbler, the function's output for the evaluator) or the function's output for both
parties. On a real garbled view, oneSidedViewOfPrvView and viewOfPrvView give the evaluator's
real view (Yao.oneSidedViewOfPrvView_gb, Yao.viewOfPrvView_gb), so from n = 1 on an
environment's advantage is the prv.sim advantage of the reduction
(Yao.advantage_oneSidedEvaluator_eq, Yao.advantage_evaluator_eq), and both reductions are PPT
whenever Z is (Yao.isPPT_oneSidedEvaluatorToPrvSim, Yao.isPPT_evaluatorToPrvSim).
Comparison with [LP09], Theorem 7, and [BHR12b], Theorem 14 #
Scheme.PrvSimSecureUniversal.yaoOneSidedHybridSemiHonestSecure and
Scheme.PrvSimSecureUniversal.yaoHybridSemiHonestSecure are steps towards Theorem 7 (§4.2, p. 15)
and Theorem 14 (§7.1, p. 35), not those theorems:
- Oblivious transfer. The transfers are the ideal
batchOTSpec. Both Theorem 7 and Theorem 14 assume an oblivious transfer protocol secure against semi-honest adversaries, and their proofs simulate that protocol's views; composition with a protocol is not formalized here (#6045). - Garbling scheme and assumption. Any garbling scheme with polynomial-time algorithms, correct
from
n = 1on, with the encodingprojectiveEncode(projective in one word layout, with tokens of one width) andprv.simsecure with one simulator, in place of the double-encryption construction of [LP09] (§4.1, p. 12). This modular form follows [BHR12b], §7.1 (Fig. 16, p. 34; Theorem 14, p. 35), whose quantifiers are∀ B ∃ Son both sides. - Environments. Uniform PPT environments that choose the inputs after seeing the public
parameters, the uniform variant of
ProtocolFamily.SemiHonestSecure; Definition 1 (p. 5) of Lindell and Pinkas quantifies over all inputs against non-uniform distinguishers. - The function. The function description is a public parameter drawn by a PPT sampler; a uniform family of functions is the case of a deterministic sampler. In Lindell and Pinkas the circuit is auxiliary input. The reduction draws the function itself, so security against the evaluator needs an efficient sampler; security against the garbler holds for every setup law.
- Inputs and outputs. The garbler holds the first
garblerLeninput bits and the evaluator the rest, where Lindell and Pinkas give each partynbits.Yao.oneSidedFamilydelivers[]to the garbler andG.ev fn xto the evaluator (as in [BHR12b], §7.1, Fig. 16);Yao.familydeliversG.ev fn xto both parties (as in [LP09], Protocol 2).
Main definitions #
Cslib.Crypto.Protocols.MPC.Yao.oneSidedViewOfPrvView,Cslib.Crypto.Protocols.MPC.Yao.viewOfPrvView: the evaluator's view from a garbled view.Cslib.Crypto.Protocols.MPC.Yao.oneSidedEvaluatorSim,Cslib.Crypto.Protocols.MPC.Yao.evaluatorSim: the simulators for a corrupted evaluator.Cslib.Crypto.Protocols.MPC.Yao.oneSidedEvaluatorToPrvSim,Cslib.Crypto.Protocols.MPC.Yao.evaluatorToPrvSim: the reductions toprv.sim, sharingCslib.Crypto.Protocols.MPC.Yao.ReductionStateandCslib.Crypto.Protocols.MPC.Yao.encReductionState.
Main results #
Cslib.Crypto.Protocols.MPC.Yao.oneSidedViewOfPrvView_gb,Cslib.Crypto.Protocols.MPC.Yao.viewOfPrvView_gb: on a real garbled view, the evaluator's real view.Cslib.Crypto.Protocols.MPC.Yao.advantage_oneSidedEvaluator_eq,Cslib.Crypto.Protocols.MPC.Yao.advantage_evaluator_eq: the reductions are exact.Cslib.Crypto.Protocols.MPC.Yao.isPPT_oneSidedEvaluatorSim,Cslib.Crypto.Protocols.MPC.Yao.isPPT_oneSidedEvaluatorToPrvSim,Cslib.Crypto.Protocols.MPC.Yao.isPPT_evaluatorSim,Cslib.Crypto.Protocols.MPC.Yao.isPPT_evaluatorToPrvSim: the simulators and reductions are PPT.Cslib.Crypto.Garbling.Scheme.PrvSimSecureUniversal.yaoOneSidedHybridSemiHonestSecure_evaluator,Cslib.Crypto.Garbling.Scheme.PrvSimSecureUniversal.yaoHybridSemiHonestSecure_evaluator: steps for a corrupted evaluator in the idealbatchOTWorldhybrid (#6045).Cslib.Crypto.Garbling.Scheme.PrvSimSecureUniversal.yaoOneSidedHybridSemiHonestSecure: step across all static coalitionsI : Finset (Fin 2)forYao.oneSidedFamilyin the idealbatchOTWorldhybrid (#6045).Cslib.Crypto.Garbling.Scheme.PrvSimSecureUniversal.yaoHybridSemiHonestSecure: step against either party forYao.familyin the idealbatchOTWorldhybrid (#6045).
References #
- Y. Lindell, B. Pinkas, A Proof of Security of Yao's Protocol for Two-Party Computation, cited in the ePrint version 2004/175 of June 26, 2006: Definition 1 (§2.1, p. 5), §4.1 (p. 12), Theorem 7 (§4.2, p. 15), Case 2 (pp. 18–19).
- M. Bellare, V. T. Hoang, P. Rogaway, Foundations of Garbled Circuits, §3.4 (p. 9) and §7.1 (Fig. 16, p. 34; Theorem 14, p. 35).
- S. Zahur, M. Rosulek, D. Evans, Two Halves Make a Whole: Reducing Data Transfer in Garbled Circuits using Half Gates, §2 (p. 5).
The evaluator's view from a garbled view #
The evaluator's view in oneSidedProtocol that a prv.sim view (F, X, d) gives: X is
split into G.inLen c.fn tokens of equal width, the first c.garblerLen of which go into the
garbler's message with F and d, and the others are the tokens that the oblivious transfer
delivers.
The evaluator's view in protocol that a prv.sim view (F, X, d) gives: X is split into
G.inLen c.fn tokens of equal width, the first c.garblerLen of which go into the garbler's
message with F and d, and the others are the tokens that the oblivious transfer delivers.
On the real garbled view of the function's input with the garbler's coins coins,
oneSidedViewOfPrvView is the evaluator's view in oneSidedProtocol with these coins, when the
encoding of G is projectiveEncode.
On the real garbled view of the function's input with the garbler's coins coins,
viewOfPrvView is the evaluator's view in protocol with these coins, when the encoding of G is
projectiveEncode.
The simulator for a corrupted evaluator #
The simulator family for a corrupted evaluator in oneSidedFamily, from a garbling simulator
S for the side information Φ: run S on the security parameter, the evaluator's output and
Φ(c.fn), and read the evaluator's view from its garbled view (oneSidedViewOfPrvView).
The simulator family for a corrupted evaluator in family, from a garbling simulator S for
the side information Φ: run S on the security parameter, the evaluator's output and Φ(c.fn),
and read the evaluator's view from its garbled view (viewOfPrvView).
The reduction to simulation privacy #
What oneSidedEvaluatorToPrvSim and evaluatorToPrvSim keep between their stages: the public
parameters, the environment's state, the word of the evaluator's input bits and the function's
output.
- params : Params G
The public parameters.
The environment's state.
The word of the evaluator's input bits.
The function's output on the chosen inputs.
The encoding of the reduction's state: each field in turn, all but the last framed, with the
public parameters written by encParams encFn.
The one-sided reduction from an environment Z against a corrupted evaluator in
oneSidedFamily to a prv.sim adversary against G, for public parameters drawn by samp. Its
choice stage draws c with samp k, runs Z.choose, and queries c.fn on the garbler's bits
followed by the evaluator's; its guess stage reads the evaluator's view from (F, X, d)
(oneSidedViewOfPrvView) and runs Z.guess with oneSidedOutputs ([] for the garbler and the
output for the evaluator).
The reduction from an environment Z against a corrupted evaluator to a prv.sim
adversary against G, for public parameters drawn by samp. Its choice stage draws c with
samp k, runs Z.choose, and queries the function c.fn on the garbler's bits followed by the
evaluator's; it keeps c, the environment's state, the evaluator's input word and the function's
output. Its guess stage reads the evaluator's view from the garbled view (F, X, d)
(viewOfPrvView) and runs Z.guess on it and on the output as both parties' outputs.
The ideal game with evaluatorSim G Φ S is the experiment PrvSim of the reduction with the
simulator S n, on the simulated side (b = false), at every parameter.
At every parameter n ≥ 1, the real game against a corrupted evaluator is the experiment
PrvSim of the reduction on the real side (b = true), when G is correct and its encoding is
projectiveEncode.
In oneSidedFamily, the ideal game with oneSidedEvaluatorSim G Φ S is the experiment
PrvSim of oneSidedEvaluatorToPrvSim with S n on the simulated side (b = false).
At every parameter n ≥ 1 in oneSidedFamily, the real game against a corrupted evaluator is
the experiment PrvSim of oneSidedEvaluatorToPrvSim on the real side (b = true), when G is
correct and its encoding is projectiveEncode.
Efficiency #
The evaluator's simulator is PPT for encoding G encFn when the garbling simulator S is
PPT on (1^k, y, φ), Φ is computed in polynomial time and G reads input lengths in polynomial
time (hinLen).
The one-sided evaluator simulator is PPT for oneSidedEncoding G encFn when the garbling
simulator S is PPT on (1^k, y, φ), Φ is computed in polynomial time and G reads input
lengths in polynomial time (hinLen).
The reduction is PPT whenever the environment Z is PPT for encoding G encFn, the public
parameters are drawn by a PPT sampler samp, and G reads input lengths (hinLen) and evaluates
ev (hev) in polynomial time.
The one-sided reduction is PPT whenever the environment Z is PPT for
oneSidedEncoding G encFn, the public parameters are drawn by a PPT sampler samp, and G reads
input lengths (hinLen) and evaluates ev (hev) in polynomial time.
Empty and full coalitions of oneSidedFamily #
Security #
The one-sided reduction is exact: at every parameter n ≥ 1, the advantage of an
environment Z between the real game of oneSidedFamily and the ideal game with
oneSidedEvaluatorSim G Φ S equals the prv.sim advantage of oneSidedEvaluatorToPrvSim samp Z
against S n, when G is correct and its encoding is projectiveEncode.
The reduction is exact: at every parameter n ≥ 1, the advantage of an environment Z
between the real game and the ideal game with evaluatorSim G Φ S equals the prv.sim advantage
of the reduction evaluatorToPrvSim samp Z against S n, when G is correct and its encoding is
projectiveEncode.
Step in the ideal batchOTWorld oblivious-transfer hybrid model (#6045), under the novel
assumption Scheme.PrvSimSecureUniversal: semi-honest security of Yao.oneSidedFamily G against a
corrupted evaluator, towards Theorem 7 of [LP09] (ePrint 2004/175, §4.2, p. 15; Case
2, pp. 18–19) and Theorem 14 of [BHR12b] (§7.1, p. 35), not those plain-model
theorems, which compose with a concrete semi-honest 1-out-of-2 oblivious-transfer protocol. When
G satisfies Scheme.PrvSimSecureUniversal for side information Φ computed in polynomial time,
is correct, has encoding projectiveEncode, and reads input lengths and evaluates ev in
polynomial time, then for public parameters drawn by any PPT sampler the PPT simulator family
Yao.oneSidedEvaluatorSim G Φ S makes the real and ideal games indistinguishable for every PPT
environment through the certified reduction Yao.oneSidedEvaluatorToPrvSim
(Yao.advantage_oneSidedEvaluator_eq, Yao.isPPT_oneSidedEvaluatorToPrvSim).
Step in the ideal batchOTWorld oblivious-transfer hybrid model (#6045), under the novel
assumption Scheme.PrvSimSecureUniversal: semi-honest security of Yao.oneSidedFamily G across
every static coalition I : Finset (Fin 2), towards Theorem 7 of [LP09] (ePrint
2004/175, §4.2, p. 15) and Theorem 14 of [BHR12b] (§7.1, p. 35), not those
plain-model theorems, which compose with a concrete semi-honest 1-out-of-2 oblivious-transfer
protocol. The oblivious transfers are the ideal batchOTWorld (batchOTSpec), party 0 outputs
[] and party 1 outputs G.ev fn x (as in [BHR12b], §7.1, Fig. 16, p. 34), and
the module documentation lists the other deviations (uniform environments that choose the inputs, a
setup law, the scheme as a parameter). Under Scheme.PrvSimSecureUniversal, Scheme.IsEfficient,
G.encode = projectiveEncode, G.Correct, polynomial-time Φ.phi, and a PPT public-parameter
sampler samp, Yao.oneSidedFamily G satisfies ProtocolFamily.SemiHonestSecure at every static
coalition I:
I = ∅(no corruption): exact simulation fromn = 1on;I = {0}(corrupted garbler):Yao.hybridSemiHonestSecure_oneSided_garbler(no computational assumption);I = {1}(corrupted evaluator):Scheme.PrvSimSecureUniversal.yaoOneSidedHybridSemiHonestSecure_evaluatorvia the certified reductionYao.oneSidedEvaluatorToPrvSim;I = Finset.univ(both parties corrupted): exact simulation fromn = 1on.
Semi-honest security of Yao.family G against a corrupted evaluator in the ideal batchOTWorld
oblivious-transfer hybrid model (#6045), under the novel assumption Scheme.PrvSimSecureUniversal:
a step towards Theorem 7 of [LP09] (ePrint 2004/175, §4.2, p. 15), not plain-model
Theorem 7 or its Case 2 (pp. 18–19), which compose with a concrete semi-honest 1-out-of-2
oblivious-transfer protocol. Case 2 first replaces the oblivious-transfer protocol by its simulator,
then the real garbled circuit by a fake one; with the ideal batchOTWorld (batchOTSpec) the first
step is empty, and the second is the prv.sim security of G. When G is prv.sim secure with
one simulator S for every adversary (Scheme.PrvSimSecureUniversal) for side information Φ
computed in polynomial time, G is correct, its encoding is projectiveEncode, and it reads input
lengths and evaluates ev in polynomial time, then for public parameters drawn by any PPT sampler
the PPT simulator family Yao.evaluatorSim G Φ S makes the real and ideal games indistinguishable
for every PPT environment: from n = 1 on, an environment's advantage is the prv.sim advantage
of the certified reduction Yao.evaluatorToPrvSim (Yao.advantage_evaluator_eq,
Yao.isPPT_evaluatorToPrvSim). The other deviations are those of the module documentation.
Semi-honest security of Yao.family G against the corruption of either party in the ideal
batchOTWorld oblivious-transfer hybrid model (#6045), under the novel assumption
Scheme.PrvSimSecureUniversal: a step towards Theorem 7 of [LP09] (ePrint 2004/175,
§4.2, p. 15), not plain-model Theorem 7, which composes with a concrete semi-honest 1-out-of-2
oblivious-transfer protocol. The oblivious transfers are the ideal batchOTWorld (batchOTSpec),
and the module documentation lists the other deviations (uniform environments that choose the
inputs, a setup law, the scheme as a parameter). The garbling scheme G is prv.sim secure with
one simulator for every adversary (Scheme.PrvSimSecureUniversal) for side information Φ computed
in polynomial time; it has polynomial-time algorithms (Scheme.IsEfficient), it is correct, and its
encoding is projectiveEncode; and the public parameters are drawn by a PPT sampler samp. Then
Yao.family G is semi-honest secure, in the sense of ProtocolFamily.SemiHonestSecure, against
the corruption of the garbler (Yao.hybridSemiHonestSecure_garbler, which needs no assumption) and
of the evaluator (Scheme.PrvSimSecureUniversal.yaoHybridSemiHonestSecure_evaluator, through the
certified reduction Yao.evaluatorToPrvSim). The modular form over a garbling scheme follows
[BHR12b], §7.1 (Theorem 14, p. 35), whose quantifiers are ∀ B ∃ S on both
sides.