Crash guide
Crystal Crash: turning a hash into a crash point
The word Crystal names this page only; the arithmetic below would be identical under any other name. The subject is the pipeline that turns seeds into a crash multiplier, one byte at a time, so that you could repeat it with your own tools.
The four stages
- Combine the inputs. A secret server seed is the key; the message is built from a client seed, a round counter (the nonce) and a cursor, joined with colons.
- Hash them. HMAC-SHA256 produces 32 bytes, written as 64 hexadecimal digits.
- Take bytes and scale. The first 4 bytes, read as one big-endian whole number, lie between 0 and 4,294,967,295. Dividing by 232 gives a float u in [0, 1).
- Apply the game formula. For crash, a common choice is (1 - e)/(1 - u), rounded down to cents, never below 1.00.
| Server seed (revealed later) | crystal-srv-41c9 |
|---|---|
| Commitment shown before play: SHA-256(server seed) | 557535ff485a3797142cdeefcaedffc030574d96a4825bec67a5b2de2fdd9596 |
| Client seed : nonce : round | crystal-player:57:0 |
| HMAC-SHA256(server seed, message) | 77dff9790f7109d772a8b40265a4e1d211f0486deb8d3d98d9dff7753389a9f9 |
| First 4 bytes (8 hex digits) | 77dff979 = 2,011,167,097 |
| Float = value / 2^32 | 0.4682613297 |
| Crash point = floor(100 x 0.99 / (1 - float)) / 100, minimum 1.00 | 1.86x |
One common construction, shown for teaching. Real services document their own message format; check theirs before verifying.
Why exactly 4 bytes
Four bytes give 232 = 4,294,967,296 possible values. That is fine enough that the gap between neighbouring floats is about 0.233 billionths, far smaller than anything the cent rounding can show for ordinary multipliers. Some services read more bytes, or loop through several digests, but the idea of scaling a whole number into [0, 1) is the same.
Reading the bytes big-endian means the first hex pair is the most significant. Reading them in the other order is also a valid design, but it gives a different number. When you verify a round, you must match the operator's documented byte order exactly, or every result will disagree.
Five rounds from the same seeds
Only the nonce changes from round to round. The table repeats stage 3 and stage 4 for nonces 57 to 61 with the same seeds. Each value is computed by the page's code from the HMAC digest.
| Nonce | First 8 hex digits | Float u | Crash point |
|---|---|---|---|
| 57 | 77dff979 | 0.468261 | 1.86x |
| 58 | 21b0380d | 0.131595 | 1.14x |
| 59 | b927470e | 0.723256 | 3.57x |
| 60 | a846b33b | 0.657329 | 2.88x |
| 61 | a4926680 | 0.642859 | 2.77x |
The crash points jump around with no visible pattern, which is what a good hash function should produce. A change of one digit in the nonce changes the whole digest. That is also why studying past crash points cannot reveal future ones while the server seed stays secret.
Doing the check yourself
Any language with an HMAC-SHA256 function can repeat these rows. In Python, hmac.new(server, message, hashlib.sha256).hexdigest() gives the digest; slice the first 8 characters, convert with int(x, 16), divide by 232, and apply the formula. The hash fairness guide covers the commitment step that makes the check meaningful.