How to keep your email private with PGP encryption on your Mac

In our last episode of Private I, I explained the basics of public-key (PK) cryptography, a way to scramble messages in a way that only someone possessing a particular key can decrypt, without that key ever having to be publicly disclosed or shared. It's an effective system that has no known theoretical exploits, and currently deployed implementations are considered robust.

And to recap: The clever bit with the public-key approach is that you have two complementary keys, one public and one private. The public key can be freely distributed. Anything encrypted by someone else with the public key can only be decrypted by having access to the corresponding private key. And a private key can be used to "sign" a string of text or a document to prove mathematically that only the private key's possessor could have signed it.

But there are two missing pieces that would let Mac, iOS, and other platforms' users take advantage of PK. The first is pragmatic: Senders and recipients need compatible software tools or plugins, preferably integrated into apps so that little effort is required. The second is existential: Without pre-arrangement, such as meeting in person or a phone call, how do you know that what purports to be someone's public key is actually that person's key?

The easiest way to solve both problems is to use an end-to-end proprietary ecosystem, but that gets us back, more or less, to iMessage or something similar. Silent Circle has one of the best options that embeds public-key cryptography, if you can convince all the people with whom you need to communicate to opt in. It starts at $10 per month for unlimited text, calls, video chat, and file transfers among its users. The service's messaging and calling options received scores of 7 out of 7 in the Electronic Frontier Foundation's secure messaging scorecard.

PGP on the Mac

But most of us don't live in a walled garden, and one of the company's founders, Phil Zimmermann, is responsible nearly 25 years ago for turning public-key cryptography into what he called PGP, for Pretty Good Privacy. (How PGP works is described in Part 1.)

PGP is available for the Mac via GPGTools, a version of the free software GPG (GNU Privacy Guard). It lets you build a directory of other people's public keys, while also letting you carry out encryption, decryption, signing, and verifying. (PGP is a trademark, and GPG coined to get around it, but you'll often see PGP used generically to refer to this method of using public keys.)

The EFF has very nice step-by-step instructions for installing GPGTools to allow it to be used directly with either Apple Mail or Mozilla Thunderbird for email; the tools are also available via the application Services menu wherever you can manipulate or select text. GPGTools is currently free, but plans to charge a very modest fee for its email plug-in at some point to help support development costs.

The EFF instructions walk you through creating your own public/private key in GPG Keychain. To use GPGTools with email, your key needs to have the same email address as the return address from which you want to send encrypted messages. Once you have a key, you can upload a key to a keyserver by selecting your key and choosing Key > Send Public Key to Keyserver. This makes your key searchable by your name and email address in a PGP directory. A key has an associated fingerprint, a cryptographic transformation of the public key that's far shorter, which I'll get to in a moment.

When you compose an email in Mail after going through the installation and key creation, you now have two new icons on the Subject line as long as the sending account matches any public key you've created. The blue starburst checkmark indicates your outgoing mail will be signed by your private key, allowing others to validate that it's been unchanged in transmission as long as they have your public key. And you can click the lock icon if all of the recipients in the address fields have public keys stored in GPG Keychain.

(Note that PGP-encrypted email protects the contents of the message, but not its subject line nor the metadata: the routing information and other details stored in email headers, and which have formed a large portion of the analysis by the NSA and other governments' security agencies to identify patterns.)

On sending such a message, you're prompted for your passphrase. I store my passphrase in 1Password, so I can bring it up rapidly. If you plan to type it, make it something long and memorable with a single piece of punctuation, like "From the still of the ! night" -- this is essentially uncrackable due to length and the fact that the phrase would never appear in any English text used for word-frequency analysis.

Now, of course, your recipients have to go through the same procedure, or use other compatible PGP software. Symantec still makes PGP, although it works on the Mac only with Microsoft Outlook. There are other implementations of GPG for other platforms. And some mobile apps can handle PGP-encrypted documents and email. (I looked for PGP iOS app that meet the bill, and the current lineup have a variety of limitations. I'll be looking into this further as this situation changes.)

With GPGTools installed, you can also perform all the other PGP-style operations from the Services menu. For instance, as I compose this in BBEdit, I can select BBEdit > Services > Insert My Fingerprint (which is 53F4 9E97 2652 4E2F 2993 4611 BB54 A24B EDD1 8384). I can also encrypt, sign, verify, and so forth.

Checking on the keys

But let's turn to the existential problem. You have a key that's associated with your email address, and you post the public key to a keyserver. How can someone be sure it's your key? If they email you at the address, it's possible your email has been tampered with, and the message is intercepted, and responded to without you ever knowing about it. One method of validating a key is to call someone, because there's about zero probability that a man-in-the-middle could know you were making the call, intercept it, and speak in real time the fingerprint of a false key. Once you've verified a key by voice or in person using its fingerprint, you're set.

The reason I'm so sure, though, that public-key messaging might rise in popularity, though, is due to, currently an invitation-only and free public-key service that manages keys and handles encryption tasks in the browser or via command-line tools -- but which also provides substantive and useful ways to validate your public key to other people's satisfaction.

Visit my profile on, and you see that I've verified myself in several ways. I posted a tweet with a code provided by Keybase, posted an item to my Github repository, added a special text-only DNS record, and uploaded a file to my web site. This is probably a good set of vectors that no other person should be able to hijack without being noticed.

The nice part of Keybase is that as it expands outside of its invitation-only phase, it will provide a common place for people to upload keys or generate new ones, and validate themselves all at once. Although Keybase doesn't operate keyserver software (for a variety of reasons, obscure and otherwise), you can click on the key of anyone's profile, and up pops a window from which you can save that person's public key or copy it.

GPG Keychain lets you paste a public key into the main window or import the public key file. Then you can immediately confirm that key against the fingerprint on the site in the same pop-up window.

None of this is, shall we say, straightforward. But neither does it require the level of tweakiness and complexity of years past. Once set up, you can send and receive encrypted emails with other people who use PGP simply by remembering or retrieving your key's passphrase. And that takes us a lot closer to reliably encrypted communications on demand than we have been until now.

Join the CSO newsletter!

Error: Please check your email address.

Tags Internet-based applications and servicessecuritypgpMailinternet

More about AppleEFFElectronic Frontier FoundationMicrosoftMozillaNSAPGPPretty Good PrivacySymantec

Show Comments

Featured Whitepapers

Editor's Recommendations

Solution Centres

Stories by Glenn Fleishman

Latest Videos

  • 150x50

    CSO Webinar: The Human Factor - Your people are your biggest security weakness

    ​Speakers: David Lacey, Researcher and former CISO Royal Mail David Turner - Global Risk Management Expert Mark Guntrip - Group Manager, Email Protection, Proofpoint

    Play Video

  • 150x50

    CSO Webinar: Current ransomware defences are failing – but machine learning can drive a more proactive solution

    Speakers • Ty Miller, Director, Threat Intelligence • Mark Gregory, Leader, Network Engineering Research Group, RMIT • Jeff Lanza, Retired FBI Agent (USA) • Andy Solterbeck, VP Asia Pacific, Cylance • David Braue, CSO MC/Moderator What to expect: ​Hear from industry experts on the local and global ransomware threat landscape. Explore a new approach to dealing with ransomware using machine-learning techniques and by thinking about the problem in a fundamentally different way. Apply techniques for gathering insight into ransomware behaviour and find out what elements must go into a truly effective ransomware defence. Get a first-hand look at how ransomware actually works in practice, and how machine-learning techniques can pick up on its activities long before your employees do.

    Play Video

  • 150x50

    CSO Webinar: Get real about metadata to avoid a false sense of security

    Speakers: • Anthony Caruana – CSO MC and moderator • Ian Farquhar, Worldwide Virtual Security Team Lead, Gigamon • John Lindsay, Former CTO, iiNet • Skeeve Stevens, Futurist, Future Sumo • David Vaile - Vice chair of APF, Co-Convenor of the Cyberspace Law And Policy Community, UNSW Law Faculty This webinar covers: - A 101 on metadata - what it is and how to use it - Insight into a typical attack, what happens and what we would find when looking into the metadata - How to collect metadata, use this to detect attacks and get greater insight into how you can use this to protect your organisation - Learn how much raw data and metadata to retain and how long for - Get a reality check on how you're using your metadata and if this is enough to secure your organisation

    Play Video

  • 150x50

    CSO Webinar: How banking trojans work and how you can stop them

    CSO Webinar: How banking trojans work and how you can stop them Featuring: • John Baird, Director of Global Technology Production, Deutsche Bank • Samantha Macleod, GM Cyber Security, ME Bank • Sherrod DeGrippo, Director of Emerging Threats, Proofpoint (USA)

    Play Video

  • 150x50

    IDG Live Webinar:The right collaboration strategy will help your business take flight

    Speakers - Mike Harris, Engineering Services Manager, Jetstar - Christopher Johnson, IT Director APAC, 20th Century Fox - Brent Maxwell, Director of Information Systems, THE ICONIC - IDG MC/Moderator Anthony Caruana

    Play Video

More videos

Blog Posts