On Wed, Apr 21, 2004, Richard Levitte - VMS Whacker wrote:

> In message <[EMAIL PROTECTED]> on Wed, 21 Apr 2004 10:37:45 -0400, Geoff Thorpe 
> <[EMAIL PROTECTED]> said:
> 
> geoff> We should find where/why things spin out of control and improve
> geoff> the handling to either work or bail out gracefully. I haven't
> geoff> the time to analyse anything for the next couple of days, but
> geoff> might be able to take a look later if someone else hasn't
> geoff> already nailed it by then.
> 
> I might find a moment tomorrow with a little bit of luck.  However,
> prime generation is definitely not my field of expertise, so it will
> take me some time to figure it out.
> 

Well for tiny primes there are some parts that are unnecessary in the main
algorithm. 

We have an exhaustive table of primes used for the initial sieve test. Up to
17863.

This would mean that if the candidate is <= 17863 then it is a prime if and
only if it appears in the table.

Its also a trivial result that any composite number has a prime divisor less
than or equal to its square root.

Since 17863^2 is 319086769 then any prime candidate less than or equal to that
value is a prime if it passes the initial sieve test.

Since a 32 bit RSA key would generate two 16 bit primes that would be more
than covered by these cases.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to