The round hybrids of a composed protocol as games of one environment #
CslibFrontier/Crypto/Protocols/MPC/Composition/Hybrid.lean bounds the subprotocol-replacement gap
of a composed protocol by Composition.replacementBound, an expectation over the earlier rounds of
the advantages of distinguishers that depend on the outcome of these rounds. The absolute value is
inside that expectation, so the bound cannot be compared with the advantage of one distinguisher
that samples the earlier rounds itself: E |X| ≥ |E X|.
This module gives the hybrid argument with the absolute value outside. The j-th hybrid of the
kernel program Composition.kernelRun draws the first j oracle rounds from the real kernel and
the later ones from the ideal kernel. Consecutive hybrids differ in the kernel of one oracle round,
and both are the game of one environment, Composition.roundEnv: it runs the first j oracle
rounds on the real kernel and stops at the next one with a Composition.RoundChallenge: the
operation of that round, the corrupted slots, the query tuple, and a guessing stage, the program
Composition.roundDistinguisher, which simulates the remaining rounds and runs the given test.
Composition.roundGame κ draws the challenged round from the kernel κ and runs the guessing
stage. The environment does not depend on κ, so for κ the ideal and the real joint distribution
of a subprotocol the two games are the ideal and the real semi-honest game of that subprotocol
against one environment that chooses the input tuple.
Everything here is original bookkeeping for the hybrid argument in the proof of Goldreich's composition theorem (Section 7.5.2.1, Theorem 7.5.7), not a cited statement. The statements are equalities of distributions and triangle inequalities: there is no security parameter, the first stage of an environment is a distribution rather than a program, because it draws the earlier rounds from the real joint distributions, and nothing is claimed about the efficiency of either stage. The asymptotic composition theorem is not proved here (#6045).
Main definitions #
Cslib.Crypto.Protocols.MPC.Schedule.oracleRounds: the number of oracle rounds of a schedule.Cslib.Crypto.Protocols.MPC.Composition.RoundChallenge: a challenged oracle round with its guessing stage.Cslib.Crypto.Protocols.MPC.Composition.roundGame: the game that draws a challenged round from a kernel.Cslib.Crypto.Protocols.MPC.Composition.roundEnv: the environment of thej-th hybrid hop of a kernel program.Cslib.Crypto.Protocols.MPC.composeRoundEnv: the environment of thej-th hybrid hop of a composed protocol, which also samples the outer coins.
Main results #
Cslib.Crypto.Protocols.MPC.Composition.roundEnv_zero_bind_roundGame,Cslib.Crypto.Protocols.MPC.Composition.roundEnv_succ_bind_roundGame,Cslib.Crypto.Protocols.MPC.Composition.roundEnv_bind_roundGame_of_oracleRounds_le: the hybrids of a kernel program are the games ofroundEnv; the first is the ideal run, the last the real run, and the ideal game of hopj + 1is the real game of hopj.Cslib.Crypto.Protocols.MPC.composeRoundEnv_zero_bind_roundGame,Cslib.Crypto.Protocols.MPC.composeRoundEnv_succ_bind_roundGame,Cslib.Crypto.Protocols.MPC.composeRoundEnv_bind_roundGame_of_oracleRounds_le: the same for a composed protocol, between the outer protocol againstcomposeDistinguisherand the composed protocol.Cslib.Crypto.Protocols.MPC.semiHonestAdvantage_compose_le_sum_roundGame: the advantage againstP.compose Subis at most the advantage ofcomposeDistinguisheragainstPplus the sum over the oracle rounds of the advantage of one environment between the ideal and the real game of the challenged round.Cslib.Crypto.Protocols.MPC.Composition.bind_elim_bind_roundGame: an outer stage followed by an environment is one environment.Cslib.Crypto.Protocols.MPC.advantage_bind_compose_le_add_sum_roundGame: the same bound when the protocols, inputs and distinguisher depend on the outcome of a common outer stage, such as a trusted setup or the environment of an enclosing composition, with every absolute value outside the expectation over it.
References #
- O. Goldreich, Foundations of Cryptography, Volume 2: Basic Applications, Section 7.5.2.1 (Theorem 7.5.7).
The number of oracle rounds of a schedule.
A challenged oracle round. The oracle operation op of the round, the corrupted slots
coalition, the query tuple query of the slots, and the guessing stage guess, a program that
turns the views of the corrupted slots in a subprotocol for op and the answers of all slots into
a bit.
- op : spec₁.Op
The oracle operation of the challenged round.
The corrupted slots of the operation.
The query tuple of the slots.
- guess : ((s : ↥self.coalition) → PartyView (spec₁.Query self.op) (Coins₂ self.op) (sc₂ self.op) ↑s) × ((s : Fin (spec₁.arity self.op)) → spec₁.Answer self.op s) → ProbComp Bool
The guess from the views of the corrupted slots and the answers of all slots.
The game of a challenged round on the kernel κ. An environment either has already decided
its bit, or it stops at a challenged round c; the views of the corrupted slots and the answers of
that round are then drawn from κ c.op c.coalition c.query and given to the guessing stage. For
κ the ideal and the real joint distribution of a subprotocol, the two games on c are the two
games of semiHonestAdvantage for that subprotocol, on the input tuple c.query against
c.guess.
Two stages as one environment. An outer stage e that either decides a bit or produces an
index a, followed by an environment g a, is one environment: its round game is the outer stage
followed by the round game of g a.
The environment of the j-th hybrid hop of a kernel program. It runs steps from the
states st, drawing the first j oracle rounds from the kernel ν, and stops at the next oracle
round with the challenge of that round. The guessing stage is roundDistinguisher: it delivers the
answers, runs the remaining rounds with the ideal functionalities W₁ and the simulators S₂,
puts the given views in front of the result and runs the test D. When steps has at most j
oracle rounds, the environment runs D itself and returns the bit.
roundGame on the ideal joint distributions after this environment is the j-th hybrid of the
kernel program, and roundGame ν the hybrid j + 1 (roundEnv_succ_bind_roundGame).
The first hybrid is the ideal run. The game of the environment of hop 0 on the ideal
joint distributions is the kernel program on these distributions followed by the test.
Consecutive hybrids differ in the kernel of one round. The game of the environment of hop
j + 1 on the ideal joint distributions is the game of the environment of hop j on the kernel
ν: both draw the first j + 1 oracle rounds from ν and the later ones from the ideal joint
distributions.
The last hybrid is the real run. When steps has at most j oracle rounds, the
environment of hop j challenges no round, and its game on any kernel κ is the kernel program on
ν followed by the test.
The environment of the j-th hybrid hop of a composed protocol. For the outer protocol P
on the input tuple x and a distinguisher D of the coalition I's views of P.compose Sub, it
samples the outer coins, runs P.steps with the first j oracle rounds drawn from the real joint
distributions (Sub op).realJoint W₂ of the subprotocols, and stops at the next oracle round with
the challenge of that round (Composition.roundEnv): the guessing stage
Composition.roundDistinguisher simulates the later rounds with W₁ and S₂ and runs D.
The first hybrid of a composed protocol. The ideal game of the environment of hop 0 is
the real execution of the outer protocol P in W₁ against the reduction
composeDistinguisher P S₂ I x D.
Consecutive hybrids of a composed protocol. The ideal game of the environment of hop
j + 1 is the real game of the environment of hop j.
The last hybrid of a composed protocol. When P has at most j oracle rounds, the game of
the environment of hop j on any kernel κ is the real execution of P.compose Sub in W₂
against D.
Composition bound with one environment per oracle round. For every outer protocol P in
the oracle world W₁, outer simulators S₁, subprotocols Sub in W₂ and subprotocol simulators
S₂, the semi-honest advantage of D against P.compose Sub with the composed simulator is at
most the advantage of the reduction composeDistinguisher P S₂ I x D against P with S₁ I, plus
the sum over the oracle rounds j of P of the advantage of the environment composeRoundEnv of
hop j between the ideal and the real game of its challenged round. Each summand is the absolute
difference of two acceptance probabilities of one environment, which samples the outer coins and
the earlier rounds itself; compare semiHonestAdvantage_compose_le_replacementBound, where the
absolute value is inside the expectation over these.
This is the concrete, per-instance form of the hybrid argument for Goldreich's Theorem 7.5.7, not
the cited theorem: nothing is assumed about P, Sub or the simulators, and no efficiency of the
environments is claimed.
Composition bound under common outer randomness, with one environment per oracle round.
Let p be the distribution of an outer stage that either decides a bit or produces an index a,
such as the description drawn by a trusted setup together with the inputs chosen by an
environment, or the challenge of an environment of an enclosing composition. Let the outer protocol
P a, the subprotocols, the simulators, the coalition, the inputs and the distinguisher D a all
depend on a, with at most N oracle rounds. The advantage between the ideal game of
(P a).compose (Sub a) with the composed simulator and its real game in W₂ a, both after the
outer stage, is at most the advantage between the ideal and the real game of the outer protocol
P a in W₁ a against composeDistinguisher, after the outer stage, plus the sum over j < N of
the advantage of one environment between the ideal and the real game of its challenged round: this
environment runs the outer stage and then composeRoundEnv (P a) … j. Every absolute value is
outside the expectation over the outer stage, the outer coins and the earlier rounds.
For an outer stage that never decides, take p = q.map Sum.inr. Nothing is assumed about the
protocols or the simulators, and no efficiency is claimed.