Open stateful oracle substitution #
A certified oracle program can be interpreted against a stateful handler that is itself a certified oracle program: the handler may draw private coins and call an arbitrary external stateful oracle, whose replies may be arbitrarily long. The result is again strict oracle PPT, returning the original result and the handler's final state, and it preserves the complete joint law of the result, the handler's state and the external oracle's state.
A local invariant and an efficiently computed additive allowance bound each reply given to the
program and the encoded private storage added per call. Individually efficient calls alone do
not suffice: repeatedly doubling the handler's state is efficient per call but not overall.
Closed substitution (Cslib.Probability.IsOraclePPTOn.run_interpret_preprocess) is the special
case of a sampled closed handler without external channels.
Main results #
Cslib.Probability.IsOraclePPTOn.run_interpret_preprocess_open: open substitution with captured caller data, a local state invariant and an efficiently computed resource allowance.Cslib.Probability.IsOraclePPTOn.interpret_bitQueries: replace each deterministic word query by a polynomial-time transformed request, keeping only one answer bit.
References #
Extends Computability/Probabilistic/OracleSimulation.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8 from closed to open handlers.
Substitute a stateful handler with its own external calls into an oracle program. The substituted program is strict oracle PPT and preserves the joint law of the result, the handler's final state and every external oracle's state. The efficiently computed allowance bounds each reply and the added encoded state; one invariant must hold for every possible handler result under every external oracle. External replies to the handler need no length bound.
Replacing every request by a polynomial-time computed word and reading at most one reply bit preserves strict oracle polynomial time. The certificate holds uniformly for every external stateful oracle, including oracles with arbitrarily long answers.