Provably fair

What is provably fair?

In online gambling provably fair describes an algorithm which can be analyzed and verified for fairness on the part of the service operator. Provably fair algorithms are often used in the operation of an online casino.

In a provably fair gambling system, a player places bets on games offered by the service operator. The service operator will publish a method for verifying each transaction in the game. This is usually by using open source algorithms for random seed generation, hashing, and for the random number generator. Once a game has been played, the player can use these algorithms to test the game’s response to his in-game decisions and evaluate the outcome by only using the published algorithms, the seeds, hashes, and the events which transpired during the game.

The benefit of a provably fair system is that third-party verification and auditing is usually unnecessary. Results of bets for which the outcomes are mathematically predetermined are harder to scrutinize and thus the system can add a degree of trustworthiness to a gambling operation. It could also potentially expose the operator to hacking attempts if there are undisclosed security flaws in the open source software.

How it works

The basis of the system is the cryptographic hash function and it’s difficulty to crack. Before the bet begins the gambling server generates a seed and send this as a hashed function to the player. Client side the player then generates a random seed and this is added to the hash function. After the bet is complete the player decrypts the hash function to determine that it is the same transaction that began. If the function matches then the bet has been uninterrupted. Any difference in the hash indicates that something has gone wrong with the outcome, most likely as a result of manipulation.

Site game side

To achieve Provably Fair Gaming, site use algorithms such as SHA256, and SHA-512  to hash a  Server Seed,  and your Client Seed (on many site you can change it or randomize it) , often a Nonce (bet number nounce is increased by 1 each roll) is used too or some other internal input data . To ensure the game bet cannot be tampered some algorithms  are used too such as Mersenne Twister and Fisher-Yates shuffle.

User side

From our side (user/player) we can see  in verifier / provable fair page  hash and client seed  for next bet to be done, all previous bet should be in clear this mean should have all info needed to calculate the bet such as server seed in clear client seed and other input data used like nonce / map / deck in site where the hash change with each roll. We can see instead in site with a nonce system all bet hidden (with only server client and nonce shown) all other data are usually show when user randomize (change server seed and client, nonce start from 0 again).