Decisional Diffie-Hellman (DDH) Assumption #
This file defines the DDH assumption parametrically over any CryptoWord W,
following the pattern of DL.lean for discrete logarithm.
DDH Game #
The DDH game captures the difficulty of distinguishing:
- Real:
(g^a, g^b, g^{ab})— the true DH shared secret - Ideal:
(g^a, g^b, g^c)— a random group element
At the abstract level with Word : CryptoWord W, the DDH game becomes:
- Real: sample
a, b, give(ecdh(a, G), ecdh(b, G), ecdh(a, ecdh(b, G)))to adversary - Ideal: sample
a, b, c, give(ecdh(a, G), ecdh(b, G), c)to adversary
Main definitions #
DDHDef— a Diffie-Hellman group (ecdh operation + key generation)DDH_Game_Real/DDH_Game_Ideal— the real/ideal DDH gamesDDH_Advantage— advantage of an adversary in breaking DDH
Usage in EDHOC #
EDHOC Method 3 (STAT-STAT) uses 3 DH operations:
- Ephemeral-ephemeral:
ecdh(x, g_y)— forprk_2e - Static-ephemeral:
ecdh(r, g_x)— forprk_3e2m - Static-ephemeral:
ecdh(i, g_y)— forprk_4e3m
Each DH operation contributes one ε_ddh to the security bound.
Cross-Validation #
| Property | This file | Textbook |
|---|---|---|
| Game structure | DDH_Game_Real/Ideal | Boneh-Shoup Def. 11.2 |
| Advantage | Advantage(Real, Ideal) | |Pr[W₀] - Pr[W₁]| |
| Key generation | DDHDef.keygen | Implicit in group sampling |
Equivalent formalizations:
- EasyCrypt:
DDHtheory inec-toolbox/theories/crypto/DDH.ec - CryptoVerif:
DDH(G, Z, g, exp, exp', mult)macro - CatCrypt codebase variants:
Examples/ElGamal.lean:DDH_real/DDH_idealoverCyclicGroup G(group-theoretic)ElectionGuard/Security.lean:DDH_real/DDH_randomoverEGParams G(election-specific)
References #
- Boneh & Shoup, A Graduate Course in Applied Cryptography, §11.4, Def. 11.2
- Katz & Lindell, Introduction to Modern Cryptography, §8.3, Def. 8.62
- Diffie & Hellman, New Directions in Cryptography, IEEE-IT 1976
- RFC 9528 — EDHOC, Section 9 (security considerations)
DDH Definition #
Abstract Diffie-Hellman group definition, parametric over SampleableType W.
- ecdh : W → W → W
DH key agreement:
ecdh(private_key, public_key)→ shared_secret. Modelsp256_ecdhin lakers'Cryptotrait. - keygen : Core.SPComp (W × W)
Key generation: produces
(private_key, public_key). Modelsp256_generate_key_pairin lakers'Cryptotrait. Key generation is heap-independent.
Instances For
DDH Games #
Type of DDH adversary: receives a DH triple and must distinguish real from ideal.
Equations
- CatCrypt.Crypto.Assumptions.DDH_Adversary W = (W → W → W → CatCrypt.Core.SPComp Bool)
Instances For
DDH real game: adversary receives (g^a, g^b, ecdh(a, g^b)).
The third element is the true DH shared secret.
Equations
- One or more equations did not get rendered due to their size.
Instances For
DDH ideal game: adversary receives (g^a, g^b, c) where c is random.
Equations
- One or more equations did not get rendered due to their size.
Instances For
DDH advantage: ability to distinguish (g^a, g^b, g^{ab}) from (g^a, g^b, random).