This article I found on the crypto gambling foundation by Kristof is really good at explaining it. I recommend anyone read it, even if you think you know!
https://cryptogambling.org/provably-fair/
numbers.
Formerly, these random numbers were generated solely by the host of a game, leaving complete control in the hands of operators. Participants had to trust the host not generating results in favor of anyone. Casinos operating on these merits caused conflict of interest for those seeking a fair gambling experience.
Due to lack of transparency, the essence of provably fair games was born. Corresponding concepts provide a way for both the operators and players to contribute to randomization, which in turn removes any possibility of deceit or cheating.
The foundation of fair gaming algorithms were laid by pseudorandom number generators, utilizing seeds which determine the outcome of wagers.
A seed shall be equally influenced by players and hosts, meaning that the result of each bet at a provably fair casino is a team effort. The house is no longer in complete control of randomization.
So, wouldn’t this mean that players are able to manipulate results in their own favor?
Commitment schemes to the rescue!
To prevent malicious behavior, hosts mustn’t show us their actual seed at first. Instead, they present a commitment of their own seed to us. Similarly to envelopes, commitments seal and conceal messages contained by them. They cannot be altered or revealed without consent from the sender. For example, hosts may commit a seed by using a one-way hash function or public key cryptography.
Hosts shall provide transparency and proof of authenticity by revealing their actual seeds at the end of each game. Anyone in possession of a host’s commitment may verify the immutability of the corresponding seed.
Bets shall be reproducible once the host seed gets revealed. Players can constantly audit the behavior of hosts by comparing random results calculated by a host and them.
Proving that the outcome of a wager is computed fairly and transparently should be performed by anyone at any time. We strongly believe in widespread use of provably fair algorithms throughout the gaming industry.
The big problem that you can't really know if the site uses the code that it shows you or it uses a completely different code.