Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
    
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 Jul 19 '11 at 17:23
    
@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 Jul 20 '11 at 10:10

Your Answer

 
discard

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.