Hacker News new | ask | show | jobs
by davidcollantes 3635 days ago
And that is how signatures work. But while encrypting only, does it still remains the same?
2 comments

Sorry, I'm not sure I've understood your question.

Do you mean encrypting the same way we encrypt using public key?

If so:

No, because as far as I can tell, when you "encrypt" a message with your public key you are in fact encrypting a random symmetric key which has been used in turn to encrypt the message. (Both ciphertexts must be sent to the recipient.)

As you may infer, if we use the same mechanism but encrypt using the private key, we just cannot ensure the authenticity of the message.

Edit: corrected typos.

To communicate with the world, you encrypt with your private key, and the public decrypts with your public key.

To communicate with an individual, you encrypt with their public key and they decrypt with their private key.

The rule of thumb is, do you want the public to read it (decryption with public key) -- or do you want a private individual to read it (decryption with private key).