Nonce
A nonce is a counter that goes up by one with each bet, so that every bet made with the same pair of seeds gets a different result.
Also called bet counter, number used once
In cryptography a nonce is a number used only once. In a provably fair game it is a simple bet counter. The server seed and client seed stay the same for many bets, so without the nonce every bet would give the same result. Adding the nonce to the input changes the output each time.
Example. Your client seed is degenowl. One bet uses the message degenowl:1, the next uses degenowl:2, and so on. Each message is run through HMAC-SHA256 with the server seed as the key, and each gives a completely different 64-character result. The provably fair verifier shows this for any nonce you enter.
What people get wrong. The nonce is not secret and not random. It is public and predictable, and that is fine, because the secret part is the server seed. People also trip over the starting number when they check a bet. Casinos may count from 0 or from 1, and the counter starts again when you change seeds. Use the nonce shown in the bet's own details.
The message format can also differ between casinos. Check the casino's own fairness page.
Related terms
- Provably fair
Provably fair is a system that lets you check for yourself that a casino fixed its part of a bet's result before you bet and did not change it afterwards.
- Server seed
A server seed is a secret random value a casino picks before you bet and uses, together with your client seed and a nonce, to work out provably fair results.
- Client seed
A client seed is the player's input to a provably fair result, a value you can set yourself that is mixed with the casino's server seed and a nonce.
- Hash
A hash is a fixed-length fingerprint of some data, where the same input always gives the same hash but the hash cannot be turned back into the input.