distributed_cards/
lib.rs

1//! Distributed cards implements the card shuffling algorithm described in the [Mental Poker
2//! Wikipedia page](https://en.wikipedia.org/wiki/Mental_poker) for n cards.
3//!
4//! The crate resolves around the [Deck] struct.
5//!
6//! To serialize/deserialize Primes and Rsa keys, they have be converted into the Unchecked variants.
7//!
8//! # Example usage
9//!
10//! ```
11//! use distributed_cards::{Deck, Prime};
12//! use rand::prelude::*;
13//!
14//! let mut rng = thread_rng();
15//!
16//! // can be reused in each game list of primes from all players has to be collected before the
17//! // shuffling can start
18//! let p = Prime::random(512, &mut rng);
19//!
20//! ```
21
22mod crypto;
23mod deck;
24
25pub use crypto::{Prime, Rsa, RsaParameter, UncheckedPrime, UncheckedRsa};
26pub use deck::{Deck, EncryptedDeck};
27pub use num_bigint_dig::BigUint;