Provably Fair
Jacks Club is provably fair. This means we use cryptography to prove that every bet is mathematically fair and manipulation free. Our players can check the fairness of every bet and confirm that they are not manipulated. You can do this on the verify page.
Implementation
Each user has one active "client seed", one active "server seed", and a "nonce" incrementing once per game for the random number generation function. The following code is how we generate random bytes:
- const message = client_seed + ':' + nonce;
- const seed = CryptoJS.HmacSHA256(message, server_seed);
- const randomBytes = CryptoJS.HmacSHA256(rounds, seed);
Server Seed
A hidden server seed is generated by our system as a random base 58 string. We show you the hashed version of the server seed to prevent us from changing the un-hashed server seed and to prevent the player from calculating the bet results beforehand. When revealing the server seed the player is able to verify if the hashed server seed matches that of the un-hashed server seed, and a new server seed is generated for future upcoming bets. The following code is how we hash the server seed:
- const hash = CryptoJS.PBKDF2(server_seed, 'Jacks Club', {
- hasher: CryptoJS.algo.SHA512
- keySize: 32
- iterations: 100000 // My paranoia was setting in :D
- });
Client Seed
Without the client seed only the server seed has influence over the bet outcome. The client seed is chosen by the player and it's purpose is to ensure the player also has influence on the randomness of the bet outcome. The 1st client seed will be automatically generated for you, You are free to change your client seed at anytime via the fairness popup.
Nonce
The nonce is a number that increments for every bet placed. It's purpose is to ensure we can generate new random bet results, while staying committed to your client seed and server seed pair.