Provably Fair Keno

Drawn Numbers:

(waiting...)

Explanation

Pseudocode: Keno draw (accurate to the implementation)

Inputs:
  - drawCount: how many unique numbers to draw
  - boardSize: maximum board number (numbers are in 1..boardSize)
  - serverSeed, clientSeed, nonce: inputs used to produce HMAC blocks

Algorithm (high level):
  - results = empty set
  - While results.size < drawCount:
       - Get a random integer from 0 to (boardSize + 1) exclusive
       - If value == 0: ignore and continue (0 is not a valid board number)
       - If value not in results: add value to results
  4. Return results (order of discovery)