Computational security of the Naor–Reingold PRF from DDH #
This module completes the efficient lazy-sampling Decisional Diffie–Hellman (DDH) reduction and
the universal-hash bit-string pseudorandom-function bridge for the Naor–Reingold PRF over a
PrimeOrderGroupFamily ([BS23], Section 10.11, Exercises 10.4, 10.8, 10.11, pp. 424–426,
and Section 4.11, Exercise 4.18, p. 172; [NR04], Section 4.1, Construction 4.1,
Theorem 4.1, Lemma 4.2, Construction 4.2, Theorem 4.3, and Remark 4.2):
- Inverse-order bound from
DDH:DDH.negligible_expected_inv_order, imported fromComplexity.Crypto.Computational.DiffieHellman.Order, makes the setup-averaged inverse group order negligible; it bounds the hashed-PRF error terms below. - Word-level adaptive group-PRF games and lazy-sampling
IsOraclePPTDDH reduction:naorReingoldFrontierOraclememoizesddhFixedUWordRerandomizeonly on thek-bit prefixes queried by anOracleDistinguisherand evaluates the remaining suffix vianaorReingoldWordSuffix. Choosingk ← sampleDyadicIndex (inLen n)yields the uniform strict PPT DDH distinguishernaorReingoldToDDHDistinguisher, proving both quantitative single- distinguisher bounds and asymptotic security (DDH.negligible_naorReingoldWordGame,DDH.negligible_naorReingoldProbGame) underF.DDH setupalone. - Universal-hash bit-string Naor–Reingold PRF (paraphrase of [NR04], Section 4.1,
Construction 4.2, Theorem 4.3, and Remark 4.2, using Lemma 4.2): composing
naorReingoldWordEvalwithlinearHashKDFunder a public universal-hash seed (F.withSeedandF.seededSetup) maps group outputs into uniformoutLen n-bit strings; a multi-query Leftover Hash Lemma bound viaPMF.dist_bind_pair_pi_le_sumyields adaptive bit-string PRF security (DDH.negligible_naorReingoldHashedGame,DDH.negligible_naorReingoldHashedProbGame, andDDH.negligible_naorReingoldHashedGame_const).
Main definitions #
Cslib.Crypto.PrimeOrderGroupFamily.sampleNaorReingoldExp: executable modular exponent sampler with statistical slackn + (F.encDesc d).length.Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldWordRealGame,Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldProbRealGame,Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldWordIdealGame: setup-parameterized word-level adaptive Naor–Reingold group-PRF experiments.Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldFrontierOracle: memoized prefix DDH rerandomization followed bynaorReingoldWordSuffix.Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldToDDHDistinguisher: single-challenge uniform strict PPT DDH distinguisher constructed from an adaptive PRF distinguisher.Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldHashedWordEval,Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldHashedRealGame,Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldHashedProbRealGame,Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldHashedGroupIdealGame,Cslib.Crypto.PrimeOrderGroupFamily.naorReingoldHashedIdealGame: universal-hash bit-string Naor–Reingold evaluation and setup-parameterized PRF experiments.
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_naorReingoldToDDHDistinguisher: uniform strict PPT certificate fornaorReingoldToDDHDistinguisherfrom anyIsOraclePPTdistinguisher.Cslib.Crypto.PrimeOrderGroupFamily.advantage_naorReingoldWordGame_le,Cslib.Crypto.PrimeOrderGroupFamily.advantage_naorReingoldProbRealGame_wordRealGame_le: quantitative single-distinguisher DDH reduction and modular-sampling bounds for the group-PRF.Cslib.Crypto.PrimeOrderGroupFamily.DDH.negligible_naorReingoldWordGame,Cslib.Crypto.PrimeOrderGroupFamily.DDH.negligible_naorReingoldProbGame: asymptotic adaptive security of the Naor–Reingold group-PRF underF.DDH setup.Cslib.Crypto.PrimeOrderGroupFamily.computableInPolyTime_naorReingoldHashedWordEval,Cslib.Crypto.PrimeOrderGroupFamily.advantage_naorReingoldHashedIdeal_le,Cslib.Crypto.PrimeOrderGroupFamily.DDH.negligible_naorReingoldHashedGame,Cslib.Crypto.PrimeOrderGroupFamily.DDH.negligible_naorReingoldHashedProbGame,Cslib.Crypto.PrimeOrderGroupFamily.DDH.negligible_naorReingoldHashedGame_const: polynomial-time evaluation, multi-query Leftover Hash Lemma bound, and asymptotic bit-string PRF security.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 4.11 (Exercise 4.18, p. 172) and Section 10.11 (Exercises 10.4, 10.8, and 10.11, pp. 424–426).
- M. Naor, O. Reingold, Number-Theoretic Constructions of Efficient Pseudo-Random Functions, Section 4.1 (Construction 4.1, Theorem 4.1, Lemma 4.2, Construction 4.2, Theorem 4.3, and Remark 4.2).
Word-level Naor–Reingold group-PRF games and prefix hybrids #
Sample a nearly-uniform modular exponent modulo F.order d via F.sampleExp with
n + (F.encDesc d).length statistical slack bits so that the statistical error
1 / 2 ^ (n + |encDesc d|) offsets polynomial query counts depending on |encDesc d|
(original).
Instances For
Every value supported by sampleNaorReingoldExp is strictly less than F.order d.
Projected to ZMod (F.order d), sampleNaorReingoldExp n d has law
F.sampleModZModLaw (n + (F.encDesc d).length) d.
sampleNaorReingoldExp is uniform strict PPT in (n, d).
Deterministic word-level oracle wrapper encoding fn : BitString m → F.Carrier d on valid
m-bit queries and returning [] on malformed queries.
Instances For
Setup-parameterized real Naor–Reingold group-PRF game with exact uniform ZMod (F.order d)
exponents ([BS23], Exercise 10.4, p. 424; [NR04], Construction 4.1 &
Theorem 4.1).
Instances For
Setup-parameterized executable Naor–Reingold group-PRF real game sampling modular exponents via
sampleNaorReingoldExp (original).
Instances For
Setup-parameterized ideal random group-function game against OracleDistinguisher
([BS23], Exercise 10.4, p. 424; [NR04], Theorem 4.1).
Instances For
Lazy-sampling frontier oracle and IsOraclePPT DDH distinguisher #
Association-list cache mapping queried k-bit prefixes to encoded group-element pairs.
Instances For
Encoding of NaorReingoldCache.
Instances For
Executable rerandomized pair sampler for naorReingoldFrontierOracle: draw two exponents via
sampleNaorReingoldExp and apply ddhFixedUWordRerandomize.
Instances For
Stateful level-k frontier oracle for Naor–Reingold ([BS23], Exercises 10.4(b) &
4.18(b); [NR04], Theorem 4.1): on a valid m-bit query, memoize a freshly
rerandomized DDH pair on query.take k, select the query[k] child, and evaluate the remaining
suffix with naorReingoldWordSuffix. Malformed queries return [] without modifying the cache.
Instances For
Single-challenge uniform strict PPT DDH distinguisher constructed from an adaptive PRF
distinguisher adversary: sample a hybrid level k ← sampleDyadicIndex (inLen n), draw suffix
exponents αs, and run adversary against naorReingoldFrontierOracle from an empty cache
([BS23], Exercises 10.4(b) & 10.11; [NR04], Theorem 4.1).
Instances For
naorReingoldToDDHDistinguisher is uniform strict PPT whenever inLen is computable in
polynomial time in unary and adversary satisfies IsOraclePPT encBool ([BS23],
Exercise 10.4(b); [NR04], Theorem 4.1).
Quantitative and asymptotic DDH security of the Naor–Reingold group-PRF #
The k-fold independent product of PMF.uniformOfFintype α is
PMF.uniformOfFintype (Fin k → α).
Quantitative single-distinguisher DDH security bound for the Naor–Reingold group-PRF
([BS23], Exercises 10.4 & 10.11; [NR04], Theorem 4.1): if adversary makes at
most Q d queries on d ∈ (setup n).support with modular-sampling slack bounded by ε, then its
PRF distinguishing advantage is at most dyadicSize (inLen n) times the single-challenge DDH
advantage of naorReingoldToDDHDistinguisher plus 2 * ε plus the setup-averaged inverse group
order.
Modular-sampling distance between naorReingoldProbRealGame and naorReingoldWordRealGame:
replacing (inLen n + 1) calls to sampleNaorReingoldExp by exact uniform ZMod (F.order d)
exponents changes the output distribution by at most (inLen n + 1) / 2 ^ n.
Asymptotic DDH security of the Naor–Reingold group-PRF (naorReingoldWordRealGame)
([BS23], Exercise 10.4; [NR04], Theorem 4.1): if F.DDH setup holds and
inLen is computable in polynomial time in unary, no IsOraclePPT adversary can distinguish
naorReingoldWordRealGame from naorReingoldWordIdealGame with non-negligible advantage.
Asymptotic DDH security of the executable Naor–Reingold group-PRF
(naorReingoldProbRealGame) ([BS23], Exercise 10.4; [NR04], Theorem 4.1):
if F.DDH setup holds and inLen is computable in polynomial time in unary, no IsOraclePPT
adversary can distinguish naorReingoldProbRealGame from naorReingoldWordIdealGame with
non-negligible advantage.
Universal-hash bit-string Naor–Reingold PRF #
Word-level universal-hash Naor–Reingold evaluation (paraphrase of [NR04],
Section 4.1, Construction 4.2): evaluate naorReingoldWordEval and hash the resulting encoded
group element into {0, 1}^{outLen} with linearHashKDF.
Instances For
naorReingoldHashedWordEval always outputs outLen bits.
naorReingoldHashedWordEval is computable in polynomial time when outLen is given in unary
and bound is computable in polynomial time in unary from d.
Setup-parameterized real universal-hash Naor–Reingold bit-string PRF game with exact uniform
ZMod (F.order d) exponents and public hash seed (d, seed) encoded via F.withSeed.encDesc
(paraphrase of [NR04], Section 4.1, Construction 4.2, Theorem 4.3, and Remark 4.2).
Instances For
Setup-parameterized executable real universal-hash Naor–Reingold bit-string PRF game sampling
exponents via sampleNaorReingoldExp (original).
Instances For
Setup-parameterized ideal bit-string random-function game for universal-hash Naor–Reingold:
sample (d, seed) ← F.seededSetup setup (F.linearHashSeedLen outLen bound) n, draw an independent
uniform random function f : BitString (inLen n) → BitString (outLen n), and pass
F.withSeed.encDesc (d, seed) to adversary (paraphrase of [NR04], Section 4.1,
Theorem 4.3 and Remark 4.2).
Instances For
Intermediate hybrid game for universal-hash Naor–Reingold: sample (d, seed) via seededSetup,
draw an independent uniform random group-valued table B : BitString (inLen n) → ZMod (F.order d),
and hash each queried group element B x • g with linearHashKDF (paraphrase of
[NR04], Section 4.1, Theorem 4.3 and Remark 4.2, using Lemma 4.2).
Instances For
Multi-query Leftover Hash Lemma bound for hashed Naor–Reingold (paraphrase of
[NR04], Section 4.1, Lemma 4.2; [BS23], Section 8.10.4, Theorem 8.11, p. 334):
if adversary makes at most Q queries on (setup n).support and qMin ≤ F.order d, then
replacing hashed random group elements by a uniform random function BitString (inLen n) → BitString (outLen n) changes the output distribution by at most
Q * (√(2 ^ (outLen n) / qMin) / 2).
Asymptotic DDH security of the universal-hash Naor–Reingold bit-string PRF (paraphrase of
[NR04], Section 4.1, Construction 4.2, Theorem 4.3, and Remark 4.2): under
F.DDH setup, when group descriptions on (setup n).support have polynomially bounded bit-length,
bound bounds encoded group elements, and 2 ^ (outLen n) / qMin n is negligible, no IsOraclePPT
adversary can distinguish naorReingoldHashedRealGame from naorReingoldHashedIdealGame.
Asymptotic DDH security of the executable universal-hash Naor–Reingold bit-string PRF
(naorReingoldHashedProbRealGame) (paraphrase of [NR04], Section 4.1,
Construction 4.2, Theorem 4.3, and Remark 4.2).
Constant-output-length hashed Naor–Reingold security under F.DDH setup alone
(original, combining DDH.negligible_expected_inv_order with Theorem 4.3, Remark 4.2, and Lemma 4.2
of [NR04]): for any constant output length c : ℕ (including c = 1), F.DDH setup
automatically supplies the inverse-order decay needed by the Leftover Hash Lemma, requiring no
external qMin hypothesis.