Commit 4f0ad31a authored by Niels Möller's avatar Niels Möller

rsa_generate_keypair: Delete unlikely and redundant check for p == q.

parent cc57adbb
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> 2018-08-09 Niels Möller <nisse@lysator.liu.se>
* rsa-internal.h (_rsa_blind, _rsa_unblind): Mark with * rsa-internal.h (_rsa_blind, _rsa_unblind): Mark with
......
...@@ -126,10 +126,6 @@ rsa_generate_keypair(struct rsa_public_key *pub, ...@@ -126,10 +126,6 @@ rsa_generate_keypair(struct rsa_public_key *pub,
random_ctx, random, random_ctx, random,
progress_ctx, progress); progress_ctx, progress);
/* Very unlikely. */
if (mpz_cmp (key->q, key->p) == 0)
continue;
mpz_sub_ui(q1, key->q, 1); mpz_sub_ui(q1, key->q, 1);
/* If e was given, we must choose q such that q-1 has no factors in /* If e was given, we must choose q such that q-1 has no factors in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment