4 ms·
DO: Use a 2048-bit RSA key, a public exponent of 65537, SHA256, and MGF1-SHA256. How can I set the public exponent when generating a key? man gpg wasn't helpfu
by johkra 16y ago
DO: Use a 2048-bit RSA key, a public exponent of 65537,
SHA256, and MGF1-SHA256.
How can I set the public exponent when generating a key? man gpg wasn't helpful.
And why this particular number? I can see that it's 2^16+1, but I don't understand the advantage of this number compared to others. (Although I've been taught that people prefer small values for e now.)
- cperciva 16y agoThat was explained in the audio part of the talk. :-) Short answer: A long list of attacks in the past have been much harder with large public exponents; using 2^16+1 instead of 3 is a bit slower but is likely to make you safer if someone else gets smart in the future.
- johkra 16y agoThanks for answering my curious questions so far. =) Since I messed up formatting earlier, my first question about generating keys with this particular exponent was hidden: Do you know how to generate such a key pair using gpg (or another tool)? Or is this done automatically?
- cperciva 16y agoIn OpenSSL you can pass your public exponent to RSA_generate_key. I'm not sure about gpg... it has been a while since I last generated a key.
- gduffy 16y agoFor OpenSSL command line: openssl genrsa -f4 2048
- johkra 16y agoThanks, OpenSSL actually uses 0x10001 by default for e. I'll use it instead of GPG from now on to generate keys.
- godavid 16y agoMaybe you are looking for this article (generate RSA/RSA GPG key): http://ekaia.org/blog/2009/05/10/creating-new-gpgkey/ http://ekaia.org/blog/2009/05/10/creating-new-gpgkey/