Commit f85b2dac authored by Niels Möller's avatar Niels Möller
Browse files

(main): Updated to use the rewritten

rsa_generate_key.

Rev: src/lsh-keygen.c:1.13
parent 0f7b571c
......@@ -220,27 +220,7 @@ main(int argc, char **argv)
key = dsa_generate_key(r, options->level);
break;
case 'r':
{
mpz_t e;
mpz_init(e);
for (;;)
{
/* Use a reasonably small random e, and make sure that at
* it is odd and has at most one more one bit. */
bignum_random_size(e, r, 30);
mpz_setbit(e, 0);
mpz_setbit(e, 17);
key = rsa_generate_key(e, r, options->level);
if (key)
break;
verbose("Bad choice of public exponent. Trying another...\n");
}
mpz_clear(e);
}
key = rsa_generate_key(r, options->level);
break;
default:
fatal("Internal error!\n");
......
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