10 releases
0.5.2 | Jul 6, 2022 |
---|---|
0.5.1 | Jul 6, 2022 |
0.5.0 | Jun 24, 2022 |
0.4.0 | Jul 2, 2021 |
0.1.0 | Jun 7, 2021 |
#1628 in Algorithms
24KB
546 lines
Distributed cards implements the card shuffling algorithm described in the Mental Poker Wikipedia page for n cards.
The crate resolves around the [Deck] struct.
To serialize/deserialize Primes and Rsa keys, they have be converted into the Unchecked variants.
Example usage
use distributed_cards::{Deck, Prime};
use rand::prelude::*;
let mut rng = thread_rng();
// can be reused in each game list of primes from all players has to be collected before the
// shuffling can start
let p = Prime::random(512, &mut rng);
Dependencies
~2.6–3.5MB
~77K SLoC