OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Bram Cohen (bramgawth.com)
Date: Thu May 24 2001 - 20:43:19 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    On 24 May 2001, lcs Mixmaster Remailer wrote:

    > What is the best way to find a prime p for which (p-1)/2 is also prime?
    > Some people seem to have very fast algorithms.

    I found the one I posted the other day just by scan searching and using
    amkCrypto's isPrime() function.

    isPrime works by first checking for a bunch of small factors and if none
    are found doing one of the probabilistic primality tests. I probably could
    have speeded it up a lot by doing the sieve on both n and (n-1)/2 before
    doing the stronger check on either of them, but other than that I don't
    know any special speedup tricks.

    -Bram Cohen

    "Markets can remain irrational longer than you can remain solvent"
                                            -- John Maynard Keynes