[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prime Number Gen's.





On Tue, 8 Aug 1995 [email protected] wrote:

> 
> "Rev. Ben" <[email protected]> writes on cpunks:
> > Does anyone know of where I could get source, royalty free, in the US for 
> > a good Prime Number Generator?
> 
> GNU code sounds like it would fit the royalty free bill.
> 
> Try the GNU multi-precision library: gmp-1.3.2.tar.gz from all good
> GNU sources.  I get my stuff from ftp://src.doc.ic.ac.uk/gnu/ if you
> don't have a GNU ftp site to hand.
> 
> There's a function
> 
> 	int mpz_probab_prime_p(mpnum, SURETY)
> 
> which returns true if the prime passes SURETY probablistic prime tests.
> 
> I think if it passes say 25 tests, then there will be less than a
> 1/2^25 chance that it is not prime.
> 
> Also, on:
> 
> 	http://dcs.ex.ac.uk/~aba/rsa-keygen.html
> 

The proper thing to do is to then search for a number which demonstrates 
p is prime....

Nathan