What To Use Instead of PGP
Itās been more than five years since The PGP Problem was published, and I still hear from people who believe that using PGP (whether GnuPG or another OpenPGP implementation) is a thing they should be doing.
It isnāt.
I donāt blame individual Internet users for this confusion. There is a lot of cargo-culting around communication tools in the software community, and the evangelists for the various projects muddy the waters for the rest of us.
Harubaki The part of the free and open source software community that thinks PGP is just dandy, and therefore evangelize the hell out of it to unsuspecting people, are the same kind of people that happily use XMPP+OMEMO, Matrix, or weird Signal forks that remove forward secrecy and think itās fine.
Not to mince words: The same people who believe PGP is good are also famously not great at cryptography engineering.
If youāre going to outsource your opinions on privacy technology to someone else, make sure itās someone who has actually found vulnerabilities in cryptographic software before. Most evangelists have not.
CMYKat Iām not here to litigate the demerits of PGP. The Latacora article I linked above makes the same arguments I would make today, and is a more entertaining read.
It is of my opinion as a security engineer that specializes in applied cryptography that nobody should use PGP, because thereās virtually always a better tool for the job you want to use PGP for.
(And for the uncommon use cases, offering a secure, purpose-built replacement is a work-in-progress.)
Note: Iām deliberately being blunt in this post because literally more than a decade of softspokenness from cryptography experts has done nothing to talk users off the PGP cliff. Being direct seems more effective than being tactful.
If you want a gentler touch, ask your cryptographer. If you donāt have a cryptographer, hire one.
If you can accept that every billionaire is the result of a failed system, thatās how cryptographers feel about people using PGP.
Instead, letās examine the āuse casesā of PGP and what you should be using instead. (Some of this is redundant with the Latacora article, but Iām also writing it 5 years later, so some things have changed.)
CMYKat Iām focusing on the āwhatā in this post, not the āwhyā. If you want to know the why, read the Latacora blog, or the Matthew Green blog.
If youāre curious about the credibility of my recommendations, read my other blog posts or ask your cryptographer.
Instead of PGP, Use This
This section contains specific tools to solve the same problems that PGP tries to solve, but better.
What makes these recommendations better than PGP?
Simply, they donāt make cryptographers want to run the other way screaming when they look under the hood. PGP does.
Some people are forced to use PGP because they work for a government that legally requires them to use PGP. In that corner case, your hands are tied by lawyers, so you donāt need to bother with what cryptographers recommend.
CMYKat Signing Software Distributions
Use Sigstore.
Note that this is an ecosystem-wide consideration, not something that specific individuals must manually opt into for each of their hobby projects. The only downside to Sigstore is it hasnāt been widely adopted yet.
If youāre a Python developer, you can just use PEP 740 to get attestations with Trusted Publishers, which gives you Sigstore for free. For most developers, this is as simple as setting up a GitHub Action to publish to PyPI.
This is a developing trend: Other programming language and package management ecosystems are following suit. I expect to see Sigstore attestations baked into NPM and Maven before the next US presidential election. With any luck, your favorite programming language could be on this list too.
Sigstore doesnāt just give you a signature that you check with a long-lived public key, nor does it require you to do the Web Of Trust rigamarole.
Rather, Sigstore gives you a lot for free. Sigstore was designed around ephemeral signing certificates rather than a long-lived private key. It was purpose-built for preventing supply-chain attacks against open source software.
Combined with Reproducible Builds, Sigstore solves the triangle of secure code delivery.
Alternatively, use minisign. If your package ecosystem doesnāt support Sigstore yet, you can get by with minisign (which is signify-compatible) until they modernize.
You can also use SSH signatures, if youād prefer. (More on that below.)
CMYKat Signing Git Tags/Commits
Use SSH Signatures, not PGP signatures.
With Ed25519. Stop using RSA.
Art by
Harubaki Sending Files Between Computers
Use Magic Wormhole.
You could also use SSH + rsync to do this job. Thatās fine too.
CMYKat Encrypting Backups
Tarsnap is the usual recommendation here.
There are a lot of other encrypted backup tools that work fine, if you donāt want to give Colin Percival your business. I donāt have a financial stake in any of them, nor have I audited them thoroughly.
Borg uses reasonable cryptography, but I havenāt had the time to review it carefully.
Kopia looks fine, but I really hate that they misuse āzero knowledgeā to describe an encryption protocol (rather than a proof system). We should not reward this misbehavior by marketers.
The point is: Youāve got options.
Too many options, in my opinion, to settle for PGP.
CMYKat Encrypting Application Data
Use Tink or libsodium.
Avoid: OpenPGP, OpenSSL and its competitors.
Not a lot to say here. Iāve written a lot about this over the years. Misuse-resistant cryptography librariesāespecially ones that make key management less painful for usersāare the way to go.
Harubaki Encrypting Files
Use age.
Age is what PGP file encryption would be if PGP didnāt suck shit.
Age has two modes: Public-key encryption, and password-based key derivation.
Hereās a quick comparison table between what age offers, and what PGP uses in the installed base:
agePGPData encryption modeAEAD (ChaPoly)CAST5 (
64-bit block cipher) in CFB mode with a strippable SHA1 āMDCāKey-commitmentYes (via the header)
Pah! You wish! Dream on.PGP isnāt even AEAD.
Password KDF memory hard?Yes, with scrypt.No.Vulnerable to chosen-ciphertext attacks?No.Yes, but PGP proponents
stupidly consider this a good thing.Supports 90ās-era cryptography?No.Yes.Releases unauthenticated plaintext?No.
Yes.Uses versioned protocols rather than ācipher agilityā?Yes.No. See: 90ās era cryptography.Most common implementations are memory-safe?Yes (Go, Rust).No (C).
Like, itās not even close.
CMYKat Some PGP proponents will insist that AEAD is possible now, but as long as the installed base of PGP remains backwards compatible with the lowest common denominator, thatās what your software uses.
Just use age. Or rage, if youāre a Rust enthusiast.
(And if you have concerns about āwhich age key should I trust?ā, Iām already planning an age-v1 extension for the Public Key Directory project. More on that below.)
Art by
Scruff Private Messaging
Use Signal.
Security teams around the world insist that they need PGP for bug bounty submissions or security operations, but Signal does this job better than PGP ever did.
Once upon a time, you needed to give people a phone number to use Signal, but that hasnāt been the case for a long time. Still, many people have missed that memo and think itās a requirement.
My Signal username is soatok.45. Go ahead and message me. You wonāt learn my phone number that way.
In the near future, I plan on developing end-to-end encryption for direct messages on the Fediverse (including Mastodon). This is what motivated my work on the Public Key Directory to begin with.
But this is not intended to be a Signal competitor by any measure. Itās a bar-raising activity, nothing more.
CMYKat I understand some people donāt like or trust Signal for whatever reason, but every single alternative thatās been suggested to Signal has offered inferior cryptography to Signalās. So I will continue to recommend Signal.
Miscellaneous PGP Alternatives
This section contains things people think they need PGP for.
Identity Verification
Iām actively working on something better!
via
XKCD If you want the ability to vend a transparently verifiable public key for a given user, thatās one of the use cases for the Public Key Directory Iām designing in order to build end-to-end encryption for the Fediverse.
Although this is purpose-built for the Fediverse, Iāve deliberately included support for Auxiliary Data messages, whose formats will be specified by protocol extensions.
Rather than trying to grok the Web-of-Trust, you can simply have your software check that multiple independent Public Key Directories have verified the record, since its inclusion is published in an append-only transparency log, secured by a Merkle tree.
My design doesnāt preclude any manual key verification, or key-signing parties, or whatever other PGP cultural weirdness you want to do with these public keys. It just establishes a baseline trustworthiness even if youāre not a paranoid computer nerd.
My project isnāt finished yet. In the meantime, you can manually check public keys when using the other recommendations on this page.
Harubaki Encrypted Email
Donāt encrypt email. From the Latacora article:
Email is insecure. Even with PGP, itās default-plaintext, which means that even if you do everything right, some totally reasonable person you mail, doing totally reasonable things, will invariably CC the quoted plaintext of your encrypted message to someone else (we donāt know a PGP email user who hasnāt seen this happen). PGP email is forward-insecure. Email metadata, including the subject (which is literally message content), are always plaintext.
There isnāt a recommendation for encrypted email because thatās not a thing people should be doing.
Art by
AJ Now, there exists a minority of extremely technical computer user for which Signal is a nonstarter (because you need a smartphone and valid phone number to enroll in the first place).
Because those people are generally not the highest priority of cryptographers (who are commonly focused on the privacy of common folkāincluding people in poor and developing countries where smartphones are more common than desktop computers), there presently isnāt really a good recommendation for private messaging that meets their constraints.
Not Matrix.
Not XMPP+OMEMO.
Certainly not PGP, either.
What PGP offers here is security theater: the illusion of safety. But itās not actually a robust private communication mechanism, as Latacora argues.
CMYKat āI insist that I need encrypted email!ā
If you find someone insisting that they āneedā encrypted email, read up on the XY Problem. In a lot of cases, thatās whatās happening here.
Do they ipso facto need email (as in, specifically the email protocols and email software)?
And do they care more about this constraint, or the privacy of their communications?
Because if their goal just to communicate privately, see above.
If the tool theyāre using being email is more important than privacy, they should consider sending empty messages with an attachment, and use age to encrypt the actual message before attaching it.
Thatās serviceable, just beware that everything Latacora wrote about encrypted emails still applies to your use case, so expect someone to CC or forward your message as plaintext.
(Unless youāre legally required to use PGP because of a government regulation⦠in which case, why do you care about my recommendations if youāre chained by the ankle to your governmentās bad technology choices?)
Finally, miss me with the ābut someone can screenshot Signalā genre of objections.
As Latacora noted, people accidentally fuck up PGP all the time! Itās very easy to do.
Conversely, you have to deliberately leak something from Signal. There is no plaintext mode.
Thatās the fucking bar you need to meet to compete with Signal.
PGP fails to be a Signal competitor, in ways that are worse than Threema, Matrix, or OMEMO.
Watch This Space
With all that said, I am actually designing an encrypted messaging protocol that will have an email-like user experience, except:
- Everything is always end-to-end encrypted, with forward secrecy.
- Itās not backwards compatible with insecure email.
- It doesnāt use PGP, or any 1990ās era cryptography.
I canāt promise a release date yet. Iām prioritizing end-to-end encryption for the Fediverse before I write the specification for that project (tentatively called AWOO, but the cryptography underpinning both projects should be similar).
Maybe 2026? Weāll see!
If someone beats me to the punch, and their design is actually good, Iāll update the post and replace this with a specific recommendation.
CMYKat Against PGP
I donāt know how to get the message out louder or clearer about how cryptographers feel about PGP than what I wrote here.
Latacora wrote their criticism in 2019. As I write this, 2024 is almost over. When will the PGP-induced madness end?
CMYKat Experts are not divided here. There is no controversy to teach.
Every time a cryptographer has talked about PGP, itās been to complain about how bad it is and opine that people shouldnāt be using it.
If youāve read this far, you already know what you should be using instead.
Header art credits: CMYKat and the GnuPG logo.
Update (2024-11-16)
Someone tried to use their Fediverse software to submit an anti-furry comment to this blog post.
Therefore, Iāve added more furry art to it.
loviesophiee If youāre curious about the cryptography used by other messaging apps, please refer to this page that collects my blogs about this topic.
#alternatives #codeSigning #digitalSignatures #encryption #PGP #security #SecurityGuidance #signing