Documentation

CslibFrontier.Crypto.Protocols.UC.Emulation

UC emulation against budgeted adversaries and environments #

UC.EmulatesWithin π φ g ε says that protocol π UC-emulates protocol φ with simulator overhead g and error ε, against interaction-bounded adversaries and environments: for every adversary A whose activations make at most pA.eval κ calls there is a simulator S whose activations make at most pS.eval κ calls, with pS bounded by g at κ + pA.eval κ (UC.SimPolyBound), such that for every set of corrupted parties C and every environment Z making at most pZ.eval κ calls, Z distinguishes (π, A) from (φ, S) with advantage at most ε pA pZ κ. The error may depend on the security parameter and on the budgets of the adversary and the environment, as in [Can20a]. UC.RealizesWithin π F g ε is emulation of the ideal protocol of the functionality F.

The simulator is chosen after the adversary and before the environment, so one simulator serves every environment. Like every ExecAdversary, it is a family S κ C that receives the static corruption set C, as in static-corruption UC. Emulation is reflexive with zero error (UC.EmulatesWithin.refl) and transitive (UC.EmulatesWithin.trans): the simulators compose and the errors add, the second error being evaluated at the budget g₁₂.comp (X + pA) of the intermediate simulator, which requires that error to be monotone in the adversary's budget.

Budgets count calls (Cslib.Crypto.Protocols.UC.Machine.IsBounded); they bound interaction, not running time.

UC.Emulates π φ is the asymptotic notion: every adversary with a polynomial budget has a simulator with a polynomial budget such that, for every polynomial environment budget pZ, one negligible function of κ bounds the advantage of every environment with budget pZ, uniformly in the corrupted parties and the auxiliary input. UC.EmulatesWithin π φ g ε implies it whenever every error ε pA pZ is negligible (UC.EmulatesWithin.emulates). It is reflexive and transitive, and its transitivity needs no monotonicity, because the negligible bound for the second step is chosen after the intermediate simulator. Since all participants are only call-bounded, these are notions of security against interaction-bounded, computationally unbounded participants. They are not UC security against polynomial-time machines, which restricts the simulator as well as the adversary and the environment, and no implication to or from that notion is established here.

Main definitions #

Main results #

References #

def Cslib.Crypto.Protocols.UC.EmulatesWithin {n : ℕ} {In Out NetQ₁ NetR₁ NetQ₂ NetR₂ : Type} (π : Protocol n In Out NetQ₁ NetR₁) (φ : Protocol n In Out NetQ₂ NetR₂) (g : Polynomial ℕ) (ε : Polynomial ℕ → Polynomial ℕ → ℕ → NNReal) :

Concrete UC emulation: protocol π emulates protocol φ with simulator overhead g and error ε. Every adversary A with per-activation budget pA has a simulator S with per-activation budget pS ≤ g (κ + pA κ) such that every environment with budget pZ, whatever the corrupted parties, distinguishes (π, A) from (φ, S) with advantage at most ε pA pZ κ.

Source. This is UC emulation with emulation slack ε and simulation overhead g of [Can20a] (Cryptology ePrint Archive 2000/067, revision of February 11, 2020), Definition 15, p. 51, in the statistical setting of Section 4.4, p. 50, where the adversary and the environment have unbounded complexity. It differs from the source as follows.

  • Adversaries, simulators and environments are bounded by the calls they make per activation, not by running time, and their computation is otherwise unbounded. For the simulator this is the variant that Section 4.4 says gives a weaker guarantee, a simulator of unlimited computational power; here its call budget is at most g at κ + pA κ, where Definition 15 bounds its running time by g(pA).
  • Corruptions are static: the corrupted set C is fixed before the execution; the simulator is chosen before C is quantified but, as an ExecAdversary, receives C as an argument, as with the non-adaptive corruptions of Section 7.1.1, p. 74.
  • Environments are not identity-bounded (Canetti's ξ = {0,1}*), and the bound holds at every κ and for auxiliary inputs z of every length, where Definition 15 asks for it at large enough k and for inputs of length pE(k).
  • A protocol has a fixed set of n parties: it is one closed machine per security parameter and corrupted set, with a party port and a network port (UC.Protocol), where the source's machine instances, with their identities, are created during the execution (Section 3.1, p. 21). Corruption reroutes the corrupted parties' ports to the adversary (UC.corruptRouter); any further corruption behaviour is the protocol's own dependence on the corrupted set.

Status. This notion is novel to this library. Compared with Definition 15 for polynomial-time participants, it admits more adversaries and environments, and also more simulators, in a different execution model. It is not source-identical, and no implication to or from Definition 15 is established here. It is plausible as a statistical, call-bounded notion of emulation: it is reflexive and transitive (EmulatesWithin.refl, EmulatesWithin.trans) and closed under composition (EmulatesWithin.compose). It is not trivial: by not_realizesWithin_fcom, a plain commitment scheme with one commitment and one opening message whose honest acceptance probabilities are large enough does not realize fcom under it.

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.UC.RealizesWithin {n : ℕ} {In Out NetQ NetR BackQ BackR : Type} (π : Protocol n In Out NetQ NetR) (F : IdealFunctionality n In Out BackQ BackR) (g : Polynomial ℕ) (ε : Polynomial ℕ → Polynomial ℕ → ℕ → NNReal) :

Concrete UC realization: protocol π emulates the ideal protocol of F with simulator call overhead g and distinguishing error ε. This is UC realization of [Can20a] (ePrint revision of February 11, 2020), Definition 20, p. 58, with EmulatesWithin in place of Definition 9's UC emulation (see EmulatesWithin for the concrete call-budget and error bounds and the differences from Definition 15), and without Definition 20's further requirement that π be subroutine-respecting. Like EmulatesWithin, it is novel to this library: it is not source-identical, and no implication to or from Definitions 15 or 20 is established here. It implies Realizes whenever every ε pA pZ is negligible (EmulatesWithin.emulates), and is plausible for the same reasons (RealizesWithin.compose_trans, not_realizesWithin_fcom).

theorem Cslib.Crypto.Protocols.UC.EmulatesWithin.mono {n : ℕ} {In Out NetQ₁ NetR₁ NetQ₂ NetR₂ : Type} {π : Protocol n In Out NetQ₁ NetR₁} {φ : Protocol n In Out NetQ₂ NetR₂} {g : Polynomial ℕ} {ε ε' : Polynomial ℕ → Polynomial ℕ → ℕ → NNReal} (h : EmulatesWithin π φ g ε) (hε : ∀ (pA pZ : Polynomial ℕ) (κ : ℕ), ε pA pZ κ ≤ ε' pA pZ κ) :
EmulatesWithin π φ g ε'

A larger error bound is still an error bound.

theorem Cslib.Crypto.Protocols.UC.EmulatesWithin.refl {n : ℕ} {In Out NetQ NetR : Type} (π : Protocol n In Out NetQ NetR) :
EmulatesWithin π π Polynomial.X fun (x x_1 : Polynomial ℕ) (x_2 : ℕ) => 0

Every protocol emulates itself with zero error: the adversary is its own simulator.

theorem Cslib.Crypto.Protocols.UC.EmulatesWithin.trans {n : ℕ} {In Out NetQ₁ NetR₁ NetQ₂ NetR₂ NetQ₃ NetR₃ : Type} {π₁ : Protocol n In Out NetQ₁ NetR₁} {π₂ : Protocol n In Out NetQ₂ NetR₂} {π₃ : Protocol n In Out NetQ₃ NetR₃} {g₁₂ g₂₃ : Polynomial ℕ} {ε₁₂ ε₂₃ : Polynomial ℕ → Polynomial ℕ → ℕ → NNReal} (h₁₂ : EmulatesWithin π₁ π₂ g₁₂ ε₁₂) (h₂₃ : EmulatesWithin π₂ π₃ g₂₃ ε₂₃) (hmono : ∀ (p p' pZ : Polynomial ℕ) (κ : ℕ), (∀ (κ' : ℕ), Polynomial.eval κ' p ≤ Polynomial.eval κ' p') → ε₂₃ p pZ κ ≤ ε₂₃ p' pZ κ) :
EmulatesWithin π₁ π₃ (g₂₃.comp (Polynomial.X + g₁₂)) fun (pA pZ : Polynomial ℕ) (κ : ℕ) => ε₁₂ pA pZ κ + ε₂₃ (g₁₂.comp (Polynomial.X + pA)) pZ κ

Transitivity of concrete UC emulation. If π₁ emulates π₂ with overhead g₁₂ and error ε₁₂, and π₂ emulates π₃ with overhead g₂₃ and error ε₂₃ monotone in the adversary's budget, then π₁ emulates π₃: the simulator for π₂'s simulator is a simulator for the original adversary, and the errors add, the second at the intermediate simulator's budget bound.

Negligible error #

def Cslib.Crypto.Protocols.UC.Emulates {n : ℕ} {In Out NetQ₁ NetR₁ NetQ₂ NetR₂ : Type} (π : Protocol n In Out NetQ₁ NetR₁) (φ : Protocol n In Out NetQ₂ NetR₂) :

UC emulation with negligible error: every adversary with a polynomial budget has a simulator with a polynomial budget, such that for each polynomial environment budget one negligible function bounds the advantage of every such environment, for all corrupted parties and auxiliary inputs.

Source. This is UC emulation, [Can20a] (Cryptology ePrint Archive 2000/067, revision of February 11, 2020), Definition 9, p. 43: for every adversary A there is a simulator S such that every environment's output with (φ, S) is indistinguishable from its output with (π, A). It is read in the statistical setting of Section 4.4, p. 50, and differs from the source as EmulatesWithin does: participants are bounded by their calls per activation rather than by polynomial running time and are otherwise computationally unbounded, the simulator included; corruptions are static; environments are not identity-bounded; protocols have a fixed set of n parties, with corruption rerouting their ports; and one negligible function bounds every environment with budget pZ, at every κ and for every auxiliary input. It therefore admits more adversaries and environments than Definition 9, and also more simulators.

Status. This notion is novel to this library. It is not source-identical, and no implication to or from Definition 9 is established here. It follows from EmulatesWithin with negligible errors (EmulatesWithin.emulates). It is plausible as a statistical, call-bounded notion of emulation: it is reflexive and transitive (Emulates.refl, Emulates.trans) and closed under composition (Emulates.compose), and by not_realizes_fcom no plain one-message commitment scheme with polynomial-call-bounded verification and nontrivial completeness realizes fcom under it.

@[reducible, inline]
abbrev Cslib.Crypto.Protocols.UC.Realizes {n : ℕ} {In Out NetQ NetR BackQ BackR : Type} (π : Protocol n In Out NetQ NetR) (F : IdealFunctionality n In Out BackQ BackR) :

UC realization with negligible error: protocol π emulates the ideal protocol of F. This is UC realization of [Can20a] (ePrint revision of February 11, 2020), Definition 20, p. 58, with Emulates in place of Definition 9's UC emulation (see Emulates for the differences), and without Definition 20's further requirement that π be subroutine-respecting. Like Emulates, it is novel to this library: it is not source-identical, and no implication to or from Definition 20 is established here. It is plausible for the same reasons (Realizes.compose, not_realizes_fcom).

theorem Cslib.Crypto.Protocols.UC.EmulatesWithin.emulates {n : ℕ} {In Out NetQ₁ NetR₁ NetQ₂ NetR₂ : Type} {π : Protocol n In Out NetQ₁ NetR₁} {φ : Protocol n In Out NetQ₂ NetR₂} {g : Polynomial ℕ} {ε : Polynomial ℕ → Polynomial ℕ → ℕ → NNReal} (h : EmulatesWithin π φ g ε) (hε : ∀ (pA pZ : Polynomial ℕ), Negligible (ε pA pZ)) :
Emulates π φ

Concrete emulation whose errors are negligible for all budgets is emulation.

theorem Cslib.Crypto.Protocols.UC.Emulates.refl {n : ℕ} {In Out NetQ NetR : Type} (π : Protocol n In Out NetQ NetR) :
Emulates π π

Every protocol emulates itself.

theorem Cslib.Crypto.Protocols.UC.Emulates.trans {n : ℕ} {In Out NetQ₁ NetR₁ NetQ₂ NetR₂ NetQ₃ NetR₃ : Type} {π₁ : Protocol n In Out NetQ₁ NetR₁} {π₂ : Protocol n In Out NetQ₂ NetR₂} {π₃ : Protocol n In Out NetQ₃ NetR₃} (h₁₂ : Emulates π₁ π₂) (h₂₃ : Emulates π₂ π₃) :
Emulates π₁ π₃

UC emulation is transitive.