Documentation

CslibFrontier.Crypto.Protocols.MPC.Advantage

Distinguishing advantage for semi-honest privacy #

PerfectSemiHonestPrivate asks the ideal and real joint view-and-output distributions to be equal. Goldreich's Definitions 7.2.1 and 7.5.1 ask them to be computationally indistinguishable. This module provides the concrete quantity behind that requirement: semiHonestAdvantage proto W f I S x D is the advantage of a distinguisher D, a randomized test on the coalition's views and all parties' outputs, between the ideal execution with simulator S (idealJoint) and the real execution (Protocol.realJoint) on the input tuple x.

The quantity is concrete and per instance: the protocol, input tuple and distinguisher are fixed, and there is no security parameter or efficiency requirement on D or S. A computational security statement bounds it for a class of distinguishers, for instance by the advantage of explicit reductions against a primitive. Perfect privacy is the case where it vanishes for every distinguisher (semiHonestAdvantage_eq_zero_iff).

Singleton coalitions {i} give the two-party form of the definition, with one simulator per corrupted party; singletonView and restrict_singleton move a single view in and out of the coalition-indexed tuples.

Main definitions #

Main results #

References #

noncomputable def Cslib.Crypto.Protocols.MPC.semiHonestAdvantage {m : ℕ} {spec : MultiOracleSpec} {sc : Schedule m spec} {In Coins Out : Fin m → Type} (proto : Protocol m spec sc In Coins Out) (W : MultiOracleWorld spec) (f : Functionality m In Out) (I : Finset (Fin m)) (S : CoalitionSimulator sc In Coins Out I) (x : (i : Fin m) → In i) (D : ((i : ↥I) → PartyView In Coins sc ↑i) × ((i : Fin m) → Out i) → ProbComp Bool) :

The advantage of a distinguisher D between the ideal joint view-and-output distribution of the coalition I with simulator S and the real one of proto in world W, on the input tuple x (cf. Goldreich Def. 7.5.1, Eq. 7.40, p. 696, with a concrete advantage in place of computational indistinguishability).

theorem Cslib.Crypto.Protocols.MPC.semiHonestAdvantage_eq_zero_iff {m : ℕ} {spec : MultiOracleSpec} {sc : Schedule m spec} {In Coins Out : Fin m → Type} (proto : Protocol m spec sc In Coins Out) (W : MultiOracleWorld spec) (f : Functionality m In Out) (I : Finset (Fin m)) (S : CoalitionSimulator sc In Coins Out I) (x : (i : Fin m) → In i) :
(∀ (D : ((i : ↥I) → PartyView In Coins sc ↑i) × ((i : Fin m) → Out i) → ProbComp Bool), semiHonestAdvantage proto W f I S x D = 0) ↔ (idealJoint f I S x).eval = proto.realJoint W I x

Perfect privacy is zero advantage: the ideal and real joint distributions of I are equal exactly when every distinguisher has advantage zero.

theorem Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivate.semiHonestAdvantage_eq_zero {m : ℕ} {spec : MultiOracleSpec} {sc : Schedule m spec} {In Coins Out : Fin m → Type} {proto : Protocol m spec sc In Coins Out} {W : MultiOracleWorld spec} {f : Functionality m In Out} {S : (I : Finset (Fin m)) → CoalitionSimulator sc In Coins Out I} (h : PerfectSemiHonestPrivate proto W f S) (I : Finset (Fin m)) (x : (i : Fin m) → In i) (D : ((i : ↥I) → PartyView In Coins sc ↑i) × ((i : Fin m) → Out i) → ProbComp Bool) :
semiHonestAdvantage proto W f I (S I) x D = 0

Perfect semi-honest privacy gives zero advantage against every distinguisher.

theorem Cslib.Crypto.Protocols.MPC.PerfectSemiHonestPrivateLe.semiHonestAdvantage_eq_zero {m : ℕ} {spec : MultiOracleSpec} {sc : Schedule m spec} {In Coins Out : Fin m → Type} {t : ℕ} {proto : Protocol m spec sc In Coins Out} {W : MultiOracleWorld spec} {f : Functionality m In Out} {S : (I : Finset (Fin m)) → CoalitionSimulator sc In Coins Out I} (h : PerfectSemiHonestPrivateLe t proto W f S) {I : Finset (Fin m)} (hI : I.card ≤ t) (x : (i : Fin m) → In i) (D : ((i : ↥I) → PartyView In Coins sc ↑i) × ((i : Fin m) → Out i) → ProbComp Bool) :
semiHonestAdvantage proto W f I (S I) x D = 0

Threshold perfect semi-honest privacy gives zero distinguishing advantage against every distinguisher for every coalition I with I.card ≤ t.

Singleton coalitions #

def Cslib.Crypto.Protocols.MPC.singletonView {m : ℕ} {spec : MultiOracleSpec} {sc : Schedule m spec} {In Coins : Fin m → Type} {i : Fin m} (v : PartyView In Coins sc i) (j : ↥{i}) :
PartyView In Coins sc ↑j

A single view of party i as a tuple over the coalition {i}.

theorem Cslib.Crypto.Protocols.MPC.restrict_singleton {m : ℕ} {spec : MultiOracleSpec} {sc : Schedule m spec} {In Coins : Fin m → Type} (i : Fin m) (v : (j : Fin m) → PartyView In Coins sc j) :

Restricting a tuple of views to the coalition {i} keeps only the view of i.