2015-10-04 21:32:25 -04:00
|
|
|
#![feature(augmented_assignments)]
|
|
|
|
#![feature(core)]
|
2015-10-05 08:17:53 -04:00
|
|
|
#![feature(test)]
|
2015-10-04 21:32:25 -04:00
|
|
|
|
2015-10-06 23:12:26 -04:00
|
|
|
/// # The Pumpkin Prime Number Generator
|
|
|
|
///
|
|
|
|
/// The `pumpkin` prime number generator library can be used to generate
|
|
|
|
/// prime numbers of any reasonable length, suitable for any cryptographic
|
|
|
|
/// purpose. All numbers generated are seeded from the operating system's
|
|
|
|
/// secure source of entrophy and are verified using three different primality
|
|
|
|
/// tests.
|
|
|
|
///
|
|
|
|
/// ## Installation
|
|
|
|
///
|
|
|
|
/// To include `pumpkin` in your project add the following line to your
|
|
|
|
/// Cargo.toml file:
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// [dependencies]
|
|
|
|
/// pumpkin = "*"
|
|
|
|
/// ```
|
|
|
|
///
|
|
|
|
/// ## Examples
|
|
|
|
///
|
|
|
|
/// ```
|
|
|
|
/// fn main() {
|
|
|
|
/// // Generate a 2048-bit prime number
|
|
|
|
/// let prime = pumpkin::Prime::new(2048);
|
|
|
|
///
|
|
|
|
/// // Want to very the prime you generated is ACTUALLY prime, and not
|
|
|
|
/// // simply a probable prime? Easy!
|
|
|
|
/// assert_eq!(prime.verify(), true);
|
|
|
|
/// }
|
|
|
|
/// ```
|
|
|
|
|
2015-10-04 21:32:25 -04:00
|
|
|
extern crate core;
|
|
|
|
extern crate ramp;
|
2015-09-28 00:25:30 -04:00
|
|
|
extern crate rand;
|
|
|
|
|
2015-10-04 21:32:25 -04:00
|
|
|
pub mod prime;
|