BC.GAMEOfficial siteOfficial
Go to bc.gamebc.game

Provably Fair

Every BC Originals result can be checked with the server seed, the client seed and the nonce. Pick a game to see how its result is calculated.

How Are the Results Calculated?

Results come from a chain of SHA256 hashes generated in advance and released in reverse order, one hash per round. The SHA256 of a round hash equals the hash of the previous round, so the chain cannot be changed once published.

To get the results, we calculate HMAC_SHA256 of the round hash with a salt as the key. The salt is the hash of Bitcoin block 790,100 (0000000000000000000301e2801a9a9598bfb114e574a91a887f2132f33047e6), which had not been mined when the chain was published. This gives us a 64-character hexadecimal string for each of the three dice.

public static List calc(String seed, String salt) {
  List diceResults = new ArrayList<>();
  for (int i = 0; i < 3; i++) {
 String hash = String.format("%s:%d", seed, i);
 String message = HmacSHA.sha256(hash, salt);
 // Generate a random number in the range of 1 to 6.
 int rawNumber = GenerateRandomV2.slideWindowNumber(message, 6) + 1;
 diceResults.add(rawNumber);
  }
  return diceResults;
}