Documentation

CatCryptCore.Crypto.Assumptions.DDH

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:

At the abstract level with Word : CryptoWord W, the DDH game becomes:

Main definitions #

Usage in EDHOC #

EDHOC Method 3 (STAT-STAT) uses 3 DH operations:

  1. Ephemeral-ephemeral: ecdh(x, g_y) — for prk_2e
  2. Static-ephemeral: ecdh(r, g_x) — for prk_3e2m
  3. Static-ephemeral: ecdh(i, g_y) — for prk_4e3m

Each DH operation contributes one ε_ddh to the security bound.

Cross-Validation #

PropertyThis fileTextbook
Game structureDDH_Game_Real/IdealBoneh-Shoup Def. 11.2
AdvantageAdvantage(Real, Ideal)|Pr[W₀] - Pr[W₁]|
Key generationDDHDef.keygenImplicit in group sampling

Equivalent formalizations:

References #

DDH Definition #

Abstract Diffie-Hellman group definition, parametric over SampleableType W.

  • ecdh a b models scalar multiplication in the group
  • keygen samples a key pair (private, public)
  • ecdh : WWW

    DH key agreement: ecdh(private_key, public_key) → shared_secret. Models p256_ecdh in lakers' Crypto trait.

  • keygen : Core.SPComp (W × W)

    Key generation: produces (private_key, public_key). Models p256_generate_key_pair in lakers' Crypto trait.

  • keygen_isPure : self.keygen.IsPure

    Key generation is heap-independent.

Instances For

    DDH Games #

    @[reducible, inline]

    Type of DDH adversary: receives a DH triple and must distinguish real from ideal.

    Equations
    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).

          Equations
          Instances For

            IsPure Proofs #

            theorem CatCrypt.Crypto.Assumptions.DDH_Game_Real_isPure {W : Type} [SampleableType W] (D : DDHDef W) (A : DDH_Adversary W) (hA : ∀ (x y z : W), (A x y z).IsPure) :
            theorem CatCrypt.Crypto.Assumptions.DDH_Game_Ideal_isPure {W : Type} [SampleableType W] (D : DDHDef W) (A : DDH_Adversary W) (hA : ∀ (x y z : W), (A x y z).IsPure) :