How to Verify Provably Fair Baccarat Hands (SHA-256 & HMAC)

Provably fair cryptography cannot forecast the next card, and any tool claiming otherwise is a scam. What it can do is prove — down to every byte and third-card draw — that a finished session was not altered after you bet.

8 min read

On provably fair crypto baccarat tables (such as Stake Originals), you do not have to take the operator's word that cards were dealt honestly. Every finished session leaves behind a cryptographic audit trail—a pre-committed SHA-256 hash, a revealed server seed, your client seed, and a hand counter called the nonce—that lets anyone recompute every single card from scratch.

Our free Provably Fair Baccarat Verifier runs that entire verification pipeline locally inside your browser using the Web Crypto API, replaying up to 5,000 hands at once onto all five baccarat roads without ever sending your seeds over the network. Here is how the math works and how to verify a real seed pair step by step.

The 4-stage cryptographic pipeline

Every coup replayed on /verify passes through four deterministic stages:

Stage 1 — Verify the SHA-256 commitment hash

Before dealing Hand 0, the casino shows you a 64-character hexadecimal hashed server seed. Once you rotate your seed pair in the casino's Fairness panel, it reveals the plaintext serverSeed. The verifier computes:

SHA-256(UTF8(serverSeed)) === committedHash.trim().toLowerCase()

Because SHA-256 is collision-resistant, a matching 64-hex-character digest proves the casino could not swap or edit the server seed after seeing your bet sizes or your client seed.

Stage 2 — Generate 24 deterministic bytes via HMAC-SHA256

A baccarat coup never draws more than six cards (up to three for Player and three for Banker), and each card draw consumes four bytes—24 bytes in total. For each hand nonce from 0 to count − 1, the engine signs:

key     = UTF8(serverSeed)
message = "${clientSeed}:${nonce}:0"
digest  = HMAC-SHA256(key, message) // 32 bytes (24 bytes consumed)

Because a single HMAC-SHA256 round outputs 32 bytes, all six card slots for a baccarat hand fit inside round = 0.

Stage 3 — Convert 4-byte chunks into floats and 52-card indices

Each consecutive 4-byte slice [b0, b1, b2, b3] becomes a floating-point number in [0, 1) and maps onto Stake's rank-major 52-card deck (0 = 2♦, 1 = 2♥, 2 = 2♠, 3 = 2♣ … 51 = A♣):

float     = b0 / 256^1 + b1 / 256^2 + b2 / 256^3 + b3 / 256^4
cardIndex = Math.floor(float * 52) // 0..51 (infinite-deck draw)

Notice an important difference from a physical eight-deck shoe: each float independently picks 1 of 52 cards with replacement (an infinite-deck RNG draw). Earlier hands do not deplete cards from later nonces at all.

Stage 4 — Apply the Punto Banco third-card tableau

Card indices [0, 1] form Player's initial two cards, and indices [2, 3] form Banker's initial two cards. Our locked Punto Banco engine resolves Naturals first; if no Natural occurred, index 4 is drawn if Player takes a third card, and the next cursor (4 if Player stood, or 5 if Player drew) is drawn if Banker takes a third card.

A real 24-hand test vector you can paste into /verify right now

Do not take any guide's math on trust—test it directly. Copy these exact audit inputs into /verify:

  • Server seed: baccarat-smart-audit-seed-2026
  • Pre-commitment SHA-256 hash: 75f93510406eb1212ceb3b86791253db1faebe5941981cc90f0232d4c328a2bc
  • Client seed: player-verify-demo
  • Number of hands: 24 (nonces 0 through 23)

Here is what happens on the first two nonces down to the byte:

  1. Nonce 0 (Hand #1 — Player wins 9 to 7): HMAC-SHA256("baccarat-smart-audit-seed-2026", "player-verify-demo:0:0") starts with bytes [41, 133, 79, 76] (float 0.162190… → index 8 = 4♦) and [64, 155, 115, 0] (float 0.252371… → index 13 = 5♥), giving Player 4♦ + 5♥ = 9 (Natural 9). Banker receives indices 25 = 8♥ and 28 = 9♦ (total 7). Because Player holds a Natural 9, neither side draws a third card, and Hand #1 resolves P.
  2. Nonce 1 (Hand #2 — Banker wins 6 to 5): Player receives indices 0 = 2♦ and 4 = 3♦ (total 5); Banker receives indices 2 = 2♠ and 11 = 4♣ (total 6). Player draws index 33 = 10♥ (0 points, staying at 5). Under the official tableau, Banker stands on 6 when Player's third card is a 10 (Banker only draws on a two-card total of 6 against a Player third card of 6 or 7), so Hand #2 resolves B.

Across all 24 nonces (0..23), the seed pair produces PBBBBBPTBPBBTBPBPPBBPTTT (12 Banker, 7 Player, 5 Ties):

All five roads replayed from serverSeed 'baccarat-smart-audit-seed-2026' and clientSeed 'player-verify-demo' across nonces 0..23: 11 Big Road columns, 17 Big Eye Boy marks, 12 Small Road marks, and 11 Cockroach Pig marks.

Checklist before trusting a session audit

  1. Save the SHA-256 hash before you play: Copy the active hashed server seed at the start of your session so you can confirm the post-rotation seed matches what was committed upfront.
  2. Set your own non-default client seed: Typing a custom client seed before Hand 0 guarantees the operator could not pre-select a favourable seed combination on their own.
  3. Match the exact nonce range: Nonces start at 0 on a fresh seed pair and increment by 1 per bet. On /verify, click any bead on the Virtualized Bead Plate to open the dealt cards, point totals, and raw floats for that exact nonce.

Want to inspect how a finite eight-deck shoe differs mathematically from an infinite-deck provably fair RNG stream? Read our eight-deck combinatorial math breakdown next, or test this 24-hand replay in the interactive road sandbox below.

Interactive Road Sandbox

Try this shoe live

Deal extra hands onto this shoe to watch the Big Road and all three casino derived roads react live. On derived roads, red = pattern repeating and blue = pattern breaking.

Two-two ×2 · P keeps it ~50%

Big Road (24 hands)

Big Road

3

Big Eye Boy

L=1
P
B

Small Road

L=2
Streak ×5 · B keeps it ~50%
B
P

Cockroach Pig

L=3
P
B

Hand #24 · Why the newest marks are red or blue

A tie adds a green slash on the Big Road and leaves all three derived roads unchanged.

Opens with this exact 24-hand sequence preloaded—and archives any shoe already on your board first.

Continue this shoe in the free Road Decoder

Frequently asked questions

Can provably fair seeds tell you what card comes next?
Never. While a session is active, the server seed is hidden behind a one-way SHA-256 commitment hash. Recomputing HMAC-SHA256 outcomes requires the plaintext server seed, which is revealed only after you rotate the seed pair and retire it permanently. Any bot or group selling seed forecasts is a scam.
Does the Baccarat Smart verifier send my seeds to a server?
No. The verifier at /verify runs 100 percent locally inside your browser using the standard Web Crypto API (crypto.subtle) inside a dedicated Web Worker. Your server seed, client seed, and replayed hands never leave your device.
How does HMAC-SHA256 turn seeds into baccarat cards?
For each hand nonce (0 through count minus 1), the verifier computes HMAC-SHA256 using the UTF-8 server seed as the secret key and clientSeed:nonce:0 as the message. That 32-byte digest supplies six 4-byte chunks (24 bytes total); each 4-byte chunk converts into a float in [0, 1), and floor(float × 52) selects a card from the rank-major 52-card deck (0 = 2 of diamonds through 51 = Ace of clubs).
Why does provably fair RNG baccarat use an infinite-deck draw?
In Stake Originals-style RNG baccarat, each float independently selects 1 of 52 cards with replacement rather than depleting an 8-deck 416-card shoe. Every coup starts from an identical 52-card distribution, so earlier hands do not even remove cards from future hands.
How many hands can I replay at once on /verify?
Up to 5,000 hands (nonces 0 through 4,999) in a single browser replay. Every verified coup is plotted onto the Bead Plate, Big Road, Big Eye Boy, Small Road, and Cockroach Pig, and clicking any bead opens the exact dealt cards and floats for that nonce.

Verify your own provably fair hands

Replay up to 5,000 hands directly in your browser using Web Crypto SHA-256 and HMAC-SHA256—your seeds never leave your device.

Verify your seeds in your browser