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 #
Cslib.Crypto.cascadeKeyedChildFunctionLaw: the function distribution induced by a uniform key.
Main results #
Cslib.Crypto.bind_evalWith_cascadeChildChallengeProgram_eq_game: the sampled wrapper has the output distribution of the finite-table challenge game, including its padding indices.Cslib.Crypto.evalWith_cascadeChildChallengeWithIndex: the fixed-index wrapper has the corresponding finite-table law.
References #
- [BS23], v0.6, Section 4.6.1 (printed pp. 152–154) and Section 6.4.2 (printed pp. 229–230), for the adjacent-hybrid argument.
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.