Re: [openpgp] Encrypting / Signing the mail subject?

Daniel Kahn Gillmor <dkg@fifthhorseman.net> Sun, 22 March 2015 21:47 UTC

Return-Path: <dkg@fifthhorseman.net>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B7E321A1C06 for <openpgp@ietfa.amsl.com>; Sun, 22 Mar 2015 14:47:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.6
X-Spam-Level:
X-Spam-Status: No, score=-1.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, MIME_8BIT_HEADER=0.3] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H8Ffahmyf9IH for <openpgp@ietfa.amsl.com>; Sun, 22 Mar 2015 14:47:51 -0700 (PDT)
Received: from che.mayfirst.org (che.mayfirst.org [209.234.253.108]) by ietfa.amsl.com (Postfix) with ESMTP id F35091A1C05 for <openpgp@ietf.org>; Sun, 22 Mar 2015 14:47:50 -0700 (PDT)
Received: from fifthhorseman.net (unknown [199.227.110.154]) by che.mayfirst.org (Postfix) with ESMTPSA id C57B4F984; Sun, 22 Mar 2015 17:47:47 -0400 (EDT)
Received: by fifthhorseman.net (Postfix, from userid 1000) id 2B8E6207C0; Sun, 22 Mar 2015 16:47:46 -0500 (CDT)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Albrecht Dreß <albrecht.dress@arcor.de>
In-Reply-To: <U0SX7b3hTvORz2AcaJxzNi@FNLm+CB1AHizdX5MmxDFI>
References: <U0SX7b3hTvORz2AcaJxzNi@FNLm+CB1AHizdX5MmxDFI>
User-Agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)
Date: Sun, 22 Mar 2015 16:47:45 -0500
Message-ID: <87h9tcd7r2.fsf@alice.fifthhorseman.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/8dzFFOtZ3qKg0WicMnJiSY6ey_4>
Cc: gnupg-devel@gnupg.org, IETF OpenPGP <openpgp@ietf.org>, Hanno Böck <hanno@hboeck.de>
Subject: Re: [openpgp] Encrypting / Signing the mail subject?
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Mar 2015 21:47:52 -0000

Hi Albrecht--

On Sun 2015-03-22 11:56:42 -0500, Albrecht Dreß wrote:
> Am 17.03.15 00:28 schrieb(en) Daniel Kahn Gillmor:
>> Are you thinking of having this line in the embedded header or in the
>> external header?
>
> Only in the embedded, signed headers block.
 [...]
>> As for the embedded header, i'm not sure it's useful there either.
>> it seems like a bit of a chicken-and-egg problem.
>
> Hmmm, yes, thinking again about it, you're right.  The only use of
> that header would be informing the recipient of a message about the
> purpose of this part if the MUA does not perform any further action
> with it (see the attached screen shot as example).

Hm, if the goal is human-friendliness, then we probably want to think
about how to be even friendlier -- english text plus a URL to an
en_US-only webpage isn't very nice to the majority of the world either
:P
>> i think the list of encrypted headers might arguably be *all* of the
>> headers except for some dummy block that is generated per-message.
>
> What do you mean with "some dummy block"?

the "dummy block" is the headers that get wrapped around the outside of
the message.

Alexey Melnikov just pointed me to this draft:

  https://tools.ietf.org/html/draft-melnikov-smime-header-signing-00

which has a similar mechanism (and is designed for S/MIME), and it
refers to the same idea as a "stub value"

  https://tools.ietf.org/html/draft-melnikov-smime-header-signing-00#section-3

> BTW, the Message-Id header may also leak information if uses the
> recommended form of RFC 5322, sect 3.6.4 (domain or FQDN as right-hand
> side).  The 'dot-atom-text - "@" - dot-atom-text' format with random
> data on both sides (which is also explicitly allowed) should be
> preferred IMHO, as long as it is guaranteed to be unique.

good point!

>>> I think this should read: "if the text/rfc822-headers part is
>>> * the first part of a multipart/mixed, which in turn is the first part of the top-level multipart/signed or application/pkcs7-mime, or
>>> * the first part of the top-level decrypted multipart/mixed for unsigned, but encrypted messages."
>> 
>> That seems more narrowly scoped, which is probably a good thing, but
>> it might be more brittle too; are there specific cases that you're
>> trying to carve out from my broader suggestion?
>
> I think your definition would try to match the text/rfc822-headers
> part to the message headers in the following weird case:
>
> multipart/signed
>   +- multipart/mixed   <-- message #1 does *not* contain protected headers
>   |   +- text/pain
>   |   +- message/rfc822   <-- forwarded message #2 *with* protected headers
>   |       +- multipart/signed
>   |           +- multipart/mixed
>   |           |   +- text/rfc822-headers   <-- protected headers of forwarded message #2
>   |           |   +- text/plain
>   |           +- application/pgp-signature
>   +- application/pgp-signature
>
> Here, text/rfc822-headers *is* the first non-multipart part within a
> multipart/signed, but it doesn't belong to the (top-level) message #1,
> so it's wrong to compare them.  I think, my definition would catch
> this case.

You're right.  I think this distinction is useful.

PS i love the content type "text/pain" -- can we register that one officially,
please? ;)

Melnikov's draft proposes a content-type parameter "forwarded" to be
used on the message/rfc822 element, to distinguish these cases.  I
haven't thought through the consequences of the way this his draft sets
it up, though -- it seems possible to misinterpret the lack of a header
from a non-compatible sender forwarding a message.

        --dkg