Tools and worked checks · 01 / 23
Provably fair verifier for HMAC-SHA256 seed schemes
Enter the revealed server seed, your client seed and the nonce of the bet. The page computes the HMAC, reads the bytes and converts them to a number by the rule you select.
Short answer
A provably fair verifier recomputes a game result from the server seed, the client seed and the nonce, and checks that the server seed matches the hash shown before the bet. This one runs in your browser, implements a stated HMAC-SHA256 scheme with four conversion rules, and shows every intermediate value. A match means the number was fixed before you bet. It says nothing about odds or payment.

Verifier
This tool runs in your browser with the Web Crypto API. It sends nothing over the network and works offline once the page has loaded. Never paste a wallet secret phrase or a private key here or into any verifier. No check on this site needs one.
Free of charge, no account. Runs in any current web browser.
The result appears here.
Key facts
- Inputs: the revealed server seed, the client seed, the nonce and, if you saved it, the server seed hash shown before play.
- Digest: HMAC-SHA256 with the server seed as key and
client seed:nonce:roundas message, that is the client seed, the nonce and the round number joined by colons (RFC 2104). - Result: four bytes read as a number u and converted to a range N by one of four rules.
- Test vector V1 gives 9892 for N = 10000.
- Nothing you type is sent anywhere. The hashing is done by the browser's Web Cryptography interface.
What this verifier computes
The tool implements one stated scheme. Many games use a member of this family, and many change a detail. If your operator's documentation differs from any line of the table, the numbers here will differ as well, and that difference says nothing about the operator.

| Step | Definition |
|---|---|
| Key | The server seed. Read as text, it is the UTF-8 bytes of its characters. Read as hex, each pair of hex digits is one byte. |
| Message | The client seed, a colon, the nonce in decimal, a colon, the round number in decimal, all encoded as UTF-8. For the first round of nonce 0 with client seed reference-client the message is reference-client:0:0. |
| Digest | HMAC-SHA256(key, message), which is 32 bytes. HMAC is defined in RFC 2104; the hash inside it is SHA-256. |
| Stream | The digests for round 0, round 1, round 2 and so on, joined end to end. The cursor is a byte position in this stream, so byte 32 is the first byte of round 1. |
| Integer u | Four bytes at the cursor, read as a big-endian unsigned integer. It lies between 0 and 4294967295. |
| Commitment | SHA-256 of the key bytes, written as 64 hex digits. This is the value to compare with the hash you saved before play. |
The four byte-to-number rules
| Rule | Definition | Are all results equally likely? |
|---|---|---|
| float | result = floor(u × N / 2^32). This equals writing the four bytes as a base-256 fraction, multiplying by N and rounding down. | Only when N divides 2^32. Otherwise some results have one more input than others. |
| reject | limit = 2^32 − (2^32 mod N). If u is at or above the limit, the four bytes are skipped and the next four are read. Then result = u mod N. | Yes, exactly. |
| mod | result = u mod N. | Only when N divides 2^32. Otherwise the lowest 2^32 mod N results each have one more input. |
| hex5 | The stream is written as hex characters and read five at a time, starting at character 2 × cursor. A group is a number from 0 to 1048575. A group at or above 1000000 is skipped. Then result = value mod 10000, often displayed divided by 100 as 0.00 to 99.99. | Yes, exactly, since 1000000 is a multiple of 10000. |
The tool computes floor(u × N / 2^32) in whole numbers. Software that does this step in double-precision floating point can differ by one in rare cases when u × N exceeds 2^53, which becomes possible for N above about two million. If a large range gives a result one away from the displayed one, this is a likely reason.
The size of the imbalance in the float and mod rules is counted exactly on the page about turning a hash into a number. At 32 bits and a range of 10000 a favoured result is more likely by one part in 429496.
A worked example to compare with
Press the button that loads test vector V1, or type the values yourself: server seed reference-test-server-seed-0001 read as text, client seed reference-client, nonce 0, cursor 0, rule float, N = 10000.
- SHA-256 of the server seed is
9088b0a58305a44b0ec72f1af9ef3e2e4927d17a516fdbf805707fdebdf69107. - The message is
reference-client:0:0and its HMAC-SHA256 under the server seed isfd3f9c652643592c1de6a9a56228cc866eda7f2d26d95c2ee38e1d1e5d3378a3. - The first four bytes are
fd3f9c65, which is the integer 4248804453. - floor(4248804453 × 10000 / 4294967296) = 9892. A dice game that shows two decimals would display 98.92.
The methods page lists seven vectors. One crosses from round 0 into round 1, and two contain a skipped read.
What a match tells you
A match shows that the number follows from the server seed, your client seed and the nonce by the rule you selected, and that the server seed has the hash you entered. Whether that seed was fixed before your bet depends on when you saved the hash, and whether the operator could have foreseen the other inputs depends on who set the client seed. It does not show that the payout table is what the game page says, that the stated return is true, that a win will be paid, or that every round you played was settled. The page on what provably fair leaves open lists these gaps one by one.
A correctly drawn number in a game with a house edge still has a negative expected value for the player. Verification changes what you know about the draw. It does not change the odds.
When the numbers differ
A different result usually means a different format. These are the details that vary between implementations.
- The message. The order of the parts, the separator and extra fields all change the digest.
- The key. Some schemes decode a hex seed to bytes, and some use the client seed as the key and the server seed in the message. If you entered a saved hash, the tool tells you when it matches the other reading of the seed, or the seed without outer white space.
- The hash function. HMAC-SHA512 gives 64 bytes per round, so byte positions shift.
- The rule, or the number of bytes read per result.
- The cursor, in games that take several results from one bet.
- The nonce. Some counters start at 0 and some at 1.
Compare the operator's own description with the table above, line by line. If the two cannot be reconciled, ask the operator for the exact algorithm. A game that is described as provably fair comes with a published procedure, and the step-by-step guide shows how to follow one without this tool.
What to keep private
A revealed server seed is public by design, and so are the client seed and the nonce. A wallet secret phrase or a private key is never an input to a fairness check. A page that asks for one in order to verify a bet is trying to take your funds. What this site stores in your browser is listed on the privacy page.
How do you verify a bet with this tool?
The form is at the start of this page.
- Collect the values. From the fairness panel of the game copy the revealed server seed, your client seed, the nonce of the bet and, if you saved it, the server seed hash shown before play.
- Enter the server seed. Choose whether the game treats it as text or as hex bytes. The documentation of the game says which.
- Enter client seed and nonce. Exactly as shown, with no added spaces.
- Set the range and the rule. A dice game with rolls from 0.00 to 99.99 has a range of 10000. Pick the conversion rule the game documents.
- Paste the saved hash. The tool then also reports whether the seed matches its commitment.
- Compare. The result must equal the game's result for that bet. The detail view lists message, digest, bytes and the integer u, for comparison with the game's own verifier.

Which values do you need, and where do they come from?
| Value | Who sets it | When you can see it | What goes wrong |
|---|---|---|---|
| Server seed hash | The operator | Before the bet | It was not saved, so there is nothing to compare with |
| Server seed | The operator | After you rotate the seed pair | It was copied with a space or a line break |
| Client seed | You, or the page on your behalf | Always | It was left at the page's default |
| Nonce | The game, counting bets | In the bet history | It is off by one, when a game counts from 1 |
| Range and rule | The documentation of the game | Always, if published | A different rule gives a different number from the same bytes |
What does it mean if the result does not match?
Work through the causes in order of likelihood before drawing a conclusion.
- The seed is read in the wrong mode. A seed of 64 hex characters may be meant as text or as 32 bytes.
- The message format differs. Operators use other separators, another order, or no round number.
- The nonce is off by one.
- The conversion rule or the range differs. The page from hash to number shows how much the rules differ.
- A character was lost or added in copying.
- The seed pair was rotated more than once, so the revealed seed belongs to other bets.
If the operator documents its scheme and none of these explains the difference, compare with the operator's own verifier and with the manual method. A revealed seed whose hash does not equal the commitment you saved before the bet is the one finding that needs no further explanation.
How does this differ from an operator's own verifier?
An operator's verifier runs code supplied by the party being checked. It can be perfectly correct. The value of a second tool is that it is a separate implementation: it was written by someone else, it shows its intermediate values, and it is tested against published known answers, listed on the methods page. A check that depends on neither repeats the arithmetic with general tools, as the page on verifying by hand does.
Which terms does this page use?
- HMAC-SHA256
- A keyed hash. The same key and message always give the same 32 bytes, and without the key the output cannot be predicted.
- Digest
- The 32-byte output of the hash for one round.
- Cursor
- The byte position in the stream of digests at which reading starts.
- Range N
- The number of possible results. 10000 stands for a dice roll with two decimals.
- Known-answer test
- An input with a published correct output, used to test an implementation. This tool is tested against cases of RFC 4231.
- Commitment
- The hash of the server seed shown before the bet. The seed hash checker compares a seed with it.
Questions people ask
Can I verify a bet while its server seed is still in use?
No. While a seed is in use you can see only its hash. Ask the game for a new seed pair. In the usual design the old server seed is then revealed and every bet made under it can be checked.
Does the verifier work without a connection?
Yes, once the page has loaded. You can switch off the network and run it again. The hashing is done by the Web Crypto interface built into the browser.
Why does a range of 10000 stand for a dice roll?
Many dice games show a number from 0.00 to 99.99. That is a whole number from 0 to 9999 with the decimal point moved two places, so N = 10000.
Which rule does my operator use?
Its documentation has to say. This site keeps no list of operators or of their algorithms, and names none.
What is a provably fair verifier?
A tool that repeats the computation of a game result from its published inputs, so that you can compare the outcome with what the game showed. It also checks that the revealed server seed matches the hash published before the bet.
How do I verify a provably fair bet?
Save the server seed hash before betting, set your own client seed, note the nonce, rotate the seed pair, and enter the revealed seed, the client seed and the nonce here. The numbered steps are on this page.
Can pasting my seeds into a verifier harm me?
A revealed server seed and the client seed of a finished pair are public values and open nothing. A wallet secret phrase is never a seed in this sense and must not be pasted anywhere. This tool sends nothing over the network.
Does a match mean the game is fair?
It means the number of that round followed from values fixed before the bet. Odds, payout and payment are outside the check, as the page about what provably fair leaves open explains.
Can I verify bets from any casino with this tool?
Only from games whose scheme equals the one stated here, or differs in a setting the tool offers. Other schemes need their own arithmetic.
Why does the tool ask whether the seed is text or hex?
Because the same characters stand for different bytes in the two readings, and HMAC works on bytes. The hash of a seed read as text differs from the hash of the same characters read as hex.
Can I write my own verifier?
Yes. The scheme is a keyed hash and a little arithmetic, and the page on verifying a round by hand does it with ordinary command-line tools. Writing it yourself is the check that depends least on anyone else.
Sources
- RFC 2104, HMAC: Keyed-Hashing for Message Authentication (IETF, February 1997). Defines HMAC as
H(K XOR opad, H(K XOR ipad, text))and says that keys longer than the hash block are hashed first. Checked . - RFC 4231, Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384 and HMAC-SHA-512 (IETF, December 2005). Source of the two published HMAC-SHA-256 test cases that our tools must reproduce. Checked .
- FIPS 180-4, the NIST standard that specifies SHA-256. We link to the NIST publication page for the standard. The known answer for the input
abcin our test vectors is recomputed with Node on every build. Checked . - Web Cryptography API (W3C Recommendation, 26 January 2017). The browser interface (
crypto.subtle.digest,importKey,sign) that the tools on this site call. A Level 2 revision exists as a working draft; we cite the Recommendation. Checked .
How we checked: statements about a named body link to that body's own page and carry the date we read it. Numbers in worked examples are computed by the site's build from the formulas shown, with routines covered by its test suite.