A hash chain is the mechanism that lets a casino commit to random outcomes in advance without revealing them. In a provably fair system, the chain is the backbone: it turns “trust us” into “check us.” This article walks through each component—server seed, client seed, nonce, and the game function—and shows what a skeptical player can verify independently in 2026.
Why a Hash Chain at All
A casino that generates a random number on the server can, in principle, change an outcome after seeing your bet. A hash chain prevents this by forcing the operator to commit to a sequence of seeds before any round begins. The commitment is a hash value: a one-way function. Given a hash, you cannot reconstruct the seed; but once the seed is revealed, anyone can re-hash it and confirm the commitment matches. That asymmetry—easy to verify after the fact, impossible to reverse before—is the entire foundation.
The Three Inputs
Almost every provably fair game derives its result from three inputs:
- Server seed — generated by the operator, committed to in advance via the hash chain, revealed only after the rounds that used it have ended.
- Client seed — chosen by the player (or mixed with a casino-supplied portion). Because it is at least partially player-controlled, it guarantees the server seed is not the only determinant.
- Nonce — a counter that increments each bet, so the same pair of seeds produces a different result for each round.
How the Chain Is Constructed
The operator starts from a random secret value and applies a cryptographic hash repeatedly:
S0 = random secret
S1 = SHA256(S0)
S2 = SHA256(S1)
…
SN = SHA256(SN-1)
The final value, SN, is published before any round starts. This is the chain anchor. For round 1, the operator reveals SN-1. The player computes SHA256(SN-1) and checks it equals SN. For round 2, the operator reveals SN-2, and the player checks SHA256(SN-2) = SN-1—the already-revealed value. Each step locks the next one in place. An operator cannot alter the sequence once the anchor is public because doing so would require inverting SHA-256 or finding a collision—infeasible at current computing scale.
Some operators publish a commitment to the next chain anchor before the current chain is exhausted, overlapping chains to avoid a gap. Others use a single seed per round. The hash-chain variant is stronger because it produces a long, unbroken trail: if just one link is invalid, the whole chain is broken.
From Seed to Game Result
Revealing the server seed is not the result itself. The operator derives the outcome through a deterministic function that mixes the server seed, client seed, and nonce. A common construction uses HMAC-SHA256:
result_bytes = HMAC_SHA256(key = server_seed, message = client_seed + “:” + nonce)
or with the seeds swapped, depending on the operator’s specification. The resulting 32 bytes are typically converted to a number:
- Take the first 8 bytes as a 64-bit big-endian integer.
- Divide by 2^64 to obtain a float in [0, 1).
- Apply the game-specific mapping: for dice, map to a target range; for crash, compute a multiplier via a transforming formula; for cards, use modulo with rejection sampling to avoid bias.
The exact byte order, hash function variant, and mapping formula vary between operators. None of these choices are “wrong” per se, but they must be documented precisely so a player can reproduce them. If the documentation glosses over byte order or the modulo method, that is a reason for skepticism.
What the Player Can Verify
The full verification path is short and compresses to a few steps. You should be able to do all of it with a browser console or a small script.
| Step | Inputs | Computation | Check |
|---|---|---|---|
| 1 | Published anchor, bet timestamp | Record before betting | Anchor predates outcome |
| 2 | Revealed server seed | SHA256(revealed_seed) | Equals anchor or previous link |
| 3 | Seed, client seed, nonce | HMAC-SHA256 + conversion | Matches game history exactly |
| 4 | Blockchain timestamp | Compare block time vs bet time | Commitment existed earlier |
| 5 | Next anchor | Same as step 2 | Forward continuity |
All of this is deterministic and cheap to run. This is the core of “provably fair”: not a certification badge but an auditable trail. Some operators write the anchor to a blockchain transaction or public timestamping service before the round; checking the block time against the bet time closes the last gap in the logic.
What “Provably Fair” Does Not Cover
A verified hash chain proves the seed was fixed in advance. It does not prove the payout mapping is honest. The house edge lives in the mapping from the random float to the payout multiplier. A game can be provably fair and still have a 10% edge; the two are orthogonal. Separate the two questions:
- Can I verify the outcome was derived from a pre-committed seed? (Provable fairness)
- Is the payout mapping’s expected value acceptable? (RTP math)
You can compute the expected value from the published mapping yourself. If the operator publishes only a payout multiplier but not the full formula, you cannot compute RTP—treat that as a red flag.
Where Implementations Fail
In practice, many provably fair claims fail not because of broken cryptography but because of sloppy specification:
- Ambiguous byte order. If the docs say “first 8 bytes” but do not state endianness, verification is impossible.
- Undefined float range. Some mappings exclude zero or use clamping that skews the distribution.
- Nonce handling. If the nonce resets unexpectedly or is incremented without a defined rule, the player cannot reproduce the result.
- Client seed set by the casino. If the player never chooses the seed, the “player control” argument is weakened—though the chain still binds the server seed.
- No forward commitment. A site that reveals a seed and then publishes its hash only after the round is useless; the commitment must precede the outcome.
The hash chain is only as strong as its weakest documented detail. That is why our casino reviews focus on whether operators publish precise, machine-readable specifications rather than vague claims.
Practical Bottom Line
Verifying a hash chain takes minutes the first time, and the habit pays off: if a site’s game history survives and seeds are revealed, you can check every round years later. The deterministic derivation means you do not need to trust the game page’s display; you can recompute the past. That is also relevant when allocating capital: a verifiable bankroll management routine assumes outcomes have not been retroactively altered. For broader context on how provable fairness fits into game design, see our guides on verification. Any claim of provable fairness is testable, and the test is simple. If a site will not let you run it, you have your answer.
FAQ
Can a casino manipulate results if it controls the hash chain?
If the chain anchor is published before the rounds and the revealed seeds are verified backward through the chain, manipulation would require inverting SHA-256 at a scale orders of magnitude beyond current capability. The practical risk is not the hash—it is whether the anchor was actually published in advance. Check the timestamp of the commitment against the bet time, ideally via a blockchain-anchored timestamp.
What if the same seed and nonce are used twice?
The derivation is deterministic, so identical inputs produce identical results. That is the basis of verification, but it also means a reused seed/nonce pair is predictable to anyone who observed the previous outcome. Always use a fresh client seed and increasing nonces. If an operator lets a nonce reset without disclosing it, treat that as a defect.
Does a verified hash prove the game is fair in the expected-value sense?
No. Provable fairness proves the outcome was derived from a pre-committed seed using a disclosed algorithm. The house edge is separate and lives in the payoff mapping. A game can be provably fair with a 20% house edge. Compute the expected value from the published mapping—and if the mapping is not published in full, the provably fair label is incomplete.







