Commit-Reveal: Why a Fair Game Shows the Seed Hash Before You Play

How the commit-reveal scheme behind provably fair games works: the sealed-envelope idea, publishing the seed hash first, rotation, reveal and hash chains.

Updated November 7, 2026

Contents
  1. Where does the idea of a commitment come from?
  2. How does the sealed envelope map onto a game round?
  3. Why does the hash have to come before play?
  4. Why set your client seed after the new hash appears?
  5. What happens when you rotate seeds?
  6. How do hash chains work for crash games?
  7. What goes wrong if a site reveals late, or never?
2
Properties a commitment needs: hiding and binding
1981
Year of Blum's coin flip and Lamport's hash chain
SHA-256
Hash that seals the server seed before play

Before your first bet, the game shows f51376a5a542e198…d096d8cc543de0. It will not tell you the seed behind that string until you ask for a new one. That delay is the entire mechanism: the game locks in its secret first, you play, and only afterward does it open the lock so you can check that nothing was swapped.

Cryptographers call this a commitment scheme, and the version games use is often described as commit-reveal. It solves one specific problem. Two parties who do not trust each other want a random result that neither can steer, and only one of them can hold the secret during play.

Where does the idea of a commitment come from?

From a coin toss over the phone. In Coin Flipping by Telephone, presented at CRYPTO 1981, Manuel Blum asked how two people in different cities could flip a fair coin when neither can see it land. His example was a divorced couple deciding who keeps the car. The answer was for one party to commit to a value in a form the other cannot read, let the other call, and then open the commitment. Blum also pointed to mental poker and certified mail as uses, which tells you the problem was never really about coins. Games that call themselves provably fair are a late, commercial application of the same trick.

A good commitment has two properties. It is hiding, so the other side learns nothing from it. It is binding, so the person who made it cannot later open it to a different value. A SHA-256 hash of a long random seed gives both: the hash reveals nothing useful about the seed, and finding a second seed with the same hash is far out of reach.

How does the sealed envelope map onto a game round?

Think of the server seed as a note sealed in an envelope that sits on the table the whole time. The hash is a photograph of the sealed envelope, detailed enough that any other envelope would look different. The sequence runs like this:

  1. The server generates a random seed and publishes its SHA-256 hash.
  2. You set or accept a client seed.
  3. Each bet uses the next nonce, and the result comes from the server seed, client seed and nonce together.
  4. You rotate the seed pair whenever you like.
  5. The server reveals the old seed and publishes the hash of a fresh one.
  6. You hash the revealed seed, compare it with the hash from step 1, and recompute any bet.

Step 6 is what the verifier does. The guide to server seeds, client seeds and nonces explains what each input contributes, and how SHA-256 and HMAC work covers the functions doing the work.

Why does the hash have to come before play?

Because a commitment made after the fact commits to nothing. Picture a site that shows the hash only once the round is over. It could generate a million candidate seeds, compute the outcome of your bet with each, keep one that loses, and display that seed's hash. Every later check would pass. The math would be correct and the game would still be rigged.

So the order is the whole point. If you take one habit from this page, make it this: copy the hash somewhere outside the game before you play. A screenshot with the clock visible is a start; a message you send yourself or a note in a cloud service that records its own edit times is harder to dispute. Without your own record, you are relying on the site's account of what it showed you, which is precisely the thing a commitment is supposed to make unnecessary.

Why set your client seed after the new hash appears?

The server seed alone is not supposed to decide the outcome. Your client seed is your share of the randomness. If you choose it after the server's hash is public, the server committed without knowing your input, and you chose your input without knowing its seed. Neither side could aim at a result.

If you never touch the client seed and the platform generates it, the scheme still works mechanically. You just give up the one lever that protects you if the server picked its seed with your default client seed already in view.

What happens when you rotate seeds?

Rotation closes the envelope's case. The game discloses the old server seed in full, and from that moment every bet made with it is checkable. At the same time a new seed is generated and only its hash is shown.

There is a reason the game cannot simply show you the active seed on request. Anyone holding the server seed, your client seed and the next nonce can compute the next result before betting. Revealing early would turn a fair game into a known one.

Some platforms rotate automatically after a set number of bets, others only when you ask. Either is fine, as long as the reveal actually comes and you saved the hash it is checked against.

How do hash chains work for crash games?

Shared-round games, such as many multiplayer crash games, have one result per round for every player at once, so there is no personal client seed to mix in. A common answer, described here in general terms, is a hash chain, an idea Leslie Lamport used for one-time passwords in a 1981 paper in Communications of the ACM.

The operator picks a secret starting value and hashes it over and over, building a long chain. It publishes the last hash in the chain before any round is played, then uses the chain backward: the first round's seed is the second-to-last value, the next round's seed is the one before that, and so on. Each revealed seed hashes to the previous round's seed, so anyone can walk the chain toward the published end and confirm it fits. A short demonstration, hashing each value as text:

h0 = SHA-256(demo-chain-start) = ece24617d3da6f4f…8a32c618cd
h1 = SHA-256(h0)               = 32915223d3edd912…7dfa737981
h2 = SHA-256(h1)               = 66e8b7a8c626e211…dbda57ba89
h3 = SHA-256(h2)               = ef12cc94b396d2ea…35fabf5dc0
h4 = SHA-256(h3)               = ab5365fbe9332517…f00c346308

publish h4 first → round 1 uses h3, round 2 uses h2, round 3 uses h1
check round 2: SHA-256(h2) must equal h3, the seed revealed in round 1

Why backward? Hashing only runs one way. Knowing h2 lets you compute h3, the round already played, and h4, the published commitment, but gives you no route to h1, the next round's seed. Players can check the past and still cannot predict the future, which is the same balance a single seed and its hash strike, stretched over thousands of rounds.

Because the whole chain exists before the first round, the operator cannot change round 500 after seeing bets on it. Some implementations also mix in a value nobody could know when the chain was made, such as a public value fixed later, so the operator could not have shopped for a favorable chain. Details differ by game, and the overview of how provably fair works links the game-specific explanations.

What goes wrong if a site reveals late, or never?

A late reveal leaves a stretch of play unverifiable. Nothing is proven wrong, but nothing is proven right either. If a site holds back the server seed for weeks, every bet in that period rests on trust, and you may have stopped playing, or lost your saved hash, by the time you can check.

No reveal at all reduces the commitment to a decorative string, because a hash you can never test against a seed is indistinguishable from random characters. A site could publish those just as easily without any seed behind them. The same goes for a reveal that only appears inside an account you can no longer open.

Watch for a few specific patterns: a hash that appears only after the round, a seed that cannot be rotated, a revealed seed that does not hash to the value you saved, and verification pages that compute the check for you but never show the raw seed. Any one of them breaks the chain of evidence. The last one is the quietest, because a green check mark from the operator's own page proves only that the operator's page shows a green check mark.

FAQ

01

What is a commit-reveal scheme in simple terms?

One side locks in a secret by publishing its fingerprint, the other side acts, and then the secret is revealed so everyone can check it matches the fingerprint. In a game, the secret is the server seed and the fingerprint is its SHA-256 hash.
02

Why can't the game show me the server seed right away?

Because the seed together with your client seed and nonce decides every result. Seeing it early would let you compute future outcomes before betting.
03

What does rotating my seed do?

It ends the current seed pair. The game reveals the old server seed, so you can check all bets made with it, and publishes the hash of a new seed for the next bets.
04

Should I change my client seed?

Changing it after the new server seed hash is shown is a good habit. The server committed without knowing your input, so it could not have picked a seed that suits it.
05

What is a hash chain in crash games?

A long list of values where each one is the hash of the next. The operator publishes the final hash first and uses the values in reverse, so each revealed round seed can be checked against the round before it.
06

What if the site never reveals the server seed?

Then nothing can be verified and the commitment is worth nothing. A hash with no reveal is just a random-looking string.
07

Who invented commitment schemes?

Manuel Blum's paper Coin Flipping by Telephone, presented at CRYPTO 1981, is the usual starting point. It described two people flipping a fair coin remotely without either being able to cheat.
08

Can a site reveal a different seed than the one it committed to?

It can try, but the revealed seed will not hash to the published value, and any checker will show the mismatch at once. A mismatch can also come from a copy error or from a platform that hashes the seed's decoded bytes rather than its text, so read its documentation before assuming a swap.