All guides

Protocol

The pfc-hmac-v1 Protocol, in Depth

A technical walkthrough of the pfc-hmac-v1 provably fair protocol: HMAC-SHA256 construction, float derivation, the twelve supported games, verification statuses, and fail-closed design.

ProvablyFair.click · November 16, 2026

An open glowing book with dice, cards and hash symbols rising from its pages

The commitment

Every round begins with a server seed: a secret string chosen by the operator. Before any bet is placed on that seed, the operator publishes the commitment:

commitment = hex(SHA-256(serverSeed))

The commitment is a SHA-256 hash of the server seed, expressed as 64 hexadecimal characters. Because SHA-256 is a one-way function, the commitment reveals nothing about the seed, but it locks the operator in: after publishing it, the operator can only reveal a seed that hashes to exactly that value. Any other seed produces a different hash, and the mismatch is immediately detectable.

The commitment is published before the bet. The seed is revealed after the round (or when the seed is rotated). That ordering is the whole security of the scheme: the operator cannot choose a seed to suit a bet it has already seen.

The HMAC construction

Outcomes are derived from the seeds with HMAC-SHA256, a standard keyed hash function. The construction is:

digest = HMAC-SHA256(key = serverSeed, message = "clientSeed:nonce:round")
  • Key: the server seed, revealed after the round.
  • Message: the client seed, the nonce, and a round counter, joined by colons. The client seed is the player's input; the nonce is the per-player round counter; the round counter starts at 0 and increments when a game needs more random values than one digest provides.
  • Output: a 32-byte digest.

The client seed's role is important. Because the outcome depends on a value the player supplies, the operator cannot pre-compute favorable outcomes for a specific player in advance — it does not know what client seed the player will use. Players who want maximum assurance can set their own client seed rather than accepting a generated one.

The nonce guarantees that each round produces a different digest even when the seeds stay the same. Two rounds with the same seeds and different nonces are unrelated.

Float derivation

Each 32-byte digest is converted into random floats. The digest is read as eight groups of four bytes, and each group becomes one float in the range [0, 1):

float = b0/256 + b1/256² + b2/256³ + b3/256⁴

where b0 through b3 are the four bytes of the group. So each digest yields 8 floats. If a game needs more than 8 floats, the round counter increments and a new digest is computed with round = 1, then round = 2, and so on. The stream is deterministic: the same seeds, nonce, and round counter always produce the same floats, which is what makes independent verification possible.

The floats are the protocol's raw random material. Every game maps them to outcomes in its own way, but the derivation is identical for all games — which means a single verification engine can check any supported game.

The twelve supported games

Each game maps the float stream to an outcome according to published rules:

GameHow the float stream maps to the outcome
DiceThe roll is floor(float × 10001) / 100, giving a result from 0.00 to 100.00.
LimboA multiplier game: the result is derived from a single float with a 0.99 factor applied to the payout.
PlinkoThe ball drops through 8, 12, or 16 rows; each float decides a left or right bounce, and the final slot determines the multiplier.
MinesA float stream selects 1–24 mine positions on a 25-tile grid; the player reveals tiles and avoids the mines.
BingoThe floats generate a permutation of 75 balls, determining the draw order.
RouletteA single float is mapped to a European wheel result, 0–36.
KenoThe floats select 10 numbers out of 80.
BlackjackThe floats shuffle 1–8 decks and deal the cards; the protocol covers the deal, not player decisions or settlement.
PokerThe floats shuffle a deck and deal Texas Hold'em hands for 2–10 players; no burn cards, and no hand evaluation.
BaccaratThe floats deal the cards under the full third-card rules.
Video pokerThe floats deal the initial five-card hand; holds and paytable evaluation are outside the protocol.
SlotsEach float selects a reel stop on a 32-stop reference strip (3 or 5 reels), producing a three-row window per reel. Paylines, paytable, wilds, and scatters are evaluated from the window, and the exact theoretical RTP is computed from the strips, paylines, and paytable.

The protocol defines the reference behavior for each game. Where a game has aspects outside the protocol — such as player decisions in blackjack or holds in video poker — those are stated explicitly rather than left ambiguous. A verification covers the random outcome the protocol defines, and nothing more.

Verification statuses

A verification returns one of four statuses:

StatusWhat it means
VerifiedThe commitment matched, the inputs were complete, and the recomputed outcome matches the recorded outcome. The round checks out.
FailedThe check completed but the result does not match: either the revealed seed does not hash to the published commitment, or the recomputed outcome differs from the recorded one. A failed round is a failed round — there is no partial credit.
InconclusiveThe check could not be completed: a required input is missing (for example, the server seed has not been revealed), or a configuration value is invalid. Inconclusive is not an accusation; it means the evidence was insufficient to reach a conclusion either way.
UnsupportedThe round uses a game, reel count, or protocol variant the verifier does not cover. Unsupported means the verifier cannot check this round at all, and it says so rather than guessing.

Fail-closed design

The protocol is designed to fail closed: whenever something is wrong, missing, or ambiguous, the result is a non-verified status. There is no path through the verifier that produces "verified" from incomplete or inconsistent evidence.

Concretely, that means:

  • A missing server seed is inconclusive, never verified.
  • A commitment mismatch is failed, never "close enough."
  • An unknown game is unsupported, never approximated.
  • An invalid configuration — a malformed reel strip, a payline pointing at a row that does not exist, a paytable entry outside the allowed range — is inconclusive, never silently corrected.
  • An observed outcome that differs from the recomputed outcome, even slightly, is failed.

This matters because a verifier that guesses is worse than no verifier at all. A guess that happens to be right teaches players to trust a check that cannot be trusted, and a guess that is wrong either accuses an honest operator or clears a dishonest one. Fail-closed means the verifier only ever says "verified" when it can show its work.

What a custom adapter is

The protocol covers twelve games with reference rules. Operators often have games that differ: a slot with custom reel strips and a different paytable, a dice variant with a different range, or a game not in the reference set at all.

A custom adapter is the mechanism for those cases. It is a precise, written specification of how the operator's game maps the same HMAC float stream to its outcomes — the strips, the paylines, the paytable, the mapping rules — so that the verifier can recompute the operator's game exactly as it recomputes a reference game. The adapter does not change the protocol's core: the commitment, the HMAC construction, and the float derivation stay the same. Only the game-specific mapping is customized, and it is published so that anyone can check it.

A custom adapter is part of an audit engagement: the mapping is reviewed, the configuration is bound to the certificate by its hash, and any change to the configuration is a new version that needs its own review.

Key takeaways

  • pfc-hmac-v1 derives outcomes from HMAC-SHA256(key = serverSeed, message = "clientSeed:nonce:round"), with 8 floats per 32-byte digest.
  • The commitment is hex(SHA-256(serverSeed)), published before the bet and checked against the revealed seed afterwards.
  • Twelve games are supported, each with a published mapping from the float stream to outcomes; aspects outside the protocol are stated explicitly.
  • Verification returns verified, failed, inconclusive, or unsupported — and the design is fail-closed, so anything wrong or missing is never reported as verified.
  • Custom adapters extend the protocol to operator-specific games without changing its core, and they are reviewed as part of an audit engagement.
  • For the full endpoint reference and worked API examples, see the documentation and the Swagger page. To check a round, use the free verifier at /verify.