Post · 2 min read· pp. 522–523

Pedersen commitments

tl;dr: Pedersen commitments [^Pede91Comm] are one of the most important cryptographic primitives for a beginner to understand, in my opinion.

$ $

Algorithms

CM.Gen(G)→ck\mathsf{CM.Gen}(\mathbb{G}) \rightarrow \mathsf{ck}

Pick two random group elements in \Gr\Gr as the commitment key:

G\randget\GrH\randget\Gr\begin{align} G \randget\Gr\\ H \randget\Gr\\ \end{align}

It is crucial that this is done correctly such that nobody knows τ\tau such that H=τGH = \tau G.

Return:

\ck←(G,H)\begin{align} \ck \gets (G, H) \end{align}

CM.Commit(\ck,m;r)→C\mathsf{CM.Commit}(\ck, m; r) \rightarrow C

Parse the commitment key:

(G,H)\parse\ck\begin{align} (G, H)\parse \ck \end{align}

Commit:

C←mG+rH\begin{align} C \gets m G + rH \end{align}

The randomness rr must be picked freshly for every mm! Committing to different messages m1m_1 and m2m_2 using the same randomness rr would leak! i.e., Given a commitment m1G+rHm_1 G + rH and another commitment m2G+rHm_2 G + rH with the same randomness, one can subtract and obtain (m1−m2)G(m_1 - m_2)G which leaks the difference!

Security

Binding

We are going to loosely define binding as the property that guarantees no adversary that is given a correctly set up \ck\ck and a commitment CC can find two different openings (m1,r1)(m_1, r_1) and (m2,r2)(m_2, r_2) such that they both commit as CC.

It is easy to show by contradiction that such an adversary \Adv\Adv would yield another adversary \Badv\Badv that can solve discrete logorithms on random (G,H)(G, H) instances.

Proof: Suppose that

∃m1≠m2,∃r1≠r2 s.t. m1G+r1H=m2G+r2H⇒(m1−m2)G+(r1−r2)H=0⇒(r1−r2)H=(m2−m1)G⇒H=m2−m1r1−r2G⇒τ=m2−m1r1−r2\begin{align} \exists m_1 \ne m_2, \exists r_1 \ne r_2\ \text{s.t.}\ m_1 G + r_1 H &= m_2 G + r_2 H\Rightarrow\\ (m_1 - m_2) G + (r_1 - r_2) H &= 0\Rightarrow\\ (r_1 - r_2) H &= (m_2 - m_1) G\Rightarrow\\ H &= \frac{m_2 - m_1}{r_1 - r_2}G\Rightarrow\\ \orange{\tau} &= \frac{m_2 - m_1}{r_1 - r_2} \end{align}

Conclusion

This post has an associated tweet:

I think Pedersen commitments are a gentle starting point for teaching cryptography to anyone!

A **commitment** is a sealed envelope with a message m in it such that:

  1. no one can tell what m is in it (hiding)
  2. no one can open it to a different m (binding)

Pedersen below 👇 pic.twitter.com/OVQ76kXAFF

— alin.apt (@alinush) November 3, 2025

References

For cited works, see below 👇👇

[^Pede91Comm]: Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing, by Pedersen, Torben Pryds, in Proceedings on Advances in Cryptology, 1992