Provably fair bitcoin casino games

Each bitcoin games game you play on www.nascasino.com is able to be immediately verified by you, proving that no cheating has taken place.

We use cryptography to ensure that neither you (the player) nor us (the casino) can possibly know outcome of a game beforehand and also that none of us are able to change results to suit themselves. You can verifiy this at any point by testing the result of each game you play.

The way we can do this is by giving you a visually verifiable input on the game you are going to play, and a fingerprint of the spin we are going to use in the game. We provide this before the game starts, and you can check once the game is over that we used the exact spin that we said we would use.

Here is the mechanism:

Provably fair roulette

1. We use a computer model for these type of games and apply a random spin to this.

The roulette wheel is presented as a list of tiles in the corresponding order. The location for the wheel to stop is chosen randomly. Mersenne Twister is the pseudorandom number generator used for this purpose. The spin is what we call the “Result”.

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

The combination of the Result and Secret is called “Hash”. When a random number, or a Secret, is produced, it is used to generate a fingerprint of the data which models the games. This way, the end outcome of the game cannot be known solely from the fingerprint. SHA-256 Hashing Algorithm is used for hashing the data and producing the unique fingerprint which corresponds to a particular wheel spin and Secret and can be used to check the game outcome.

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

The player can choose a number from 0 to 36 (or 37 for American roulette) or use the number which is chosen randomly and by pressing the spin button, make the wheel move further by this number.

4. Now it is time to enjoy the game by placing bets and waiting for the desired outcome

Place your bets and begin the game, and of course, dont forget to have fun!

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

When the game is finished, the player can see the wheel spin (combination of the Result and the Secret), the Fingerprint that was shown before the game started (hash[Result+Secret]), the player’s own input and the end result. In order to make sure that the spin corresponds to the Fingerprint revealed at the beginning of the game, the player is invited to use either our own widget or any independent hash calculator available on the web.

6. Check the influlence that you had on the outcome of the game!

Each player can compare the spin and the final result of the game to see how his input has influenced the outcome of the game. By taking the number selected by the player and adding the corresponding number of tiles to the one the wheel was initially planning to land on (see Result+Secret), you will get to the tile the wheel actually landed on.

The next category of provably fair bitcoin games are the card games. We make use of a simlar system to ensure that the games are all fair.

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. To generate the shuffled deck we use a method known as Fisher Yate's 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 the 'Result' and combined with the 'Secret' will be used to create the Hash.

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

The {Result+Secret} is the Hash. To generate the unique fingerprint for a particular deck, SHA-256 Hashing Algorithm is used. This creates a fingerprint that is unique to that exact deck, and you can use this later for checking the provability of the game.

3. We get you to have some influence on the game.

For card games, we let you cut the deck by picking a location to cut the deck. This is represented bya so-called client seed number that you pick. This that you choose as the seed number further effects the result of the game which guarantees that the casino cannot predict the game result. For example, if the player chooses 24 in poker, the deck will be cut 24 cards from the top and then dealt.

4. You play the card game

Now it is time to enjoy the game by placing bets and waiting for the desired outcome. Using the combination of your seed that you have chosen and the result with the secret, you can be assured that neither the player or the casino can cheat.

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

When the game is finished, the shuffled deck is revealed to the player (Result+Secret) together with the initial Fingerprint (hash[Result+Secret]), the Client Seed and the Final Result. In order to make sure that the spin corresponds to the Fingerprint revealed at the beginning of the game, the player is invited to use either our own widget or any independent hash calculator available on the web.

6. Check the effect you had on the game!

You can check the effect you had on the game by comparing the shuffled deck (Result+Secret) to the one that was cut (Final Result), thus verifying the player’s input. The values will match but one will be cut at the position picked by the player when you cut the deck! (24 from the top in our example)

The last category of provably fair bitcoin games are the slots type of games. We once again make use of a simlar system to ensure that the games are all provably fair.


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.

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

The player can push each reel one more time by selecting a number from 0 to 9. Each reel will move further by the selected number. The player can pick his own number or use the suggested random number.

4. You play the slots game

Now it is time to enjoy the game by placing bets and waiting for the desired outcome!

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

When the game is finished, the player can see the reel spin (combination of the Result and the Secret), the Fingerprint (hash[Result+Secret]), the player’s own input and the end result. In order to make sure that the spin corresponds to the Fingerprint revealed at the beginning of the game, the player is invited to use either our own widget or any independent hash calculator available on the web.

6. Check the effect you had on the game!

In order to verify the input of each player on the game outcome, the spin (Result+Secret) and the final result shall be compared. In the client seed number, each digit stands for a different reel. For instance, for a slot with 5 reels the client seed will be a 5-digit number. If the player choose 30700 as the client seed, in the final result the icon at the top of the first reel will be matching the icon of the fourth set revealed in the Result (the first set counting as 0). The second icon will match the second icon of the first set, the third icon will match the third icon of the eighth set, etc. The same check can be performed for rows number two and three.

It is possible to manually verify your information yourself using a 3rd party website proving that the game is indeed fair.


Manual Verification

When playing any of the games, we create a Hash of the 'Result', and the 'Secret' before you play. The the Hash is unique to every game, and even the slightest change in the data will give a completely different result. By displaying the Hash in the beginning, we are effectivley verifying the result of the Roulette, Cards, or Slots type of game before you make your bet. Once the game is played, you can see the full details of the data we used.

You can manually verify the Hash, by taking the same information that is the Result + Secret, and Hashing it with the same SHA256 Algorythim.

Provably fair bitcoin casino

For example, here is the Result + Secret data for a blackjack card game:

Before I played, the Hash for the game was displayed as: a485c626837ceef5a86df368325d1c110557b910a4bf3800867de1d641ec0321

You can visit http://www.movable-type.co.uk/scripts/sha256.html to create a SHA256 Hash of some data. Paste the info into the Message box on the website and press the Generate Hash button to create the unique hash based on your data. The hash should be identical to the one used as the last game eg: a485c626837ceef5a86df368325d1c110557b910a4bf3800867de1d641ec0321

From that information I have just proved that the exact deck was used in my game. When I played I had a Seed, which was where the deck was cut. I chose 247 as the seed.

The final result was:

The hands dealt were: 8 of Clubs, 2 of Diamonds, Ace of Clubs, Ace of Clubs, King of Diamonds then 6 of Hearts. This can be seen above, where the original deck was cut at position 247 (my seed), to draw the cards that were used in that hand (8C:2D:AC:AC:KD:6H).

The deck is proven to be exactly the same and in the same order that was decided before I played. The cut of the deck was chosen by me at 247, and at that point the cards were dealt. If you take the original deck cards and cut it manually at 247, you begin exactly at the position where my cards were dealt from, and they display the exact same order.

You can use this same method to manually verify the other types of games on the casino, to prove that they are fair for both the player and the casino.