Fair play

Deck commitment and privacy.

At cash tables, the server publishes a hash commitment before the hand. The seeds stay private, even after the hand ends: rebuilding the deck would reveal the cards of players who folded or chose MUCK. These seeds are never revealed automatically or published later.

  1. 01 · Server

    Generates the seeds

    Cards are shuffled on the server, from its own seed and a client seed.

    serverSeedclientSeed
  2. 02 · Before the hand

    Publishes the commitment

    The commitment is the SHA-256 hash of the combined seeds. It records the value without revealing it.

    SHA-256("serverSeed:clientSeed")
  3. 03 · After the hand

    The seeds stay private

    Rebuilding the deck would reveal folded and mucked cards. That is why the seeds are never published.

    Card privacy

What the commitment lets you check

The commitment is SHA-256("serverSeed:clientSeed"). It records a hash of the seeds without revealing them. On its own, it does not allow rebuilding the deck or publicly verifying a complete hand. It also does not prove that the dealt cards followed that deck or that the commitment was received before the deal.

The manual verifier below compares voluntarily supplied data and reproduces a 52-card deck. It does not connect to games, does not fetch seeds from real hands and does not certify the operation. The demo uses the synthetic seeds server and client.

The algorithm, in detail

The shuffle is deterministic given the seeds and the hand nonce:

  • Initial deck (52 cards, canonical order): suits for each rank, in rank order 2 3 4 5 6 7 8 9 T J Q K A and suit order s h d c, that is 2s, 2h, 2d, 2c, 3s, …, As, Ah, Ad, Ac.
  • Keystream: 32-byte blocks of HMAC-SHA256(key = serverSeed, message = "clientSeed:nonce:counter"), with counter starting at 0 and incrementing on each block. The keystream is consumed in 4-byte chunks (big-endian uint32).
  • Unbiased integer in [0, max]: rejection sampling: range = max + 1, limit = floor(2³² / range) × range; draw uint32 values until one is < limit and return value % range.
  • Fisher-Yates: for i from 51 down to 1, draw j in [0, i] and swap positions i and j.

The verifier below is a faithful, byte-for-byte reimplementation of the engine algorithm in packages/core-poker (src/rng.ts, src/deck.ts and src/verify.ts). It runs 100% in your browser using crypto.subtle.

Manual verifier

Manual seed verifier

Use the example or any test seeds you want to supply. The calculation runs locally in your browser; this tool does not send the values anywhere. A match only confirms the supplied hash, not the fairness of a game.