nav search
Data Center Software Security Transformation DevOps Business Personal Tech Science Emergent Tech Bootnotes BOFH

Armouring up online: Duncan Campbell's chief techie talks crypto with El Reg

Truecrypt, PGP, GPG - but NEVER Skype

By Matt Fowler, 19 Dec 2014

Crypto toolbox, Part I I think I was about 15 or 16 when PGP was making headlines for being classified as munitions by the US government and was (supposedly) banned from export. While I wasn’t a subversive type at the time, I got a very strong sense that any software that scared the mighty USA so badly was something I ought to play with and try to understand – even if I didn’t need it.

Coming up to nearly the present day, I have fallen into a personal and working relationship with investigative journalist and occasional Reg contributor Duncan Campbell.

Among other things, such as interpreting tedious corporate MS Access databases for our work on the Offshore Leaks tax haven investigation, and now getting involved with his forensic IT work, I ended up being personal tech support for anything Duncan can't sort directly or doesn’t have the time to research. This has also led me to presenting the technical side of our work on Offshore Leaks at a couple of journalism conferences.

And then Edward Snowden, Laura Poitras and Glenn Greenwald changed the world. Or perhaps they just revealed that we'd been living in a fantasy world for a good long while.

Suddenly, Duncan “Echelon” Campbell was getting back in to serious top-tier investigative journalism again. And my opinion and assistance were sought on the tools people were telling him to use.

After I assisted some of The Register's team with the necessary crypto tools to discuss Duncan's recent articles securely, group editor Joe Fay approached me and asked if I would write something myself about the tools and how they fit together.

It should be noted that these are not the only potentially suitable tools – just the ones I'm directly familiar with. There are some alternative options at Reset The Net's Privacy Pack site.

The tools I'm going to outline here are not going to improve your productivity. They aren't here to make your life easier; rather, they're to make the lives of anyone trying to snoop on your stuff harder. If you have a big team project and nobody apart from one or two crypto-fans have ever used PGP before, the feel-good factor that might be gained from being all techno-futuristic will be very rapidly overshadowed by the feel-bad problem of not getting any work done.

At the point I joined the team for ICU’s Offshore Leaks project, Duncan had just finished winning an internal battle about the use of PGP. Specifically, convincing everyone NOT to use it.

If you have a big team project and nobody apart from one or two crypto-fans have ever used PGP before, the feel-good factor that might be gained from being all techno-futuristic will be very rapidly overshadowed by the feel-bad problem of not managing to get any work done.

Duncan wisely pointed out that the threat model for the project did not include governments – as we understood it, they had already received the same data we were working with and reporting on. So, there was no need to go to Defcon 1 in order to try to keep them out. A slow and convoluted manual PGP-and-email arrangement was replaced with a dedicated private forum system (provided by team member Sebastian Mondial) which was invite-only and delivered over SSL – but not specifically trying to be secure against government-level adversaries.

However, during the preparation of Duncan's recent articles about NSA GCHQ and the Snowden papers, all of the top-tier tools were absolutely in play.

Don't feel you have to use the tools in this article at every possible opportunity. Consider who you're trying to keep secrets from when deciding how much extra effort to go to.

Local storage: Truecrypt

Truecrypt can encrypt an entire physical drive (HDD, USB flash stick, whatever you like), or you can create a "container file" of a fixed size to hold the data you want to store securely. When you run Truecrypt, enter your password and mount your encrypted volume, it shows up as a new drive on whatever drive letter you choose.

Beware the old "C:\Windows\Temp" catch

Truecrypt is the simplest to understand out of all these tools. Your data is protected by the password you enter when you set it up. If you use a good long password, the data it has protected for you is pretty much perfectly secure. It won’t stop you if you insist on using a short, easily attacked password – and if you forget your really awesome password then there is no magic "recovery" route available.


Truecrypt - version 7.1 considered safe, although caution is advised

Of course, Truecrypt can't help you if the files you have stored inside its robust cryptographic storage are also present in C:\Windows\Temp, or available for forensic recovery after you move them into your Truecrypt container. If you are worried about that, you can get TC to encrypt your boot partition so you have to enter your password to even get Windows to begin booting. Of course, that's still vulnerable if someone snatches your booted-and-unlocked laptop from your grasp.

Despite the recent scares, many people are still comfortable with using the previous (7.1a) release of the massively popular encrypted storage application. Now that the dust has settled a little, I am too.

I share Steve Gibson's opinion that the dire "it's insecure, stop using it" message put out by its developers should more accurately be interpreted as "we quit, there will be no support from us going forward, so please use something else".

At this point, although version 7.1a of Truecrypt is considered safe, it is appropriate to urge a little bit of caution about where you download. This would be a great opportunity for ne'er-do-wells to put up fake mirrors serving compromised, weakened or malware-addled versions of the software. I would recommend either Steve Gibson's mirror on his GRC page, or the new site hosted in Switzerland, as being appropriate and trustworthy.

Now we've got all that out of the way, here's a link to a decent tutorial to walk you through the basic setup (creating a container-file based volume).

For greater depths of background reading, Andrew Y has reconstructed the original Truecrypt website for reference purposes, including the Documentation section.

Securing email with PGP/GPG

While you certainly can use Truecrypt to send files to someone else, that would require you to either pre-arrange a shared password in advance, or have some other already-secure channel to transmit it to them. That's not hugely useful in many situations, such as a whistleblower wanting to communicate securely with a journalist they’ve never met.

That's where the clever maths of Public Key Cryptography comes in. Rather than the "symmetric" model used by Truecrypt (encrypt with a password, decrypt with the same password), Public Key tools work with a mathematically-related pair of really massive numbers. One of those can be shared freely with the entire world and is used to encrypt data (the Public Key), but that ciphertext can then only be decrypted by the other half of the pair, which you keep secret (the Private Key).

The de facto standard for this is OpenPGP, descended from the original Pretty Good Privacy created by Phil Zimmermann. The Free Software toolset GPG (GNU Privacy Guard) is the most commonly used implementation.

There are a number of possible configurations available for GPG, depending on if you would rather use it as a plugin to a local email client or use it entirely as a stand-alone app. My personal preference is to use the Enigmail plugin for the Mozilla Thunderbird mail client, whereas a more-manual approach which requires less changes to your general way of working (not needing you to use a different email client) would be to use the Gnu Privacy Assistant (GPA) standalone app from the GPG4Win bundle.

There are also Chrome extensions which implement OpenPGP in client-side Javascript inside your browser, to aid using it with webmail services. I haven't used any of these and I'm not sure if they would provide seriously top-tier protection – there are hazards like Gmail's autosaving of unsent emails that could cause your message to be sent to Google "in the clear".

This would be another "security versus convenience" trade-off. For best security, don't compose your sensitive emails in a webmail page – write them locally in Notepad, run them through GPG by hand, then copy+paste the encrypted version in to Gmail to send it.

Behind the browser padlock

If you've read Glenn Greenwald's recently released book, he describes how the mysterious "Cincinnatus" tried (unsuccessfully) to get him to install and configure GPG, including creating a video tutorial to walk him through the steps; that tutorial is still up and available to view on Vimeo. Although the audio can be a little tricky to understand – he had run his voice through a particularly enthusiastic autotune-like filter to hide his identity – it's a very thorough treatment of how to install and use GPG at a "click here, choose this option" level of detail.

One area that video doesn't cover is how to validate that the Public Key you have found genuinely does belong to the intended recipient. There are known instances of fake keys being uploaded to the public key servers (such as Erinn Clark, developer for the Tor project, and one for Glenn Greenwald himself. This is believed to be how an internal encrypted email between Jesselyn Radack (Edward Snowden's lawyer) and Glenn Greenwald escaped into the wild, as reported here and here.


PGP uses Public Key tools that work with a mathematically-related pair of really massive numbers

In cosy "web browser padlock icon" land, aka SSL/TLS, we all trust a bunch of Certificate Authorities (such as Verisign, Thawte and Digicert). They check the identities of the people they're issuing certificates to – at least, in theory – and the presence of an intact digital signature from the CA means we can be confident that we are genuinely connecting to the site we're trying to reach and not being redirected through an interloper. Of course, those CAs all have to obey the law of the land in their local jurisdictions, National Security Letters and all.

OpenPGP doesn't have that top-down "CA-style" validation of public keys. Rather, users can sign their friends' or colleagues' public keys to assert that they have checked that the specific key really belongs to the proper person. If you verify my key and tell your OpenPGP client that you trust it and trust me, then you will "inherit" the trust I have stamped on to Duncan's key when I signed it. This entire concept, while technically incredibly clever, is also a massive pain in the backside. Accordingly, people don't really do it much or enough – if at all.

The most common approach at the moment is to publish your Public Key directly on your own website. That's a pretty good starting point for most needs, although if you are getting into government-level adversary land then there is still the theoretical risk that either the site has been modified on the webserver or the contents substituted on its way over the internet to you.

To manually verify that the Public Key you're intending to use really does belong to the right person, you need to compare the Key Fingerprint (40 hex digits) that you see on the key with the Fingerprint that the key owner sees on their definitive copy. Counter-intuitively, this process does not need to be done in secret – a Skype or normal-phone call is entirely acceptable. What matters is that the information you're exchanging (fingerprints of public keys) is not changed in transit - there's no specific problem with allowing The Man to eavesdrop on that conversation.

You will see a key ID of the last eight (sometimes 16) digits of a key's fingerprint used to identify it; that is only suitable to use for convenience, it's very possible to forge a key and make the final eight digits of the fingerprint match up with an existing target key. Always validate the entire fingerprint if you're verifying or signing someone's key.

The key-signing side of OpenPGP is pretty un-fun and I haven't managed to find a nice "cuddly" tutorial to suggest at this point. Over to you, commentards?


Don't even think about using Skype for anything sensitive. There is no meaningful encryption or security provided any more. It is completely open to interception by the agencies. ®

The Register - Independent news and views for the tech community. Part of Situation Publishing