1

I know RSA keys are extremely difficult to crack, especially given adequate encryption bit length. However, does having access to the public key make it at all easier to crack the private key? I would imagine cracking the private key is essentially impossible without the public key. If you don't have the public key, you would have to completely guess at both the modulus and exponent until the resulting key can finally decrypt an encrypted message.

I know a public key, by definition, is public and accessible. However, if we're talking about a server-client application, and if you control the server and client, you could easily implement certain practices by which to protect the public key to a certain extent, making it less public, if you will.

So if someone was trying to crack a private key, would they need access to the public key first?

Based on the answer to this question, it seems like the answer is yes. If this is correct, then to what extent does having the public key aid in cracking the private key? How much more difficult would it be without the public key?

  • 1
    Ask yourself: how would you know that you've correctly decrypted a message? The point of encryption is that with the wrong key, you can end up at any plain text, and without a priori knowledge, you can't tell whether that happened coincidentally or by correct decryption – Marcus Müller Jul 25 '17 at 3:17
  • @Marcus Müller: Strictly speaking, that's not actually true unless you use an information theoretically secure encryption (i.e. one time pad) or your data is smaller than the encryption key. – Lie Ryan Jul 25 '17 at 13:10
1

No, knowing the public is not required to crack an RSA private key. Given an encrypted message, the attacker only needs to know something which allows him to distinguish a success in decrypting your message from a failure. This something can be anything, commonly it is some knowledge about the data content as for instance the knowledge of a challenge in its clear form, the presence of certain tags, of the data structure, of data statistics as for instance a presence of large number of correct english words or the presence of a checksum.

While not bad in its essence, your idea of keeping the public key private just reduces your public key cryptography to a situation which would most likely be solvable using symmetric cryptography.

One of the big issue with symmetric cryptography was that the sender and receiver had to find a way to exchange a pair of secret keys securely while there is no secure communication channel already established and no way to check each other identity. The main solution for this was to use out-of-band key exchange.

Asymmetric encryption, to which RSA encryption belongs, solved this by proposing a system where the sender and receiver can publish their public keys in a common directory, those public keys being optionally signed by a third-party entity trusted by both parties. This allows to remove the burden of having to exchange keys using out-of-band methods.

Nevertheless, if you like, you can still use out-of-band methods to exchange the public key. It is not necessary, depending on what you intend to do it may be more complex and harder to maintain over time, it will not increase your security in any noticeable way but it will not decrease your security either.

To go (a bit) in your direction, note that all public keys are necessarily made really public. A good example of this is user's SSH authentication keys. While stored in clear form, the user's public is usually not published (as opposed to the server's public key). However this so as long as there no advantage in doing so. As soon as it becomes more practical to store public keys in a trustable directory (an internal company directory for instance), there is usually no issue in doing so.

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.