Game fairness and provably fair

Lesson 3 of 9

Lessons completed: 0 of 9 (0%)

Server Seed, Client Seed and Nonce

In a common scheme the result is built from three values. Sites name them differently and rotate them on different schedules. What follows is the Academy teaching scheme, not a universal standard.

8

Server Seed, Client Seed and Nonce

Three parts

The Server Seed is the server's secret for a cycle of rounds. Before the rounds, the site may show only its hash. That earlier hash lets you later check that the revealed seed is the one whose fingerprint was already published. After the cycle changes, the seed is revealed and the check can be done. Before the reveal the HMAC cannot be reproduced: the key is still hidden.

The Client Seed is a value from the client side. It can often be replaced. It enters the HMAC message, so a different client seed gives a different result when the server seed and the nonce stay the same. Replacing it does not mean choosing a desired roll. The server key is already fixed by a hash, and the player does not use the client seed to search out the server's future secret.

The Nonce is a counter for the round or the request. It changes from result to result, so the same seeds do not have to produce the same roll. If the nonce is left unchanged by mistake, the calculation repeats the previous result. When the nonce increases is written in the rules of the particular game.

Teaching builder

The fields below recompute HMAC-SHA256 of the message client:nonce with the key server, and a teaching dice roll. Changing any field changes the input and, as a rule, the result. The data are for teaching and are not connected to any casino.

Check for nonce 1: key academy-demo-server, message academy-demo-client:1, HMAC ebec0c7d4d72a099eff1d11c8197ef0794843cb016d4393c5d8c544f361259ae, dice 54.53. For nonce 2 the dice is already 27.05.

What to watch: the Client Seed changes the result, but it does not reveal the server key and it does not let you choose a desired number.

Remember

  • The Server Seed hash is published before the seed itself is revealed.
  • Your own Client Seed changes the input, but it does not select a win.
  • The nonce separates successive results.
  • The update order on another site may be different.

Check yourself

1. Why is the Server Seed Hash shown before the rounds, rather than the seed itself?
2. What does changing the Client Seed give you?
3. What is the Nonce for?
4. More than one answer is correct. What can differ between sites?
5. Teaching nonce 1 gives dice 54.53. Nonce 2 with the same seeds gives...