Discussion about this post

User's avatar
Andrew Shaffer's avatar

I find this quote from the article rather concerning:

"You have your own seed, a string of characters you can change. The casino has its own server seed, which is hidden from you for now: you only see its fingerprint, a hash. The two seeds, client and server, work as a pair. A standard cryptographic function, HMAC-SHA256, built on the SHA-256 hashing standard, mixes them with the bet number. For each bet this produces a different value, and that value picks a row of the table: it falls into one row’s range, from start to end. The bigger a row’s weight, the wider its range and the more often it comes up. This function plays the role of a random number generator. The randomness comes from the seeds; the function only turns them and the bet number into that value. That’s why, unlike the RNG in a regular slot, anyone can recalculate its result.

The casino sees your seed right away. When you change your seed, the casino reveals its old server seed. You can then check it against the fingerprint: if the casino had swapped its seed, the fingerprint wouldn’t match, because a different seed has a different hash. And you can recalculate every bet, down to the row it landed on...."

In general, a single hash value for the casino's seed cannot uniquely identify the seed value that the casino actually used during a series of plays. Hash collisions are a fundamental property of any hash function that maps a larger set of actual values onto a smaller set of hash values, and finding actual values that cause hash collisions is often surprisingly easy (especially if the actual values being hashed are random strings of characters instead of something that has to be intelligible like an email that is being cryptographically signed). Moreover, the casino has the luxury of precomputing sets of seed values that will all generate the same hash value before the player ever chooses his own seed value if it wants to.

Once the casino receives the player's seed value, does this "provably fair" algorithm do anything to prevent the casino from simulating the outcomes of a long sequence of plays using each of the possible casino seed values that all generate the same hash value that was shown to the player, and then selecting the casino seed value that will result in the player losing the largest amount from all of the potential seeds that share that same hash (or at least avoid selecting any casino seed that results in the player receiving a large payout during the long sequence of plays that was simulated)? With the speed of modern computers, running these simulations could probably be performed before the player ever makes his first play.

Ready for more?