Pedersen commitments over a prime-order group family #
Over a PrimeOrderGroupFamily, Pedersen's commitment scheme ([Ped92], Section 3,
Theorem 3.1; [BS23], Section 8.12, Definition 8.8, Section 10.6.1, Fact 10.3 and
Theorem 10.4, and Exercise 20.5) uses a group description d and a public commitment key
h = α • g : F.Carrier d generated by a secret exponent α : ZMod (F.order d). To commit to a
message m : ZMod (F.order d) with randomness r : ZMod (F.order d), the committer computes
pedersenCommit d h m r = m • g + r • h.
On encoded group elements and natural-number exponents, encodePedersenCommit computes
F.encode d (F.pedersenCommit d h m r) in polynomial time from (d, encode h, m, r) using
F.encode d (F.generator d), F.smul, and F.add.
At a fixed group, pedersen d is the scheme as a typed Commitment.Scheme with keys,
commitments in F.Carrier d, messages and openings in ZMod (F.order d). It is correct
(pedersen_correct) and perfectly hiding at every key h ≠ 0 (pedersen_perfectlyHidingAt). Its
hiding advantage is at most 1 / q, with the event α = 0 as the only loss
(advantage_pedersen_hidingExperiment_le). Breaking its binding reduces exactly to the
discrete-logarithm experiment dlExperiment (succProbability_pedersen_bindingExperiment_le).
The family results below are stated for the word-level CommitmentScheme instance
pedersenScheme, with canonical binary message words (ValidPedersenMessage),
commitment-and-opening pair law (pedersenCommitPairLaw) and verification algorithm
pedersenVerify (V(m, c, o)). Its games draw d and then run the experiments of pedersen d
(pedersenHidingGame_eq, pedersenBindingGame_eq), and its hiding bound is derived from the typed
one. We establish:
- Algebraic and homomorphic laws (
pedersenCommit_zero,pedersenCommit_add,pedersenCommit_neg,pedersenCommit_sub,pedersenCommit_smul) and polynomial-time encoded evaluation (encodePedersenCommit,encodePedersenCommit_encode,computableInPolyTime_encodePedersenCommit). - Unconditional hiding (
pedersenCommitLaw_eq_uniform_of_ne_zero,pedersenCommitLaw_eq_of_ne_zero,pedersen_perfectlyHidingAt,advantage_pedersen_hidingExperiment_le,pedersenHidingForKey_eq_of_ne_zero,advantage_pedersenHidingGame_le,negligible_advantage_pedersenHidingGame_ideal,pedersenScheme_statisticalHiding_ideal): for every non-identity commitment keyh ≠ 0, a uniform blinding exponentr ← PMF.uniformOfFintype (ZMod (F.order d))makespedersenCommit d h m runiformly distributed onF.Carrier dand independent ofm. Consequently, at any fixeddandh ≠ 0, the chosen-message hiding distributions forbit = falseandbit = trueinF.pedersenScheme.hidingForKey ⟨d, h⟩are identical against every (even computationally unbounded) two-stage adversaryEncryption.WordAdversary. When the key exponentα ← PMF.uniformOfFintype (ZMod (F.order d))is drawn uniformly from all ofZMod (F.order d)(matchingdiscreteLogGameand [BS23], Exercise 20.5), the degenerate keyα = 0occurs with probability1 / F.order d, bounding any unbounded adversary's hiding advantage inF.pedersenScheme.hidingGame (F.pedersenKeyDist setup)by1 / mwhenever supported groups have order at leastm. That game draws the key exponent and the commitment randomness exactly uniformly at thePMFlevel, so its asymptotic hiding theorems are ideal-sampling steps; the hiding bound for the fair-coin samplers isnegligible_advantage_pedersenHidingProbGameinCslibFrontier/Crypto/Computational/PedersenCommitment/ProbComp.lean. - Computational binding under the discrete-logarithm assumption (
pedersenVerify,inv_mul_eq_of_pedersenCommit_eq,succProbability_pedersen_bindingExperiment_le,extractNat_eq_of_pedersenCommit_eq,pedersenToDLAdversary,pedersenToDLAdversary_encode,succProbability_pedersenBindingGame_le_discreteLogGame,isPPTOn_pedersenToDLAdversary): any verified double opening(c, (m₀, o₀), (m₁, o₁))withm₀ ≠ m₁andpedersenVerify d h mᵢ c oᵢ = truefori ∈ {0, 1}underh = α • ghas(ofBits m₀ : ZMod q) ≠ (ofBits m₁ : ZMod q), forces(ofBits o₀ : ZMod q) ≠ (ofBits o₁ : ZMod q), and yieldsα = (o₁ - o₀)⁻¹ * (m₀ - m₁)moduloq([Ped92], Section 3, Theorem 3.1; [BS23], Section 10.6.1, Fact 10.3 and Theorem 10.4), computed in polynomial time via Fermat's little theorem asextractNat (F.order d) o₁ m₀ o₀ m₁(CslibFrontier.Crypto.Computational.DiscreteLog.Extract). This gives an exact zero-loss reduction fromF.pedersenScheme.bindingGametodiscreteLogGame. The word reductionpedersenToDLAdversarychecks the collision with the encoded verifierencodePedersenVerifyand is, on every key, the typed reductionpedersenToDLrun on the adversary read throughpedersenCollisionOf(pedersenToDLAdversary_encode), so the word bound is the typed one at each group. The asymptotic binding theorem, for the fair-coin key lawpedersenKeyDistProb, isDiscreteLog.pedersenScheme_binding_pedersenKeyDistProbinCslibFrontier/Crypto/Computational/PedersenCommitment/ProbComp.lean.
Main definitions #
Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommit,Cslib.Crypto.PrimeOrderGroupFamily.encodePedersenCommit: algebraic and encoded Pedersen commitment evaluation.Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommitLaw,Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommitPairLaw: the commitment element distribution and the(c, o)commitment-and-opening pair distribution for a uniform blinding exponentr : ZMod (F.order d).Cslib.Crypto.PrimeOrderGroupFamily.pedersen: Pedersen commitment as a typedCommitment.Schemeat a fixed group.Cslib.Crypto.PrimeOrderGroupFamily.pedersenToDL: the typed reduction from a binding adversary todlExperiment.Cslib.Crypto.PrimeOrderGroupFamily.ValidPedersenMessage,Cslib.Crypto.PrimeOrderGroupFamily.pedersenVerify: canonical message space and verification algorithmV(m, c, o).Cslib.Crypto.PrimeOrderGroupFamily.validPedersenMessageBool,Cslib.Crypto.PrimeOrderGroupFamily.encodePedersenVerify: the polynomial-time message check and verification on encoded public group elements and message, commitment and opening words.Cslib.Crypto.PrimeOrderGroupFamily.PedersenKey,Cslib.Crypto.PrimeOrderGroupFamily.encPedersenKey,Cslib.Crypto.PrimeOrderGroupFamily.pedersenKeyDist,Cslib.Crypto.PrimeOrderGroupFamily.pedersenScheme: Pedersen commitment packaged as a public-parameterCommitmentScheme.Cslib.Crypto.PrimeOrderGroupFamily.pedersenToDLAdversary: reduction from a binding adversary to the discrete-logarithm game.Cslib.Crypto.PrimeOrderGroupFamily.pedersenHidingAdversary,Cslib.Crypto.PrimeOrderGroupFamily.pedersenCollisionOf: word-level hiding and binding adversaries read as typed ones.
Main results #
Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommit_add,Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommit_smul,Cslib.Crypto.PrimeOrderGroupFamily.encodePedersenCommit_encode,Cslib.Crypto.PrimeOrderGroupFamily.computableInPolyTime_encodePedersenCommit: homomorphic laws and polynomial-time encoded commitment evaluation.Cslib.Crypto.PrimeOrderGroupFamily.encodePedersenVerify_encode,Cslib.Crypto.PrimeOrderGroupFamily.computableInPolyTime_encodePedersenVerify: encoded verification computespedersenVerifyin polynomial time.Cslib.Crypto.PrimeOrderGroupFamily.pedersen_correct,Cslib.Crypto.PrimeOrderGroupFamily.pedersen_perfectlyHidingAt,Cslib.Crypto.PrimeOrderGroupFamily.advantage_pedersen_hidingExperiment_le,Cslib.Crypto.PrimeOrderGroupFamily.inv_mul_eq_of_pedersenCommit_eq,Cslib.Crypto.PrimeOrderGroupFamily.succProbability_pedersen_bindingExperiment_le: correctness, hiding and binding ofpedersen d.Cslib.Crypto.PrimeOrderGroupFamily.pedersenHidingGame_eq,Cslib.Crypto.PrimeOrderGroupFamily.pedersenBindingGame_eq: the word-level games drawd, then run the experiments ofpedersen d.Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommitLaw_eq_uniform_of_ne_zero,Cslib.Crypto.PrimeOrderGroupFamily.pedersenCommitLaw_eq_of_ne_zero,Cslib.Crypto.PrimeOrderGroupFamily.pedersenHidingForKey_eq_of_ne_zero: perfect hiding forh ≠ 0.Cslib.Crypto.PrimeOrderGroupFamily.extractNat_eq_of_pedersenCommit_eq: two distinct openings of one commitment underh = α • grecoverαwithextractNat; shared with the discrete-logarithm hash reduction inCslibFrontier.Crypto.Computational.DiscreteLog.GroupHash.Cslib.Crypto.PrimeOrderGroupFamily.pedersenToDLAdversary_encode: the word reduction is the typed reductionpedersenToDLon the adversary read throughpedersenCollisionOf.Cslib.Crypto.PrimeOrderGroupFamily.isPPTOn_pedersenToDLAdversary: the binding reduction is uniform strict PPT.
Ideal-sampling steps #
The games under the key law F.pedersenKeyDist setup draw the key exponent exactly uniformly at
the PMF level, and the hiding game also draws the commitment randomness that way. These results
are steps toward the theorems of
CslibFrontier/Crypto/Computational/PedersenCommitment/ProbComp.lean, which sample with
sampleExp, not the cited results.
Cslib.Crypto.PrimeOrderGroupFamily.advantage_pedersenHidingGame_le,Cslib.Crypto.PrimeOrderGroupFamily.negligible_advantage_pedersenHidingGame_ideal,Cslib.Crypto.PrimeOrderGroupFamily.pedersenScheme_statisticalHiding_ideal: unconditional1 / mhiding bound over uniformα : ZMod (F.order d), and its asymptotic form, towardnegligible_advantage_pedersenHidingProbGame. A nativeCommitmentScheme.StatisticalHidinginstance cannot be stated yet, becauseCommitmentScheme.commitDisttakes no security parameter (#6133).Cslib.Crypto.PrimeOrderGroupFamily.succProbability_pedersenBindingGame_le_discreteLogGame: exact binding-to-discrete-logarithm bound, whichDiscreteLog.pedersenScheme_binding_pedersenKeyDistProbapplies the assumption through.
References #
- T. P. Pedersen, Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing, Section 3, Theorem 3.1.
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6, Section 8.12 (Definition 8.8, p. 344), Section 10.6.1 (Fact 10.3 and Theorem 10.4, pp. 414–415), and Exercise 20.5 (pp. 843–844).
Algebraic and encoded Pedersen commitments #
Algebraic Pedersen commitment ([Ped92], Section 3; [BS23], Section 10.6.1 and
Exercise 20.5): commit to message m : ZMod (F.order d) with randomness r : ZMod (F.order d)
under commitment key h : F.Carrier d as m • g + r • h.
Additive homomorphism of Pedersen commitments: committing to (m₁ + m₂, r₁ + r₂) equals
the sum of the individual commitments.
Scalar-multiplication homomorphism of Pedersen commitments.
Under a commitment key h = α • g, pedersenCommit d (α • g) m r = (m + r * α) • g.
Two openings (m₀, r₀) and (m₁, r₁) produce the same commitment under h = α • g if and
only if m₀ + r₀ * α = m₁ + r₁ * α in ZMod (F.order d).
encodePedersenCommit computes F.encode d (F.pedersenCommit d h m r) on encoded group
elements.
Encoded Pedersen commitment evaluation is computable in polynomial time.
Unconditional hiding and CommitmentScheme packaging #
The distribution of F.pedersenCommit d h m r when r is drawn uniformly from
ZMod (F.order d).
Perfect hiding for any non-identity commitment key h ≠ 0 ([Ped92], Section 3,
Theorem 3.1): for every message m : ZMod (F.order d), F.pedersenCommitLaw d h m equals the
uniform distribution (PMF.uniformOfFintype (ZMod (F.order d))).map (· • F.generator d) on
F.Carrier d.
Perfect hiding ([Ped92], Section 3, Theorem 3.1): for any h ≠ 0 and any two
messages m₀, m₁ : ZMod (F.order d), the commitment distributions F.pedersenCommitLaw d h m₀ and
F.pedersenCommitLaw d h m₁ are identical.
Bind form of pedersenCommitLaw_eq_uniform_of_ne_zero: for any h ≠ 0 and message m,
sampling r ← PMF.uniformOfFintype (ZMod (F.order d)) and passing F.pedersenCommit d h m r to a
continuation f has the same distribution as sampling γ ← PMF.uniformOfFintype (ZMod (F.order d))
and passing γ • F.generator d.
Typed Pedersen commitments at a fixed group #
Pedersen's commitment scheme in the group F.Carrier d ([Ped92], Section 3;
[BS23], Section 10.6.1 and Exercise 20.5). Key generation draws a uniform exponent α and
publishes h = α • g. Committing to m draws a uniform opening r and returns
pedersenCommit d h m r = m • g + r • h. Verification recomputes the commitment.
Pedersen commitments are correct: every honest opening verifies.
The Pedersen commitment to m under h is distributed as pedersenCommitLaw d h m.
Perfect hiding at a non-identity key ([Ped92], Section 3, Theorem 3.1): for h ≠ 0,
the commitment is uniform on F.Carrier d whatever the message.
Key generation outputs the identity h = 0 exactly when it draws α = 0, which has
probability 1 / q.
Hiding of Pedersen commitments ([Ped92], Section 3, Theorem 3.1; [BS23],
Exercise 20.5). The only loss is the event that key generation draws α = 0
(succProbability_pedersen_keyGen_zero_eq_inv); every other key is perfectly hiding
(pedersen_perfectlyHidingAt). So every adversary, even a computationally unbounded one, has
hiding advantage at most 1 / q.
Two different openings of one Pedersen commitment under h = α • g use different
randomness.
Two openings of one Pedersen commitment reveal the discrete logarithm ([Ped92],
Section 3, Theorem 3.1; [BS23], Section 10.6.1, Fact 10.3): if (m₀, r₀) ≠ (m₁, r₁) give
the same commitment under h = α • g, then α = (r₁ - r₀)⁻¹ * (m₀ - m₁).
A Pedersen binding collision under h = α • g reveals α.
The discrete-logarithm adversary built from a Pedersen binding adversary: run it with the
instance h as the commitment key and read α off the two openings ([BS23],
Section 10.6.1, Theorem 10.4).
Exact binding-to-discrete-logarithm reduction ([BS23], Section 10.6.1,
Theorem 10.4; [Ped92], Section 3, Theorem 3.1): whenever the binding adversary opens one
commitment to two messages, pedersenToDL outputs the discrete logarithm of the key.
A message word m : List Bool is a canonical Pedersen message for group description d if
ofBits m < F.order d and m is the canonical binary representation (ofBits m).bits. Requiring
canonical binary representation ensures that distinct message words in the message space represent
distinct elements of ZMod (F.order d).
The distribution of (F.encode d (F.pedersenCommit d h m r), r.val.bits) (encoded commitment
string and canonical binary opening string) when r is drawn uniformly from ZMod (F.order d).
The commitment-string marginal of pedersenCommitPairLaw is
(pedersenCommitLaw d h m).map (F.encode d).
Pedersen commitment verification V(m, c, o) ([BS23], Section 8.12, p. 344, and
Section 10.6.1, p. 414; [Ped92], Section 3): verify that m is a canonical message word for
d (ofBits m < F.order d and (ofBits m).bits = m) and that recomputing the commitment from
(ofBits m, ofBits o) under (d, h) yields c.
pedersenVerify accepts only canonical Pedersen message words (ValidPedersenMessage).
Correctness of pedersenVerify: every (c, o) in the support of
pedersenCommitPairLaw d h (ofBits m) for a canonical message word m is accepted by
pedersenVerify d h m c o.
Boolean decision procedure for ValidPedersenMessage d m (ofBits m < F.order d and
(ofBits m).bits = m).
validPedersenMessageBool is computable in polynomial time from (d, m).
Composition rule for validPedersenMessageBool.
Pedersen verification from (description, encoded public element), message, commitment and
opening words. The public element is already encoded; no discrete logarithm or semantic group
value is supplied to this algorithm.
The encoded verifier computes exactly the verifier used by pedersenScheme.
Encoded Pedersen verification is polynomial-time in all of its input words.
Encoding of a PedersenKey: the framed group description F.encDesc k.desc followed by the
encoded public element F.encode k.desc k.element (encPedersenKey_apply).
The tuple of the fields of encPedersenKey.
Draw d ← setup n and a uniform key exponent α ← PMF.uniformOfFintype (ZMod (F.order d)),
returning the Pedersen key ⟨d, α • g⟩ ([BS23], Exercise 20.5, pp. 843–844).
Pedersen's commitment scheme as an instance of the general public-parameter CommitmentScheme
([BS23], Section 8.12, Definition 8.8, p. 344, and Section 10.6.1, p. 414;
[Ped92], Section 3).
The typed hiding adversary run by a word-level one at the group d. It gives the word-level
adversary the encoded key and reads its two message words as exponents, as pedersenScheme
does. When either word is not a canonical message, both challenge messages are the first word, as
hidingForKey commits to the first word then.
At the key ⟨d, h⟩, the word-level hiding experiment of pedersenScheme is the left-or-right
experiment of pedersen d played by pedersenHidingAdversary.
The word-level hiding game of pedersenScheme draws d, then runs the hiding experiment of
pedersen d played by pedersenHidingAdversary.
For any non-identity commitment key h ≠ 0, F.pedersenScheme.hidingForKey ⟨d, h⟩ produces the
exact same output distribution for any two hidden bits b₁ and b₂, against every (even
computationally unbounded) Encryption.WordAdversary.
At any non-identity commitment key h ≠ 0, the hiding advantage of any (computationally
unbounded) adversary between bit = false and bit = true is 0.
Unconditional hiding bound for Pedersen commitments: when every supported group at
parameter n has order at least m > 0, any (even computationally unbounded)
Encryption.WordAdversary has distinguishing advantage at most 1 / m in
F.pedersenScheme.hidingGame (F.pedersenKeyDist setup). This is
advantage_pedersen_hidingExperiment_le at each supported group.
Ideal-sampling step toward negligible_advantage_pedersenHidingProbGame, not the cited result:
when every supported group at parameter n has order at least m n > 0 and 1 / m n is
negligible, every (even computationally unbounded) Encryption.WordAdversary has negligible
advantage in F.pedersenScheme.hidingGame (F.pedersenKeyDist setup), whose key exponent and
commitment randomness are drawn exactly uniformly at the PMF level (after [Ped92],
Section 3, Theorem 3.1; [BS23], Section 8.12, Definition 8.8, and Exercise 20.5). The
native CommitmentScheme form is blocked on #6133.
Ideal-sampling step toward negligible_advantage_pedersenHidingProbGame, not the cited result:
pedersenScheme is statistically hiding (CommitmentScheme.StatisticalHiding) under the key law
F.pedersenKeyDist setup, where the key exponent and the commitment randomness are drawn exactly
uniformly at the PMF level (after [Ped92], Section 3, Theorem 3.1; [BS23],
Section 8.12, Definition 8.8, and Exercise 20.5). CommitmentScheme.commitDist takes no
security parameter, so pedersenScheme cannot commit with the fair-coin sampler
pedersenCommitProb (#6133).
Computational binding under the discrete-logarithm assumption #
Two openings of one Pedersen commitment reveal the discrete logarithm ([Ped92],
Section 3, Theorem 3.1; [BS23], Section 10.6.1, Fact 10.3): if openings
(m₀, r₀) ≠ (m₁, r₁), read in ZMod (F.order d), give the same commitment under h = α • g,
then extractNat recovers α = (r₁ - r₀)⁻¹ * (m₀ - m₁). This is
inv_mul_eq_of_pedersenCommit_eq on natural-number exponents.
Any valid Pedersen binding collision (c, (m₀, o₀), (m₁, o₁)) under h = α • g recovers α
with extractNat ([Ped92], Section 3, Theorem 3.1; [BS23],
Section 10.6.1, Fact 10.3).
Read a word-level double opening (c, (m₀, o₀), (m₁, o₁)) under the key ⟨d, h⟩ as a typed
one. The messages and openings are read as exponents and the commitment is recomputed from the
first opening. When the words are not a collision for pedersenScheme, the result is the trivial
non-collision with equal messages.
The typed reading of a word-level double opening is a collision for pedersen d exactly when
the words are a collision for pedersenScheme.
The word-level binding game of pedersenScheme draws d, then runs the binding experiment of
pedersen d played by the word-level adversary read through pedersenCollisionOf.
Turn a pedersenScheme binding adversary into a discrete-logarithm adversary
([BS23], Section 10.6.1, Theorem 10.4, pp. 414–415). It gives the adversary the
encoded Pedersen key encPair F.encDesc encBits input. When the reply (c, (m₀, o₀), (m₁, o₁))
is a binding collision, checked with encodePedersenVerify on the encoded key, it outputs α in
binary, computed with extractNat from the two openings; otherwise it outputs [], the binary
word of 0. On every key it is the typed reduction pedersenToDL run on the adversary read
through pedersenCollisionOf (pedersenToDLAdversary_encode).
The word reduction is the typed one: on the encoded key of any h,
pedersenToDLAdversary runs the typed reduction pedersenToDL on the binding adversary read
through pedersenCollisionOf, the reading of pedersenBindingGame_eq, and writes the exponent it
outputs as the binary word of its canonical value.
Exact binding-to-discrete-logarithm reduction ([BS23], Section 10.6.1,
Theorem 10.4, pp. 414–415; [Ped92], Section 3, Theorem 3.1): for every security parameter
n, the success probability of adversary in
F.pedersenScheme.bindingGame (F.pedersenKeyDist setup) is at most the discrete-logarithm success
probability of pedersenToDLAdversary adversary. At each group d this is the typed bound
succProbability_pedersen_bindingExperiment_le, through pedersenBindingGame_eq and
pedersenToDLAdversary_encode.
pedersenToDLAdversary is uniform strict PPT whenever the binding adversary is.