Expand description
A crate for generating large prime numbers, suitable for cryptography.
Primes are generated similarly to OpenSSL except it applies some recommendations from the Prime and Prejudice.
- Generate a random odd number of a given bit-length.
- Divide the candidate by the first 2048 prime numbers
- Test the candidate with Fermat’s Theorem.
- Runs Baillie-PSW test with
log2(bits) + 5
Miller-Rabin tests
Modules§
- error
- Error structs
- prime
- Generates cryptographically secure prime numbers.
- safe_
prime - Generates cryptographically secure safe prime numbers.