Provability Explained

Provably Fair Roulette

Most BGaming games you can play here at Bitstarz are provably fair and verifiable immediately and independently by you!

We use a cryptographic method that ensures that we (the casino) or you (the player) can't possibly know the outcome of the game until the moment it starts. We do this by letting you have a simple and visually verifiable input on the game and we show you a fingerprint of the spin we are going to use before the game starts so you can check after the game is over that we used the spin we said we would. Here's how it works:

  1. We use a computer model for the Roulette Wheel and decide on a random spin to apply to it.

    We model the roulette wheel as a list of the tiles in the order they appear and then generate a random location for the roulette wheel to stop at. We use the best pseudorandom number generator out there, the Mersenne Twister algorithm. We call the spin 'Result'.

    image-1
  2. We show you a 'fingerprint' of the spin and a random number we call 'Secret'.

    We call this Hash (Result+Secret). We generate a random number called 'secret' and use this to create a fingerprint of the data to model the game. This ensures that you cannot figure out the final result of the spin from just the fingerprint. We create this unique finger print by hashing the data with the SHA-256 Hashing Algorithm. This creates a fingerprint that is unique to that exact spin of the wheel and Secret, and you can use this later to verify the game.

    image-2
  3. We get you to have some input on the game.

    We let you add an extra push to the wheel. You can select a number from 0 to 36 (or 37 for American roulette which has an extra tile) to push the wheel further along by that amount when you press spin. You can either pick your own number or use one chosen randomly for you.

    image-3
  4. You play the game!

    Place your bets, start the game, and most of all have fun.

  5. We show you the actual data used to generate your game!

    After the game is over, we show you the spin of the wheel (Result+Secret), the ‘fingerprint’ we showed you before the game (hash[Result+Secret]), the input you had on the game, and the final result. You can use our widget to verify that the spin matches the ‘fingerprint’ we gave you before the game, or you can use any third party hash calculator to verify it yourself!

    image-4
  6. Check the effect you had on the game!

    You can even check the input you had on the game by comparing the spin (Result+Secret) and final result. Take the client seed and count that many tiles past the tile it was originally set to land on (found in Result+Secret) and you'll be at the same tile as the final result!

    For a walk-through of how to verify the game using an independent website

    MANUAL VERIFICATION

  7. We have our own verification widget on the website, but what good is that if you want to make sure we are playing fair? You can check the hash we give you and the randomised spin and secret seed match up. It’s really quick and simple to do!

    Find a trusted third party hash calculator. We suggest quickhash.com, but there are many others.
    Copy the Result+Secret field from the game and paste the data into the input box on the third party calculator.
    Select the SHA-256 as your algorithm and press generate.
    The hash that is generate should exactly match the hash we presented you at the beginning of the game!

    This proves that the initial spin shown to you in a form of fingerprint was not changed in any way during the game play when you placed your bets or after you set your number in order to effect the game.

Provably Fair Pocket Dice

To achieve Provably Fair Gaming we utilise strong cryptographic algorithms such as SHA-256 Hashing Algorithm, Mersenne Twister and Fisher-Yates shuffle. These ensure the game cannot be tampered with.

Technical Implementation

We generate 30 initial random numbers ranging from 1 to 6.
We generate random server seed.
The initial numbers are hashed using hash("sha256", json_encode($initial_numbers) . $server_seed). The resulting hash is made public.
When you start a game, we use javascript in your browser to create a client seed.
The initial numbers are shuffled calling Fisher-Yates shuffle with client seed.

Code used for hashing initial numbers:

/**
* Calculates hash of array with server seed
* @param array $initialNumbers
* @param string $serverSeed
* @return string
*/

function hashInitialNumbers(array $initialNumbers, $serverSeed)
{
return hash('sha256', json_encode($initialNumbers) . $serverSeed);
}

Code used for shuffling:

/**
* Shuffles array with client seed
* @param array $items
* @param string $seed
* @return array shuffled array
*/

function fisherYatesShuffle(array $items, $seed)
{
$mt_seed = intval(substr(hash('sha256', $seed), -8), 16);
 mt_srand($mt_seed);
$count = count($items);
for ($i = $count - 1; $i > 0; $i--)
 {
  $j = mt_rand(0, $i);
  $tmp = $items[$i];
  $items[$i] = $items[$j];
  $items[$j] = $tmp;
 }
return $items;
}

$finalShuffle = fisherYatesShuffle($initialNumbers, $clientSeed);
$result = array_slice($finalShuffle, 0, 2);

Provably Fair Cards

  1. We generate a shuffled deck using modern shuffling techniques, as well as another number we call Secret.

    Secret is a number generated by the server and used for the hash (explained later). To generate the shuffled deck we use a method known as Fisher-Yates shuffle which is similar to picking a number out of a hat. To make sure the numbers picked are completely random, we use the Mersenne Twister algorithm to generate random numbers for the Fisher Yate's Shuffle to use. This is considered the top standard for shuffling techniques. We call the shuffled deck 'Result'.

    image-5
  2. We show you a 'fingerprint' of the shuffled deck and the 'Secret'.

    We call this Hash (Result+Secret). We create this unique finger print by hashing the data with the SHA-256 Hashing Algorithm. This creates a fingerprint that is unique to that exact deck, and you can use this later to verify the game.

    image-6
  3. We get you to have some input on the game.

    For card games, we let you cut the deck by picking a location to cut the deck. This is represented by a number called the client seed. We take the number you choose and use it to effect the outcome of the game. This ensures there is no way we could know the outcome of the game until the point it starts. So if for a game of poker you pick 24 as your client seed, we will cut the deck 24 cards from the top before dealing the cards and starting the game.

    image-7
  4. You play the game!

    Place your bets, start the game, and most of all have fun.

  5. We show you the actual data used to generate your game!

    After the game is over, we show you the full shuffled deck (Result+Secret), the ‘fingerprint’ we showed you before the game (hash[Result+Secret]), the input you had on the game (Client Seed), and the Final Result. You can use our widget to verify that the spin matches the ‘fingerprint’ we gave you before the game, or you can use any third party hash calculator to verify it yourself!

    image-8
  6. Check the effect you had on the game!

    You can even check the input you had on the game by comparing the fully shuffled deck (Result+Secret) and the deck after it was cut (Final Result). You will find that the values are the same deck, but one of them has been 'cut' at the position you chose!

    For a walk-through of how to verify the game using an independent website

    MANUAL VERIFICATION

  7. We have our own verification widget on the website, but what good is that if you want to make sure we are playing fair? You can check the hash we give you and the randomised spin and secret seed match up. It’s really quick and simple to do!

    Find a trusted third party hash calculator. We suggest quickhash.com, but there are many others.
    Copy the Result+Secret field from the game and paste the data into the input box on the third party calculator.
    Select the SHA-256 as your algorithm and press generate.
    The hash that is generate should exactly match the hash we presented you at the beginning of the game!

    This proves that the initial spin shown to you in a form of fingerprint was not changed in any way during the game play when you placed your bets or after you set your number in order to effect the game.

Provably Fair Slots

  1. We use a computer model for the Slot Reels and decide on a random spin to apply to each one.

    We model each reel as a list of the tiles in the order they appear and then generate a random location for each reel to stop at. We use the best pseudorandom number generator out there, the Mersenne Twister algorithm, to generate a random number for each slot. We call the spin 'Result'.

  2. We show you a 'fingerprint' of the spin and a random number we call 'Secret'.

    We call this Hash (Result+Secret). We generate a random number called 'secret' and use this to create a fingerprint of the data to model the game. This ensures that you cannot figure out the final result of the spin from just the fingerprint. We create this unique finger print by hashing the data with the SHA-256 Hashing Algorithm. This creates a fingerprint that is unique to that exact spin of the reel and Secret seed, and you can use this later to verify the game.

    image-9
  3. We get you to have some input on the game.

    We let you add an extra push to each of the reels. You can select a number from 0 to 9 for each reel to push that reel further along by that amount. You can either pick your own number or use one chosen randomly for you.

    image-10
  4. You play the game!

    Place your bets, start the game, and most of all have fun.

  5. We show you the actual data used to generate your game!

    After the game is over, we show you the spin of the reel (Result+Secret), the fingerprint (hash[Result+Secret]), the input you had on the game (client seed), and the final outcome of the game (Final Result). You can use our widget to verify that the spin matches the ‘fingerprint’ we gave you before the game, or you can use any third party hash calculator to verify it yourself!

    image-11
  6. Check the effect you had on the game!

    You can check the input you had on the game by comparing the spin (Result+Secret) and Final Result. The input you had on the game, called the client seed, is a number where each digit represents a different reel. So, for a 5 reel slot machine it will be a 5 digit number. If your number was 30700 then for your final result you will have the icon at the top of the first reel match the first icon in the fourth set shown in Result (the first set counts as 0). The second icon will the second icon listed in first set, third icon will be the third icon listed in the eighth set and so on. You can do the same for the second and third rows too!

    Example:

    Final Result

    {
     "symbols": [
      [", "shield", "siren", "lightning", "medusa", "siren"],
      [", "thor", "neptune", "heracles", "shield", "artemis"],
      [", "coin", "coin", "themis", "coin", "thor"]
     ],
     "card": "6D"
    }
    First Row – Green, Second Row – Blue, Third Row - Redimage-12

    Client Seed

    30700

    Result+Secret

    {
     "symbols": [
      ["siren", "siren", "heracles", "medusa", "siren"], (0)
      ["themis", "neptune", "themis", "shield", "artemis"], (1)
      ["heracles", "coin", "artemis", "coin", "thor"], (2)
      ["shield", "heracles", "heracles", "medusa", "shield"], (3)
      ["thor", "thor", "coin", "shield", "heracles"], (4)
      ["coin", "medusa", "themis", "artemis", "thor"], (5)
      ["lightning", "artemis", "ship", "ship", "medusa"], (6)
      ["minotaur", "shield", "lightning", "themis", "lightning"], (7)
      ["thor", "heracles", "heracles", "coin", "shield"], (8)
      ["artemis", "thor", "themis", "artemis", "medusa"], (9)
      ["coin", "siren", "coin", "heracles", "artemis"], (10)
      ["ship", "heracles", "neptune", "medusa", "thor"] (11)
     ],
     "card": "6D",
     "game": "slots:platinum_lightning",
     "secret": "ad17e9bf57de88cd103569c6f84a1d63"
    }

    For a walk-through of how to verify the game using an independent website

    MANUAL VERIFICATION

  7. We have our own verification widget on the website, but what good is that if you want to make sure we are playing fair? You can check the hash we give you and the randomised spin and secret seed match up. It’s really quick and simple to do!

    Find a trusted third party hash calculator. We suggest quickhash.com, but there are many others.
    Copy the Result+Secret field from the game and paste the data into the input box on the third party calculator.
    Select the SHA-256 as your algorithm and press generate.
    The hash that is generate should exactly match the hash we presented you at the beginning of the game!

    This proves that the initial spin shown to you in a form of fingerprint was not changed in any way during the game play when you placed your bets or after you set your number in order to effect the game.