]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Document that the generator is the generator of the subgroup and not the group.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 29 May 2010 09:37:29 +0000 (11:37 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 3 Jun 2010 17:54:57 +0000 (19:54 +0200)
lib/nettle/mpi.c

index 2bac5b731b3a44e16e11e628332bfd37b3e9824b..abf0023dca3709962b31fe8d91e53631d27cab2a 100644 (file)
@@ -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)
         */