Skip to the reads

Coin casinos · Daily read

How Provably Fair Gambling Works: The Cryptography Behind It

Provably fair is not magic. It's mathematics. Every hand can be verified using a one-way hash function that proves the outcome wasn't generated after the bet.

By Paula Nguyen, 3 min read

ALMANAC ENTRYBC365

Day148

Entered under Coin casinos. Also under Primers, Licences & law, Rule breakers and Account safety.

Cryptographic hash function verification code displayed on computer monitor

The city doesn't care if you're honest. The city is indifferent to your virtue. All the city cares about is whether you can prove you didn't cheat. Provably fair gambling is about proof.

Traditional online casinos want you to trust them. Trust the RNG. Trust the auditor. Trust the regulator. Trust is a relationship, and relationships are fragile. A regulatory scandal, a data breach, a rumor that spreads faster than the truth. The trust evaporates.

Provably fair removes trust. It replaces it with mathematics. You don't have to trust anyone. You have to understand hash functions.

Here's how it works.

Before the hand is dealt, the casino generates a random seed and computes a cryptographic hash of that seed. The hash is public. The seed is hidden. The hash is unforgeable (you cannot reverse-engineer the seed from the hash) and deterministic (the same seed always produces the same hash).

You, the player, generate your own seed. You submit it. The casino combines your seed with their seed and produces a new hash. This combined hash determines the card order.

The hand plays out. You lose or win. Now the casino reveals its seed. You run the same hash function (the code is public, you can download it) on the combined seed. You calculate what the card order should have been. You compare that to the cards you were dealt.

If they match, the hand was fair. If they don't match, the casino cheated and you have proof.

Why This Works

Hash functions are one-way. SHA-256 (the common one used in provably fair gambling) takes any input and produces a 256-bit output. The process is deterministic (same input always produces same output) but irreversible (you cannot work backward from output to input).

This means the casino cannot cheat without being caught. They cannot reveal a seed at the end that produces a different card order than what was dealt. The mathematics won't work.

But the casino also cannot know your outcome in advance. You generate your seed after they generate theirs. The combined seed is unknown to both parties until the moment of play. Nobody can manipulate the result because the result is locked in by mathematics the moment both seeds exist.

For the player, this is powerful. Every hand is verifiable. No audit required. No trust required. Just math.

The Catch

Provably fair requires the player to actually verify. If you don't run the hash function, you're trusting that the casino set it up correctly. Most players don't verify. They trust.

But the option exists. That changes the game. In traditional casinos, the player has no option. The shuffle is hidden. The mathematics are proprietary. You must trust.

In provably fair casinos, the mathematics are open. The player can check. The fact that they don't is their choice, not the casino's limitation.

The Implementation Problem

Provably fair is used mostly in crypto casinos. Few traditional casinos offer it. Why? Because traditional casinos are regulated. The regulator provides trust. The UKGC or MGA certifies the RNG. Players don't need provably fair if they have regulatory oversight.

Crypto casinos cannot use regulatory oversight. They operate outside legal frameworks. So they offer mathematics instead. Provably fair is their substitute for licensing.

This creates an interesting situation. A crypto casino might be actually more trustworthy (every hand is mathematically verifiable) than a licensed traditional casino (trust in the regulator, which could fail). But the traditional casino has legal authority behind it, which provably fair does not.

Both approaches work. The traditional casino buys trust through regulation. The crypto casino buys trust through mathematics. The player chooses which type of proof they value.

End of the entry for Day 148

Send this read