Provably Fair Verification

Independently verify that PixelPup games are fair. Every hand and roll uses a cryptographic commit-reveal scheme.

How It Works

1
Before play: The server generates a random seed using crypto.randomBytes(32) and sends you its SHA-256 hash (the "commit"). This locks the outcome before you act.
2
You play: Your optional client seed combines with the server seed and hand ID. Neither party can change the outcome after commit.
3
After play: The server reveals the original seed. You verify: SHA-256(serverSeed) === commit
4
Replay: Using the seeds + hand ID, you can deterministically replay the exact shuffle or roll and confirm the outcome matched.

Verify a Hand

Manual Verification

Paste seeds to verify independently — no trust required.

Algorithm Reference

Exact algorithms used server-side. Implement in any language to verify.

Poker & Blackjack — Fisher-Yates + SHA-256 Hash Stream

seedString = serverSeed + ":" + clientSeed + ":" + handId + ":deal"  // or ":bj"
h = SHA-256(seedString)

// Hash stream: repeatedly hash to produce 32-bit integers
function nextRandom():
  h = SHA-256(h)
  return parseInt(h[0..7], 16)  // first 8 hex chars as uint32

// Fisher-Yates shuffle with rejection sampling (eliminates modulo bias)
for i = 51 down to 1:
  limit = 0xFFFFFFFF - (0xFFFFFFFF % (i+1))
  do: r = nextRandom()
  while r >= limit
  j = r % (i+1)
  swap deck[i], deck[j]

Dice — SHA-256 Satoshi Roll with Rejection Sampling

// Unbiased roll in [0, 9999]
limit = 0xFFFFFFFF - (0xFFFFFFFF % 10000)  // = 4294960000
attempt = 0
do:
  h = SHA-256(serverSeed:clientSeed:handId:nonce:dice:attempt)
  n = parseInt(h[0..7], 16)
  attempt++
while n >= limit
roll = n % 10000

Commit Verification

// The commit hash shown before play must equal:
SHA-256(serverSeed) === commitHash

// If this matches, the server could not have changed
// the seed after showing you the commit.

Deck Order

// Standard 52-card deck before shuffle:
// Ranks: 2,3,4,5,6,7,8,9,T,J,Q,K,A
// Suits: s(spades),h(hearts),d(diamonds),c(clubs)
// Order: 2s,2h,2d,2c,3s,3h,3d,3c,...,As,Ah,Ad,Ac