X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a..6a024d24d97cb5d42c0091571735475b849f59f4:/math/strongprime.h diff --git a/math/strongprime.h b/math/strongprime.h index 6f39f500..14ad39e4 100644 --- a/math/strongprime.h +++ b/math/strongprime.h @@ -60,7 +60,14 @@ * Use: Sets up for a strong prime search, so that primes with * particular properties can be found. It's probably important * to note that the number left in the filter context @f@ is - * congruent to 2 (mod 4). + * congruent to 2 (mod 4); that the jump value is twice the + * product of two large primes; and that the starting point is + * at least %$3 \cdot 2^{N-2}$%. (Hence, if you multiply two + * such numbers, the product is at least + * + * %$9 \cdot 2^{2N-4} > 2^{2N-1}$% + * + * i.e., it will be (at least) a %$2 N$%-bit value. */ extern mp *strongprime_setup(const char */*name*/, mp */*d*/, pfilt */*f*/, @@ -85,9 +92,6 @@ extern mp *strongprime_setup(const char */*name*/, mp */*d*/, pfilt */*f*/, * * %$p - 1$% has a large prime factor %$r$%, * * %$p + 1$% has a large prime factor %$s$%, and * * %$r - 1$% has a large prime factor %$t$%. - * - * The numbers produced may be slightly larger than requested, - * by a few bits. */ extern mp *strongprime(const char */*name*/, mp */*d*/, unsigned /*nbits*/,