Stateful simulation with private randomness #
An external oracle's invariant or state simulation remains valid when clients also draw private
randomness. Private draws leave oracle state untouched, and independent sampling commutes with
the distribution relating two state representations. These are specializations of the existing
OracleComp rules to the disjoint-sum interface, with no additional program induction.
Each rule is stated twice: for the spelled-out interpretation of the sum handler, and for its name
Cslib.ProbOracleComp.runWith (runWith_invariant, runWith_simulation, …). The two statements
are definitionally equal.
Main results #
Cslib.ProbOracleComp.run_interpret_invariant: external invariants survive private sampling.Cslib.ProbOracleComp.run_interpret_simulation: local joint-state simulation suffices.Cslib.ProbOracleComp.run_interpret_map_state_of_invariant: state representation on an invariant.Cslib.ProbOracleComp.run_interpret_map_state: deterministic representation of oracle state.Cslib.ProbOracleComp.run_interpret_map_response_state: represent replies and oracle state, leaving private samples unchanged.Cslib.ProbOracleComp.run_interpret_readOnly: preserve a fixed external environment.Cslib.ProbOracleComp.run_interpret_run_interpret: a handler with private coins and external calls, followed by the external oracle, is one stateful handler on the joint state.Cslib.ProbOracleComp.runWith_readOnly,Cslib.ProbOracleComp.runWith_invariant,Cslib.ProbOracleComp.runWith_simulation,Cslib.ProbOracleComp.runWith_map_state_of_invariant,Cslib.ProbOracleComp.runWith_map_state,Cslib.ProbOracleComp.runWith_map_response_state,Cslib.ProbOracleComp.runWith_run_interpret: the same rules forCslib.ProbOracleComp.runWith.
References #
Adapts the cslib crypto branch's state simulation API at
5ff69ca93402e7c947208dc56396d6d86203ccd8 to the typed sum of sampling and external calls.
Reading a fixed external environment retains it, independently of the client's private draws.
Reading a fixed external environment retains it, independently of the client's private draws: the run evaluates the program against the environment at the starting state.
An external oracle's invariant is unaffected by the client's private sampling.
An external oracle's invariant holds at every final state of runWith.
A local probabilistic state simulation extends to clients with fresh private samples.
A local probabilistic state simulation extends to runWith.
Re-encode private state on invariant states while retaining independent private samples.
A state representation commuting with external calls on invariant states commutes with
runWith.
A deterministic state representation commuting with external calls commutes with the whole randomized adaptive program, retaining the result and represented private state.
A deterministic state representation commuting with external calls commutes with
runWith.
Reply and state representations preserve randomized adaptive execution. Private samples are forwarded unchanged; only external replies and the oracle's state are represented.
Reply and state representations commute with runWith; private samples are forwarded
unchanged.
A stateful handler that draws private coins and calls an external oracle, followed by that oracle, is one stateful handler on the joint state. Private draws stay fresh, and the result, the handler's state and the external oracle's state are retained jointly.
A stateful handler that draws private coins and calls an external oracle, run against that
oracle by runWith, is one runWith on the joint state of the handler and the oracle.