Documentation

CslibFrontier.Crypto.Computational.PseudorandomFunction.Cascade.ChildChallenge

Sampled child-channel challenge for cascade routing #

To compare the two child-function laws for a query-bounded cascade router, order its channels by first use. Pick one channel for the challenge, with ideal rows before it and real rows after it. Compared with changing all rows, choosing the challenge channel uniformly loses exactly the size of the sampled range. Indices beyond the query budget reject in both experiments, allowing a power-of-two sampling range.

Main definitions #

Main results #

References #

noncomputable def Cslib.Crypto.cascadeChildChallengeAt {α : Type} {count width n : ℕ} (real ideal : PMF (BitString width → BitString n)) (channel : Fin count) (challenge : BitString width → BitString n) (program : Probability.WordOracleComp ℕ α) :
PMF α

Run the client with the supplied challenge function at channel, independent ideal functions at earlier channels, and independent real functions at later channels. All calls go through the first-use rule of the finite child oracle.

noncomputable def Cslib.Crypto.cascadeChildChallengeGame {width n : ℕ} (count capacity : ℕ) [NeZero capacity] (real ideal challenge : PMF (BitString width → BitString n)) (program : Probability.WordOracleComp ℕ Bool) :

Draw a uniform challenge index from Fin capacity. Reject indices outside the count child channels. The challenge law is used at exactly the selected channel.

theorem Cslib.Crypto.advantage_cascadeChildChannelOracle_le {count width n : ℕ} (real ideal : PMF (BitString width → BitString n)) {program : Probability.WordOracleComp ℕ Bool} (hbudget : ProbOracleComp.IsQueryBounded program count) (ε : NNReal) (hstep : ∀ (channel : Fin count), Game.advantage (real.bind fun (row : BitString width → BitString n) => cascadeChildChallengeAt real ideal channel row program) (ideal.bind fun (row : BitString width → BitString n) => cascadeChildChallengeAt real ideal channel row program) ≤ ε) :

A common bound for every fixed child challenge gives a linear loss in the number of channels, including the case in which the client makes no queries.

theorem Cslib.Crypto.succProbability_cascadeChildChannelOracle_eq {count capacity width n : ℕ} [NeZero capacity] (real ideal : PMF (BitString width → BitString n)) {program : Probability.WordOracleComp ℕ Bool} (hbudget : ProbOracleComp.IsQueryBounded program count) (hcapacity : count ≤ capacity) :
↑(Game.succProbability (PMF.map Prod.fst (ProbOracleComp.runWith (cascadeChildChannelOracle real) program []))) - ↑(Game.succProbability (PMF.map Prod.fst (ProbOracleComp.runWith (cascadeChildChannelOracle ideal) program []))) = ↑capacity * (↑(Game.succProbability (cascadeChildChallengeGame count capacity real ideal real program)) - ↑(Game.succProbability (cascadeChildChallengeGame count capacity real ideal ideal program)))

Signed gap for the sampled child challenge, so that the result can telescope across successive cascade depths. Padding indices reject in both experiments.

theorem Cslib.Crypto.advantage_cascadeChildChannelOracle_eq {count capacity width n : ℕ} [NeZero capacity] (real ideal : PMF (BitString width → BitString n)) {program : Probability.WordOracleComp ℕ Bool} (hbudget : ProbOracleComp.IsQueryBounded program count) (hcapacity : count ≤ capacity) :
Game.advantage (PMF.map Prod.fst (ProbOracleComp.runWith (cascadeChildChannelOracle real) program [])) (PMF.map Prod.fst (ProbOracleComp.runWith (cascadeChildChannelOracle ideal) program [])) = ↑capacity * Game.advantage (cascadeChildChallengeGame count capacity real ideal real program) (cascadeChildChallengeGame count capacity real ideal ideal program)

For a client with at most count child calls, sampling a single challenge channel gives the full child-oracle advantage divided by the sampling range. Padding the range to capacity ≥ count contributes the same rejecting output on both sides.