From: Nikos Mavrogiannopoulos Date: Sat, 29 May 2010 09:37:29 +0000 (+0200) Subject: Document that the generator is the generator of the subgroup and not the group. X-Git-Tag: gnutls_2_11_3~232 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44defdb6d920505aced100a7f73bbea5b8f97aa8;p=thirdparty%2Fgnutls.git Document that the generator is the generator of the subgroup and not the group. --- diff --git a/lib/nettle/mpi.c b/lib/nettle/mpi.c index 2bac5b731b..abf0023dca 100644 --- a/lib/nettle/mpi.c +++ b/lib/nettle/mpi.c @@ -338,6 +338,7 @@ static int wrap_nettle_prime_check(bigint_t pp) /* generate a prime of the form p=2qw+1 * The algorithm is simple but probably it has to be modified to gcrypt's * since it is really really slow. Nature did not want 2qw+1 to be prime. + * The generator will be the generator of a subgroup of order q-1. */ inline static int gen_group (mpz_t *prime, mpz_t* generator, unsigned int nbits) { @@ -442,7 +443,7 @@ inline static int gen_group (mpz_t *prime, mpz_t* generator, unsigned int nbits) /* c = r^((p-1)/q), r == random * c = r^(2w) - * if c!=1 c is the generator for the group of the prime + * if c!=1 c is the generator for the subgroup of order q-1 * * (here we reuse q as r) */