Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have placed a bet that I can create a public key such that my adversary will not be able to crack (decrypt) it for at least one week. For my primes $p$ and $q$, I chose very large numbers that are $101$ digits long, each. I also tried to make them to be as distinct as possible.

Now what I am wondering is whether to choose a big encryption exponent or a small one. Since I have began my study of Cryptography about a month ago, I am not too familiar with choosing a solid encryption exponent. I heard that choosing the digits $3, 5, 17, 257$ or $65537$ would give me a good security but I have not read about it. I was thinking of going with $257$ because intuition tells me that there exists a inverse relation between the two: when choosing large primes for $p$ and $q$, then pick a small encryption exponent and vice versa. But I don't know if this makes complete sense in some regards.

Any input is appreciated.

share|cite|improve this question

The primes $p$ and $q$ for RSA should be big, $p\pm1$ and $q\pm1$ should not have a simple factorization, $\frac pq$ should not be too close to a simple fraction and I think there are a few more caveats.

Then pick (public) $e$ and (private) $d$ with $ed\equiv 1\pmod {(p-1)(q-1)}$, which can be done by picking odd $e$ randomly in the full range and compute $d$ via Euclidean algorithm. I don't think that any choice of $e$ is better or worse than another. Of course $d$ should not be guessable, but if $e$ is perfectly random, so is $d$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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