]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
rsa_generate_keypair: Delete unlikely and redundant check for p == q.
authorNiels Möller <nisse@lysator.liu.se>
Thu, 13 Sep 2018 06:18:16 +0000 (08:18 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Thu, 13 Sep 2018 06:18:16 +0000 (08:18 +0200)
ChangeLog
rsa-keygen.c

index 83e96789f76bf48d3d6061c04084b3beffb5bab9..4c384ffac205d58a056fd227b1b8d9adc0a56d38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-09-13  Niels Möller  <nisse@lysator.liu.se>
+
+       * rsa-keygen.c (rsa_generate_keypair): Delete unlikely and
+       redundant check for p == q.
+
 2018-08-09  Niels Möller  <nisse@lysator.liu.se>
 
        * rsa-internal.h (_rsa_blind, _rsa_unblind): Mark with
index b7e38f770bb0823126b04d2c602af4d403cd64eb..702b63b8b6874de24e1bf9dbc0361958f29483a1 100644 (file)
@@ -126,10 +126,6 @@ rsa_generate_keypair(struct rsa_public_key *pub,
                              random_ctx, random,
                              progress_ctx, progress);
 
-         /* Very unlikely. */
-         if (mpz_cmp (key->q, key->p) == 0)
-           continue;
-
          mpz_sub_ui(q1, key->q, 1);
       
          /* If e was given, we must choose q such that q-1 has no factors in