HMAC is a calculation that combines a secret key with some data, called the message, to produce a code. The same key and message always produce the same code.
The HMAC message depends on the game:
Single-player games: The secret key is the server seed. The message is the client seed, nonce, and block index, joined with colons.
hmac = HMAC_SHA256(key = serverSeed, message = clientSeed:nonce:blockIndex)Multiplayer games: The secret key is the round’s Hash code. The message is the Seed, which is the chosen Bitcoin block’s hash.
hmac = HMAC_SHA256(key = Hash, message = Seed)
The message is one input to the calculation; it is separate from the secret key and the resulting HMAC code.
