Search code examples
cryptographyrsaencryption-asymmetric

Is it possible to get the private key using the public key?


I am using RSA asymmetric encryption, encrypting the data using the public key and decrypting the data using the private key.

The public key will be shared in clients machines.

My question is if the user get the public key is there any way to get the private key using the public one?


Solution

  • The keys are mathematically linked, but it is not possible to get the private key from the public key (at least no one knows or admits to knowing how to do so). However, you can obtain the public key from the private key.

    If you don't have a good understanding of Public-key cryptography, you might wonder about things and ask questions. And that's OK, it's confusing when you first think about it. Here's a great book Cryptography Decrypted that I recommend to friends who wish to learn more about cryptography in general. It has a very good section on Public-key cryptography and presents it in such a way that anyone can understand.