Pedersen Commitment
Protocol Description
Setup
Let G be a (multiplicative) cyclic group of prime order for which the Discrete Logarithm problem is intractable. The key generation procedure publishes randomly chosen generators g,h∈G, which serve as both the commitment key and verification key.
Commit
To commit to a number m∈{0,...,∣G∣−1}, committer picks a random z∈{0,...,∣G∣−1} and sends c=gm⋅hz.
Open
To open a commitment c, committer sends (m,z). Verifier checks that c=gm⋅hz.
Properties of the commitment:
perfect hiding
computational binding
Additive Homomorphism
One important property of Pedersen commitments is that they are additively homomorphic. This means that the verifier can take two commitments c1 and c2, to values m1,m2∈{0,...,∣G∣−1} (with m1,m2 known to the committer but not to the verifier), and the verifier on its own can derive a commitment c3 to m3=m1+m2, such that the prover is able to open c3 to m3. This is done by simply letting c3=c1⋅c2. As for “opening information” provided by the prover, if c1=hm1⋅gz1 and c2=hm2⋅gz2, then c3=hm1+m2⋅gz1+z2, so the opening information for c3 is simply (m1+m2,z1+z2). In summary, Pedersen commitments over a multiplicative group G are additively homomorphic, with addition of messages corresponds to group-multiplication of commitments.
Perfect HVZK Proof of Knowledge of Opening
It is possible to the prover to prove that it knows how to open a commitment c to some value, without actually opening the commitment.
Protocol
Let G be a (multiplicative) cyclic group of prime order over which the Discrete Logarithm relation is hard, with randomly chosen generators g and h.
Input is c=gm⋅hz. Prover knows m and z, Verifier only knows c,g,h.
Prover picks d,r∈{0,...,∣G∣−1} and sends to verifier a=gd⋅hr.
Verifier sends challenge e chosen at random from {0,...,∣G∣−1}.
Prover sends m′=me+d and z′=ze+r
Verifier checks that gm′⋅hz′=ce⋅a
Properties of the protocol:
perfect completeness
special soundness
perfect HVZK
Establishing A Product Relationship Between Committed Values
Suppose the committer sends commitments (c1,c2,c3) that is claimed to be a commitments to values (m1,m2,m1⋅m2). Pedersen commitments are not multiplicatively homomorphic but it is possible to the prover to prove to the verifier that c3 indeed commits to m1⋅m2, without actually opening up c3 and thereby revealing m1⋅m2.
Protocol
Let G be a (multiplicative) cyclic group of prime order over which the Discrete Logarithm relation is hard.
Input is ci=gmi⋅hri for i∈{1,2,3} such that m3=m1⋅m2mod∣G∣.
Prover knows mi and ri for all i∈{1,2,3}, verifier only knows c1,c2,c3,g,h.
Prover picks b1,...,b5∈{0,...,∣G∣−1} and sends to verifier three values:
Verifier sends challenge e chosen at random from {0,...,∣G∣−1}.
Prover sends:
Verifier checks that the following three equalities hold:
Properties of the protocol:
perfect completeness
special soundness
perfect HVZK
Last updated