If I understood it correctly, PGP encrypts email by using receiver's public key. In a multiple-receiver scenario, does that mean each receiver will get a different version of "encrypted" email but the same version of "decrypted" email?

Also, it is possible to decrypt email with sender's public key?

In a multiple-receiver scenario, does that mean each receiver will get a different version of "encrypted" email but the same version of "decrypted" email?

Usually not. PGP supports something called "Multi-Key Encryption"; multiple recipients public keys are used to encrypt the data encryption key, which is minimal overhead on top of what is already being encrypted. Here's a Question that can tell you more about that.

Also, it is possible to decrypt email with sender's public key?

No, public keys are used to encrypt and to verify signatures. A single key half (either the public or private key) can't be used to both encrypt and decrypt; they're one-way tools.

The message is encrypted by random symmetric key, then for every recipient the symmetric key is encrypted with his public key and included into the pgp file (there will be several copies of the symmetric key, encrypted with different public keys, in one file). So every receiver would get the same encrypted message.

No, you can't decrypt anything with public key, otherwise everyone would be able to (it's public, everyone can get it). But for example Enigmail by default encrypts the message with both recipient's and sender's public keys (as though sender is one of receivers), so that sender can decrypt the message in his "Sent" folder.

Simply try:

Preamble:

From man gpg:

NAME
       gpg - OpenPGP encryption and signing tool
...
COMMANDS
       -e     Encrypt data...
OPTIONS
       -a     Create  ASCII  armored  output...
       -r     Encrypt for user id name...

Encryption for one recipient

$ gpg -aer $USER  <<<"Hello world." >/tmp/file1.pgp
$ ls -l /tmp/file1.pgp
-rw-r--r-- 1 user user 533 nov  9 15:39 /tmp/file1.pgp

$ gpg -qd /tmp/file1.pgp
Hello world.

$ gpg -aer aFriendOfMine <<<"Hello world." >/tmp/file1.pgp
$ ls -l /tmp/file1.pgp
-rw-r--r-- 1 user user 533 nov  9 15:42 /tmp/file1.pgp

$ gpg -qd /tmp/file1.pgp
gpg: decryption failed: No secret key

Nota: I have aFriendOfMine's public key, but I can't decrypt the message I crypted with his public key.

This answer your second question.

Encryption for many recievers

$ gpg -aer $USER -r aFriendOfMine <<<"Hello world." >/tmp/file1.pgp
$ ls -l /tmp/file1.pgp
-rw-r--r-- 1 user user 902 nov  9 15:43 /tmp/file1.pgp

The file is something bigger!

$ gpg -qd /tmp/file1.pgp
Hello world.

And I know aFriendOfMine could decrypt same message too.

You could add many -r $DEST flag on command line, but as many dests, the mail become bigger, depending on number of recipient AND keylength and algorithm of each recipient's key.

$ gpg -aer $USER -r aFriendOfMine -r alice -r bruno -r charlie -r theDude \
      <<<"Hello world." >/tmp/file1.pgp
$ ls -l /tmp/file1.pgp
-rw-r--r-- 1 user user 3027 nov  9 16:26 /tmp/file1.pgp

The file is something bigger, but each recipient will be able to read them.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.