🪶Pedersen commitment

A Pedersen commitment is a cryptographic primitive used to commit to a chosen value while keeping it hidden from others, but with the capability to reveal the chosen value later. Pedersen commitments are commonly used in cryptographic protocols to achieve both confidentiality (hiding information) and commitment (ensuring information isn't changed later).

The Pedersen commitment has the properties of being both hiding (it's computationally infeasible to determine the committed value) and binding (once you've committed, you can't change your mind without detection).

Here's how it works:

  1. Setup: Two large prime numbers pp and qq are chosen such that qq divides p1p−1. Then, a cyclic group GG of order qq is selected with generator gg. A random hh is also chosen from GG such that no one knows the discrete logarithm of hh with respect to gg, i.e., no one knows aa where h=gah=g^a.

  2. Commitment: To commit to a value ss with randomness rr, the commitment CC is calculated as: C=gshrC=g^s⋅h^r

  3. Opening: To open the commitment (i.e., to reveal the committed value), the committer provides the value ss and the randomness rr. The verifier then checks the commitment using the given ss and rr against the previously provided commitment CC.

The hiding property ensures that, given CC, it's computationally hard to deduce ss or rr. The binding property ensures that, once CC has been provided, it's computationally infeasible to find any other ss^′ or rr^′ such that the commitment could have been created with ss^′ and rr^′ (i.e., you can't find two different sets of values that result in the same commitment).

Pedersen commitments are used in a variety of cryptographic protocols and systems, especially in the context of zero-knowledge proofs and privacy-preserving mechanisms.

Last updated