Documentation

CslibFrontier.Computability.Probabilistic.Oracle.ReplayParameter

Saved coins independent of a generated auxiliary input #

A polynomial bound on the length of the public inputs, substituted into an oracle machine's clock, gives one polynomial coin budget depending only on the security parameter. A strict-PPT generator supplies such a bound for its supported public inputs. Replay still truncates the supplied tape at the original input-dependent clock. This padding preserves the joint output and external state, without fixing the randomness of the handler.

Main definitions #

Main results #

References #

Original padding consequence of IsOraclePPTOn.exists_savedCoins and IsPPTOn.length_le.

def Cslib.Probability.savedCoinBudget (c d keyC keyD n : ℕ) :

One polynomial budget for a polynomial clock c * (|(1ⁿ, pk)| + 1) ^ d on every input pk of length at most keyC * (n + 1) ^ keyD.

The saved-coin budget is polynomial in the security parameter.

On any input pk of length at most keyC * (n + 1) ^ keyD, the polynomial clock c * (|(1ⁿ, pk)| + 1) ^ d is at most savedCoinBudget c d keyC keyD n.

theorem Cslib.Probability.IsOraclePPT.exists_savedCoins_of_length_le {Operation β : Type} [DecidableEq Operation] {output : β ↪ List Bool} {program : ℕ → List Bool → WordOracleComp Operation β} (h : IsOraclePPT output program) (keyC keyD : ℕ) :
∃ (k : ℕ) (Control : Type) (_ : Finite Control) (machine : Turing.MultiTapePTM k Bool Control Operation) (c : ℕ) (d : ℕ), (IsOraclePPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits fun (p : List Bool × List Bool) => machine.runCoins (fun (op : Operation) (word : List Bool) => ProbOracleComp.query (op, word)) p.1 p.2) ∧ (∀ (n : ℕ) (pk : List Bool), pk.length ≤ keyC * (n + 1) ^ keyD → c * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, pk)).length + 1) ^ d ≤ savedCoinBudget c d keyC keyD n) ∧ ∀ (n : ℕ) (pk : List Bool), pk.length ≤ keyC * (n + 1) ^ keyD → ∀ (Store : Type) (oracle : Operation × List Bool → StateT Store PMF (List Bool)) (s : Store), ProbOracleComp.runWith oracle (⇑output <$> program n pk) s = (BitString.uniformList (savedCoinBudget c d keyC keyD n)).bind fun (coins : List Bool) => ProbOracleComp.runWith oracle (machine.runCoins (fun (op : Operation) (word : List Bool) => ProbOracleComp.query (op, word)) (List.take (c * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, pk)).length + 1) ^ d) coins) ((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, pk))) s

Bound the public input by keyC * (n + 1) ^ keyD, then use a coin law independent of that input. The prefix cutoff remains the original machine clock. The replay equality holds for every public input within the bound and every stateful handler.

theorem Cslib.Probability.IsOraclePPT.exists_savedCoins_of_keyGen {Operation Key β : Type} [DecidableEq Operation] {keyEncoding : Key ↪ List Bool} {output : β ↪ List Bool} {gen : ℕ → ProbComp (List Bool × Key)} (hgen : IsPPTOn Turing.MultiTapeTM.encUnary (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits keyEncoding) gen) {program : ℕ → List Bool → WordOracleComp Operation β} (h : IsOraclePPT output program) :
∃ (k : ℕ) (Control : Type) (_ : Finite Control) (machine : Turing.MultiTapePTM k Bool Control Operation) (c : ℕ) (d : ℕ) (keyC : ℕ) (keyD : ℕ), (∀ (n : ℕ), ∀ keys ∈ (gen n).eval.support, keys.1.length ≤ keyC * (n + 1) ^ keyD) ∧ (IsOraclePPTOn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits) Turing.MultiTapeTM.encBits fun (p : List Bool × List Bool) => machine.runCoins (fun (op : Operation) (word : List Bool) => ProbOracleComp.query (op, word)) p.1 p.2) ∧ (∀ (n : ℕ) (pk : List Bool), pk.length ≤ keyC * (n + 1) ^ keyD → c * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, pk)).length + 1) ^ d ≤ savedCoinBudget c d keyC keyD n) ∧ ∀ (n : ℕ) (pk : List Bool), pk.length ≤ keyC * (n + 1) ^ keyD → ∀ (Store : Type) (oracle : Operation × List Bool → StateT Store PMF (List Bool)) (s : Store), ProbOracleComp.runWith oracle (⇑output <$> program n pk) s = (BitString.uniformList (savedCoinBudget c d keyC keyD n)).bind fun (coins : List Bool) => ProbOracleComp.runWith oracle (machine.runCoins (fun (op : Operation) (word : List Bool) => ProbOracleComp.query (op, word)) (List.take (c * (((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, pk)).length + 1) ^ d) coins) ((Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encUnary Turing.MultiTapeTM.encBits) (n, pk))) s

Generate the auxiliary word by an actual strict-PPT program, then use a coin law independent of that word. The prefix cutoff remains the original machine clock. The replay equality holds for every key satisfying the derived size bound and every stateful handler.