Skip Menu |

This queue is for tickets about the Crypt-RSA CPAN distribution.

Report information
The Basics
Id: 63007
Status: new
Priority: 0/
Queue: Crypt-RSA

People
Owner: Nobody in particular
Requestors: duncan.loveday [...] bt.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Move to later version of Math-PARI
Date: Mon, 15 Nov 2010 21:59:46 +0000
To: <bug-Crypt-RSA [...] rt.cpan.org>
From: <duncan.loveday [...] bt.com>
Hi, I ran into some trouble installing Crypt::RSA on an old Solaris 9 box. The CPAN installer (using perl -MCPAN -e"install Crypt::RSA") downloaded PARI version 2.1.7 which failed to compile on Solaris because of problems with some architecture specific optimisations - overcome by building with "machine=none" in the end - but it prompted me to try Crypt::RSA with the latest PARI library. Everything built fine but I found the performance was terrible and eventually traced this to a change in behaviour of the PARI function isprime(). I don't know if you are aware but - and I quote - "isprime in version 2.1.7 only did a strong pseudoprimality test which was much faster than the real primality test used in version 2.3. So you can expect version 2.3 to be much slower for prime numbers. For composite numbers the speed should be about the same". This is not a slowdown one can live with - the two calls to isprime from method check() in Crypt::RSA::Key::Private took about 5 minutes each for me on 2.3.5 - down to a couple of minutes each on the latest development trunk. Version 2.1.7 does them in a couple of seconds each. I initially raised this as an issue with the PARI team (http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1127) and their suggestion is to change isprime to ispseudoprime which if I've understood correctly would give the same behaviour on 2.3.x as 2.1.7 - it is supported on both. Actually they say the implementation on 2.3.x is stronger and still fast. Unless there are other reasons not to go to 2.3.x I think this would be a good update as 2.1.7 is old enough now to be difficult to build on some platforms. Duncan.