Documentation

CatCryptCore.Examples.Commitments.Pedersen

Pedersen Commitment Scheme #

This file defines the Pedersen commitment scheme over a pairing group and proves:

  1. Perfect hiding: The hiding advantage is exactly 0 for any adversary. The proof uses a bijection argument: for any two messages m₀, m₁, the map r ↦ r + β⁻¹ · (m₁ - m₀) is a bijection on ZMod p (when β ≠ 0), making the commitment distributions identical.

  2. Computational binding from DLog: Any adversary that breaks binding can be used to solve the discrete logarithm problem. Specifically, Binding_Advantage ≤ DL_Advantage via an explicit reduction.

  3. UC wrapping: Perfect hiding lifts to UC emulation at ε = 0.

Construction #

Given a pairing group with generators g₁ and a second generator h = g₁^β (where β is the secret trapdoor, unknown to the committer):

References #

Pedersen Parameters #

Parameters for the Pedersen commitment scheme.

The scheme operates in the source group G₁ of a pairing group P. The second generator h = g₁^β is determined by the secret exponent β. Both messages and randomness live in ZMod P.p.

The key security property is that β is unknown to the committer:

  • Hiding holds unconditionally (information-theoretically) when β ≠ 0
  • Binding holds computationally, assuming DLog is hard
Instances For

    Commitment Operations #

    Pedersen commitment: C = g₁^m · h^r = g₁^(m + β·r).

    The commitment is computed as a product of two group elements: one determined by the message, one by the randomness.

    Equations
    Instances For

      The commitment equals g₁^(m + β·r) when expressed as a single exponentiation.

      Verification: check that C = g₁^m · h^r.

      Equations
      Instances For

        Hiding Game #

        Pedersen hiding adversary: chooses two messages, then distinguishes from commitment.

        Instances For

          Pedersen hiding game with bit b: commit to m_b with fresh randomness.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Perfect Hiding Proof #

            Key algebraic identity: shifting the randomness by δ = β⁻¹ · (m₁ - m₀) transforms a commitment to m₀ into a commitment to m₁.

            Specifically: commit(m₁, r) = commit(m₀, r + β⁻¹·(m₁ - m₀)).

            For any two messages, the commitment games are equal.

            This is the core of perfect hiding: sampling r uniformly and computing commit(m₀, r) gives the same distribution as commit(m₁, r), because the bijection r ↦ r + β⁻¹·(m₁ - m₀) preserves uniformity.

            Perfect hiding: The Pedersen hiding advantage is exactly 0.

            For any adversary A, the hiding games for bit 0 and bit 1 produce identical distributions, regardless of which messages the adversary chooses.

            Binding Game and DLog Reduction #

            The DLog game specialized for Pedersen: sample β, give h = g₁^β to adversary.

            We need a game where β is sampled (rather than fixed as in PedersenParams), so the reduction works for any β. The adversary outputs (m₁, m₂, r₁, r₂).

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              The DLog reduction adversary: given h = g₁^β and a binding break (m₁, m₂, r₁, r₂) with m₁ ≠ m₂ and g₁^(m₁ + β·r₁) = g₁^(m₂ + β·r₂), extract β = (m₁ - m₂) · (r₂ - r₁)⁻¹.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Algebraic Core Lemmas #

                theorem CatCrypt.Examples.Commitments.Pedersen.PedersenParams.binding_extracts_dlog (P : Crypto.PairingGroup) [Fact (Nat.Prime Crypto.PairingGroup.p)] (β m₁ m₂ r₁ r₂ : ZMod Crypto.PairingGroup.p) (hne : m₁ ≠ m₂) (hcommit : m₁ + β * r₁ = m₂ + β * r₂) :
                (m₁ - m₂) * (r₂ - r₁)⁻¹ = β

                When m₁ ≠ m₂ and m₁ + β·r₁ = m₂ + β·r₂ in ZMod p, we can extract β = (m₁ - m₂) · (r₂ - r₁)⁻¹.

                This is the algebraic heart of the binding-to-DLog reduction.

                Binding Security Bound #

                Computational binding from DLog: Breaking Pedersen binding implies solving DLog.

                Given an adversary A that breaks binding with advantage ε, we construct a DLog adversary binding_to_dlog A with advantage at least ε.

                The proof proceeds by:

                1. Unfolding both games to expose the common sample β >>= (A (g₁^β) >>= ...)
                2. Applying prTrue_bind_mono at each bind layer
                3. Using the algebraic lemma to show a binding break implies a DLog solution

                UC Wrapping #

                Combined Security Statement #

                Full Pedersen security: perfect hiding and computational binding.

                • Hiding: The hiding advantage is 0 for any adversary (information-theoretic).
                • Binding: The binding advantage is bounded by the DLog advantage (computational).

                Together, these give the standard Pedersen security guarantee: the scheme is perfectly hiding and computationally binding under DLog.