Skip to the page
Cryptocurrency keys and hash function blocks creating provable fairness chain

How Provably Fair Gambling Works: The Cryptography Behind It

Provably fair gambling emerged from the early Bitcoin-era online casinos between 2012 and 2014. The cryptographic construction predates them, but the application to wagering is specific, and worth tracing carefully: from Nakamoto's Bitcoin whitepaper through SatoshiDice, to the seed-and-hash protocols in use today at crypto-native operators.

Filed by
The Get Trump Casino Journal
Filed
Reading
5 min

Provably fair gambling is a family of cryptographic protocols, deployed in online wagering platforms, which allow a player to verify after the fact that the outcome of a game was not manipulated by the operator. The protocols rely on well-established primitives from modern cryptography, principally the cryptographic hash function and the commitment scheme. What is novel in provably fair systems is not the cryptography itself, which is decades old, but its specific application to gaming, which arose in the early Bitcoin economy and remains substantially unchanged in its foundational form.

The Late 2000s: Precursor Thinking

The conceptual groundwork predates Bitcoin. In cryptographic literature, the commitment scheme was formalised by Manuel Blum and others during the early 1980s. The basic construction is this: one party commits to a value by publishing its cryptographic hash, keeping the preimage secret; at a later time, the party reveals the preimage, and any observer may hash it and verify that the revealed value matches the earlier commitment. The hash function, in this application, binds the committer to a value without disclosing it. Blum's coin-flipping protocol, presented in 1983, applied this idea to the simple problem of two mutually distrustful parties agreeing on the outcome of a fair coin toss over a communication channel.

The analogy to online gambling is direct. A player and an operator are precisely two mutually distrustful parties, and the outcome of a wager is, at its mathematical core, a coin toss or a generalisation of one.

2009 and the Bitcoin Block Hash

Satoshi Nakamoto's January 2009 release of the Bitcoin protocol did not address gambling. Nakamoto's concern was with double-spending in a decentralised ledger. Nevertheless, the protocol introduced into wide circulation a particular property that would prove useful to the later gambling application: every Bitcoin block contains a hash that is deterministically derived from its contents, is computationally infeasible to predict in advance, and becomes permanently visible to all network participants upon block inclusion.

Early operators would later exploit this property. The block hash, because no single party could control it and because it was publicly auditable, served as a convenient source of shared randomness. Protocols that incorporated the block hash as part of their outcome-generation procedure gained a form of public verifiability that traditional online casinos did not offer.

2012: SatoshiDice and the First Deployed System

The Bitcoin dice site SatoshiDice, launched in April 2012 by Erik Voorhees, is generally credited as the first commercial gambling operator to deploy what has since come to be called a provably fair protocol. The site's design was austere. Players sent a Bitcoin transaction to one of a set of published addresses, each corresponding to a payout threshold. The outcome of the wager was determined by a value derived from the player's transaction hash, a server-side secret, and an HMAC-SHA512 construction.

Before play, the site published the SHA-256 hash of the server's secret key. After play, or periodically, the server revealed the key itself. Any player could then confirm two things: that the revealed key hashed to the pre-published commitment, and that the claimed outcome of each historical wager could be reconstructed deterministically from the revealed key and the publicly visible transaction hashes.

Voorhees sold SatoshiDice in July 2013 for 126,315 Bitcoin, which at the time was valued at approximately 11.5 million US dollars. The protocol persisted after the sale, though ownership has changed hands since.

The General Construction in Modern Use

By 2014 the basic pattern had generalised into the template used by nearly all crypto-native casinos today. The elements, in the order they are typically deployed in a single round of play:

  • The operator generates a server seed, a long random string, and publishes its SHA-256 hash to the player before the wager.
  • The player supplies a client seed, which the player may edit at will, and which the operator commits to record as submitted.
  • The player also supplies, or the system supplies, a nonce, which is typically an incrementing integer counting the player's rounds.
  • At the moment the wager is resolved, the outcome is computed by feeding the concatenation of server seed, client seed, and nonce into an HMAC function, typically HMAC-SHA256, and mapping the resulting bytes into the game's outcome space.
  • After the session ends, or after the player rotates seeds, the operator reveals the previously committed server seed. The player may then reconstruct every outcome from the raw inputs and verify each result.

The property this construction provides is not that the operator cannot influence the outcome at all. It is a narrower property: that the operator cannot retroactively adjust the server seed, because the seed's hash was committed before the round began, and that the operator cannot alter the client seed, because the client seed was under the player's control. Given these two constraints, and given the one-way property of the HMAC, the operator's scope to manipulate a specific round is limited to the selection of the server seed itself, which had to be chosen before the operator knew what the player would do.

Present Day

The template is now standard at operators such as BC.Game, Stake.com, Rollbit, and many smaller crypto-dice sites. Several traditional fiat casinos have adopted variants of the approach for their in-house games, though the practice is less common in the licensed European market, where regulators require instead that a Random Number Generator be certified by an accredited laboratory such as Gaming Laboratories International or BMM Testlabs.

The two regimes coexist. Certified RNG places trust in a third-party auditor. Provably fair places trust in cryptographic construction and the assumption that the hash function used is preimage-resistant. Neither is strictly superior. They answer different questions. The provably fair regime is attractive to the technically inclined player who prefers to verify rather than to take an auditor's word, and the regulatory regime is attractive to jurisdictions whose legal framework predates the cryptographic primitives on which provably fair rests.

What began as an elegant solution to a specific problem in a small Bitcoin dice site in 2012 has, by 2026, become part of the infrastructure of a now mature crypto-gambling economy.

Wings for this entry

Share the entry

Crypto Gambling and nearby wings

Keep reading

Cryptocurrency symbol and cryptographic hash function mathematical formulaCrypto Gambling

4 min read

How Provably Fair Gambling Works: The Cryptography Behind It

Provably fair gambling emerged from the Bitcoin era around 2012-2013, pioneered by sites like SatoshiDice. The system uses cryptographic hash functions to prove that a game result was not determined after the bet was placed. Understanding the mechanism requires basic knowledge of hashing and commitments.

Filed by The Get Trump Casino Journal

encrypted payment shield icon over licensed online casino transaction verification portalCrypto Gambling

6 min read

Payment Security at Licensed Online Casinos

A walk through the history of how online casino payment security got built, from the 1996 InterCasino launch to PSD2 strong authentication to the 2020s tokenised wallet era. Dates, names, and what each step made possible.

Filed by The Get Trump Casino Journal

Three stablecoin logos arranged with equivalent value lines and casino deposit arrowsBonuses

5 min read

Stablecoins Like USDT and USDC for Casino Deposits

Listen, I'm gonna break this down for you because nobody else is talking about it straight. Stablecoins for casino deposits. USDT, USDC, the whole thing.

Filed by The Get Trump Casino Journal