2

I am working on Mac OS X and using GPG KeyChain software to send an email to someone with my public key. It looks like the following:

enter image description here

I am trying to understand the following two cases:

  1. When I click on Mail Public Key, the Apple Mail opens up with an attached public key. On top of that if I attach any document and send that email to anyone, would that be considered as encrypted?
  2. If I want to use receiver’s public key, do I need to ask him to give me his public key and then I would import the key on GPG Keychain and then once it’s imported, I can again right click and click on “Mail Public Key” option to send the email?

  3. When I tried to copy the text from word document, I was able to see Encrypt Services to New Window option after RightClicking(the selected text)-->Services :

enter image description here

However, I didn't see anything when I selected the text from the PDF document. Do I always need to select text files or word document to encrypt the message?

  1. After encrypting the message, I copied the encrypted message into mail, entered the recipient's email address, but the OpenPGP icon didn't turn green and I wasn't able to click the lock icon adjacent to Subject text field. Could you explain why?

Please advise.

3

Here are my answers:

  1. When I click on Mail Public Key, the Apple Mail opens up with an attached public key. On top of that if I attach any document and send that email to anyone, would that be considered as encrypted?

No. When you send a GPG public key to someone it doesn’t have to be encrypted. It won’t hurt anything if you sent the GPG public key encrypted, but it doesn’t really factor into what you are attempting to do: The whole idea of sending a GPG public key to someone else is to allow them to encrypt messages they wish to send to you.

In your case, you need to get the GPG public key from your recipient before you can send them any encrypted messages. As explained on this website:

For example, if Bob wants to send sensitive data to Alice, and wants to be sure that only Alice may be able to read it, he will encrypt the data with Alice's Public Key. Only Alice has access to her corresponding Private Key and as a result is the only person with the capability of decrypting the encrypted data back into its original form.

So if you somehow sent the PDF along with your GPG public key in that message both items—the PDF and the key—would be unencrypted by default. Unless of course you get the recipient’s GPG public key and then you can encrypt a message to them.

But your GPG public key is a non-factor in the flow of content you are talking about. You just need their GPG public key so you can place the PDF in an encrypted message you would send to them for decryption.

  1. If I want to use receiver’s public key, do I need to ask him to give me his public key and then I would import the key on GPG Keychain and then once it’s imported, I can again right click and click on “Mail Public Key” option to send the email?

Yes, you do need the recipient’s GPG public key to send them an encrypted message. But that said, your description is a slightly muddled idea of how GPG encryption works. The “Mail Public Key” function has nothing to do with encrypting email; it simply sends your GPG public key to a recipient.

So, you definitely need the recipient’s GPG public key so you can encrypt a message intended for them. Just get their GPG public key, import it into your GPG keychain and then you can encrypt a message to them.

This screenshot (below) from the official GPG Tools site explains it well. Here are the steps you should follow:

  1. With GPG Mail installed, get the GPG public key of the recipient. Then when you create a new message for the PDF, enter a “To:” address that matches the GPG public key of the recipient.
  2. Once that “To:” address is set—and it matches the email address of the GPG public key you added—you will be able to click the lock icon to the immediate right of the “From:” pull down.
  3. If all goes well, the “OpenPGP” area in the upper right will turn green and you can then send the mail to the recipient as an encrypted message.

enter image description here

Questions 3 and 4 are just confusing. Whatever your question 3 is—and whatever steps you are attempting—just forget about it. That is an unnecessary step. Move onto this:

  1. After encrypting the message, I copied the encrypted message into mail, entered the recipient's email address, but the OpenPGP icon didn't turn green and I wasn't able to click the lock icon adjacent to Subject text field. Could you explain why?

Please look at my answer—as well as the very clear steps at the official GPG Tools site—and see that this process does not need to jump through hoops.

You should not be using a stand-alone PGP/GPG application. Just use the Apple Mail app plugin and follow the simple steps there. You need to recipient’s GPG key added to your keychain. Then for step 4, don’t do anything other than compose a normal email and attach the attachment. Enter the “To:” address into the new mail message. Once that is done, click the lock icon to the immediate right of the “From:” pull down. And that’s it. The “OpenPGP” area in the upper right will turn green and you can then send the mail to the recipient as an encrypted message.

  • @CBHacking I have added follow up questions # 3 and #4. Could you guys please take a look at those as well? Thanks – John Sep 15 '15 at 2:10
  • @John Whatever your step 3 is, forget it. You are making this tons more complicated. You need the recipient’s GPG key, add that to your keychain, and just follow the steps from the GPG tools site—or what I have outlined in my answer to step 2—and then you are good to go. But at 100% no point does using an external application play a role in any of this for any reason. Just follow the steps and you are good. – JakeGould Sep 15 '15 at 2:23
  • 1
    Okay, my apple mail was linking to another email account and that's the reason the OpenPGP option wasn't turning green. It worked fine when I created new keys for the actually account linked with my apple mail. Thanks everyone for helping me out !! – John Sep 15 '15 at 3:30
  • @John No problem. To be fair, GPG Public Key stuff can be confusing at first, but once you get it you understand how clean/simple the process can be when using the GPG mail tool. – JakeGould Sep 15 '15 at 3:32
1

@JakeGould's edited answer is correct. I would delete this answer but it has comments now.

You cannot send an encrypted email to somebody unless you have their public key. Your own private key can be used to sign an email - making it so anybody who has your public key already can verify that the email could only have come from you - but in order to send somebody an email you need to have the recipient's public key. Your own keys, public or private, will never help you in sending an encrypted mail.

Also, it's perfectly acceptable (though unnecessary) to send your public key in an encrypted mail. If you have the recipient's public key, you can use it to encrypt your PDF file, and also send along your own public key so that the recipient can send encrypted mail back to you. Because the recipient can decrypt your mail, you can (if you want to) encrypt your public key too. There's no good reason to do so, though; the whole point of a public key is that everybody can see it.

  • I don't have recipient's public key but the recipient asked me to use his public key and encrypt the PDF and send it over to him via email. So based on my understanding, I would need to ask for his public key and then one I have, I would need to import it in GPG Key Chain. So my question is, does importing it automatically attaches it with the email that I will be sending to him? I am kind of lost here. – John Sep 14 '15 at 22:14
  • @john "So my question is, does importing it automatically attaches it with the email that I will be sending to him?" Look at my updated answer. Just get the recipient's ate a GPG encrypted message to them. Nothing else needs to be attached or done. – JakeGould Sep 14 '15 at 22:20
  • @John, ask thre reciepient where their public key is hosted (if not the usual places like gpg.mit.edu or some distro keyserver mine for example are on gpg.mit.edu, pgp.gmu.edu, keys.fedoraproject.org ) the email attached to the gpg key will likely be in the Comment of the gpg key. If you only have the reciepent's email try gpg --search-keys --keyserver gpg.mit.edu "<email_you_have>" see if they show up if so import from there – linuxdev2013 Dec 13 '15 at 20:50

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.