OpenPGP in Thunderbird
It is a pretty rare event to see a nearly 21-year-old bug be addressed—many projects are nowhere near that old for one thing—but that is just what has occurred for the Mozilla Thunderbird email application. An enhancement request filed at the end of 1999 asked for a plugin to support email encryption, but it has mostly languished since. The Enigmail plugin did come along to fill the gap by providing OpenPGP support using GNU Privacy Guard (GnuPG or GPG), but was never part of Thunderbird. As part of Thunderbird 78, though, OpenPGP is now fully supported within the mail user agent (MUA).
The enhancement request actually asked for Pretty Good Privacy (PGP) support; PGP is, of course, the progenitor of OpenPGP. The standards effort that resulted in OpenPGP started in 1997. Back in 1999, PGP was the only real choice for email encryption, though the initial version of GnuPG had been released a few months before the request.
Early on, the main concerns expressed in the bug tracker were about the legality of shipping cryptographic code. The US government's attempts to restrict the export of cryptographic systems, known as the "crypto wars", were still fresh in the minds of many. It was not entirely clear that adding "munitions-grade crypto" to a MUA like Thunderbird was legal or wise. Early in 2000, the US revised its export-control regulations, which removed that particular concern.
There was work done toward adding support for OpenPGP and Secure/Multipurpose Internet Mail Extensions (S/MIME), which is another email encryption standard, over 2000 and 2001, but the code never actually landed. Thunderbird (called "mailnews" in those days) was in fire-fighting mode; fixing bugs and getting basic functionality working took precedence over new features like encryption. There was also a need to design a reasonable plugin mechanism.
Eventually, Enigmail showed up, which took some of the pressure off the Mozilla developers. Enigmail could be used on all of the supported platforms for Thunderbird to encrypt and decrypt PGP-style email (either inline or PGP/MIME) using GnuPG. Its initial maintainer, Ramalingam Saravanan, updated the bug with new information about Enigmail several times.
In the bug, multiple people suggested that Enigmail be incorporated into Thunderbird and the Enigmail developers were not opposed. In 2003, Patrick Brunschwig, who was a new maintainer for the plugin, said that doing so would help in getting rid of some of the "hacks" that were done to make Enigmail work with Thunderbird. But nothing like that ever happened.
Thunderbird itself has had something of a checkered past with
regard to its parent, Mozilla. On two separate occasions Thunderbird has
been spun out from the Mozilla nest. In 2007,
it left to allow Mozilla to focus on
Firefox. That led to the creation of Mozilla
Messaging as the new home for Thunderbird, which was reabsorbed
in 2011. But in 2012, support
for Thunderbird from Mozilla was reduced and in 2015 Thunderbird was given its walking papers again. Then, in 2017,
it was determined that the right place
for "Thunderbird’s legal, fiscal and cultural home
" was the
Mozilla Foundation.
All of that upheaval was likely not entirely conducive to focused development, but plenty of good work was done on the MUA over the intervening years, including adding S/MIME support along the way. However, integrating Enigmail or otherwise supporting OpenPGP never quite made the list. People would periodically pop up in the bug report to ask that it be resolved and occasionally Brunschwig would note that the decision was in the hands of the Thunderbird developers. That went on for many years, until an October 2019 blog post announcing the project's plans with respect to OpenPGP.
The announcement said that Thunderbird will be releasing a version in (northern hemisphere) summer 2020 with support for OpenPGP built right in. It will not be based on Enigmail, which will not be updated to the new Thunderbird plugin (or add-on) interface; Enigmail will effectively be in maintenance mode. It will be supported on the then-current Thunderbird 68 release, until that reaches end of life six months after 78 is released. But Brunschwig will be working on the OpenPGP support for Thunderbird and the plans were to help ensure that Enigmail keys and settings could make the transition.
In addition, the project plans to leave GnuPG behind, as explained by Kai Engert on the tb-planning mailing list. It comes down to licensing, at least in part. GnuPG is available under GPLv3, which means that shipping it as part of Thunderbird, which is under the Mozilla Public License 1.1, could be tricky to do right. But there is also a complexity factor:
If Thunderbird decided to distribute GnuPG software, the situation might get even more complicated. If users already have a copy of GnuPG installed on their system, we'd have to be careful to avoid any potential conflicts that might occur by having two competing copies of GnuPG installed on a computer.
It may be possible, eventually, to use GnuPG for Thunderbird cryptographic operations, but that is not a priority—except to support OpenPGP smartcards. The RNP library for OpenPGP, which is what is being used for Thunderbird, does not support smartcards, at least yet. In the interim, using GnuPG for smartcards will be supported for Thunderbird.
The OpenPGP wiki page lays
out the overall vision for the feature. As planned, OpenPGP
support was released as part of Thunderbird 78 in early
September. It comes with a migration tool to help Enigmail users make the
switch. In addition, the Mozilla Open Source Support
program provided a grant to security audit both RNP and the related
Thunderbird code. "We are happy to report that no critical or major
security issues were found, all identified issues had a medium or low
severity rating, and we will publish the results in the future.
"
There is an extensive HOWTO and FAQ document, a wiki status page, and a discussion forum for the "end-to-end encryption" (e2ee) feature in Thunderbird. The e2ee feature covers both OpenPGP and S/MIME in Thunderbird, though a support document for the feature only covers OpenPGP at the time of this writing.
The main difference, from a user perspective, between OpenPGP and S/MIME is the matter of keys. As with everything in the cryptography world, it seems, key management for email is a difficult problem. S/MIME takes a certificate approach to keys, like with TLS keys for HTTPS; keys are signed by certificate authorities, which can be done in-house or by third parties. OpenPGP depends on the decentralized web of trust, where keys are verified and signed by other users' keys. A key that is signed by a trusted key may also be trusted and those trust relationships can extended in a transitive fashion if desired.
Existing users of Enigmail will encounter some changes. For example, Enigmail "junior mode", which was added by the p≡p foundation, is not supported. Also, OpenPGP in Thunderbird does not support the web of trust directly:
It has been a long time coming, but it seems that OpenPGP has made its way into Thunderbird proper. It would be nice to believe that it will help broaden the adoption of email encryption, but that is probably a forlorn hope. Adding the feature will serve to highlight encryption, however, which may eventually pay dividends. But the key-management problem, in particular, is difficult and is likely the largest barrier to widespread adoption of email encryption.
