From 5a15f9b33c05a1579737ee57ef9cbc7b326eb8ac Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 8 Oct 2010 14:08:01 +0000 Subject: [PATCH] fix --- src/util/crypto_ksk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/crypto_ksk.c b/src/util/crypto_ksk.c index 6136fbf43..af0905a33 100644 --- a/src/util/crypto_ksk.c +++ b/src/util/crypto_ksk.c @@ -325,7 +325,8 @@ gen_prime (gcry_mpi_t *ptest, unsigned int nbits, GNUNET_HashCode * hc) size_t written; gcry_mpi_set_ui(sp, x); - gcry_mpi_div (NULL, tmp, prime, sp, -1 /* TODO CG: is this correct? */); + gcry_mpi_div (NULL, tmp, prime, sp, -1); + mods[i] = 0; gcry_mpi_print (GCRYMPI_FMT_USG, (unsigned char *) &mods[i], sizeof(*mods), &written, tmp); } gcry_mpi_release (sp); @@ -419,8 +420,7 @@ generate_kblock_key (KBlock_secret_key * sk, gcry_mpi_sub_ui (t2, sk->q, 1); gcry_mpi_mul (phi, t1, t2); gcry_mpi_gcd (g, t1, t2); - gcry_mpi_div (f, NULL, phi, g, -1 /* TODO CG: is this correct? */); - + gcry_mpi_div (f, NULL, phi, g, 0); while (0 == gcry_mpi_gcd (t1, sk->e, phi)) { /* (while gcd is not 1) */ gcry_mpi_add_ui (sk->e, sk->e, 2); -- 2.25.1