Documentation

CslibFrontier.Crypto.Computational.PseudorandomFunction.Cascade.SampledReductionLaw

Sampled game law for the cascade child challenge #

The wrapper draws the challenge index with fair bits and the local keys as consecutive fixed-width rows. These draws give a uniform index and independent uniform keys. An unused index gives the same rejecting output for every external challenge law.

Main definitions #

Main results #

References #

noncomputable def Cslib.Crypto.cascadeKeyedChildFunctionLaw (family : List Bool → List Bool → List Bool) (width n : ℕ) :
PMF (BitString width → BitString n)

The child-function distribution induced by a uniform n-bit key at input width width. The fixed-width representation reads the first n result bits, padding short results with zero.

theorem Cslib.Crypto.evalWith_cascadeChildChallengeWithIndex {count width n : ℕ} (family : List Bool → List Bool → List Bool) (hlength : ∀ (key block : List Bool), key.length = n → block.length = width → (family key block).length = n) (selected : Fin count) (challenge : BitString width → BitString n) (program : Probability.WordOracleComp ℕ Bool) :
OracleComp.evalWith (OracleComp.sumHandler ProbComp.unifOracle fun (req : Unit × List Bool) => PMF.pure (randomFunctionOracle width challenge req.2)) (cascadeChildChallengeWithIndex family width n count (↑selected) program) = cascadeChildChallengeAt (cascadeKeyedChildFunctionLaw family width n) (Probability.PMF.uniformOfFintype (BitString width → BitString n)) selected challenge program

The key-sampling wrapper at a specified index has the same law as the finite child table with the supplied function in that row.

theorem Cslib.Crypto.bind_evalWith_cascadeChildChallengeProgram_eq_game {width n : ℕ} (family : List Bool → List Bool → List Bool) (hlength : ∀ (key block : List Bool), key.length = n → block.length = width → (family key block).length = n) (count indexBits : ℕ) (source : PMF (BitString width → BitString n)) (program : Probability.WordOracleComp ℕ Bool) :
(source.bind fun (challenge : BitString width → BitString n) => OracleComp.evalWith (OracleComp.sumHandler ProbComp.unifOracle fun (req : Unit × List Bool) => PMF.pure (randomFunctionOracle width challenge req.2)) (cascadeChildChallengeProgram family width n count indexBits program)) = cascadeChildChallengeGame count (2 ^ indexBits) (cascadeKeyedChildFunctionLaw family width n) (Probability.PMF.uniformOfFintype (BitString width → BitString n)) source program

Under any external function distribution, the wrapper realizes the sampled finite-table game with a range of size 2 ^ indexBits. For the keyed family, keys have width n, inputs have width width, and replies have width n. No external query is needed on a padding index.