Crate large_primes

source ·

Modules§

Functions§

  • Performs a probabilistic primality test using Fermat’s little theorem.
  • Computes the greatest common divisor (GCD) of two BigUint numbers using the Euclidean algorithm.
  • Generates all prime numbers up to a given maximum value.
  • Performs the Lucas-Lehmer test for Mersenne primes.
  • Performs the Miller-Rabin primality test.
  • Computes the power of a BigUint base raised to a BigUint exponent.
  • Computes the modular exponentiation of a BigUint base raised to a BigUint exponent modulo another BigUint.
  • Performs the standard primality test by checking for prime factors from 2 to the square root of the given number.