SHA-256 HMAC Server-Client Seed Verification Protocol
How cryptographic commitment hashes prevent retroactive outcome manipulation in distributed random number generation.
1. The Three-Variable Commitment Architecture
A verifiable random function relies on three independent inputs combined via HMAC-SHA256: a secret Server_Seed (committed beforehand via its public SHA-256 hash), a user-defined Client_Seed, and a monotonically increasing integer Nonce.
| Parameter | Entropy Source | Pre-Round Visibility | Post-Rotation Audit |
|---|---|---|---|
Server_Seed (256-bit) | Hardware TRNG | Hashed (SHA256(Server_Seed)) | Revealed in Plaintext |
Client_Seed | Browser WebCrypto API | Public / User Editable | Verifiable Anytime |
Nonce | Sequential Counter (0, 1, 2...) | Public | Deterministic |
Frequently Asked Questions (FAQ)
Q: Why can't an operator alter the Server Seed after seeing the Client Seed?
Because the SHA-256 hash of the Server Seed is published before the round begins; changing even a single bit would produce a completely different hash.
Q: How are the first 4 bytes of an HMAC-SHA256 digest converted into a uniform float?
Each byte is divided by powers of 256 respectively and summed to yield a uniformly distributed value in [0, 1).