Crate distributed_cards[−][src]
Expand description
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);
Structs
| Deck | The Deck struct is the starting point to shuffle. It contains n cards. The deck doesn’t care what cards it represents. |
| EncryptedDeck | |
| Prime | |
| Rsa | |
| RsaParameter | |
| UncheckedPrime | |
| UncheckedRsa |