SkinTrain provably fair
Check a game played on the older scheme from its values, with nothing but this file. It runs offline, makes no request and loads nothing from elsewhere: save it, open it from your disk without a connection, and it still works. Cryptography uses your browser's own Web Crypto.
Each line is a fixed set of inputs and the answer SkinTrain publishes for it. If every line passes, the algorithm in this file is the one that decided real games.
Played on the current scheme, or checking a battle or giveaway with an EOS block? Use the standalone verifier for current games.
The verdict and how the game was decided appear here once you paste a game's data and press Check.
Verdict
Filled with a known example; Check above fills it with your game.
The server seed text, used as it is as the HMAC key (not hex-decoded).
Lowercase hex. Several seeds (a battle's mode draws) are sorted and hashed together.
The round values are {"roundNumber": N}.
A case uses {}; a battle seat uses {"SeatNumber":"<n>","TeamNumber":"<n>"}.
A separate check from the roll. With each game the server publishes HMAC-SHA256(salt, serverSeed)
(a battle publishes it when the battle starts). Once the salt rotates it is published too, so you can
recompute that hash here: a match shows the seed was not changed after the hash was published. Here the
salt, hex-decoded to bytes, is the key; the roll above keys on the server seed text.
The same server seed text. Here it is the HMAC data, not the key.
Lowercase hex, decoded to raw bytes and used as the HMAC key.
The hash published with the game, sometimes labelled the server seed hash.
| and take SHA-256. The result is a lowercase-hex aggregatedSeed.aggregatedSeed, the round-values JSON and the game-values JSON with colons. Each JSON object is compact, keys ordinal-sorted, strings quoted, numbers bare, byte for byte as on the server.HMAC-SHA256(key = serverSeed, message) gives 32 bytes. The server published this seed's hash with the game.uint32 windows at offsets 0, 4, ..., 24 and take the first below 4,294,900,000; if all seven are too high, use offset 28. Then value mod 100000 gives a ticket from 0 to 99,999.HMAC-SHA256(key = decoded salt, data = server seed) gives 32 bytes. Take their lowercase hex.