pub trait RandPrime<T> {
    fn gen_prime(
        &mut self,
        bit_size: usize,
        config: Option<PrimalityTestConfig>
    ) -> T; fn gen_safe_prime(&mut self, bit_size: usize) -> T; }
Expand description

Supports random generation of primes

Required Methods

Generate a random prime within the given bit size limit

Generate a random prime with exact the given bit size Generate a random (Sophie German) safe prime within the given bit size limit. The generated prime is guaranteed to pass the is_safe_prime test

Implementors