Re: [openpgp] Signer's User ID

Daniel Kahn Gillmor <dkg@fifthhorseman.net> Tue, 20 September 2016 21:56 UTC

Return-Path: <dkg@fifthhorseman.net>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3522E12B9FB for <openpgp@ietfa.amsl.com>; Tue, 20 Sep 2016 14:56:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=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 SMnCD4HCqyBA for <openpgp@ietfa.amsl.com>; Tue, 20 Sep 2016 14:56:48 -0700 (PDT)
Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by ietfa.amsl.com (Postfix) with ESMTP id D2A7B12B9FE for <openpgp@ietf.org>; Tue, 20 Sep 2016 14:56:46 -0700 (PDT)
Received: from fifthhorseman.net (unknown [38.109.115.130]) by che.mayfirst.org (Postfix) with ESMTPSA id AD04BF999; Tue, 20 Sep 2016 17:56:44 -0400 (EDT)
Received: by fifthhorseman.net (Postfix, from userid 1000) id BF23E20140; Tue, 20 Sep 2016 16:39:08 -0400 (EDT)
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: "Neal H. Walfield" <neal@walfield.org>, IETF OpenPGP <openpgp@ietf.org>
In-Reply-To: <87mvj9mrs9.wl-neal@walfield.org>
References: <87mvj9mrs9.wl-neal@walfield.org>
Date: Tue, 20 Sep 2016 16:39:08 -0400
Message-ID: <87fuouux03.fsf@alice.fifthhorseman.net>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/kUcZhrxm4c3hxgzFDMaxsRaqbek>
Subject: Re: [openpgp] Signer's User ID
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.17
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: <https://mailarchive.ietf.org/arch/browse/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: Tue, 20 Sep 2016 21:56:50 -0000

On Thu 2016-09-15 05:33:10 -0400, Neal H. Walfield wrote:
> RFC 4880 says:
>
>   5.2.3.22.  Signer's User ID
>
>    (String)
>
>    This subpacket allows a keyholder to state which User ID is
>    responsible for the signing.  Many keyholders use a single key for
>    different purposes, such as business communications as well as
>    personal communications.  This subpacket allows such a keyholder to
>    state which of their roles is making a signature.
>
>    This subpacket is not appropriate to use to refer to a User Attribute
>    packet.
>
> In GnuPG, we use the user id's email address.  Thus, if a key has the
> user id "Neal H. Walfield" <neal@walfield.org>;, and the user runs:
>
>   echo data to sign | gpg --default-key neal@walfield.org -s
>
> or
>
>   echo data to sign | gpg --default-key 'Neal H. Walfield' -s
>
> Then, in both cases we include this subpacket in the signature packet
> with the string "neal@walfield.org";.
>
>
> Note: we use data for locating the key via DANE or WKS as well as in
> our TOFU implementation to identify the intended binding.
>
>
> Since, IMO, the spec is unclear about the contents of this field and
> Werner pointed out that another implementation could reasonably use
> the hash of the user id here, I think it makes sense to clarify
> exactly what is expected to increase interoperability.  My proposal to
> standardize GnuPG's behavior is:
>
>   5.2.3.22.  Signer's User ID
>
>    (String)
>
>    This subpacket allows a keyholder to state which User ID is
>    responsible for the signing.  Many keyholders use a single key for
>    different purposes, such as business communications as well as
>    personal communications.  This subpacket allows such a keyholder to
> *  state which of their roles is making a signature.  The value of
> *  this subpacket is a byte-for-byte copy of the RFC 2822 mail name-addr
> *  portion of the User ID.
>
>    This subpacket is not appropriate to use to refer to a User Attribute
>    packet.


fwiw, i've always assumed this was a byte-for-byte match of the signing
User ID itself, UTF-8-encoded just like the User ID.  Making this a
specific transformation of the User ID seems like an extra complication,
without much gain, no?

Tools that do DANE or WKS or other lookups can do whatever
transformation they need independently of what's stored in this
subpacket.  Why require a new transformation in the OpenPGP spec itself?

        --dkg