Enigmail vs Thunderbird vs line-wrapping
There are plenty of security buffs who lament that it may be too late for PGP encryption to ever become common practice for email among the general public, but many of them continue to believe that PGP signatures on email still have a fighting chance. After all, the signature adds its value without making the message unreadable to those recipients who lack the proper software support. Yet "proper software support" is a tricky level to achieve, as users of Mozilla Thunderbird have known for a while. A longstanding problem in the way Thunderbird interacts with the PGP add-on Enigmail triggers false signature-mismatch warnings in certain situations (not all of which are under the user's control), illustrating yet again how difficult implementing security in the email realm can be.
In a recent blog entry about encouraging GnuPG usage among Debian Developers, Jo Shields wrote about the problem, telling readers to avoid Enigmail entirely:
Such a claim might sound shocking, considering that Enigmail is one of the most popular Thunderbird add-ons and Thunderbird one of the most popular desktop email applications. Surely, if there was such a major bug, it would have gotten fixed quickly. But many others have pointed out the same problem over the course of several years—at least since 2007, and as recently as last year.
Essentially, the trouble happens when Enigmail attaches an inline PGP signature to an email in Thunderbird's HTML message composer. The HTML composer is a different component than the plain-text composer, and it performs some "clean up" on the message body after the user hits send. That is an obvious recipe for trouble, since it occurs after the signature was computed over the message. Any alterations, including those that are invisible to the user (such as white-space changes or replacing special characters with HTML character codes) will alter the hash value of the message, which is the element of the signature that is encrypted by the sender's private key.
In this case, the alteration that happens to the message body is automatic line-wrapping. Thunderbird's line-wrapping for HTML messages breaks lines that exceed 79 characters (or whatever the value of the mailnews.wraplength preference is set to), so not every message is affected. In an attempt to avert this trouble, Enigmail performs its own line-wrapping on the message body just before generating the signature, at mailnews.wraplength - 2.
Nevertheless, there are invariably some situations when a single
"word" is longer than 77 characters; the simplest example is a lengthy
URL. In these situations, the automatic line-wrapping Thunderbird
performs after Enigmail has processed the message splits the long line
at the mailnews.wraplength point when it is sent, therefore the
signature no longer validates when the email recipient's PGP client checks
it. Changing Thunderbird's line-wrapping behavior is not simple
either; it requires
changing several preferences. As Enigmail lead developer Patrick
Brunschwig said in a 2009 comment thread
(comment #10), "The problem behind it is that Mozilla is too
clever -- it re-wraps the message after Enigmail has signed it, even
though Enigmail already applied line wrapping with the same methods as
HTML.
" Since Thunderbird provides a constrained API for
extensions, there is nothing Enigmail can do. Thus, he continued,
"the only solutions I have are: either use PGP/MIME or write
plaintext messages.
"
Unfortunately, while support for inline PGP signatures is fairly widespread, support for PGP/MIME (which in essence makes the signature a message attachment) is less common—particularly with proprietary email clients. In addition, Thunderbird's default behavior is to compose replies in the same format as the original email; one can force it to reply to an HTML email with plain text by holding down the "Shift" key when punching the "Reply" button or by altering each account's composition settings, but both options seem like an unnecessary hassle. After all, as quite a few bug reporters have noted in the various bug reports about this topic, it is at the very least odd that Thunderbird auto-line-wraps HTML messages but does not do the same to plain-text messages. It would seem like HTML content could be sent as-is, leaving the receiver's email client to render the message in however many columns are available.
Plain-text emails are not problem-free either, however. Thunderbird's default is to send plain text in the format=flowed (RFC 2646) format, which can lose leading spaces; Enigmail tries to compensate for this by transforming leading spaces to "~". Moreover, Enigmail also dash-escapes plain text (as required by the OpenPGP specification), which regularly causes problems for people emailing software patches with signatures.
One way to look at the whole mess is that the root of the problem
is the existence of two ways to include a PGP signature in a message
(inline and through PGP/MIME), two code paths to compose email in
Thunderbird (plain text and HTML), three programs that process the
message between the user hitting "send" and the email leaving the
machine (GnuPG, Enigmail, and Thunderbird), and multiple preferences
that affect line-wrapping. There is certainly no shortage of
opportunities for finger-pointing, but considering all of the variables
involved, an equally defensible conclusion is that digital email
signatures—despite their relatively small size on
screen—ultimately cannot be simplified down to point-and-click ease.
Index entries for this article | |
---|---|
Security | |
Security | Encryption/Email |
Posted Feb 13, 2014 3:25 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link] (8 responses)
Posted Feb 13, 2014 8:42 UTC (Thu)
by dd9jn (✭ supporter ✭, #4459)
[Link] (7 responses)
Enigmail should make sure never to send out HTML unless it is a real attachment.
Posted Feb 13, 2014 11:41 UTC (Thu)
by Seegras (guest, #20463)
[Link] (5 responses)
Also solves a load of other problems such as web-bugs, makes some scams obvious and so on.
Posted Feb 13, 2014 17:26 UTC (Thu)
by drag (guest, #31333)
[Link] (4 responses)
If I had to depend on some sort of html to text conversion or going text-only then that would mean that email would be largely useless for me as the vast majority of people I communicate with default to html formatting. Such is life.
Posted Feb 13, 2014 17:41 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link] (3 responses)
Also, I originally said that HTML *drafting* should be removed, not *support*. I personally use mutt, but I also still have bindings to default to w3m -dump if an email is mangled badly enough.
Posted Feb 13, 2014 20:55 UTC (Thu)
by drag (guest, #31333)
[Link] (2 responses)
The problem is that people often use html for a reason. Often they are trying to share graphs or screen shots, and quite often the colors and fonts they use for html have real meaning.
> Also, I originally said that HTML *drafting* should be removed, not *support*.
Having the inability to draft emails kinda defeats the purpose, doesn't?
If you force people to choose between being able to make professional looking emails, pretty fonts, or be able to share pictures of their kids (with descriptions inline) and crypto then that pretty much will destroy any chance that any significant number of people will use signing.
Posted Feb 13, 2014 22:21 UTC (Thu)
by dd9jn (✭ supporter ✭, #4459)
[Link]
Posted Feb 13, 2014 23:40 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link]
As for the drafting thing, it was half tongue-in-cheek, but I'd view it as a small victory :) .
Posted Feb 13, 2014 15:12 UTC (Thu)
by HelloWorld (guest, #56129)
[Link]
Posted Feb 13, 2014 4:16 UTC (Thu)
by salimma (subscriber, #34460)
[Link]
I must have triggered the HTML composer somehow, didn't think much about it and sent the mail off. Kaboom.
Posted Feb 13, 2014 4:20 UTC (Thu)
by idupree (guest, #71169)
[Link]
The situation could certainly be a lot better.
Posted Feb 13, 2014 8:51 UTC (Thu)
by jezuch (subscriber, #52988)
[Link] (1 responses)
This is insane. Instead of applying more and more cleverness the only sane solution is to make the cleanup be performed before signing. All the other "problems" mentioned in the article are completely irrelevant. *boggle*
Posted Feb 13, 2014 17:06 UTC (Thu)
by Koromix (subscriber, #71455)
[Link]
Posted Feb 13, 2014 11:24 UTC (Thu)
by cesarb (subscriber, #6266)
[Link] (13 responses)
Posted Feb 13, 2014 11:49 UTC (Thu)
by nowster (subscriber, #67)
[Link] (1 responses)
Posted Feb 13, 2014 14:00 UTC (Thu)
by cesarb (subscriber, #6266)
[Link]
(That was back when the latest version of MSIE was 6, and you had to develop for it, MSIE 5, and MSIE 5.5 which somehow was worse than the other two. Back when your site worked only with MSIE because it needed a Windows Media Player ActiveX control, but you still made as much of it as was possible work on Gecko, just so you could get decent JavaScript error messages. These were dark days.)
Posted Feb 13, 2014 12:56 UTC (Thu)
by niner (subscriber, #26151)
[Link] (9 responses)
Posted Feb 13, 2014 13:40 UTC (Thu)
by mbunkus (subscriber, #87248)
[Link] (1 responses)
Posted Feb 13, 2014 13:49 UTC (Thu)
by niner (subscriber, #26151)
[Link]
Posted Feb 13, 2014 14:07 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link] (6 responses)
Posted Feb 13, 2014 17:28 UTC (Thu)
by drag (guest, #31333)
[Link] (5 responses)
Posted Feb 13, 2014 17:50 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link] (4 responses)
Also, splay threads are ridiculous, but I blame GMail for perpetuating that madness.
Posted Feb 20, 2014 15:22 UTC (Thu)
by Max.Hyre (subscriber, #1054)
[Link] (3 responses)
Posted Feb 20, 2014 17:00 UTC (Thu)
by mathstuf (subscriber, #69389)
[Link] (2 responses)
Is there another term for it?
Posted Feb 23, 2014 20:10 UTC (Sun)
by dlang (guest, #313)
[Link] (1 responses)
Posted Feb 23, 2014 20:35 UTC (Sun)
by mathstuf (subscriber, #69389)
[Link]
Posted Feb 13, 2014 13:09 UTC (Thu)
by dodocaptain (guest, #44818)
[Link]
Caused me large amounts of grief when trying to do online auction purchases with home windows users who couldn't read my mail :-(
Posted Feb 14, 2014 19:27 UTC (Fri)
by Fats (guest, #14882)
[Link]
I don't agree, I don't see any reason why a good programmed email client can make this point-and-click easy. It just seems Thunderbird is not able implement it well.
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
bullshit!
It's none of your business what kind of email people want to send to each other. Having signatures only work for text emails is simply bad engineering.
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Enigmail vs Thunderbird vs line-wrapping
Or maybe they did?
PGP/MIME
PGP/MIME
PGP/MIME
PGP/MIME
PHP/MIME
PHP/MIME
I guess even a real PHP/MIME wouldn't make that much difference to PGP/MIME since AFAIK only one or maybe two people ever verified my signatures anyway.
PGP/MIME
PGP/MIME
Email gripes
OK, I’ll bite. Wikipedia has nothing on “splay threads”, and Duckduckgo & Bing only reference your post...
What’s a splay thread?
Splay threads
Splay threads
Splay threads
Splay threads
PGP/MIME
Enigmail vs Thunderbird vs line-wrapping