Documentation

CslibFrontier.Crypto.Protocols.UC.PushProperties

Fuel Monotonicity, Truncation Bounds, and Pull-to-Push Bridge for UC Execution #

This module proves fuel-monotonicity, truncation-error, and halting-stability properties for the single-token push runtime in CslibFrontier/Crypto/Protocols/UC/PushExecution.lean, together with a 3-node pull-to-push execution bridge from Cslib.Crypto.Protocols.UC.exec to PushSystem (call-bounded, fixed 3-node set, non-PPT scheduler step; #6043 remains open).

Main definitions #

Main results #

Fuel Monotonicity, Truncation Bounds, and Halting Stability #

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushRun_some_mono {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) {fuel₁ fuel₂ : ℕ} (h : fuel₁ ≤ fuel₂) (b : Bool) :
(pushRun S κ z fuel₁).eval (some b) ≤ (pushRun S κ z fuel₂).eval (some b)

Fuel monotonicity for pushRun: once the initial node can halt with some b, increasing the step budget never decreases the probability of some b.

theorem Cslib.Crypto.Protocols.UC.Push.support_pushRun_some_mono {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) {fuel₁ fuel₂ : ℕ} (h : fuel₁ ≤ fuel₂) {b : Bool} (hb : some b ∈ (pushRun S κ z fuel₁).eval.support) :
some b ∈ (pushRun S κ z fuel₂).eval.support

Support monotonicity for pushRun: any concrete outcome some b in the support at fuel₁ remains in the support at every fuel₂ ≥ fuel₁.

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushRun_none_antitone {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) {fuel₁ fuel₂ : ℕ} (h : fuel₁ ≤ fuel₂) :
(pushRun S κ z fuel₂).eval none ≤ (pushRun S κ z fuel₁).eval none

Antitonicity of timeout probability: the probability that pushRun returns none never increases when additional fuel is supplied.

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushRun_some_le_add_none {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) {fuel₁ fuel₂ : ℕ} (h : fuel₁ ≤ fuel₂) (b : Bool) :
(pushRun S κ z fuel₂).eval (some b) ≤ (pushRun S κ z fuel₁).eval (some b) + (pushRun S κ z fuel₁).eval none

Two-fuel upper bound on some b: extra fuel can shift at most the earlier timeout mass eval (pushRun S κ z fuel₁) none into some b.

@[simp]
theorem Cslib.Crypto.Protocols.UC.Push.eval_pushExec_true_eq {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) (fuel : ℕ) :
(pushExec S κ z fuel).eval true = (pushRun S κ z fuel).eval (some true)

pushExec outputs true exactly when pushRun outputs some true.

theorem Cslib.Crypto.Protocols.UC.Push.abs_toReal_pushExec_sub_le {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) {fuel₁ fuel₂ : ℕ} (h : fuel₁ ≤ fuel₂) :
|((pushExec S κ z fuel₁).eval true).toReal - ((pushExec S κ z fuel₂).eval true).toReal| ≤ ((pushRun S κ z fuel₁).eval none).toReal

Two-fuel truncation error bound for pushExec: when fuel₁ ≤ fuel₂, the difference in acceptance probability is at most the probability that pushRun has not halted at fuel₁ steps. (By Game.coe_advantage, the left-hand side equals (Game.advantage _ _ : ℝ).)

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushRun_eq_of_none_eq_zero {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) {fuel₀ fuel : ℕ} (hzero : (pushRun S κ z fuel₀).eval none = 0) (hle : fuel₀ ≤ fuel) :
(pushRun S κ z fuel).eval = (pushRun S κ z fuel₀).eval

Halting stability for pushRun: if the timeout probability at fuel₀ is zero, then the entire output distribution is invariant for all fuel ≥ fuel₀.

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushExec_eq_of_none_eq_zero {m : ℕ} {Msg : Type} (S : PushSystem m Msg) (κ : ℕ) (z : List Bool) {fuel₀ fuel : ℕ} (hzero : (pushRun S κ z fuel₀).eval none = 0) (hle : fuel₀ ≤ fuel) :
(pushExec S κ z fuel).eval = (pushExec S κ z fuel₀).eval

Halting stability for pushExec: if the timeout probability at fuel₀ is zero, then the output distribution of pushExec is invariant for all fuel ≥ fuel₀.

Pull-to-Push Bridge for UC.exec #

inductive Cslib.Crypto.Protocols.UC.Push.UCMsg (n : ℕ) (In Out NetQ NetR AdvQ AdvR : Type) :

Messages exchanged in the 3-node push simulation of UC.exec:

  • partyQuery {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (i : Fin n) (x : In) : UCMsg n In Out NetQ NetR AdvQ AdvR
  • partyReply {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (o : Option Out) : UCMsg n In Out NetQ NetR AdvQ AdvR
  • advQuery {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (q : AdvQ) : UCMsg n In Out NetQ NetR AdvQ AdvR
  • advReply {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (r : AdvR) : UCMsg n In Out NetQ NetR AdvQ AdvR
  • netQuery {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (q : RoutedNetQ n In NetQ) : UCMsg n In Out NetQ NetR AdvQ AdvR
  • netReply {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (r : RoutedNetR Out NetR) : UCMsg n In Out NetQ NetR AdvQ AdvR
def Cslib.Crypto.Protocols.UC.Push.ucPushSystem {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (π : Protocol n In Out NetQ NetR) (A : ExecAdversary n In Out NetQ NetR AdvQ AdvR) (C : Finset (Fin n)) (Z : Environment n In Out AdvQ AdvR) :
PushSystem 3 (UCMsg n In Out NetQ NetR AdvQ AdvR)

Library construction (no cited definition): explicit 3-node PushSystem embedding a sequential UC.exec execution (0 = environment Z, 1 = adversary A, 2 = routed protocol corruptRouter C (π κ C)), with all writes allowed. Call-bounded, fixed 3-node set, non-PPT scheduler step (#6043 remains open).

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushRun_ucPushSystem {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (π : Protocol n In Out NetQ NetR) (A : ExecAdversary n In Out NetQ NetR AdvQ AdvR) (C : Finset (Fin n)) (Z : Environment n In Out AdvQ AdvR) (κ : ℕ) (z : List Bool) {bZ tA fuel : ℕ} (hZ : (Z κ z).IsQueryBounded bZ) (hA : (A κ C).IsBounded tA) (hfuel : 2 * bZ * (tA + 1) + 1 ≤ fuel) :
(pushRun (ucPushSystem π A C Z) κ z fuel).eval = PMF.map some (exec π A C Z κ z).eval

Pull-to-push bridge for pushRun: when Z κ z makes at most bZ external queries, each activation of A κ C makes at most tA calls, and fuel ≥ 2 * bZ * (tA + 1) + 1, the 3-node push execution ucPushSystem has the exact same output distribution as UC.exec (wrapped in some). Call-bounded, fixed 3-node set, non-PPT scheduler step (#6043 remains open).

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushExec_ucPushSystem {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (π : Protocol n In Out NetQ NetR) (A : ExecAdversary n In Out NetQ NetR AdvQ AdvR) (C : Finset (Fin n)) (Z : Environment n In Out AdvQ AdvR) (κ : ℕ) (z : List Bool) {bZ tA fuel : ℕ} (hZ : (Z κ z).IsQueryBounded bZ) (hA : (A κ C).IsBounded tA) (hfuel : 2 * bZ * (tA + 1) + 1 ≤ fuel) :
(pushExec (ucPushSystem π A C Z) κ z fuel).eval = (exec π A C Z κ z).eval

Pull-to-push bridge for pushExec: under the same query bounds and fuel threshold 2 * bZ * (tA + 1) + 1 ≤ fuel, pushExec (ucPushSystem π A C Z) has the exact same Boolean output distribution as UC.exec.

theorem Cslib.Crypto.Protocols.UC.Push.eval_pushExec_ucPushSystem_of_polyBounded {n : ℕ} {In Out NetQ NetR AdvQ AdvR : Type} (π : Protocol n In Out NetQ NetR) (A : ExecAdversary n In Out NetQ NetR AdvQ AdvR) (C : Finset (Fin n)) (Z : Environment n In Out AdvQ AdvR) {pZ pA : Polynomial ℕ} (hZ : Z.PolyBounded pZ) (hA : Adversary.PolyBounded A pA) (κ : ℕ) (z : List Bool) {fuel : ℕ} (hfuel : 2 * Polynomial.eval κ pZ * (Polynomial.eval κ pA + 1) + 1 ≤ fuel) :
(pushExec (ucPushSystem π A C Z) κ z fuel).eval = (exec π A C Z κ z).eval

Pull-to-push bridge specialized to Environment.PolyBounded and Adversary.PolyBounded: for any fuel ≥ 2 * (pZ.eval κ) * (pA.eval κ + 1) + 1, pushExec (ucPushSystem π A C Z) matches UC.exec.