Pseudorandom coins from a pseudorandom function #
A pseudorandom function with N-bit keys, inputs and outputs supplies up to N pseudorandom
coins for every short request word: pad the request prefix-freely to N bits (padRequest),
evaluate, and keep the requested number of bits (prfCoins). Distinct requests of length below
N pad to distinct inputs, so in the ideal world they receive independent uniform coins, and a
repeated request receives the same coins. This is the coin source of stateless tree signatures
([BS23], Section 14.6.2, "Generating internal keys using a PRF"), where N is a
polynomial in the signature scheme's parameter chosen above every coin budget.
The coin games coinRealGame and coinIdealGame let an adversary request (x, L) and answer with
prfCoins family k x L under a uniform key, or with the first L bits of a uniform random
function at padRequest N x. The reduction coinDistinguisher forwards each request padded and
truncates the reply, so both games are exactly the PRF games of the forwarded adversary
(eval_coinRealGame, eval_coinIdealGame), and a pseudorandom function makes the coin games
indistinguishable (PseudorandomFunction.coinIndistinguishable).
Main definitions #
Cslib.Crypto.padRequest,Cslib.Crypto.prfCoins: the padding and the coins.Cslib.Crypto.coinRequestDecoder,Cslib.Crypto.coinRealGame,Cslib.Crypto.coinIdealGame: the coin games.Cslib.Crypto.coinDistinguisher: the reduction to the PRF games.
Main results #
Cslib.Crypto.length_padRequest,Cslib.Crypto.padRequest_injective,Cslib.Crypto.length_prfCoins,Cslib.Crypto.computableInPolyTime_prfCoins: the coins have the requested length, come from distinct inputs for distinct short requests, and are computable in polynomial time.Cslib.Crypto.eval_coinRealGame,Cslib.Crypto.eval_coinIdealGame,Cslib.Crypto.isOraclePPT_coinDistinguisher: the exact reduction and its efficiency.Cslib.Crypto.PseudorandomFunction.coinIndistinguishable: the coin games are indistinguishable for every oracle-PPT adversary.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Section 14.6.2.
Padding and coins #
Distinct requests shorter than the width pad to distinct words.
The coins have the requested length when it is at most the key length.
The coins are computable in polynomial time from the key, the request and the unary count.
The coin games #
A coin request word encPair encBits encUnary (x, L): the request x and the number L of
coins; requestDecoder-style, every word decodes to some pair.
The ideal coin game: a uniform random function on N bits answers every request at its
padding, cut to the requested count.
The reduction to the PRF games #
The PRF distinguisher built from a coin adversary: run it, answering through coinQuery.
The real coin game is the real PRF game of the forwarded adversary.
The ideal coin game is the ideal PRF game of the forwarded adversary.
The forwarded adversary is uniformly strict oracle PPT whenever the coin adversary is.
A pseudorandom function gives pseudorandom coins: the real and ideal coin games are indistinguishable for every oracle-PPT adversary, with the same advantage as the forwarded adversary's in the PRF games.