Check a game’s dice
A free tool · Last updated 28 October 2026
When a game against a bot ends, Backgammon Room shows the key its dice came from. Paste it here and this page works out every roll again, so you can see they’re the rolls you played. It all happens in your browser: nothing you enter leaves this page.
What it checks
Before the first roll of a game against a bot, your iPhone picks a secret key and shows its fingerprint, the lock. Every roll comes from the key and the roll’s number, so once the game has started no roll can change, whatever you play and whatever the bot’s level. When the game ends, the key is revealed.
This page hashes the key to see that it gives the lock, then works out every roll from it. If the lock matches and the rolls are the ones you played, the dice were fixed before the game began: neither the app nor the bot chose them. Online, the server seals its number the same way before the first roll and both apps add a number of their own, so no one alone decides the dice. How the dice work explains it all in plain words.
Check it without this page
The lock is the SHA-256 of the key’s 32 bytes. A roll is read from HMAC-SHA256, keyed with the key, of the roll’s label followed by :0 (then :1, :2… if more bytes are needed): a byte of 252 or more is skipped, any other gives a die of (byte mod 6) + 1, and the first two dice read are the roll.
- Against a bot, the opening roll’s label is
bg-dice-v1:opening:0(:1,:2… after a tie; your die first) and each turn’s isbg-dice-v1:turn:2,bg-dice-v1:turn:3… The opening roll’s winner plays it as turn 1. A later game of a match has no opening roll and starts atbg-dice-v1:turn:1. In a Practice game, after a take-back:bg-dice-v1:turn:7:line:1. - Online, the key is HMAC-SHA256, keyed with the server’s number, of
bg-online-v1:seeds:followed by both apps’ numbers in lowercase hex, separated by a colon. The labels arebg-online-v1:g1:opening:0, thenbg-online-v1:g1:roll:1,…:roll:2… (g2for the second game, which starts atroll:1). - A test: with the key 00 01 02 … 1f, the lock starts
630dcd29, the opening roll is 4-6 and turn 1’s roll would be 5-4.
In Python, with nothing to install:
import hashlib, hmac
key = bytes.fromhex("000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f")
print(hashlib.sha256(key).hexdigest()) # the lock
def roll(label):
dice, block = [], 0
while True:
for byte in hmac.new(key, f"{label}:{block}".encode(), hashlib.sha256).digest():
if byte < 252:
dice.append(byte % 6 + 1)
if len(dice) == 2:
return dice
block += 1
print(roll("bg-dice-v1:opening:0"), roll("bg-dice-v1:turn:2")) # [4, 6] [1, 3]
Questions
- Is anything I enter sent to you?
- No. The page works everything out in your browser, and the site has no analytics or cookies.
- Do I have to enter my rolls?
- No. Without them the page lists every roll the key gives, to compare with the game’s replay. With them it compares each one for you.
- What if a roll doesn’t match?
- Check that the rolls are in the order they came, that the key and the lock come from the same game, and the answers about the opening roll and take-backs. If the key matches the lock and a roll still differs, tell us with the game’s key.
More free tools: Should I double? and the race and shot calculator.