top | item 12080278

(no title)

giucal | 9 years ago

It works in both directions, but the purpose is different.

To put it simply:

Since you are supposed to be the sole owner of your private key, using it to encrypt something allows the public to verify your identity.

discuss

order

davidcollantes|9 years ago

And that is how signatures work. But while encrypting only, does it still remains the same?

giucal|9 years ago

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.

niftich|9 years ago

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).