The shuffling algorithm used to ensure a truly
random deck is very important. We use a sort shuffle using a
random-number generator that generates 2^32 different values
pulled from a 4096-bit entropy pool. This provides certain advantages
over the Knuth shuffle used by other systems. We assign a random
value to each card, as in the following example:
Ace of clubs = 289384521
2 of clubs = 1543421228
3 of clubs = 410684245
Jack of spades = 306557875
Queen of spades = 1382797013
King of spades = 1886740576
We then sort the cards based on their unique index values. In
this case, the result is the ordering shown below.
Ace of clubs = 289384521
Jack of spades = 306557875
3 of clubs = 410684245
Queen of spades = 1382797013
2 of clubs = 1543421228
King of spades = 1886740576
Our shuffling method eliminates the modulo bias that can be a
problem with the Knuth shuffle. The effects of the modulo bias
can be mitigated using a multi-pass Knuth shuffle, but the use
of a superior algorithm makes such multi-pass shuffling unnecessary.
Some other interesting numbers:
A deck of cards can have 52! (roughly 8x10^67) permutations.
This number can be determined fairly simply. The first card dealt
can be any one of 52 cards. The second card dealt can be any
one of the remaining 51 cards. At this point, there are 51x52
different permutations. To find the total number of possible
permutations in a deck, the calculation is 52x51x50x49…3x2x1,
which results in approximately 8x10^67 different combinations.
Given a true random data source, the initial permutation with
our shuffling method is (2^32)^52. This is roughly 8x10^500.
Because we use a 4096-bit entropy pool, we are pulling our numbers
from any one of 2^4096 different possibilities, which is a significantly
larger figure than the possible number of combinations we use.
This means that there are 10^433 different ways that we can generate
data to obtain any given random deck. By comparison, it would
be 10^382 times more likely to randomly choose the same molecule
of water from the ocean twice consecutively than to generate
the same set of values from which to create a shuffled deck using
our method.