State-separating proofs: parallel sessions and distinguishing advantage #
State-separating proofs organize a game-based security argument as an algebra of packages:
stateful programs with an exported and an imported interface, which are composed sequentially and
placed side by side. Here a package is an interactive machine Cslib.Crypto.Protocols.UC.Machine:
sequential composition is Machine.comp, and its linking laws (Machine.link_comp,
Machine.run_comp) are the associativity laws of the package algebra. This file adds
parFin M, thempackagesM jrun side by side as independent sessions, each on its own state, with the queries of the exported interface tagged by their session (sessionSpec m E);par M₁ M₂, two packages run side by side behind the sum of their interfaces;advantage A M₀ M₁, the advantage of the adversaryAin distinguishing two closed packages, with the reduction lawadvantage_compand the hybrid boundadvantage_le_sum_range;eval_run_eq_of_represent, the state-simulation principle: two closed packages give every adversary the same output distribution when each state of the first is represented by a state of the second, compatibly with initialization and with every activation.
Main definitions #
Cslib.Crypto.Protocols.SSP.sessionSpec: the interface ofmtagged sessions.Cslib.Crypto.Protocols.SSP.parFin:mpackages run side by side.Cslib.Crypto.Protocols.SSP.par: two packages run side by side.Cslib.Crypto.Protocols.SSP.advantage: the distinguishing advantage between closed packages.
Main results #
Cslib.Crypto.Protocols.SSP.advantage_comp: a reduction package moves into the adversary.Cslib.Crypto.Protocols.SSP.advantage_le_sum_range: the hybrid bound along a sequence of closed packages.Cslib.Crypto.Protocols.SSP.eval_run_eq_of_represent: state simulation between closed packages.Cslib.Crypto.Protocols.SSP.eval_run_eq_runWith: a run against a closed package evaluated viaProbOracleComp.runWith.
References #
Packages side by side #
The packages M j run side by side as m independent sessions: the state is the tuple of the
session states, initialized session by session, and the query (j, q) runs the activation of the
j-th package on its own state, leaving the other sessions untouched.
Running m packages with per-activation call budget t side by side gives a package with
call budget m * t.
Two packages importing the same interface, run side by side behind the sum of their exported interfaces: each query is answered by the corresponding package, on its own state.
On the left interface, par M₁ M₂ runs an activation of M₁ on its own state.
On the right interface, par M₁ M₂ runs an activation of M₂ on its own state.
Distinguishing advantage #
The advantage of the adversary A in distinguishing the closed packages M₀ and M₁: the
advantage between the experiments of running A against each of them.
The advantage depends on the two packages only through the output distributions that they give the adversary.
Reduction. Distinguishing R.comp M₀ from R.comp M₁ is distinguishing M₀ from M₁
by the adversary R.link A, which runs A against the reduction package R.
Hybrid argument. The advantage between the first and the last of a sequence of closed packages is at most the sum of the advantages between consecutive ones.
State simulation #
The output distribution of a program run against a closed package: sample the initial state, then interpret the program with each activation read as a distribution.
The output distribution of a program run against a closed package, written with
ProbOracleComp.runWith: sample the initial state, then run against the closed activation kernels
fun q s => Machine.closeEval ((N.handle q).run s).
State simulation. Let every state of the closed package M be represented by a state of
the closed package M', so that the initial distribution of M maps to that of M', and every
activation of M maps to the activation of M' from the represented state. Then every program has
the same output distribution against M and against M'.