An executable finite-list oracle for the PRF ideal game #
Valid queries are memoized as ordinary words. Malformed queries receive the empty word and retain the cache. Injective key representations and the shared eager/lazy theorem identify this program with the ideal PRF game for every randomized adaptive adversary.
Main definitions #
Cslib.Crypto.cachedRandomFunctionOracle: a list cache with fair-bit sampling on misses.
Main results #
Cslib.Crypto.prfIdealGame_eq_cached: exact equality of the eager and cached experiments.Cslib.Crypto.isPPT_prfIdealGame: a strict PPT realization for every oracle-PPT adversary.
References #
Adapts Crypto/Computational/PseudorandomFunction/RandomOracle.lean on the cslib crypto
branch at 5ff69ca93402e7c947208dc56396d6d86203ccd8 to the shared typed interpreter.
Each cached call charges the parameter, query and complete input and output cache.
An executable list cache realizes the ideal experiment, preserving repeated-query consistency and independent private randomness under arbitrary adaptive interaction.
The ideal experiment has a strict PPT realization through its lazy cache. This does not construct the exponentially large eager table; the entire adaptive interaction is certified.