How to reproduce a provably fair Dice roll: worked example

Reproduce a provably fair Dice roll of 62.99 with SHA-256 and HMAC-SHA256. Match the server seed to its commitment, then check your own round.

Diego MoralesDiego MoralesPublished Nov 20, 2026
Two translucent aqua dice with gold pips on a precision scale.

Key Takeaways

  • Two checks verify a Dice roll: the revealed server seed must hash to the saved commitment, and HMAC-SHA256 of the seeds and nonce must reproduce the roll.
  • The sample round (client seed glass-board, nonce 7) reproduces a roll of 62.99, and changing only the nonce gives a different, unrelated roll.
  • A verified roll proves the result was fixed before the bet; it says nothing about the payout multiplier or the house edge.

You can reproduce a provably fair Dice roll with two checks: the revealed server seed must hash to the commitment shown before play, and HMAC-SHA256 of the client seed, nonce and round must reproduce the recorded roll. Our sample round does both and lands on 62.99, and you can repeat it in your browser without an account.

Open our Provably Fair Checker and press Load sample bet to test these exact sample values.

What is on a provably fair Dice receipt?

A provably fair Dice receipt records five values: the commitment published before play, the revealed server seed, the client seed, the nonce (the round counter) and the recorded roll. Dice is an instant game where the roll is a number from 0.00 to 100.00 and you bet that it lands above or below a target. The two dice on the cover are an illustration only, because there are no six-sided dice to add together in this game.

The sample below is a fictional teaching round that follows the scheme in Shuffle's provably fair documentation. Shuffle is a crypto casino that publishes the formulas behind its in-house games.

Receipt fieldSample value
Client seedglass-board
Nonce (round counter)7
Recorded roll62.99

Revealed server seed, as text:

0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

Original SHA-256 commitment:

a8ae6e6ee929abea3afcfc5258c8ccd6f85273e0d4626d26c7279f3250f77c8e

Press Load sample bet in the checker, which fills in these values, and every stage shows a match. Now change only the displayed result to 62.98 and press Verify again. The commitment still matches. The reproduced roll still reads 62.99. Only the result stage fails. Typing a different number onto the receipt has no effect on the maths underneath.

Why does the server seed have to match the commitment?

The commitment is the SHA-256 hash of the server seed, published before you bet, so the casino cannot swap in a different seed after seeing your result. SHA-256 is the hash function defined in FIPS 180-4, the Secure Hash Standard. It turns any text into a 64-character fingerprint, and the only practical way to get the same fingerprint is to start from the same text.

Hash the 64 characters of the sample seed and you get the commitment above. Change one character, for example the last f to a 0, and the fingerprint becomes 89423b9e...f4399f, which shares nothing recognisable with the original. Check against the commitment you saved before betting, or the one displayed while the seed pair was active; copying a fingerprint after the reveal proves nothing.

How is 62.99 calculated from the seeds?

The roll is the first four bytes of an HMAC-SHA256 output, turned into a fraction and scaled to 0.00-100.00. HMAC-SHA256 is a keyed hash defined in RFC 2104. The server seed text is the key. The message is the client seed, the nonce and the round joined by colons, which for this receipt is exactly glass-board:7:0. The final zero is the round number: each round yields 32 bytes, and a game that needs more numbers asks for round 1, 2 and so on. A space or an extra colon gives you a different calculation.

The output begins a1426423611375ad..., so the first four bytes are a1 42 64 23. Read them left to right as one unsigned integer and you get 2,705,482,787. Divide by 4,294,967,296 (that is 2^32) to obtain 0.6299193 (to seven decimal places). Multiply that fraction by 10,001, discard the fractional part to get 6,299, and divide by 100. The displayed roll is 62.99. Keeping the full precision until the last step matters near a boundary, because 0.6299193 x 10,001 is 6,299.82 and rounding it up would print 63.00.

The same 32 bytes hold seven more numbers for games that need them. Taking the next four-byte groups gives 37.92, 70.01, 43.61, 64.11, 19.58, 94.99 and 50.79. Dice uses only the first.

Why multiply by 10,001 rather than 10,000?

The formula multiplies by 10,001 because a Dice roll has 10,001 possible two-decimal outcomes, from 0.00 up to 100.00 inclusive. A bet that wins on any roll below 50.00 covers 5,000 of them, which is 49.995%. A bet that wins below 70.00 covers 7,000 of 10,001, or 69.993%. Those fractions are exact for the number generator. The house edge comes from the casino's published payout multiplier, which roll verification does not test.

What changes when only the nonce changes?

Every bet on the same seed pair increases the nonce by one, so each round gets a completely different roll from the same two seeds. Keep the server seed and client seed from the sample and change only the nonce:

NonceMessageRoll
6glass-board:6:085.57
7glass-board:7:062.99
8glass-board:8:046.32

Nothing links one row to the next, so an 85.57 followed by a low roll does not make a high one more likely later. Changing the client seed has the same effect: glass-board followed by a trailing space gives 16.65 for nonce 7. We recalculated every figure here with a short Python script using the standard hmac and hashlib libraries, and you can run the same check yourself.

How do you check your own completed round?

You check your own round by rotating the seed pair to reveal the server seed, then matching both the commitment and the recomputed roll. Use a receipt from the same game and implementation, because other operators may format the message or convert the bytes differently. Follow these steps:

  1. Save the commitment shown before you bet.
  2. Play, then rotate the seed pair so the provider reveals the old server seed.
  3. Paste the exact seed text, your client seed, the nonce and the recorded roll into the checker.
  4. Read the two results separately.

If the commitment comparison fails, check which seed pair the receipt belongs to. If the commitment matches but the roll differs, compare the client seed and nonce with the round history. Once both pass, check your bet condition and payout using our guide on how to verify a provably fair bet step by step. A roll of 62.99 can win a "below 70" bet and lose a "below 50" bet, so the receipt needs both the roll and your chosen condition to settle the result.

What does a verified roll prove, and what does it not?

A matching receipt proves that the roll came from seeds fixed before the bet and was not edited afterwards, and it proves nothing about the payout multiplier. At a payout of 1.4143x on "below 70.00" (a bet that wins on 7,000 of 10,001 rolls), the theoretical return is $98.99 per $100 staked, an expected loss of $1.01, even when every roll verifies. Running the receipt through a checker leaves both that expected loss and any single round's result unchanged.

Where else does the same method appear?

The same seed-and-nonce method appears in other provably fair instant games such as blackjack and roulette, which change only the final step. Blackjack maps the number onto a card, which is why provably fair blackjack can deal the same card twice. In roulette, that number picks a pocket instead; we cover the maths in why provably fair roulette still has a house edge. Our guide to provably fair gambling explained covers how the method works in full.

To try verifiable games yourself, see how we check each operator's licence, payments and withdrawals in our best crypto casinos list, or read our Shuffle review for a look at one casino that publishes its Dice scheme. Checking your rolls will not stop you losing money. Play only if you are 18 or over, using money you can afford to lose.

Frequently asked questions

Can a casino fake a provably fair Dice roll?

No, not without the receipt failing, provided you saved the commitment before betting and the client seed was yours to set. Because the commitment locks in the server seed before you bet, the roll is already determined once your client seed and the nonce are applied. If the operator swaps the seed or edits the roll afterwards, one of the two checks fails.

Why does my roll not match the checker?

Most mismatches come down to a small copy-paste error. A trailing space in the client seed or a wrong nonce gives a different roll, and so does a server seed from another seed pair. Check the nonce and seed pair against your bet history first, then confirm you are using the same game and implementation.

Do I need an account to verify a roll?

No. You do not need an account or login, because the checker runs on the values you paste. What you must get from the casino is the revealed server seed, and that only appears once you rotate the seed pair.

Does verifying a roll improve my chances of winning?

No. Checking a roll just confirms it came from seeds locked in beforehand. Future bets stay independent, as every new nonce generates a fresh roll.

Does the roll run from 0.00 to 100.00 inclusive?

Yes, the roll spans 0.00 to 100.00 inclusive, which gives 10,001 possible values. Exactly 100.00 lands once in 10,001 rolls, and each game's rules state whether "below" or "above" bets include that boundary.

Diego Morales

Diego Morales

Global casino reviewer

Diego pays attention to the stuff players actually notice right away. How fast can you sign up? How easy is it to deposit, especially with crypto? Where are the hidden traps in the bonus offers? And does support actually help when something goes wrong, or do they just send generic replies? He turns complicated bonus rules and legal terms into plain English, so you know what you're agreeing to. He also has a sharp checklist for spotting the usual withdrawal problems like endless verification requests, unclear limits, and rules that aren't properly explained.

Share this article

Frequently asked questions

Use it for a completed round that follows the Dice inputs and mapping Shuffle documents, which is the checker's preset. Other games can encode the message or convert the output differently, so enter their published rules in the custom mode.

The latest, in your inbox

New reviews, bonus updates and a closer look at the small print.

No spam · Unsubscribe anytime · 18+