I’m creating an application where I have to use RSA to encrypt some stuff using a public key. I want this encryption to be really fast. Initially, I tried a 2048 bit key with F4 (=65537) as the exponent but it is not fast enough. So now I’m considering the following 2 options:
- 2048 bit modulus, e=3
- 1024 bit modulus, e=65537
Both satisfy my performance requirements but which one provides better security? I should also note that I use the PKCS#1 padding scheme.
If you use random padding such as OAEP in PKCS#1, most (all?) of the known weaknesses from using low exponents are no longer relevant.
Also have you tried using e=17? There’s no rule saying you have to choose either 3 or 65537.