Static Diffie–Hellman and chosen-ciphertext key recovery against multiplicative ElGamal #
Fix an additive commutative group G that is a ZMod q-module, as in
CslibFrontier/Crypto/Computational/DiffieHellman/Finite.lean; the textbook element v ^ α is
α • v and the identity 1 is 0.
In the static Diffie–Hellman (SDH) experiment ([BS23], Section 16.1.4, Attack Game 16.1,
p. 688), the challenger draws a uniform secret α : ZMod q and answers each query v : G with
α • v (sdhOracle); the adversary wins when it outputs α (sdhExperiment, sdhAdvantage).
With one query at g, a discrete-logarithm adversary A plays dlExperiment q g A inside
sdhExperiment (dlToSDH, sdhAdvantage_dlToSDH).
Multiplicative ElGamal ([BS23], Exercise 11.5, p. 459) decrypts a ciphertext
(v, e) : G × G under secret key α : ZMod q to e - α • v. As observed in [BS23],
Section 16.1.4 (p. 688), decrypting (-v, 0) (the additive form of (1 / v, 1)) returns
0 - α • (-v) = α • v (elGamalDecryptOracle_neg_zero). Consequently, answering each SDH query
v by asking the ElGamal decryption oracle elGamalDecryptOracle for (-v, 0) turns any
static-DH adversary A into a key-recovery oracle adversary sdhToElGamalKeyRecovery A with the
exact same experiment distribution and success probability
(elGamalKeyRecoveryAdvantage_sdhToElGamalKeyRecovery), preserving any query budget Q
(isQueryBounded_sdhToElGamalKeyRecovery) and submitting only ciphertexts with second component 0
(queriesSatisfy_sdhToElGamalKeyRecovery). Conversely, an ElGamal key-recovery adversary B making
at most Q decryption queries gives a static-DH adversary elGamalKeyRecoveryToSDH g B making at
most Q + 1 SDH queries (one query at g for the public key α • g, plus one per decryption
query) with the same advantage (sdhAdvantage_elGamalKeyRecoveryToSDH,
isQueryBounded_elGamalKeyRecoveryToSDH).
All definitions and reductions here are stated for one fixed group with per-reduction query bounds
(isQueryBounded_dlToSDH, isQueryBounded_sdhToElGamalKeyRecovery,
isQueryBounded_elGamalKeyRecoveryToSDH) and query predicates (queriesSatisfy_dlToSDH,
queriesSatisfy_sdhToElGamalKeyRecovery), with no PPT efficiency certificate over a group family
(such as IsOraclePPT / IsOraclePPTOn), no asymptotic SDH assumption, no one-more
Diffie–Hellman reduction, and no Brown–Gallant–Cheon attack ([BS23], Exercise 16.3).
The theorems about sdhToElGamalKeyRecovery are therefore fixed-group steps toward the claim of
[BS23], Section 16.1.4 (p. 688), that a CCA adversary recovers the secret key if SDH is
easy in G, not the cited result: that claim needs the key-recovery adversary to be efficient
whenever the SDH adversary is, and no efficiency certificate for the reduction is proved here
(#5293).
Differences from the book #
- Groups are written additively as
ZMod q-modules:1is0,v ^ αisα • v,1 / vis-v, and the decryption query(1 / v, 1)is(-v, 0). - The fixed-group definitions and theorems assume only
[AddCommGroup G],[NeZero q]and[Module (ZMod q) G]; neither primality ofqnor thatggeneratesGis required. - [BS23], Section 16.1.4 (p. 688) states Attack Game 16.1 and the reduction
sdhToElGamalKeyRecovery.dlToSDHand the converseelGamalKeyRecoveryToSDHare additions of this library.dlToSDHshows that the game is no harder than discrete logarithm; the book's expectation that it is no easier, which it qualifies on the same page, is not formalized. elGamalKeyRecoveryExperimentis a stand-alone key-recovery oracle game backed by the algebraic decryption oracleelGamalDecryptOracle(computingpure (ct.2 - α • ct.1), matchingPrimeOrderGroupFamily.elGamalDecrypt), rather than thecca2GameOnindistinguishability game used for ElGamal inCslibFrontier/Crypto/Computational/ElGamal/Malleability.lean.- In Attack Game 16.1 the challenger sends no initial group element to the SDH adversary, whereas in
elGamalKeyRecoveryExperimentthe adversary receives the public keyα • g. ThussdhToElGamalKeyRecoveryignores the public key and preserves the query boundQ, whileelGamalKeyRecoveryToSDHqueriesgonce to formα • gand has query boundQ + 1.
Main definitions #
Cslib.Crypto.SDHSpec,Cslib.Crypto.SDHAdversary,Cslib.Crypto.sdhOracle,Cslib.Crypto.sdhExperiment,Cslib.Crypto.sdhAdvantage: Attack Game 16.1 in a fixed group.Cslib.Crypto.dlToSDH: the 1-query discrete-logarithm to static-DH reduction.Cslib.Crypto.ElGamalDecryptionSpec,Cslib.Crypto.ElGamalKeyRecoveryAdversary,Cslib.Crypto.elGamalDecryptOracle,Cslib.Crypto.elGamalKeyRecoveryExperiment,Cslib.Crypto.elGamalKeyRecoveryAdvantage: the multiplicative ElGamal key-recovery oracle game.Cslib.Crypto.sdhToElGamalKeyRecovery,Cslib.Crypto.elGamalKeyRecoveryToSDH: the reductions between static DH and ElGamal key recovery.
Main results #
Cslib.Crypto.sdhAdvantage_dlToSDH,Cslib.Crypto.isQueryBounded_dlToSDH,Cslib.Crypto.queriesSatisfy_dlToSDH: discrete logarithm reduces to 1-query static DH.Cslib.Crypto.elGamalDecryptOracle_neg_zero: queryingelGamalDecryptOracleat(-v, 0)equalssdhOracle q α v.Cslib.Crypto.elGamalKeyRecoveryAdvantage_sdhToElGamalKeyRecovery,Cslib.Crypto.isQueryBounded_sdhToElGamalKeyRecovery,Cslib.Crypto.queriesSatisfy_sdhToElGamalKeyRecovery: static DH reduces to ElGamal key recovery with the same advantage and query budgetQ.Cslib.Crypto.sdhAdvantage_elGamalKeyRecoveryToSDH,Cslib.Crypto.isQueryBounded_elGamalKeyRecoveryToSDH: ElGamal key recovery with budgetQreduces to static DH with budgetQ + 1.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Exercise 11.5 (p. 459) and Section 16.1.4 (Attack Game 16.1, p. 688).
Static Diffie–Hellman (Attack Game 16.1) #
The oracle interface of the static Diffie–Hellman game ([BS23], Section 16.1.4,
Attack Game 16.1, p. 688): each query is a group element v : G and is answered by a group
element.
The static Diffie–Hellman solve oracle ([BS23], Section 16.1.4, Attack Game 16.1,
p. 688, and Section 11.6.3, p. 455): on query v : G, return α • v (the textbook v ^ α). This
is also the oracle of the book's CDH solve query in Section 11.6.3 (the one-more Diffie–Hellman
game is not formalized here).
The static Diffie–Hellman experiment ([BS23], Section 16.1.4, Attack Game 16.1,
p. 688): draw a uniform secret α : ZMod q, run A against sdhOracle q α, and accept when the
adversary outputs α.
The static Diffie–Hellman advantage of A: its success probability in sdhExperiment.
Turn a discrete-logarithm adversary A into a 1-query static Diffie–Hellman adversary: query
the SDH oracle at g to obtain α • g and run A on the reply.
In sdhExperiment, dlToSDH g A is the discrete-logarithm experiment dlExperiment q g A.
dlToSDH g A wins the static Diffie–Hellman game with the exact discrete-logarithm advantage
of A.
dlToSDH g A makes at most 1 SDH query on every path.
Key-recovery oracle attack on multiplicative ElGamal #
The decryption oracle interface of multiplicative ElGamal ([BS23], Exercise 11.5,
p. 459, and Section 16.1.4, p. 688): a query is a ciphertext pair (v, e) : G × G and is answered
by the decrypted group element in G.
A key-recovery decryption-oracle adversary against multiplicative ElGamal: given the public key
u = α • g, it queries the decryption oracle on ciphertexts in G × G and outputs a guess for
the secret key α : ZMod q.
The multiplicative ElGamal decryption oracle under secret key α : ZMod q
([BS23], Exercise 11.5, p. 459): decrypts (v, e) to e - α • v (matching
PrimeOrderGroupFamily.elGamalDecrypt).
Key observation of [BS23], Section 16.1.4 (p. 688): querying
elGamalDecryptOracle at (-v, 0) (the additive form of (1 / v, 1)) equals sdhOracle q α v.
The key-recovery decryption-oracle experiment for multiplicative ElGamal ([BS23],
Section 16.1.4, p. 688): draw a uniform secret key α : ZMod q, pass the public key α • g to B
with access to elGamalDecryptOracle q α, and accept when B outputs α.
The key-recovery advantage of B against multiplicative ElGamal: its success probability in
elGamalKeyRecoveryExperiment.
The static-DH to ElGamal key-recovery reduction ([BS23], Section 16.1.4, p. 688):
given a static-DH adversary A, build the key-recovery adversary B that runs A and answers each
SDH query v : G by querying the ElGamal decryption oracle on (-v, 0) (the additive form of
(1 / v, 1)).
Running sdhToElGamalKeyRecovery A against the ElGamal decryption oracle runs A against the
SDH oracle.
The key-recovery experiment of sdhToElGamalKeyRecovery A is sdhExperiment q A: a
fixed-group step toward [BS23], Section 16.1.4 (p. 688), not the cited result, which
also needs the reduction to be efficient (#5293).
sdhToElGamalKeyRecovery A recovers the ElGamal secret key with the exact SDH advantage of
A: a fixed-group step toward [BS23], Section 16.1.4 (p. 688), not the cited result.
The book's claim needs the key-recovery adversary to be efficient whenever the SDH adversary is;
here there is no group family and no IsOraclePPT certificate for the reduction, only the query
bound isQueryBounded_sdhToElGamalKeyRecovery (#5293).
Query-bound certificate for sdhToElGamalKeyRecovery: if A makes at most Q SDH
queries, then sdhToElGamalKeyRecovery A makes at most Q decryption queries.
Every decryption query submitted by sdhToElGamalKeyRecovery A has second component 0
(the textbook (1 / v, 1)).
The converse reduction: turn an ElGamal key-recovery adversary B into a static-DH adversary
by querying g to obtain the public key α • g and answering each decryption query (v, e) with
e - α • v via one SDH query at v.
Running elGamalKeyRecoveryToSDH g B against sdhOracle q α runs B (α • g) against
elGamalDecryptOracle q α.
In sdhExperiment, elGamalKeyRecoveryToSDH g B is elGamalKeyRecoveryExperiment q g B.
elGamalKeyRecoveryToSDH g B wins the static-DH game with the exact key-recovery advantage of
B.
Query-bound certificate for elGamalKeyRecoveryToSDH: if B makes at most Q decryption
queries on every public key, then elGamalKeyRecoveryToSDH g B makes at most Q + 1 SDH
queries.