4

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?

2 Answers 2

6

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.

1
  • 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, 2016 at 10:17
4

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.

9
  • PGP supports encrypting with your private key? Do you have a reference? Mar 28, 2016 at 14:20
  • 1
    @NeilSmithline, also often called "signing";)
    – Tobi Nary
    Mar 28, 2016 at 14:23
  • That's not how signing works. See @Philipp's answer for a summary of signing. Mar 28, 2016 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, 2016 at 14:27
  • 1
    @NeilSmithline Thanks, clarified. Does it look ok now?
    – techraf
    Mar 28, 2016 at 14:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .