perl-Crypt-Primes -- Provable prime number generator for cryptographic applications
http://search.cpan.org/dist/Crypt-Primes/
This module implements Ueli Maurer's algorithm for generating large
provable primes and secure parameters for public-key cryptosystems. The
generated primes are almost uniformly distributed over the set of primes
of the specified bitsize and expected time for generation is less than
the time required for generating a pseudo-prime of the same size with
Miller-Rabin tests. Detailed description and running time analysis of
the algorithm can be found in Maurer's paper, "Fast Generation of Prime
Numbers and Secure Public-Key Cryptographic Parameters" (1994).