Originally from
http://bitcoin-betting-guide.com/provably-fair-gambling/TL;DR
The provably fair way for a site to deal cards is for the site to shuffle the deck as normal then provide you with a hash of the shuffle. As a card is dealt you provide a random seed, manually or automatically generated in your browser (client side, not on the sites server) that the site cannot see or predict. Your seed changes the card to something neither you nor the site can have known. This is the online equivalent of cutting the deck to the dealers shuffle.
After the hand is dealt the deck is laid out and you can check that the deck started out as the hash the site provided indicated and that the cards were then changed in accordance with the seed you provided. If these are both the case then you have just played a provably fair hand!
See link for more details and explanation.
pretty much word for word from the bitzino provably fair FAQ and your TL;DR = TL;SDR
here is mine.
- Dealer hashes (deck order + dealer seed).
- client provides random seed for shuffler
- deck is shuffled with clients seed
Once original deck order and dealer seed is shown, check hash(deck order + dealer seed) against the hash you were shown, then shuffle the deck with the clients seed and check against the cards dealt.
Still reading ? cool then lets discuss some details:
Q> Why does the dealer need a random seed ?
A> Well if he didnt seed the hash, you could create a hash table of every deck combination then when playing simply look up the deck order using the hash then shuffle it using your seed and you will know the order of the deck.
Q> Whats so important about a client seed.
A> without this its not provably fair, its only provable results.
Q> Can I trust the site to generate my seed for me every time.
A> No, you should use your own RNG or at the very least verify their RNG is actually a RNG.
Let me put it another way, would you let the dealer cut the deck for you ? if not, then you should be setting your own seeds using your own RNG or ensuring the client side RNG is what it claims to be.