Adaptive corruptions (snapshot model) in the UC execution #
Extends CslibFrontier.Crypto.Protocols.UC.Execution with CorruptionMode (.static vs
.adaptive) and a snapshot-based corruption exposure interface (PartyMemory: .erasing vs
.nonErasing), inspired by Section 7.1 (pp. 28:69–70), Section 7.1.1 (p. 28:71), and
Section 7.2 (pp. 28:73–74) of [Can20a] (J. ACM pagination; ePrint 2000/067 of Feb 11, 2020,
p. 74).
- Snapshot corruption model (not Canetti §7.1.1 write-once storage):
AdaptiveProtocol.viewis an arbitrary caller-supplied projection (for instance,View := Unitcan hide coins still stored in the inner machine), andAdaptiveProtocol.recordSnapshotappendsP.view κ j s'for every partyjafter each inner activation (.partyor.net). Thus.nonErasinghistories omit intra-activation discarded coins while exposing global inner-activation counts.PartyMemorycontrols only whetherCorruptionReport.historyreturnsnoneor that snapshot list; establishing [Can20a] §7.1.1's write-once / non-erasing storage restriction, mandatory coin exposure, and per-party activation granularity remains open. - Status query and adversary class:
AdaptivePartyQ.statusmodels the identity-revealing (f = id) "Report corruption status" query on the corruption aggregation ITI (p. 28:70).AdaptiveEmulatesWithin/AdaptiveEmulatesare call-bounded statistical notions.
Scope #
[Can20a] §7.1.1 write-once / non-erasing storage restrictions and mandatory coin-exposure /
per-party activation-granularity guarantees, universal composition under adaptive corruption,
multiple sessions, proactive/passive modes, subroutine corruption paths, PPT bounds, and
[CF01] Theorems 8 and 11 remain open and out of scope. Existing static definitions
in Execution, Emulation, DummyAdversary, and Composition are unchanged.
Main definitions #
Cslib.Crypto.Protocols.UC.CorruptionMode,PartyMemory,AdaptiveProtocol,CorruptionReport,AdaptiveRouterState: corruption modes, memory, protocols, and router state.Cslib.Crypto.Protocols.UC.AdaptivePartyQ,adaptivePartySpec,AdaptiveNetQ,AdaptiveNetR,adaptiveProtocolSpec,adaptiveExecSpec: adaptive execution ports.Cslib.Crypto.Protocols.UC.adaptiveRouter,AdaptiveAdversary,AdaptiveEnvironment,Environment.toAdaptive,IdealFunctionality.toAdaptive: participants and adaptive routing.Cslib.Crypto.Protocols.UC.liftAdaptiveNet,liftAdaptiveAdversary,adaptiveExecMachine,adaptiveExec,adaptiveAdvantage,AdaptiveEmulatesWithin,AdaptiveEmulates: experiment and call-bounded emulation.Cslib.Crypto.Protocols.UC.AdaptiveProtocol.toStatic,AdaptiveAdversary.ofStatic: static special case embeddings.
Main results #
Cslib.Crypto.Protocols.UC.adaptiveAdvantage_self,adaptiveAdvantage_comm,adaptiveAdvantage_triangle: pseudometric laws foradaptiveAdvantage.Cslib.Crypto.Protocols.UC.Environment.PolyBounded.toAdaptive,AdaptiveEmulatesWithin.{mono, refl, trans, emulates},AdaptiveEmulates.{refl, trans}.Cslib.Crypto.Protocols.UC.IdealFunctionality.toStatic_toAdaptive: functionality round-trip.Cslib.Crypto.Protocols.UC.runFrom_adaptiveExecMachine_intertwine,adaptiveExec_static_eq_adaptive_of_noCorrupt,adaptiveExec_static_ofStatic,adaptiveExec_adaptive_ofStatic: network congruence and static special case.
References #
Modes, protocols, reports, and ports #
When corruption may occur during an execution: either only at invocation (static) or at any
time (adaptive) ([Can20a], Section 7.1.1, p. 28:71).
- static : CorruptionMode
- adaptive : CorruptionMode
Instances For
Router trace-exposure flag in the snapshot corruption model: .erasing exposes only the
post-corruption view snapshot (CorruptionReport.history = none), while .nonErasing exposes the
recorded list of per-activation P.view snapshots (some (s.trace i)). This flag governs only
CorruptionReport.history in adaptiveRouter; it does not enforce [Can20a] §7.1.1's
write-once storage restriction, coin exposure, or per-party activation granularity (which stay
open).
- erasing : PartyMemory
- nonErasing : PartyMemory
Instances For
An n-party protocol equipped for the snapshot adaptive-corruption model: a closed machine per
security parameter κ, an arbitrary caller-supplied per-party view projection view (which need
not expose all stored coins or private state, e.g. View := Unit), a state transition onCorrupt
applied when party i is corrupted, and a trace-exposure flag memory.
The protocol machine at security parameter
κ.Arbitrary caller-supplied projection from inner protocol state to party
i's reported view (may hide stored coins or state, e.g. withView := Unit).The protocol's own reaction when party
iis corrupted (replacingπ κ C's dependence onCin staticProtocol).- memory : PartyMemory
Router trace-exposure flag selecting whether past view snapshots are omitted or included in
CorruptionReport.history.
The corruption report returned to the adversary when corrupting party i: its current view
and, for .nonErasing protocols, the oldest-first history of snapshots since initialization.
- current : View
Party
i's current view at corruption. Oldest-first sequence of snapshots since initialization (
someiff.nonErasing).
Instances For
The state maintained by adaptiveRouter: the inner protocol state, the currently corrupted
parties, and the per-party trace of oldest-first view snapshots.
- inner : S
The inner protocol machine's state.
The set of currently corrupted parties.
Per-party oldest-first snapshot history recorded at
initand after each inner activation.
Environment-side queries to the party and corruption-status interface: .party i x activates
party i with input x, and .status queries the current set of corrupted parties
([Can20a], Section 7.1, p. 28:70, the identity-revealing f = id case of standard
f-revealing corruption on the corruption aggregation ITI).
- party {n : ℕ} {In : Type} (i : Fin n) (x : In) : AdaptivePartyQ n In
- status {n : ℕ} {In : Type} : AdaptivePartyQ n In
Instances For
Reply types for AdaptivePartyQ: party activations return Option Out, and .status returns
Finset (Fin n).
Adversary-side queries behind adaptiveRouter: drive a corrupted party (party), corrupt a
party (corrupt), or send a protocol network query (net).
- party {n : ℕ} {In NetQ : Type} (i : Fin n) (x : In) : AdaptiveNetQ n In NetQ
- corrupt {n : ℕ} {In NetQ : Type} (i : Fin n) : AdaptiveNetQ n In NetQ
- net {n : ℕ} {In NetQ : Type} (q : NetQ) : AdaptiveNetQ n In NetQ
Instances For
Adversary-side replies behind adaptiveRouter, matching AdaptiveNetQ.
- party {Out NetR View : Type} (out : Option Out) : AdaptiveNetR Out NetR View
- corrupt {Out NetR View : Type} (report : Option (CorruptionReport View)) : AdaptiveNetR Out NetR View
- net {Out NetR View : Type} (r : NetR) : AdaptiveNetR Out NetR View
Instances For
The ports exported by adaptiveRouter: the environment's party/status port and the
adversary's routed network port.
The ports seen by an adaptive environment: the party/status port and the adversary port.
Adaptive router and participants #
Apply P.onCorrupt κ i in canonical order for every i ∈ C₀ at initialization.
Build the corruption report for party i from a router state.
Update the router state after an inner protocol activation by appending every party's P.view
snapshot (so .nonErasing histories reflect global inner-activation counts).
The snapshot-model adaptive corruption router wrapping P.machine κ with initial corruptions
C₀. Initial corruptions apply P.onCorrupt at init. Environment party calls addressed to
corrupted parties are dropped (none, matching static corruptRouter); adversary party calls are
allowed only for corrupted parties; .status returns s.corrupted; .corrupt i is ignored for
i ∉ s.corrupted in .static mode and in .adaptive mode applies P.onCorrupt, inserts i,
and computes P.corruptionReport after P.onCorrupt without recording an extra snapshot of the
onCorrupt transition itself.
An adversary (or simulator) in the adaptive execution: an initial corruption set initial κ at
invocation and an interactive machine talking to the routed network port
AdaptiveNetQ/AdaptiveNetR. Its internal state is generic.
Parties corrupted immediately at invocation for security parameter
κ.- machine : ℕ → Machine (netSpec (AdaptiveNetQ n In NetQ) (AdaptiveNetR Out NetR View)) (netSpec AdvQ AdvR)
The adversary machine talking to
AdaptiveNetQ/AdaptiveNetR.
An environment in the adaptive execution: a program with private coins interacting with the party/status port and the adversary, outputting a bit.
Embed a static execSpec program into adaptiveExecSpec by sending party calls to
AdaptivePartyQ.party and never querying .status.
Embed a static environment into AdaptiveEnvironment as one that never queries .status.
Embed an IdealFunctionality as an AdaptiveProtocol with memory := .erasing,
view-leakage map reveal, and optional corruption-notification state hook onCorrupt
([Can20a], Section 7.2, pp. 28:73–74, standard PID-wise corruption). Marking ideal
functionalities .erasing models that F's internal state belongs to no party and only
reveal is exposed on corruption; rule (1)'s disclosure of party p's past inputs and
subroutine outputs holds when F's state records them and reveal exposes them. When onCorrupt
is supplied, F learns of both initial corruptions (via applyInitialCorruptions) and mid-run
corruptions (via adaptiveRouter), so (F.toAdaptive reveal onCorrupt).toStatic = F.toProtocol
whenever F.init κ C factors as applyInitialCorruptions κ C <$> F.init κ ∅
(IdealFunctionality.toStatic_toAdaptive). In particular, corruption-independent initialization
alone does not yield the static round-trip for an arbitrary onCorrupt hook; it suffices when
paired with the default identity hook fun _ _ s => s
(IdealFunctionality.toStatic_toAdaptive_of_initIndep), whereas deterministically tracked initial
corruptions require the explicit factorization above (and arbitrary C-dependent probabilistic
sampling inside F.init κ C cannot be reconstructed after init and remains outside
AdaptiveProtocol).
Execution and advantage #
Mirror of UC.liftNet for the adaptive left port adaptivePartySpec n In Out (which extends
partySpec n In Out with .status, so UC.liftNet does not apply directly).
Mirror of UC.liftAdversary for adaptivePartySpec n In Out.
The closed machine of an adaptive execution: A placed in front of adaptiveRouter.
The adaptive UC execution experiment: the environment's output bit when interacting with
P and A under mode, at security parameter κ and auxiliary input z.
The advantage of Z in distinguishing (P, A) from (Q, S) under mode. Both worlds run
under the same mode, while each uses its own protocol's memory.
An adaptive execution cannot be distinguished from itself.
The adaptive distinguishing advantage is symmetric.
The triangle inequality for adaptive advantage through an intermediate protocol and adversary.
Budgets and adaptive emulation #
Every activation of P.machine κ makes at most p.eval κ calls.
Every activation of A.machine κ makes at most p.eval κ calls (A.initial is
unconstrained).
At security parameter κ, Z makes at most p.eval κ calls in total, regardless of the
auxiliary input z.
Lifting static queries into adaptiveExecSpec preserves query budgets.
Embedding a static environment into AdaptiveEnvironment preserves its call budget.
Concrete adaptive UC emulation under mode in the snapshot corruption model (statistical,
call-bounded notion inspired by [Can20a], Section 7.1.1, p. 28:71, not a theorem of the
paper; §7.1.1's write-once storage restriction, coin exposure, and per-party activation
granularity remain open). Every adversary A with per-activation call budget pA has a simulator
S with per-activation call budget pS bounded by g at κ + pA.eval κ, such that every
environment Z with call budget pZ distinguishes (P, A) from (Q, S) with advantage at most
ε pA pZ κ.
Asymptotic adaptive UC emulation under mode with negligible error in the snapshot corruption
model (statistical, call-bounded notion inspired by [Can20a], Section 7.1.1, p. 28:71, not
a theorem of the paper; §7.1.1's write-once storage, coin exposure, and activation granularity
remain open).
A larger error bound is still an error bound.
Every adaptive protocol emulates itself with zero error.
Transitivity of concrete adaptive UC emulation.
Concrete adaptive emulation whose errors are negligible for all budgets is asymptotic adaptive emulation.
Every adaptive protocol emulates itself.
Asymptotic adaptive UC emulation is transitive.
Static corruption as a special case #
Convert an adaptive protocol to a static Protocol by applying P.onCorrupt for C during
initialization.
Converting an adaptive protocol to a static one preserves its call budget.
When F.init κ C factors as applyInitialCorruptions κ C <$> F.init κ ∅, converting
F.toAdaptive reveal onCorrupt back to a static Protocol recovers F.toProtocol identically.
Specialization of IdealFunctionality.toStatic_toAdaptive for IdealFunctionality
instances whose initial state ignores C and with default trivial onCorrupt.
Project an AdaptiveNetR reply back to RoutedNetR (ignoring .corrupt, which static
adversaries never send).
Translate a static adversary's network program into AdaptiveNetQ/AdaptiveNetR, sending
only .party and .net queries and never .corrupt.
Lift a static ExecAdversary to an AdaptiveAdversary with initial corruption set C that
never sends .corrupt.
Lifting a static adversary preserves its call budget.
Every external query of program of the form .corrupt i has i ∈ C₀.
An adaptive adversary sends .corrupt i only for parties already in A.initial κ.
A static adversary lifted via AdaptiveAdversary.ofStatic never queries .corrupt.
Sample the initial state of adaptiveExecMachine as independent samples of protocol and
adversary initial states.
Left-port party query step of adaptiveExecMachine.
Left-port .status query step of adaptiveExecMachine.
Network-congruence intertwining for adaptiveExecMachine: two (mode, A) pairs whose
router-lifted adversary activations intertwine under RA (preserving
rs.corrupted = A₁.initial κ) produce equal adaptiveExecMachine outputs.
If A satisfies NoNewCorrupt (it sends .corrupt i only for parties already in
A.initial κ), then .static and .adaptive modes produce the exact same execution.
Running a static adversary lifted via AdaptiveAdversary.ofStatic against P in .static
mode with embedded environment Z.toAdaptive equals the static UC execution exec P.toStatic.
Running a static adversary lifted via AdaptiveAdversary.ofStatic against P in .adaptive
mode with embedded environment Z.toAdaptive also equals the static UC execution
exec P.toStatic, because ofStatic never sends .corrupt.