HOW IT WORKS

1
Before You Bet
WE COMMIT
We generate a secret seed and show you its SHA-256 hash. This locks in our commitment - we can't change it later.
You see (hash): 8f2a1b3c4d5e6f7a...
2
Your Turn
YOU ADD ENTROPY
You provide your own seed (or use our generated one). This ensures we can't predict the final outcome either.
Your seed: my-custom-seed-2026
3
Game Result
COMBINED RNG
HMAC-SHA256 uses the server seed as the key and clientSeed:nonce:cursor as the message. Same inputs always produce the same output.
Result generated from: HMAC-SHA256(serverSeed, client:nonce:cursor)
4
After Game
WE REVEAL
We show you the original server seed. Hash it yourself - if it matches what we showed before, the game was fair.
Verify: SHA256(seed) = original hash? ✓

INTERACTIVE DEMO

This page runs the algorithm in your browser so you can inspect every step. In production the server seed is generated and stored on the server until it is revealed.

🔑
Seed Management
Server Seed Hash Public
Click "New Session" to start
Server Seed Secret
Hidden until revealed
Your Seed (Client) Editable
Nonce (Bet Counter)
0 Increments with each bet
🎲
Generate Results

Each click uses the current seeds + nonce to generate a provably fair random result.

Dice Roll (0-99.99)
--
Crash Point
--
Wheel (0-36)
--
Raw Float (0-1)
--
HMAC Output (First 32 chars)
--
📜
Bet History
0 bets
Nonce Type Result Raw Float
No bets yet

WHERE WE USE IT

This is the RNG we put on games that need a verifiable random outcome: dice, crash math, cards, combat, grids. Sports contests that settle on live scores (squares, pick'em, survivor) don't use it for the score. Slots live on Stake use Stake Engine's RGS, not this browser demo.

THE ALGORITHM

This demo uses the Web Crypto API for SHA-256 and HMAC-SHA256. Production keeps the server seed on the server until reveal. The float math below is the same.

generateFloat() JavaScript
// Generate deterministic random float from seeds async function generateFloat(serverSeed, clientSeed, nonce, cursor = 0) { // Combine all entropy sources const input = `${clientSeed}:${nonce}:${cursor}`; // HMAC-SHA256 produces deterministic output const hash = await hmacSha256(serverSeed, input); // Use first 13 hex chars for high precision const hexSegment = hash.slice(0, 13); const decimal = parseInt(hexSegment, 16); const maxValue = parseInt('fffffffffffff', 16); // Return float between 0 and 1 return decimal / (maxValue + 1); }
verify() JavaScript
// Verify server seed matches commitment async function verifyServerSeed(serverSeed, serverSeedHash) { // Hash the revealed seed const computedHash = await sha256(serverSeed); // Must match what was shown before betting return computedHash === serverSeedHash; }