The list form of the Computational Diffie–Hellman problem in a fixed group #
A list adversary receives a • g and b • g and returns a list of group elements; it wins when
the Diffie–Hellman value (a * b) • g is among the first Q entries of its list. A CDH adversary
that runs it and returns the entry at a uniformly chosen position below Q is right with at least
1 / Q of that probability, since it cannot recognize the right entry. This is the guessing step
of [BS23] in Section 21.11.4 (p. 908), where the list is the adversary's random-oracle
queries and the book states only a "non-negligible (though smaller)" chance, and in the proof of
Theorem 11.4 (Section 11.5.1, pp. 446–448), where it is the source of the factor Q: choosing one
of at most Q queries at random gives CDHadv[Bcdh, G] ≥ Pr[Z] / Q, equation (11.12).
The reduction listCDHToCDH takes its index sampler as an argument, and the analysis is general
in its law: eval_listCDHExperiment_le_mul_add_of_index bounds the list experiment by c times the
CDH experiment of listCDHToCDH plus ε for every index sampler such that, for each of the first
Q entries of every list, c times the probability of selecting it, plus ε, is at least 1;
eval_listCDHExperiment_le_mul is its case ε = 0. An exactly uniform index below Q gives
c = Q and ε = 0 (listCDHAdvantage_le_mul_cdhAdvantage). A machine with fair coins cannot draw
an exactly uniform index below every Q. It can draw Cslib.ProbComp.sampleModIndex width Q: the
residue modulo Q of a number written with width fair coins, capped at Q (which matters only
at Q = 0). Each position below Q is drawn with probability at least 1 / Q - 1 / 2 ^ width
(Cslib.ProbComp.one_le_mul_eval_sampleModNat_add), so the reduction keeps the factor Q and
adds the term Q / 2 ^ width (eval_listCDHExperiment_le_mul_add), for every width and every
Q. The efficient reduction over a prime-order group family draws its index this way; it, its
certificate, its bound and the conclusion under the CDH assumption are in
CslibFrontier/Crypto/Computational/DiffieHellman/ListCDHFamily.lean.
No hypothesis restricts Q or the adversary's lists:
- At
Q = 0the list experiment is never won (listCDHAdvantage_zero), and both bounds read0 ≤ 0. The exact bound's index is then uniform below1, andsampleModIndex width 0always returns0, so the reduction reads position0. - A list shorter than
Qcounts in full, sincel.take Q = l; an exactly uniform index falls past its end with probability1 - l.length / Q, and the reduction then outputsg. - Repeated entries are allowed. Each copy of the Diffie–Hellman value among the first
Qentries adds1 / Qto the reduction's success probability, so the bound can be strict.
Differences from the book:
- Groups are written additively, and the experiment draws exponents, as in
Cslib.Crypto.cdhExperiment. - The book's list is built from the adversary's random-oracle queries: in Theorem 11.4 all of
them, at most
Q; in Section 21.11.4 those of the form(pw', id_P, id_Q, u, v, w'), with no stated bound. Here the adversary returns the list, and only its firstQentries count, so an adversary that returns more entries gains nothing from them. - The book's solver chooses uniformly among the queries it collected (in Theorem 11.4, the points
of
Domain(Map), at mostQof them) and outputs "failure" when there are none. This reduction draws a position belowQwithout looking at the list, and outputsgwhen the position is past the end; any fixed element would do. Each member of the firstQentries is still chosen with probability at least1 / Q. - The win condition is decided, so the experiment takes
[DecidableEq G], asCslib.Crypto.cdhExperimentdoes.
The book names neither the problem nor the reduction: "list CDH" and the names of all declarations here are this library's names.
Main definitions #
Cslib.Crypto.listCDHExperiment,Cslib.Crypto.listCDHAdvantage: the list form of CDH and its success probability.Cslib.Crypto.listCDHToCDH: the reduction, for a given index sampler.
Main results #
Cslib.Crypto.listCDHAdvantage_zero: atQ = 0the list experiment is never won.Cslib.Crypto.eval_listCDHExperiment_le_mul_add_of_index,Cslib.Crypto.eval_listCDHExperiment_le_mul: the bound for a general index sampler, with and without an additive term.Cslib.Crypto.listCDHAdvantage_le_mul_cdhAdvantage: the list advantage is at mostQtimes the CDH advantage of the reduction with an exactly uniform index, for everyQ.Cslib.Crypto.eval_listCDHExperiment_le_mul_add: with the fair-coin indexsampleModIndex width Q, the list success probability is at mostQtimes the CDH success probability of the reduction plusQ / 2 ^ width, for everywidthand everyQ.Cslib.Crypto.eval_listCDHExperiment_mono: the list success probability does not decrease when the boundQgrows.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 21.11.4, p. 908, and Section 11.5.1, Theorem 11.4 and its proof with equation (11.12), pp. 446–448.
The guessing reduction of [BS23], Section 21.11.4 (p. 908) and the proof of
Theorem 11.4 (p. 447), with its index sampler index: on the CDH instance (s, t), run the list
adversary, draw a position from index and return the entry there, or g when the position is
past the end of the list.
The list form of CDH in the group generated by g: the challenger draws uniform exponents a
and b and gives the adversary a • g and b • g; the adversary wins when (a * b) • g is among
the first Q entries of its list. The name is this library's.
The success probability of A in listCDHExperiment.
At Q = 0 the list form of CDH is never won: no entry is among the first 0.
The guessing step for a general index sampler, with an additive term: if, for every list
l and every member x of l.take Q, c times the probability that the entry of l at a
position drawn from index (or g past the end) is x, plus ε, is at least 1, then the list
experiment accepts with probability at most c times that of the CDH experiment for
listCDHToCDH, plus ε. The hypothesis is on the index law alone.
The guessing step for a general index sampler: if, for every list l, the entry of l at
a position drawn from index (or g past the end) is each member of l.take Q with probability
at least 1 / c, then the list experiment accepts with probability at most c times that of the
CDH experiment for listCDHToCDH. The hypothesis is on the index law alone. This is the case
ε = 0 of eval_listCDHExperiment_le_mul_add_of_index.
The list form of CDH loses at most a factor Q ([BS23], Section 21.11.4, p. 908,
and equation (11.12) in the proof of Theorem 11.4, p. 448): the guessing reduction with the index
Fin.val <$> ProbComp.unifFin (Q - 1), exactly uniform below Q when 0 < Q, solves CDH with at
least 1 / Q of the list adversary's success probability. It holds for every Q, including 0,
every list length and lists with repeated entries; beyond NeZero q and DecidableEq G, which the
experiments need, there is no hypothesis on q or g. With the fair-coin index
ProbComp.sampleModIndex width Q the factor stays Q and the term Q / 2 ^ width is added
(eval_listCDHExperiment_le_mul_add).
The guessing step with a fair-coin index loses a factor Q plus Q / 2 ^ width: the
guessing reduction of [BS23], Section 21.11.4 (p. 908) and equation (11.12) in the proof
of Theorem 11.4 (p. 448), run with the index ProbComp.sampleModIndex width Q drawn from width
fair coins, solves CDH with probability at least 1 / Q of the list adversary's success
probability, minus 1 / 2 ^ width. The book draws the index exactly uniformly; the fair-coin index
and the term Q / 2 ^ width are this library's. The factor is exactly Q: each position below
Q is drawn with probability at least 1 / Q - 1 / 2 ^ width
(ProbComp.one_le_mul_eval_sampleModNat_add), so whenever the Diffie–Hellman value is among the
first Q entries the reduction returns it with at least that probability. It holds for every
width and every Q, including Q = 0, where both sides are 0; beyond NeZero q and
DecidableEq G there is no hypothesis on q or g.
More entries that count cannot hurt the adversary: if Q ≤ Q', the list experiment with
bound Q' accepts with probability at least that with bound Q, since the first Q entries of a
list are among its first Q'.