5
$\begingroup$

I am developing a simple web app that uses asymmetric encryption, but I am not sure whether to chose RSA for the reasons mentioned above.

What are your suggestions? Also if I decided to go with RSA what is the recommended Key Size ?

Also, someone in the comment area mentioned using libraries made by others, but did not say which libraries should I use?

$\endgroup$
  • 1
    $\begingroup$ DSA is a signature algorithm, you can't really consider it as an alternative to RSA encryption. What do you mean? $\endgroup$ – otus Jan 13 '16 at 9:23
  • $\begingroup$ Oh okay I did not know that, so what other alternatives are there to RSA $\endgroup$ – john doe Jan 13 '16 at 9:25
  • 4
    $\begingroup$ RSA is still believed secure but elliptic curves are the most widely used alternative. $\endgroup$ – otus Jan 13 '16 at 9:32
  • 5
    $\begingroup$ If you're typing the letters RSA into your code, you're doing it wrong. Cryptography is not a magic bullet and is hard to get right. Use protocols and libraries that experts have written and let them pick the algorithm. $\endgroup$ – Gilles Jan 13 '16 at 10:49
  • 1
    $\begingroup$ What makes you think that RSA has been broken by the NSA? Also, are you trying to protect your data from a well funded government? Define who the attackers are, what their skills levels are and the value of your data, then define the level of security necessary. As @Gilles states, just encryption by itself does not create security, it must be used correctly and that is not easy. $\endgroup$ – zaph Jan 13 '16 at 15:44
32
$\begingroup$

This question has many problems in the way it was asked, and clearly did not come after doing some investigation. However, since this seems to be a misconception that is spreading widely, I will relate to it.

It is not true that the "crypto community" (whoever that is) believes that the NSA can break RSA. In fact, if Snowden taught us anything, it is that the NSA is using many techniques to bypass RSA in TLS and elsewhere (stealing private keys, utilizing implementation bugs, and more), but are not breaking RSA. If they could break RSA then this wouldn't be necessary and would be the easiest route to take.

Now, it may very well be that the NSA has some advantages in factoring over the academic and open crypto community. This makes a lot of sense for two reasons:

  1. We share everything that we discover with them (by publishing papers), and they share nothing about what they discover with us
  2. They have absurd computing power that they can utilize

Having said the above, I do not think that they can do much more than the rest of us. What's my basis for this belief? Nothing except that many very strong academic minds have also worked on this, and the Snowden revelations about what they are doing.

This possibly justifies the move to RSA-2048 (instead of settling on RSA-1536). I am very skeptical that the NSA can go beyond RSA-1024 by much. However, I think that it is a good idea to use RSA-2048 because I strongly believe that this is way beyond their power, again for the reasons stated above.

$\endgroup$
  • $\begingroup$ Very well written thanks. I will consider everything $\endgroup$ – john doe Jan 14 '16 at 5:23
  • 4
    $\begingroup$ Also some confuse the problem of Dual_EC_DRBG in software from what was once the RSA company with the RSA algorithm: security.stackexchange.com/a/72586/39571 . $\endgroup$ – dave_thompson_085 Jan 14 '16 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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