6
$\begingroup$

I am a novice programmer and am just finishing up an RSA encryption program that I am writing for practice. Currently I have the program generate a relatively small random value for the public key e. When adding the finishing touches, I realized that there was no point for e to be random. Is this thinking correct?

$\endgroup$
0

1 Answer 1

11
$\begingroup$

Yes, this thinking is correct; there is no requirement that the public exponent $e$ to be random. After all, it doesn't matter whether $e$ can be guessed by an attacker; we'll be including that value in the public key anyways.

Common practice is currently to use the fixed value $65537 =2^{16} +1$ for $e$. Any odd value of $e > 1$ will work; however, smaller values of $e$ will tend to make the system brittle against errors in performing the RSA padding.

$\endgroup$
2
  • 1
    $\begingroup$ some combinations of $e$ and $n$ don't work. $e$ and φ(n) must be coprime. $\endgroup$ Commented Dec 4, 2012 at 22:23
  • 1
    $\begingroup$ You could also add that the reason we use values of the form $2^n + 1$ for $e$ is that they have low Hamming weight, which makes modular exponentiation (and thus, encryption) very efficient. $\endgroup$
    – Thomas
    Commented Dec 5, 2012 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.