Projects page: Improving probable prime algorithms

Bob Kuo bobjkuo at gmail.com
Sun Nov 1 10:51:17 CET 2009


Hello

I was reading over the projects page (http://gmplib.org/projects.html)
and noticed a blurb about improving the probable prime algorithm. For
this year's Google Summer of Code I implemented the BPSW primality
test in perl using the GMP library (code at
http://github.com/bubaflub/math--primality and
http://search.cpan.org/~bubaflub/Math-Primality-0.04/lib/Math/Primality.pm)
and there is even a C implementation that we based our implementation
off of (page: http://www.trnicely.net/misc/bpsw.html code:
http://www.trnicely.net/misc/bpsw1.zip) which uses GMP as well.  The
BPSW primality test is essentially a combination of Miller-Rabin and
Lucas-Selfridge primality tests but no pseudoprime has been found for
all n < 10^15.  If you would like to have this type of algorithm in
GMP I would be more than happy to help in anyway I can.

Secondly, I think it would be useful if you exposed the Miller-Rabin
test directly, with the function allowing the programmer to specify
the base and the number n to be checked.

Thanks,

Bob


More information about the gmp-devel mailing list