← Back to section · Foundations of Cryptography

Hashing in Commitments and Integrity: Seal It Now, Reveal It Later; Fingerprint First, Compare Later

Publish a value's hash now and show the original later, and you have the simplest cryptographic commitment: it stays hidden (hiding) and cannot be disowned (binding). The same mechanism in another costume is the integrity fingerprint behind software distribution and evidence logs. This article explains the principles and limits of both roles.

Published 22 November 2026 · 5 min read · PQ Frontier

Hashing in Commitments and Integrity: Seal It Now, Reveal It Later; Fingerprint First, Compare Later
AI-generated site artwork
Video explainer · Hash functions: from message to digest

The best-known use of a hash function is “compute a fingerprint”. But the fingerprint metaphor understates its standing in protocols: split the publication of the hash and the revelation of the original into two points in time and you get one of cryptography’s most basic building blocks — the commitment; distribute the hash over a trusted channel and you get the integrity checking that the whole software supply chain runs on. This article treats the two roles together, because they use the same set of properties under different trust assumptions.

Commitments: sealing the answer in an envelope

A commitment scheme solves an everyday problem: I want you to believe now that I have settled on a value, without telling you the value yet; and when I reveal it later, you must be able to confirm I did not swap it. The paper version is writing the answer down, sealing it in an envelope and handing the envelope to you. The digital version is a hash: the committer picks a random value rr and publishes C=H(m ∥ r)C = H(m \,\|\, r); at reveal time they present (m,r)(m, r), and the verifier simply recomputes and compares.

It stands on two properties. Hiding: from CC alone, mm cannot be learned — this needs preimage resistance, and it needs rr. Omit the randomness and publish H(m)H(m) directly, and when mm‘s space of possible values is small (an “up” or “down” call, a three-digit bid), the verifier can enumerate it and recover mm — the envelope might as well be transparent. The random value inflates the input space beyond enumeration, which is why it cannot be skipped. Binding: once issued, the commitment cannot be opened to a different m′≠mm' \ne m — and this is exactly collision resistance: opening one commitment two ways is finding a collision. So the two properties rest on the hash’s two legs: hiding on preimage resistance (plus randomness), binding on collision resistance. This also explains why, once MD5 and SHA-1 collisions fell, every commitment and fingerprint built on them had to be retired — the binding was gone.

Commitments’ classic posts inside protocols

Commitment schemes sound abstract, yet they are load-bearing parts of many protocols. The classic example is coin flipping by telephone (Blum, 1981): how can two people who cannot meet flip a coin fairly? One side first sends a hash commitment to “heads or tails, plus a random value”; the other side announces their guess; then the committer reveals — before the reveal, the guesser cannot see the outcome (hiding), and at the reveal the committer cannot change their story (binding), and a trustworthy remote coin flip is complete. The same pattern carries sealed bidding: during the bidding window only commitments are submitted, and after the deadline all bids are revealed together, preventing both early peeking at prices and changing a bid after seeing others’. Certain stages of electronic voting, verifiable randomness, and many sub-protocols inside zero-knowledge proofs reuse this “seal first, reveal later” rhythm. Commitments are, so to speak, the envelope of the protocol world — simple enough to overlook, and present almost everywhere.

An application cognate with integrity checking is timestamping and evidence anchoring: submit a file’s hash to a public, append-only log (or periodically anchor the Merkle root of a batch of hashes somewhere widely witnessed), and you can later prove “this file already existed at that time and has not been altered”. The proof’s strength comes from two places: the hash’s binding guarantees the file was not swapped, and the log’s tamper-evidence guarantees the commitment’s time point was not back-filled — which is exactly where the Merkle tree of the next section earns its keep.

Integrity checking: putting the fingerprint in a trusted channel

Change the setting and the commitment’s two phases collapse into one, giving integrity checking. A software publisher publishes the SHA-256 value of an installer; the user downloads it, computes locally and compares: a match means the bits in hand are the very bits the publisher committed to; a mismatch — whether from transmission damage or tampering in transit — means reject. Here the hash plays the role of a keyless public commitment: once the fingerprint is published, the publisher cannot disown a different file as “genuine” (binding), and an attacker who wants a malicious file with the same fingerprint must break collision resistance.

But this chain carries an often-overlooked precondition: the fingerprint itself must reach the user over a trusted channel. If the attacker can replace both the download and the fingerprint on the web page (by compromising the distribution site itself, say), the comparison is meaningless — the user is merely cross-checking two values the attacker dictated. Serious release processes therefore wrap the fingerprint in another layer: signing the fingerprint list with a digital signature, publishing it through an independent channel, or writing it into a tamper-evident log. The hash’s job is to compress “arbitrary data” into one checkable sentence; delivering that sentence trustworthily is the job of mechanisms beyond it.

From one hash to a Merkle tree: commitments at scale

When the object of commitment is not one value but a million records, publishing a hash per record is both bulky and awkward to verify. A Merkle tree organizes the commitments: each record is hashed at the leaves, neighbouring hashes are paired and hashed again, level by level, converging to a single root hash. The committer publishes just this one root value; to later prove a record is in the set, they present the sibling hashes along the path from that record to the root — the verifier recomputes up the path and compares against the published root, and the proof length grows only logarithmically with the dataset size. Certificate transparency logs, distributed version control and evidence and audit systems of every kind are built on this tree. It fuses this article’s two roles into one: the root hash is a scalable commitment, and every path proof is an efficient integrity check.

The boundary, in summary

The power of hash commitments and integrity checks comes from a plain fact: a hash compresses “the identity of arbitrary data” into a short, public, independently recomputable value. But neither provides authenticity — anyone can compute a hash, so it proves “consistent with the commitment”, never “who made the commitment”. Attaching identity and authenticity is the task of signatures and certificate systems; making “consistency” itself scalable, auditable and durable is hashing’s quiet, central place in the infrastructure.

Tags: Commitment SchemesIntegrity CheckingHash Fingerprints