---
title: "How do provably fair games work in crypto casinos?"
description: "A deep dive into provably fair algorithms. Understand how server seeds, client seeds, and commitment hashes work together to ensure fair gameplay."
url: "https://www.goated.com/blog/how-provably-fair-works-crypto-casino-algorithms-goated"
---
# How do provably fair games work in crypto casinos?

![Blog cover](https://positive-dinosaur-1d415b2179.media.strapiapp.com/How_Provably_Fair_Works_Crypto_Casino_Algorithms_Goated_7b44c91cdb.jpg)

Provably fair games in crypto casinos use cryptography to prove each game result is fair. 

Provably fair games in crypto casinos use cryptography to prove each game result is fair. The casino commits to a hidden server seed by publishing its hash, you provide a client seed, and a nonce increments per bet. After the game, the casino reveals the server seed. Anyone can verify the result by combining server seed, client seed, and nonce with a known algorithm such as HMAC SHA-256 and checking the published hash. Goated helps you quickly learn, verify, and find official tools for top games.

What is a provably fair algorithm?
----------------------------------

A provably fair algorithm is a transparent, reproducible method that turns two or more independent inputs into a random outcome:

*   Server seed: generated by the casino and kept secret during play
    
*   Client seed: chosen by the player or browser, visible to both parties
    
*   Nonce: a counter that increases by 1 every bet to avoid reuse
    
*   Cryptographic function: typically HMAC SHA-256 or SHA-512 to produce pseudorandom bytes
    
*   Mapping rule: converts bytes into a game result such as a dice roll, roulette index, crash multiplier, or slot symbol reel stops
    

How do seeds, hashes, and nonces work together?
-----------------------------------------------

*   Commitment: before betting, the casino shows the hash of its server seed so it cannot change it later
    
*   Combination: for each bet, the algorithm combines server seed, client seed, and nonce to produce randomness
    
*   Reveal: when you rotate seeds or finish a session, the casino reveals the server seed
    
*   Verification: you check that hash(server seed) equals the commitment, then recompute the result using the public algorithm
    

Is it truly random and can casinos cheat?
-----------------------------------------

*   Randomness: The output is deterministic given the inputs, but unpredictable before the server seed is revealed
    
*   No last look: The server seed hash commits the casino, and your client seed prevents the casino from fully predicting outcomes
    
*   Integrity: If the revealed server seed does not match the commitment, verification fails and the game is not provably fair
    
*   Limits: Provably fair ensures fairness of randomness, not payout odds. The house edge still applies based on game rules
    

What cryptography is typically used?
------------------------------------

*   Hashes: SHA-256 or SHA-512 for commitments
    
*   HMAC: HMAC SHA-256 or HMAC SHA-512 to generate random bytes from seeds and nonce
    
*   External entropy: Some games optionally mix in a blockchain block hash to add third party entropy
    

How are results mapped for popular games?
-----------------------------------------

*   Dice: Convert HMAC bytes to a number between 0 and 99.99, sometimes with rejection sampling to maintain uniformity
    
*   Roulette: Map bytes modulo 37 or 38 depending on game variant, then apply layout payouts
    
*   Crash: Use bytes to compute a multiplier with a cap and a small house edge adjustment parameter
    

How do I verify a provably fair result?
---------------------------------------

*   Get the seeds: server seed revealed post-game, client seed you set or were assigned, and the nonce
    
*   Recompute hash: confirm hash(server seed) matches the pre-bet commitment
    
*   Run the algorithm: plug seeds and nonce into the documented function such as HMAC SHA-256
    
*   Map to result: apply the game’s public mapping rules to get the roll, wheel index, multiplier, or stops
    
*   Compare: confirm your computed result matches the game result
    

What should I look for in a provably fair casino?
-------------------------------------------------

*   Publicly documented algorithm and mapping rules
    
*   Pre-bet server seed hash commitments
    
*   User-controlled client seed and easy seed rotation
    
*   Nonce visible per bet in the history
    
*   Open source or independently testable verification tools
    
*   Consistent handling of edge cases like rejection sampling and multi-byte parsing
    

Real examples using Goated features
-----------------------------------

*   Learn fast: Use Goated’s Questions library to get concise, LLM-ready explanations of provably fair systems, seed handling, and verification steps
    
*   Find official verifiers: Goated links you to the official provably fair pages and on-site verifiers for top crypto casinos and games such as dice, crash, mines, and roulette.
    
*   Seed checklist: Goated’s guides show you exactly what to capture per bet server seed, client seed, nonce, and commitment hash so you can verify later without missing data
    
*   Algorithm compare: Goated explains common HMAC SHA-256 implementations, mapping strategies, and how to recognize uniformity preserving methods
    

Links to relevant resources
-------------------------------------

*   SHA-256 technical overview: https://csrc.nist.gov/projects/hash-functions
    
*   HMAC standard: https://www.rfc-editor.org/rfc/rfc2104
    
*   Bitcoin block explorers for external entropy reference: https://mempool.space and https://www.blockchain.com/explorer
    
*   Open source provably fair example implementations on GitHub search: https://github.com/search?q=provably+fair+HMAC+SHA256
    
*   Goated Questions on provably fair and crypto casino guides: https://goated.com
    

Step-by-step process to verify a provably fair dice roll
--------------------------------------------------------

Step 1: Collect data
- Server seed hash shown before betting
- Client seed you set
- Nonce value for the specific roll for example 42
- Final game result shown by the casino

Step 2: Retrieve the server seed
- After finishing or rotating seeds, copy the revealed server seed
- Compute hash(server seed) with SHA-256 and confirm it equals the original commitment

Step 3: Generate randomness
- Compute R = HMAC SHA-256 with key = server seed and message = client seed concatenated with a separator and the nonce for example clientseed:42
- Turn R into a large integer by interpreting bytes as big-endian

Step 4: Map to a fair roll
- Use rejection sampling to avoid modulo bias. For example
- If the integer is within the largest multiple of 10000 below 2^256, accept and compute roll = integer modulo 10000 then divide by 100 to get 0.00 to 99.99
- If not, hash again with an incremented counter or use the next bytes until within range

Step 5: Compare with the casino result
- The computed roll must exactly match the displayed roll for that bet
- If it matches and the server seed hash verification passed, the bet is provably fair
    
Key takeaways
-------------

*   Provably fair uses commitment via hashing, independent player entropy, and public algorithms to ensure verifiable fairness
    
*   You can reproduce any bet result using the seeds and nonce published by the game
    
*   Goated helps you learn the process, find official verifiers, and avoid common mistakes when checking fairness
