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§
- BigUint
- A big unsigned integer type.
- Deck
- The Deck struct is the starting point to shuffle. It contains n cards. The deck doesn’t care what cards it represents.
- Encrypted
Deck - Prime
- Rsa
- RsaParameter
- Unchecked
Prime - Type for serialization and sending over the network
- Unchecked
Rsa - Type for serialization and sending over the network