What is a commitment in cryptography?

A commitment locks in a piece of data without revealing it. Later it can be opened and anyone can check that it matches, but until then it gives nothing away and cannot be changed.

Also called commitment scheme or note commitment.

Explain it like I’m five

Picture a locked box with a slot. You write your choice on a card, drop it in the box, lock it and hand the box to a friend. The friend cannot open it, and you cannot swap the card, because the box is already in your friend’s hands. Later you hand over the key, the friend opens the box, and everyone sees what you chose. The box is the commitment, and the key is what lets you open it.

What problem it solves

People who do not trust each other often need to fix a choice now and reveal it later. In a coin toss by phone, the caller commits to heads or tails before the toss, so she cannot change her call after hearing the result. In a zero-knowledge proof, the prover commits to a first message before it sees the verifier’s challenge. On a blockchain, a commitment can sit in public while the value behind it stays private, and a later proof can refer to it without opening it.

How it works, step by step

  • Pick the value to commit to and a fresh random value, long enough that nobody can guess it (the blinding value or salt).
  • Hash the two together and publish the result (the commitment).
  • Until it is opened, the commitment reveals nothing about the value, because the random part makes the hash look random (hiding).
  • To open it, publish the value and the random part. Anyone hashes them again and compares the result with the commitment.
  • Changing the value afterwards would need a second pair with the same hash, which is a collision, so the committer is stuck with the original value (binding).
  • Other constructions use number theory. A Pedersen commitment hides the value perfectly, whatever the attacker’s computing power, and binds as long as discrete logarithms are hard. Two such commitments can be multiplied into a commitment to the sum of the values, which lets a system check that amounts balance without seeing them.
  • A Merkle root commits to a whole list, and a polynomial commitment commits to a polynomial.

A worked example

Alice calls heads and sends the SHA-256 hash of the word heads followed by a random 256-bit salt. Bob tosses a coin and announces the result. Alice reveals the word and the salt, and Bob hashes them to check that they match. Without the salt, Bob could hash heads and tails himself, two tries, and read Alice’s call straight from the commitment. With a 256-bit salt he would face about 2 to the power of 256 possibilities, a number with 78 digits.

Pedersen commitments add up. In a toy group modulo 23 with g equal to 4 and h equal to 9, committing to 3 with randomness 5 gives 6, and committing to 4 with randomness 6 gives 9. Their product, 6 times 9, is 8 modulo 23, which is exactly the commitment to 7 with randomness 11. Real groups are far too large to search.

What it guarantees

  • A commitment hides the value until it is opened, and it binds the committer to that value afterwards.
  • Each property can hold perfectly, statistically or only against limited computing power. No scheme can be both perfectly hiding and perfectly binding, because an attacker with unlimited power could try every value and opening until one fits.
  • Hash-based commitments hide as long as the hash behaves like a random function, and they bind as long as the hash resists collisions.
  • Pedersen commitments bind only as long as discrete logarithms are hard, and NIST’s FIPS 205 lists discrete logarithms among the foundations that a large quantum computer would put at risk.

Common misunderstandings

  • A commitment is a different tool from encryption. No key decrypts it, and opening it means revealing the value and the salt.
  • Hashing a value alone hides it only when the value has many possible choices. The salt is what makes guessing hopeless.
  • A commitment fixes a value without proving that the value is a valid one. Proving validity is the job of a zero-knowledge proof.
  • Opening a commitment publishes its value and its salt, so the same commitment hides nothing afterwards.

Where it is used

Zero-knowledge proofs commit to their first message, and STARKs commit to long lists of values with Merkle roots. Zcash notes are commitments, and its Sapling pool builds them from Pedersen commitments. Ethereum’s EIP-4844 introduced KZG commitments, which rely on the parameters of the 2023 ceremony.

History

Manuel Blum described commitments for coin flipping by telephone in 1981, Brassard, Chaum and Crépeau formalized them in 1988, and Torben Pedersen introduced his additive commitments in the early 1990s.

In Redacted

Every deposit and every private action in Redacted mints a note, which is a SHA-256 commitment added to the note tree. Its secrets follow from its owner’s keys by fixed rules, so nothing encrypted is written next to it.

Architecture →

Related terms

Sources: Commitment scheme, Wikipedia · Zcash Protocol Specification · ethSTARK Documentation, version 1.2, StarkWare · Announcing the KZG Ceremony, Ethereum Foundation Blog · FIPS 205, Stateless Hash-Based Digital Signature Standard, NIST

Updated November 1, 2026. All terms