Computationally hiding is a cryptographic property of a commitment scheme that guarantees the committed value remains secret to any probabilistic polynomial-time adversary, meaning it is infeasible to compute the hidden data from the commitment alone. This is a computational security guarantee, relying on the assumed hardness of a mathematical problem (like the discrete logarithm), rather than perfect or information-theoretic hiding, which offers unconditional security. The property is fundamental to protocols like Pedersen commitments, where a value v is hidden within a commitment C = g^v * h^r, with r as a random blinding factor.
Computationally Hiding
What is Computationally Hiding?
A core security property in commitment schemes and zero-knowledge proofs, ensuring data remains secret until intentionally revealed.
The security model assumes the adversary has bounded computational resources, aligning with real-world constraints where breaking the hiding property would require solving a problem believed to be intractable, such as inverting a cryptographic hash function or solving the decisional Diffie-Hellman problem. This distinguishes it from perfectly hiding schemes, which leak zero information even to an adversary with infinite power, but often require longer commitments or trade-offs with binding properties. In practice, most blockchain systems, such as those employing zk-SNARKs or confidential transactions, rely on computationally hiding constructions for efficiency.
A canonical example is a sealed-bid auction: a bidder submits a computationally hiding commitment to their bid. Until the reveal phase, other participants and the auctioneer cannot determine the bid value, preventing front-running or bias. The hiding property fails only if the underlying computational assumption is broken (e.g., a hash collision is found), which is considered highly unlikely. This property is often paired with computational binding, creating a trade-off known as the hiding-binding duality, where a scheme can be either perfectly hiding and computationally binding, or perfectly binding and computationally hiding.
How Does Computationally Hiding Work?
Computationally hiding is a cryptographic property of a commitment scheme that ensures the committed value remains secret, but only under the assumption that an adversary has limited computational power.
Computationally hiding is a security property of a commitment scheme that guarantees the secrecy of the committed data. Specifically, it means that for any probabilistic polynomial-time (PPT) adversary, the commitment string reveals no information about the original message. This is a computational security guarantee, contrasting with information-theoretic hiding, which provides unconditional secrecy. The property relies on the presumed hardness of a computational problem, such as the discrete logarithm or the RSA problem, making it infeasible for a realistic adversary to extract the hidden value before the commitment is opened.
The mechanism typically works by using a one-way function or a trapdoor function. To commit to a value v, the committer generates a random blinding factor r and computes the commitment C = Commit(v, r). The function Commit is designed so that, given C, it is computationally intractable to determine v without knowledge of r. The security proof often involves a reduction: if an adversary could break the hiding property, it could also solve the underlying hard problem (e.g., inverting a hash function or breaking an encryption scheme), which is assumed to be impossible for efficient algorithms.
In practice, a common instantiation is the Pedersen commitment, which operates over a cyclic group. Here, the commitment is C = g^v * h^r, where g and h are public generators of the group and the discrete logarithm between g and h is unknown. Given C, an adversary cannot distinguish between commitments to different values v and v' because the blinding factor r perfectly randomizes the output. This semantic security against chosen-plaintext attacks is analogous to the security provided by symmetric-key encryption.
The computational aspect is crucial for efficiency. Information-theoretic schemes often require larger parameters or more rounds of interaction. Computational hiding allows for compact, non-interactive commitments that are fundamental to blockchain protocols like zk-SNARKs and bulletproofs, where a prover commits to witness values without revealing them. The security assumption aligns with the broader cryptographic consensus that problems like factoring large integers or finding elliptic curve discrete logarithms are hard for classical computers.
It is essential to pair computationally hiding with the binding property, which ensures the committer cannot later open the commitment to a different value. Many schemes achieve computational binding and computational hiding, trading absolute security for practical performance. The strength of the hiding property is parameterized by a security parameter (e.g., 128-bit security), defining the computational effort required for a successful attack, which is designed to be astronomically high for all foreseeable adversaries.
Key Features
Computational hiding is a cryptographic property of a commitment scheme where the committed value cannot be feasibly deduced from the commitment string without the secret opening key, even with unlimited computational power.
Core Cryptographic Property
A commitment scheme is computationally hiding if, for all probabilistic polynomial-time adversaries, the commitment string reveals no information about the underlying message. This relies on the assumed hardness of a computational problem, such as the discrete logarithm problem or factoring large integers. It's a weaker guarantee than statistical hiding but is sufficient for most practical applications where adversaries have bounded computational resources.
Contrast with Binding
A secure commitment scheme must satisfy two properties: hiding and binding. Hiding ensures the secret is concealed. Binding ensures the committer cannot later open the commitment to a different value. Computational hiding is often paired with perfect binding (unconditionally secure), creating a hybrid scheme. The Pedersen commitment is a classic example, offering computational hiding under the Discrete Logarithm assumption and perfect binding.
Implementation Example: Pedersen Commitment
The Pedersen commitment C = g^m * h^r is a standard construct offering computational hiding.
g,hare public generators of a cryptographic group.mis the secret message.ris a random blinding factor. The commitmentChidesmbecause the adversary cannot distinguish between commitments of different messages due to the randomness introduced byrand the assumed hardness of the Discrete Logarithm Problem for the group.
Applications in Blockchain
Computational hiding is fundamental to privacy-preserving protocols:
- ZK-Rollups: Hiding transaction details within a validity proof.
- Confidential Transactions: Hiding asset amounts (e.g., in Mimblewimble).
- Voting Schemes: Hiding individual votes until tallying.
- Commit-Reveal Schemes: Securing on-chain auctions or random number generation by first posting a hidden commitment.
Security Assumptions & Limitations
Security is conditional on the intractability of underlying computational problems. If an adversary gains sufficient computational power (e.g., through quantum computing breaking discrete logarithms), the hiding property fails. This is why computational hiding is contrasted with statistical hiding, which provides security against even computationally unbounded adversaries. The choice between them is a trade-off between security strength and efficiency.
Related Cryptographic Primitives
Computational hiding interacts with other core concepts:
- Zero-Knowledge Proofs: Often rely on computationally hiding commitments to conceal witness data.
- Oblivious Transfer: Uses hiding to protect sender's unselected messages.
- Indistinguishability: Hiding is formally defined through computational indistinguishability between commitments of any two messages.
- Random Oracle Model: Some schemes prove hiding security in this idealized model.
Visual Explainer: The Hiding Security Game
A conceptual framework used to formally prove that a commitment scheme's hiding property holds against a computationally bounded adversary.
In cryptographic game theory, the Hiding Security Game is a formal model where an adversary (or challenger) attempts to break the computational hiding property of a commitment scheme. The game proceeds in distinct phases: the adversary first chooses two distinct messages, m0 and m1. A challenger then randomly selects one of these messages, computes a commitment c, and sends it to the adversary. The adversary's goal is to guess which of the two messages was committed to with a probability significantly better than random chance (50%).
A commitment scheme is proven to be computationally hiding if, for any probabilistic polynomial-time (PPT) adversary, the advantage in winning this game is negligible. This means the commitment c reveals no computationally extractable information about the committed message m. The security relies on the hardness of an underlying computational problem, such as the discrete logarithm or the decisional Diffie-Hellman assumption, making it infeasible for a realistic adversary to distinguish between commitments.
This game starkly contrasts with the Binding Security Game, which tests a commitment's immutability. While the hiding game ensures secrecy during the commit phase, the binding game ensures integrity during the reveal phase. Together, they form the dual-security guarantees of any commitment scheme. The model is foundational for protocols like zk-SNARKs and verifiable random functions (VRFs), where a prover must commit to a value without revealing it until a later stage of the protocol.
Examples & Implementations
Computational hiding is a cryptographic property where a secret is concealed by a commitment, making it infeasible to discover the secret through computation, even with unlimited resources. This section explores its practical applications in blockchain protocols.
Pedersen Commitments
A foundational cryptographic scheme that is both computationally hiding and unconditionally binding. It allows a prover to commit to a value v without revealing it, using a random blinding factor r. The security relies on the discrete logarithm problem, making it infeasible to compute v from the commitment C = v*G + r*H.
- Key Use: Core component of confidential transactions in Mimblewimble and Zcash.
- Property: Hiding is computational; an adversary with infinite computing power could theoretically break it, but this is considered practically impossible.
zk-SNARKs & zk-STARKs
Zero-knowledge proof systems leverage computational hiding to prove statement validity without revealing underlying data. The witness (private inputs) is computationally hidden within the proof.
- zk-SNARKs: Use elliptic curve pairings and a trusted setup. The prover's secret witness is hidden based on the hardness of the elliptic curve discrete logarithm problem.
- zk-STARKs: Rely on cryptographic hashes and are post-quantum secure. Hiding is based on the collision resistance of the hash function.
Merkle Trees & Data Availability
While Merkle roots are deterministic (not hiding), computational hiding is applied to the data within the leaves. For example, a vector commitment can hide the values in a Merkle tree while still allowing proofs of inclusion.
- Application: Used in data availability sampling for Layer 2 rollups. Nodes can verify data is available without needing to see the full, potentially private, content of each transaction.
Commitment Schemes in Voting
Blockchain-based voting protocols use computationally hiding commitments to ensure ballot secrecy until the tally phase. A voter commits to their choice vote with a random nonce r and publishes the hash H(vote, r).
- Process: The commitment hides the vote during the voting period.
- Reveal: Later, voters reveal
(vote, r)to open their commitment, allowing the result to be computed publicly while maintaining anonymity until the reveal.
Confidential Transactions (Mimblewimble)
This protocol uses Pedersen Commitments to hide transaction amounts. Instead of plaintext values, the blockchain stores commitments that are sums of Pedersen commitments.
- Mechanism: A transaction output is a commitment
C = x*G + a*H, whereais the amount andxis a private key (blinding factor). - Result: The network can verify that no new money was created (by checking the sum of input/output commitments) without knowing the actual amounts involved.
Range Proofs (Bulletproofs)
Range proofs demonstrate a committed value lies within a specific range (e.g., 0 to 2^64) without revealing the value. They are built upon computationally hiding commitment schemes.
- Function: Prove a Pedersen commitment
Ccommits to a valuevwhere0 ≤ v < 2^n. - Importance: Essential for Confidential Transactions to prevent overflow attacks and negative amounts, all while keeping the actual value secret.
Hiding vs. Binding: A Comparison
A comparison of the two core security properties of cryptographic commitment schemes, which are essential for protocols like Pedersen commitments and zero-knowledge proofs.
| Property | Computationally Hiding | Statistically Binding |
|---|---|---|
Security Guarantee | Hides the committed value from any computationally bounded adversary. | Binds the committer to a single value with overwhelming probability. |
Assumption | Relies on computational hardness (e.g., Discrete Log Problem). | Relies on information theory and probability. |
Breakable By | A computationally unbounded adversary (theoretical). | A computationally unbounded adversary cannot break it. |
Primary Use Case | Privacy: The value remains secret until reveal. | Integrity: The committer cannot change the value later. |
Example Scheme | Pedersen Commitment | Pedersen Commitment |
Reveal Phase | Requires opening with the original value and blinding factor. | Opening must be consistent with the single bound value. |
Weakening Effect | If broken, historical privacy is compromised. | If broken, the commitment's integrity is void. |
Ecosystem Usage
Computationally hiding is a cryptographic property where a commitment scheme conceals the committed value from any party with bounded computational power, ensuring privacy in protocols like zero-knowledge proofs and blockchain scaling.
Contrast with Perfectly Hiding
It's critical to distinguish computationally hiding from perfectly hiding commitments. A computationally hiding scheme relies on the assumed hardness of a computational problem (e.g., discrete log). A perfectly hiding scheme (e.g., some Pedersen Commitment variants) provides information-theoretic security, meaning even an adversary with unlimited computing power cannot learn the value. Most practical blockchain systems opt for computational hiding for its efficiency and compatibility with zero-knowledge proof systems.
Common Misconceptions
Clarifying frequent misunderstandings about the 'computationally hiding' property in cryptographic commitments, particularly its relationship to security models and practical guarantees.
Computationally hiding is a cryptographic property of a commitment scheme where the committed value is concealed from any observer, provided that observer is limited to performing polynomial-time computations. This means the value is not perfectly secret; a computationally unbounded adversary (like one with infinite time and resources) could theoretically discover it. The security relies on the assumed hardness of a computational problem, such as the discrete logarithm problem or finding hash function collisions. It is the standard model for practical systems, contrasting with the stronger, information-theoretic 'perfectly hiding' guarantee, which is immune to any adversary regardless of computational power.
Frequently Asked Questions
Computationally hiding is a foundational cryptographic property for commitments and zero-knowledge proofs. These questions address its core principles, applications, and distinctions from related concepts.
Computationally hiding is a security property of a commitment scheme where a commitment value reveals no information about the underlying secret message to a computationally bounded adversary. This means that, given the commitment C = Commit(m, r), no efficient algorithm can distinguish between commitments to different messages m0 and m1 with probability significantly better than random guessing. The hiding property relies on computational assumptions, such as the hardness of the discrete logarithm or factoring problems, making it infeasible—but not information-theoretically impossible—to extract the secret. This is in contrast to perfectly hiding schemes, which offer unconditional security against even unbounded adversaries.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.