I'm using the website https://www.igolder.com/PGP/encryption/ to encrypt/decrypt PGP messages and create public/private key pairs.

I get that when I send somebody my encrypted message only he can decrypt it, because I used his public key to encrypt. (integrity)

But when he recieves the encrypted message, he only needs HIS private key to decrypt it. How does that grant authenticity - how does he know who sent the message?

Is PGP only good for giving integrity but not authenticity?


Most PGP implementations don't just allow to encrypt a message with the receivers key, but also allow to sign it with the senders key (this one does not).

A PGP signature is a cryptographic hash of the message encrypted with the private key of the sender. When the receiver decrypts the hash with the public key of the sender and calculates the hash of the message, these two should match.

  • okay, so the website I mentioned in my post simply doesn't support signing the message with the senders private key therefore no authenticity can be granted. Other PGP implementations however have that feature. thanks. – ndru Mar 28 '16 at 10:17

General mechanism is:

  • You encrypt the message with his public key; he decrypts it with his private key -> privacy and integrity

  • You encrypt the message with your private key; he decrypts it with your public key -> authenticity and integrity

  • You encrypt the message with your private key and his public key; he decrypts it with your public key and his private key -> privacy, authenticity and integrity

With PGP message authentication is achieved by encrypting the message digest (hash) instead of a full message and sending the resulting signature along the message.

  • PGP supports encrypting with your private key? Do you have a reference? – Neil Smithline Mar 28 '16 at 14:20
  • 1
    @NeilSmithline, also often called "signing";) – Tobi Nary Mar 28 '16 at 14:23
  • That's not how signing works. See @Philipp's answer for a summary of signing. – Neil Smithline Mar 28 '16 at 14:25
  • @NeilSmithline, except for the hashing being left out here, which is technically not necessary for signing, signing is encryption with the private key. – Tobi Nary Mar 28 '16 at 14:27
  • 1
    @NeilSmithline Thanks, clarified. Does it look ok now? – techraf Mar 28 '16 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.