Function glass_pumpkin::prime::check

source ·
pub fn check(candidate: &BigUint) -> bool
Expand description

Test if number is prime by

1- Trial division by first 2048 primes 2- Perform a Fermat Test 3- Perform log2(bitlength) + 5 rounds of Miller-Rabin depending on the number of bits