Before a single wager is placed, a provably fair casino should publish a SHA-256 commitment. This commitment is a fixed-length string that locks in a future outcome without revealing it. Reading it correctly is not an optional ritual; it is the only way to confirm, after the round is over, that the game you played was not altered mid-stream. Here is what to check in that 64-character string, and why it matters.
What a SHA-256 Commitment Actually Contains
A SHA-256 commitment is the output of the SHA-256 hash function applied to a preimage. The preimage can be a server seed, a client seed, a nonce, or a combination of these. In most implementations, the commitment is the hash of the server seed alone, or of the server seed plus a round identifier. The point is that the commitment is published before the round; the preimage is kept secret until the round ends.
You cannot reverse a SHA-256 hash. Given the commitment, you cannot infer the preimage or the outcome. That is the property that makes the commitment trustworthy. The only thing you can do is record it, and later verify that the revealed preimage hashes to exactly the same value.
Hex Format and Length
SHA-256 always outputs 256 bits, which are usually encoded as 64 hexadecimal characters. A valid commitment must therefore be exactly 64 characters from the set 0-9 and a-f. If the site shows a 32-character string, a 128-character string, or anything with non-hex characters, the implementation is not using straight SHA-256. Check the documentation; it may be a truncated hash or an HMAC with an extra key.
What to Check Before You Place the Bet
The phrase “before you place the bet” is not a stylistic choice. Once the round has started, a bad actor can replace the commitment and the seed. The verification protocol assumes you captured the commitment at a time when the operator could not know the client seed, or at least when the outcome was not yet determined. Make it a habit to copy the commitment from the game screen into a text file before pressing the betting button.
- Copy the exact 64-character string, not an abbreviated version.
- Timestamp the commitment in your own records.
- Check that the displayed commitment changes from round to round. A fixed commitment is a warning sign.
- If the site offers a history of past commitments and seeds, compare the current commitment against that list to ensure it has not been used before.
Replay Risk and Nonce Inclusion
A commitment is only meaningful if its preimage is unique. If the same commitment is seen twice, either the preimage is reused or the system is not including a round-specific value. Most games include a nonce (an incrementing number) or a round ID in the hashed data. Verify that in the operator’s documentation: the commitment should be a hash of the server seed and the round nonce, not just the static server seed. If it is only the server seed, then every round has the same commitment, and the preimage only has to be revealed once; after that, the player could predict all future results.
Reading the Commitment Relative to the Revealed Seed
Reading the commitment before the bet is step one. Step two is verifying it after the bet. The process is deterministic: you take the revealed preimage, apply SHA-256, and compare. You can do this in a terminal with a one-line command, or with any online SHA-256 calculator. The exact construction matters.
If the site says the commitment is SHA256(serverSeed + clientSeed + nonce), then you must concatenate those strings exactly before hashing. Strings are not separated by commas or spaces unless the site explicitly says so. The safest way is to copy the three values and concatenate them with no delimiters, then compare the hash. If the result matches the commitment, the game was not tampered with after the bet was placed.
Constructing the Test String
Here is a generic example. Suppose the revealed values are serverSeed = a3f1, clientSeed = b7c2, nonce = 5. The preimage is the concatenation “a3f1b7c25”. Hash that with SHA-256 and compare. If the site uses “:” as a separator, the test string would be “a3f1:b7c2:5”. The published documentation will define the exact scheme. Do not guess. Check it in the site’s verification page or API documentation, and compare against earlier rounds whose seeds have already been revealed.
You can build a simple shell loop to check the last 100 rounds: pull the commitments and revealed seeds, recompute the hashes, and report mismatches. Any mismatch means the game is not running the published algorithm, and you should stop playing immediately.
Red Flags in a Commitment
| Pattern | Likely Problem |
|---|---|
| 64 hex chars, but identical in every round | The nonce is not hashed, or the server seed never rotates. |
| Commitments are 32 hex chars | Implementation is likely SHA-256 truncated to 128 bits, which reduces collision and preimage resistance. |
| Commitment displayed as ‘0x…’ in a browser | The displayed value may be a JavaScript string, not the actual hash. Check the network payload. |
| Multiple commitments shown for the same round | The site may allow the provider to pick a favorable outcome after the fact. |
| Commitment is from a different playing session | Reused commitment from a known seed makes the outcome predictable to anyone who saved it. |
Why This Matters for Your Bankroll
Verification is not a separate activity from betting; it is part of your process. If you cannot verify a game, you are betting against an opaque house edge. The extra two minutes spent reading the commitment and checking the seed is the same cost as checking a bankroll management plan. Without the check, you are trusting a voice on a screen. With it, you have a timestamped record that can be shown to a casino’s support team, or to the community, if the hash does not match.
The principle applies to casinos that publish their verification methods in their reviews and to the broader guidance in provably fair guides. Operators that expect regular players to automate verification usually document their exact concatenation order. Those that do not, or that change the order silently, should be treated as unverified.
FAQ
Can you read the outcome from the SHA-256 commitment before the bet?
No. SHA-256 is designed to be preimage resistant. The whole point of the commitment is that it does not reveal the outcome. You can only check that the revealed preimage after the round matches the commitment you recorded before the round.
What if the revealed seed does not hash to the commitment?
Then the game was not provably fair in that round. Either the operator used a different preimage construction than documented, or the commitment was changed during the session. Save both the commitment and the revealed seed, and compare them with the algorithm specified. A mismatch is an immediate stop signal.
Is a SHA-256 commitment alone enough to prove the game is fair?
No. The commitment only proves the seed was locked before the bet. The full fairness proof depends on the outcome derivation function and the ability to audit the client seed. Read the commitment as one step in a longer verification chain. If any part of the chain is missing, the game is not verifiable.







