5 ms·
I wrote this a a few months back: https://github.com/ryancdotorg/libtprpg https://github.com/ryancdotorg/libtprpg (do note the disclaimer in the README) It's
by ryan-c 13y ago
I wrote this a a few months back:
https://github.com/ryancdotorg/libtprpg https://github.com/ryancdotorg/libtprpg (do note the disclaimer in the README)
It's particularly good for blackjack using multiple decks (that implementation should be able to generate all possible permutations of up to four decks, not that the universe will exist long enough to do it) because it requires no computation ahead of time, only when cards are dealt.
I got the idea from this article:
http://blog.notdot.net/2007/9/Damn-Cool-Algorithms-Part-2-Secure-permutations-with-block-ciphers http://blog.notdot.net/2007/9/Damn-Cool-Algorithms-Part-2-Se...
see also
http://www.cs.ucdavis.edu/~rogaway/papers/subset.pdf http://www.cs.ucdavis.edu/~rogaway/papers/subset.pdf