Inline-encryption, encryption failure when storing sent mails

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Aug 20 10:03:27 PDT 2013


On 08/16/2013 04:02 AM, David Bremner wrote:
> Simon Hirscher <public at simonhirscher.de> writes:
> 
>> 1. Support for inline-encryption As far as I can see, so far only
>> encrypted mails with PGP/MIME are supported. Couldn't notmuch also
>> support text/plain messages that contain PGP-encrypted messages by
>> scanning for "^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"? – as suggested in
>> a previous message to this mailing list
>> (id:87zl3az8mm.fsf at lillypad.riseup.net; web view:
> 
> If someone feels inspired to work on this, maybe 
> 
>    notmuch-wash-convert-inline-patch-to-part
> 
> (in notmuch-watch.el) might be a reasonable place to start.

if anyone does feel inclined to work on this, please consider that
dealing cleanly an inline-signed message has a number of serious
problems, not least of which is the Content-Type.

I've been meaning to write this up more cleanly, but a summary here will
have to do for now:

The MIME Content-Type header for an inline-PGP-signed e-mail message is
not signed.  This means that an attacker can replay a signed message
while undetectably changing the Content-Type.  One example of such an
attack is to leave the base Content-Type as text/plain but to switch
charsets -- the same bytestream can then be interpreted differently.

For example, depending on the charset, the same bytestream can be
represented as:

 The rental is €13/week for unit 7.

[charset=big5]

or:

 The rental is £ב13/week for unit 7.

[charset=iso-8859-8]

since 1GBP = 1.17EUR, this represents a change of 17% in the value of
the signed message while retaining the signature's validity :P

Given that you don't have cryptographically-reliable Content-Type
information, will you be comfortable indicating that the message is
actually signed?

Also, inline-signed messages may not span the entire part.  That is, a
message could have a bit of unsigned text above or below the
inline-signature.  The current user-facing UI in notmuch-emacs indicates
whether each part is individually signed or not.  How would
notmuch-emacs indicate reliably to the user that only a portion of the
part is signed?

In short: inline PGP is a mess, and existing implementations which try
to cope with it have severe shortcomings.  I'd rather avoid introducing
new types of failure to notmuch.

	--dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1027 bytes
Desc: OpenPGP digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20130820/e3e4011a/attachment.pgp>


More information about the notmuch mailing list