Sitemap
Press enter or click to view image in full size

Member-only story

Making Commitments

6 min readDec 1, 2024

--

Zero Knowledge Proofs involve making a commitment to data and not revealing it. Overall, there are three main methods we can use to create this commitment: Hash-based, Pedersen and polynomial.

Hash-based commitments

With hash-based, we basically create a hash of the data and then can reveal later that we can match the data to the hash.

Pedersen commitments

With a Pedersen commitment, Bob has a secret, and then creates a random number (r), and then generates a commitment (c) from the secret and the random value). At some time in the future, Bob can reveal to Alice that he has the secret value:

Press enter or click to view image in full size

To register the secret initially, we take two large prime numbers (p and q) and we create a generator value (g) which is of the order of q and a subgroup of Zp. Then s becomes a secret from 0 to Zq, and we calculate:

The sender now creates a commitment for a message (m) and with a random number (r):

The sender can then send c to the receiver. Next, the sender will then reveal m and r for the commitment, and the receiver verifies with:

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.