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.)
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.
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?
openssl genrsa -f4 2048