Math::Prime::Util::RandomPrimes(3pm)

Math::Prime::Util::RandomPrimes3pm

Generate random primes

Version

Version 0.73

Overview

Routines to generate random primes, including constructing proven primes.

Random prime functions

random_prime

Generate a random prime between "low" and "high". If given one argument, "low" will be 2.

random_ndigit_prime

Generate a random prime with "n" digits. "n" must be at least 1.

random_nbit_prime

Generate a random prime with "n" bits. "n" must be at least 2.

random_maurer_prime

Construct a random provable prime of "n" bits using Maurer's FastPrime algorithm. "n" must be at least 2.

random_maurer_prime_with_cert

Construct a random provable prime of "n" bits using Maurer's FastPrime algorithm. "n" must be at least 2. Returns a list of two items: the prime and the certificate.

random_shawe_taylor_prime

Construct a random provable prime of "n" bits using Shawe-Taylor's algorithm. "n" must be at least 2. The implementation is from FIPS 186-4 and uses SHA-256 with 512 bits of randomness.

random_shawe_taylor_prime_with_cert

Construct a random provable prime of "n" bits using Shawe-Taylor's algorithm. "n" must be at least 2. Returns a list of two items: the prime and the certificate.

random_strong_prime

Construct a random strong prime of "n" bits. "n" must be at least 128.

random_proven_prime

Generate or construct a random provable prime of "n" bits. "n" must be at least 2.

random_proven_prime_with_cert

Generate or construct a random provable prime of "n" bits. "n" must be at least 2. Returns a list of two items: the prime and the certificate.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

Authors

Dana Jacobsen <[email protected]>

From libmath-prime-util-perl 0.73-2+b5 in Debian 13 (Trixie). Parsed by carta from the page's man source.