Documentation

CslibFrontier.Crypto.Computational.PseudorandomFunction.Cascade.FiniteChildTable

Finite channel tables for cascade routing #

A client with at most q external child queries can presample q independent child functions. The finite oracle starts with no assigned channels, reads the sampled function for the next channel when it is first used, and uses that same function on repeats.

Main definitions #

Main results #

References #

noncomputable def Cslib.Crypto.cascadeChildFiniteOracle {count width n : ℕ} (table : Fin count → BitString width → BitString n) (request : ℕ × List Bool) :

Answer a child query from a finite table. The state counts the assigned channels. Only the next unused channel may be assigned. A request outside the table or skipping ahead returns the empty word and preserves the state.

theorem Cslib.Crypto.runWith_cascadeChildChannelOracle_eq_finite {α : Type} {count width n : ℕ} (source : PMF (BitString width → BitString n)) {program : Probability.WordOracleComp ℕ α} (hbudget : ProbOracleComp.IsQueryBounded program count) :
PMF.map Prod.fst (ProbOracleComp.runWith (cascadeChildChannelOracle source) program []) = (Probability.PMF.pi fun (x : Fin count) => source).bind fun (table : Fin count → BitString width → BitString n) => PMF.map Prod.fst (ProbOracleComp.runWith (cascadeChildFiniteOracle table) program 0)

At most count child queries can consume at most count independent functions. Drawing all of them up front preserves the output distribution, including adaptive calls, repeated channels, and requests that skip an unseen channel.