From: Niels Möller Date: Tue, 25 May 2010 20:52:21 +0000 (+0200) Subject: Comment improvement. X-Git-Tag: camellia_32bit_20100720~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c49b0dc61ca2af55a0d465dbbfdb165f2105a62;p=thirdparty%2Fnettle.git Comment improvement. Rev: nettle/dsa-keygen.c:1.5 --- diff --git a/dsa-keygen.c b/dsa-keygen.c index 1d67168c..5e447af8 100644 --- a/dsa-keygen.c +++ b/dsa-keygen.c @@ -72,13 +72,9 @@ dsa_generate_keypair(struct dsa_public_key *pub, nettle_random_prime (p0, p0_bits, ctx, random); - /* Generate p = r q p0 + 1, such that 2^{n-1} < p < 2^n. + /* Generate p = 2 r q p0 + 1, such that 2^{n-1} < p < 2^n. * - * Then r = (p-1) / (q p0) < (2^n-2) / (q p0) - * - * and r >= 2^{n-1} (q p0). - * - * FIXME: Check further. */ + * We select r in the range i + 1 < r <= 2i, with i = floor (2^{n-2} / (p0 q). */ mpz_init (p0q); mpz_mul (p0q, p0, pub->q);