When I encrypt a message with my public key, can I read it with the same public key?

4

On a process that is using asymmetric encryption(such as ssh), when I want to send a message to someone using my public key, can I decrypt and read this message with my public key (the same that I used to encrypt) or only who has the private key would be able to decrypt this message?

Diogo

Posted 2011-07-19T17:17:52.857

Reputation: 28 202

Answers

7

Asymmetric encryption means that you use one key to encrypt, and ONLY the matching other key can decrypt. You don't use YOUR public key to encrypt a message you want to send to somebody. You use THEIR public key. The message will ONLY be able to be decrypted by THEIR private key.

If they wanted to send a response to you, they use YOUR public key, creating a message that can only be decrypted by YOUR private key.

peelman

Posted 2011-07-19T17:17:52.857

Reputation: 4 580

Right, when I was saying my public key I was reffering to the public key that the privates key's owner gave to me. However, thanks for clarify. :D – Diogo – 2011-07-19T17:23:25.090

@Diogo BTW if you encrypt with your private key, you are signing your message, and everyone with your public key can decrypt it knowing you "approve this message". – Jader Dias – 2011-07-20T10:10:06.370

0

It’s called as asymmetric encryption because we use different key to decrypt and encrypt message.we never transmit the key used for decryption so that there should be no risk of interception.Hence for decryption private key is used and public key is used for encryption.

aila

Posted 2011-07-19T17:17:52.857

Reputation: 21