3 ms·
I'm no crypto expert, but their use of Mersenne Twisters and 32 bit seeds seems suspect to me. In theory couldn't the casino compute all 2^32 possible seeds for
by tlrobinson 13y ago
I'm no crypto expert, but their use of Mersenne Twisters and 32 bit seeds seems suspect to me. In theory couldn't the casino compute all 2^32 possible seeds for a bunch of server seeds, and select the ones that are biased in their favor?
- kedean 13y agoThey mention that they first do enough shuffling to cover all possibilities of the deck, then apply the seeded shuffling.
- sirclueless 13y agoThe "enough shuffling to cover all possibilities of the deck" is a server-side-only operation. It's not verified at all, they could replace a pre-shuffled deck with a carefully chosen one if they liked.
- advisedwang 13y agoEssentially yes. As with the shuffle-and-cut example the server can constrain the possible choices. However this seems to be an impractical as this requires an astronomical amount of effort - the server would need to run through all 2^32 shuffles from the deck they pick just to see if that deck was favourable. This would be exceedingly rare, so a vast number of shuffles must be tested in this manner.
- sirclueless 13y agoYou don't have to do it for every deck. You can work backwards from a desirable end result. For example, here's a really dumb formula to do a tiny bit better than random: The game is "Black or red," where the top card of the deck is revealed. If it is black (clubs or spades), you win. If it is red (hearts or diamonds), the casino wins. The casino can cheat as follows: It generates all 2^32 possible Mersenne "cuts" of the deck. Then it finds those card positions which, through random chance, are shuffled to the top slightly more often by the Mersenne cut process. Then it chooses a deck to reveal as the "shuffled" deck at the beginning with a disproportionately large number of red cards in those locations. Since they will get cut to the top more than 50% of the time, the casino can do more than break even. The law of large numbers and the fact that MT19937 is a decent PRNG that passes an awful lot of randomness tests says that the chance of each position being "cut" to the top is almost exactly 1/52. So the casino isn't going to do much better than 50% on this game. But the Mersenne twister isn't cryptographically secure at all, you can imagine a casino coming up with a better game that does better than this one at taking advantage of MT-generated permutations.