BC.GAMETrang chính thứcChính thức
Đến bc.gamebc.game

Công bằng có thể kiểm chứng

Mọi kết quả BC Originals đều có thể kiểm tra bằng seed máy chủ, seed máy khách và nonce. Chọn một trò chơi để xem cách tính kết quả.

Fish Prawn Crab

Xác thực

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;
}