← Back to the lobby

How we shuffle

Every online hand at Larry’s House is dealt from a deck that is locked before the deal, shuffled with randomness from your device as well as ours, and opened up after the hand so anyone can check it. You don’t have to trust us. You can check.

The short version

  1. We lock the deck first. Before each deal, our server picks a secret random number (the server seed) and shows everyone at the table its fingerprint. A fingerprint can’t be turned back into the seed, but it pins the seed down: if we swapped the seed later, the fingerprint wouldn’t match.
  2. Your device adds its own randomness. While you’re seated, your phone or computer picks a random number of its own (your player seed) and sends it in. The deck is shuffled from the server seed and every player’s seed together. We locked our seed in before we saw yours, so we can’t choose a deck we like.
  3. We open the lock after the hand. When the hand ends, the server reveals its seed. Your device rebuilds the deck on its own and checks that the seed matches the fingerprint, that your seed was used, and that your cards and the table cards came from that deck.

The result shows on the fair-deal line at the table: a green ✓ when the hand checks out, and a red ✗ with the reason if anything doesn’t.

Where the randomness comes from

Check a hand yourself

The table checks every hand you’re dealt into automatically. To see the whole deck for yourself, open the fair-deal line at the table after a hand, tap the Copy hand details button, and paste them here. The deck is rebuilt in your browser; nothing is sent anywhere.

The exact recipe

For anyone who wants to check a deck with their own code, this is exactly how a deal is built from the seeds in a hand’s details:

  1. Fingerprint: SHA-256 of the server seed’s 32 bytes (decode the hex first), written as lowercase hex. It must equal the commitment.
  2. Player seeds: sort them by player id and join them as id:seed, separated by commas. Call it P. Empty if nobody’s seed arrived in time.
  3. Random stream: block n (0, 1, 2…) is HMAC-SHA256 keyed by the server seed’s bytes, over the text P|0|n. Read each block as eight big-endian 32-bit numbers.
  4. Unbiased picks: to pick a number below k, take the next number w from the stream. If w is below the largest multiple of k under 2³², the pick is w mod k; otherwise skip it and take the next.
  5. Shuffle: start from the deck in order (clubs, diamonds, hearts, spades; ace to king within each suit). For i from 51 down to 1, pick j below i + 1 and swap cards i and j. Card 0 is the top of the deck.
  6. Deal: in Double-Suit Badugi, Down the River, Texas Hold’em and Omaha, cards go round one at a time from the top, starting at the seat left of the button, and the table cards come next. Wigg Game, Jelly Game and Clock deal in their own order, as each game’s How it works page describes; the checker above deals every game the way the server does. If a draw empties the deck, the discards are reshuffled the same way with |1|, then |2|, in place of |0|.

What it doesn’t cover

Chips are play money with no cash value. See About for more on how the game works.