From: Niels Möller Date: Sun, 30 Sep 2007 20:42:49 +0000 (+0200) Subject: FIXME-comment for next_prime. X-Git-Tag: nettle_2.0_release_20090608~121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a13032db6fce44c7138d9cdfc9f33ba0c02bf8e;p=thirdparty%2Fnettle.git FIXME-comment for next_prime. Rev: nettle/rsa-keygen.c:1.3 --- diff --git a/rsa-keygen.c b/rsa-keygen.c index e4731d54..c1bc2f20 100644 --- a/rsa-keygen.c +++ b/rsa-keygen.c @@ -62,6 +62,13 @@ static const unsigned long primes[NUMBER_OF_PRIMES] = { 977, 983, 991, 997 }; +/* FIXME: Tune and optimize this more cerefully. + + 1. Avoid using % in the loop. + + 2. Tune the number of primes. +*/ + /* NOTE: The mpz_nextprime in current GMP is unoptimized. */ static void bignum_next_prime(mpz_t p, mpz_t n, int count,