Technical definition
A cryptographic commitment scheme consists of two main phases: the commit phase and the reveal phase. In the commit phase, a party generates a commitment to a secret value using a cryptographic hash function or a similar one-way function, producing a fixed-size output (the commitment). This commitment is sent to another party or published publicly. The secret value remains hidden due to the properties of the hash function, which is designed to be preimage-resistant and collision-resistant. In the reveal phase, the committing party reveals the original value along with a proof that it matches the commitment. The verifying party can then check the validity of the commitment using the revealed value and the proof. Commitment schemes often rely on the hiding property (the commitment reveals no information about the secret) and the binding property (the committing party cannot change the secret after the commitment is made).
An analogy
Imagine writing a sealed letter with your secret choice inside and mailing it to a friend. Once the letter is sealed and sent, you cannot change what’s inside, and your friend cannot peek to see what you chose. Later, you can open the letter to reveal your choice, and your friend can verify that the opened letter matches the sealed one.
Why it matters
Cryptographic commitments are fundamental in blockchain and cryptographic protocols because they enable parties to make irrevocable decisions or reveal information in a trustless manner. They are used in consensus mechanisms, zero-knowledge proofs, secure multi-party computation, and privacy-preserving applications like confidential transactions.
Where it came from
The concept of cryptographic commitments dates back to early work in cryptography, with foundational ideas appearing in the 1980s and 1990s. One of the earliest formalizations was by Gilles Brassard and David Chaum in 1988, who introduced the concept of bit commitment in the context of secure two-party computation. Commitment schemes have since evolved with advances in cryptographic primitives like hash functions and zero-knowledge proofs.
Example in practice
In a blockchain context, a cryptographic commitment might be used in a voting system. A voter commits to their vote by publishing a hash of their choice (e.g., a hash of "Candidate A"). After all votes are committed, voters reveal their actual votes by providing the original value and proving it matches the commitment. This ensures that votes are private until the reveal phase, preventing vote buying or coercion, while still allowing verifiable tallying.
Common misconceptions
- Misconception: A cryptographic commitment is just encryption. → Correction: Encryption hides data but allows decryption later, whereas a commitment hides data and prevents the committer from changing it after the fact. Encryption is reversible, while commitments are designed to be irreversible once made.
- Misconception: A commitment reveals some information about the secret. → Correction: A well-designed commitment scheme should have the hiding property, meaning the commitment reveals no information about the secret value. If it leaks partial information, it is not a secure commitment scheme.
Risks & limitations
- Weak cryptographic primitives: If the underlying hash function or commitment scheme is broken (e.g., due to advances in cryptanalysis), the hiding or binding properties may fail, allowing an attacker to learn the secret or change the committed value.
- Implementation flaws: Poorly implemented commitment schemes can leak information or fail to enforce binding, such as by using weak randomness or not properly verifying proofs during the reveal phase.
- Quantum vulnerability: Some commitment schemes rely on computational hardness assumptions (e.g., discrete logarithm) that could be broken by quantum computers, rendering the scheme insecure in the post-quantum era.
- Front-running: In some blockchain applications, an attacker may observe a commitment and use it to influence the outcome before the reveal phase (e.g., in decentralized finance or auctions).