[openpgp] Overhauling User IDs / Standardizing User Attributes (was: Re: Scoped trust (signatures))

Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> Wed, 27 June 2018 00:42 UTC

Return-Path: <marcus.brinkmann@ruhr-uni-bochum.de>
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 4894F130F04 for <openpgp@ietfa.amsl.com>; Tue, 26 Jun 2018 17:42:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.301
X-Spam-Level:
X-Spam-Status: No, score=-4.301 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ruhr-uni-bochum.de
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 0_0qxHO5Ov9n for <openpgp@ietfa.amsl.com>; Tue, 26 Jun 2018 17:42:28 -0700 (PDT)
Received: from out2.mail.ruhr-uni-bochum.de (out2.mail.ruhr-uni-bochum.de [134.147.42.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0D83D127332 for <openpgp@ietf.org>; Tue, 26 Jun 2018 17:42:27 -0700 (PDT)
Received: from mx2.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by out2.mail.ruhr-uni-bochum.de (Postfix mo-ext) with ESMTP id 41FkdY4ZgKz4x5W for <openpgp@ietf.org>; Wed, 27 Jun 2018 02:42:25 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ruhr-uni-bochum.de; s=mail-2017; t=1530060145; bh=A1MSl7AuACweeMMkXWT3aZrSVw0UF/+YlC8Wt4cPHcg=; h=From:Subject:To:References:Date:In-Reply-To:From; b=fcLZzO/wRbfGQ/Z+S2noYt4RfcuiHC+xbGSZ44xYkorGHQ2O5CfzFCK6IEkO1RkTB KJhzTtxcYi6XOrPdnZ+TffiKaHhkheBvIhGGMK6WnhebKlDLMBx7TE29ySBTm/Wu/E mtjX8B2NAPPBmpqe29ByiwayTU1C3ex04S7AUiec=
Received: from out2.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by mx2.mail.ruhr-uni-bochum.de (Postfix idis) with ESMTP id 41FkdY3x8nz4xSr for <openpgp@ietf.org>; Wed, 27 Jun 2018 02:42:25 +0200 (CEST)
X-Envelope-Sender: <marcus.brinkmann@ruhr-uni-bochum.de>
X-RUB-Notes: Internal origin=134.147.42.227
Received: from mail1.mail.ruhr-uni-bochum.de (mail1.mail.ruhr-uni-bochum.de [134.147.42.227]) by out2.mail.ruhr-uni-bochum.de (Postfix mi-int) with ESMTP id 41FkdY3gqgz4x5W for <openpgp@ietf.org>; Wed, 27 Jun 2018 02:42:25 +0200 (CEST)
Received: from [192.168.142.139] (p4FE3FC17.dip0.t-ipconnect.de [79.227.252.23]) by mail1.mail.ruhr-uni-bochum.de (Postfix) with ESMTPSA id 41FkdX5yvkzyWJ for <openpgp@ietf.org>; Wed, 27 Jun 2018 02:42:24 +0200 (CEST)
From: Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
To: openpgp@ietf.org
References: <39e598e1-2bc0-32c9-3489-4bb6ca2a631b@leo.gaspard.ninja> <871sdw24yd.wl-neal@walfield.org> <c2e6bbe7-0694-8193-bb76-dd50fde7d967@leo.gaspard.ninja> <d28d8f8b-b261-eb29-97bc-9c7159a62ce6@leo.gaspard.ninja> <118e5b9d-de9e-aa14-d8b4-19ef259f3d0a@ruhr-uni-bochum.de> <e63924fe-95b2-dcf8-5726-b0497945ac74@leo.gaspard.ninja>
Openpgp: preference=signencrypt
Message-ID: <f31349e2-e509-4e06-6db5-2ff0ffb213a5@ruhr-uni-bochum.de>
Date: Wed, 27 Jun 2018 02:42:24 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
MIME-Version: 1.0
In-Reply-To: <e63924fe-95b2-dcf8-5726-b0497945ac74@leo.gaspard.ninja>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.99.4 at mail1.mail.ruhr-uni-bochum.de
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/openpgp/qAbVjQkhy2lmnJMknvf3Hq5A0xA>
Subject: [openpgp] Overhauling User IDs / Standardizing User Attributes (was: Re: Scoped trust (signatures))
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.26
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: Wed, 27 Jun 2018 00:42:32 -0000

On 06/27/2018 01:28 AM, Leo Gaspard wrote:
> On 06/26/2018 10:45 PM, Marcus Brinkmann wrote:
>> I think the problem you are facing is Zooko's triangle: Decentralised,
>> meaningful names for keys can not be secure.
> 
> Indeed, this is similar to what I am thinking. But Zooko's triangle is
> only for “decentralized” names, and what I see in all implementations
> that I know of is that the end-user “validates” a particular (sub)set of
> the names the key claims it has, and then uses these names. (similar to
> handles defined in XEP-0165)

If the use is purely local, you don't need OpenPGP at all, just store a
local label to name the key. That's what NeoPG will do and Sequoia wants
to do that, too, AFAIK.

The only reason to create (exportable) signatures is to convince
thirdparties of the binding, either by authority (centralized+secure,
CA-style) or by introduction (decentralized+insecure, web of trust).

OpenPGP (standard and implementations) has the concept of a local,
non-exportable signature. As far as I am concerned, that's just a leaky
abstraction due to historic implementation details being exposed, just
as with Trust Packets: Non-exportable signatures are by definition
local, and trust packets are local by a SHOULD rule (and in fact wholly
implementation defined).

> Also, I am not trying to solve Zooko's triangle, only to decouple
> elements that are currently tightly interwoven without any reasonable
> standard in the User ID field (hello @users.noreply.github.com, hello
> roles in comments, etc.)

There is value in standardization of user id field values, but I am not
sure that OpenPGP is the place for that. Not only has that ship sailed,
it is also mostly useful if embedded in a larger policy framework, as
you have suggested from the beginning.

>> The PGP (implementation)
>> answer to this is the web of trust, but that is pretty much out of scope
>> for OpenPGP (the standard).  This is also apparent from your description
>> by the introduction of external policies ("when I want to sign X, I need
>> to check Y"), that are also out of scope for OpenPGP.  This might
>> explain the lack of response here.
>>
>> Once you are adding additional policies, you can create additional
>> restrictions for user id fields, or introduce additional (private use?)
>> user attributes ad lib, and those will be the least of your worries.
> 
> Hmm… I think rfc4880bis§5.2, and in particular signature type 0x13 for
> instance, do imply that “The issuer of this certification has done
> substantial verification of the claim of identity.”?

Doesn't mean anything. In fact, in the same section the standard says:

  "Please note that the vagueness of these meanings is not a flaw, but a
   feature of the system.  Because OpenPGP places final authority for
   validity upon the receiver of a signature, it may be that one
   signer's casual act might be more rigorous than some other
   authority's positive act."

> And thus the standard doesn't currently address the “I want to sign an
> email address but not the name associated to it, because I haven't
> checked the name” use case, unless the one who generated the key (not
> the one who wants to sign) did generate orthogonal User IDs.

You can just create your own user ids and bind them to the key. Don't
laugh! See https://bitbucket.org/skskeyserver/sks-keyserver/issues/41

I am not suggesting that you should do this, or that it is or should be
meaningful. Just pointing out that the standard is incomplete in many
more ways than you might think.

> And actually rfc4880bis even mentions “By convention, it includes an RFC
> 2822 [RFC2822] mail name-addr” (even if not enforcing it), thus
> encouraging non-orthogonal User IDs.

Doesn't mean anything. Here is a key with a key in the user id:
97E4CFC94B1D6212

> The point in these proposed fields, in my opinion, is that if User IDs
> are removed from v5 keys altogether (if they aren't then there is no
> point in doing it indeed), then there will be an enforced separation

enforced by whom? according to which rules?

> of
> different parts of the (current) User ID into separate fields.
> 
> As for these fields becoming free form, I do hope that it wouldn't
> happen:

Here is a decentralised file storage based on OpenPGP user ids and
public keyserver networks;

https://github.com/yakamok/keyserver-fs

This is using uids, but if you remove them, hacks like this will move on
to other available fields.

> for the image attribute (the only one standardized afaik), I
> haven't heard (yet?) of people using it for storing anything else than
> an image. And with fields like:
>  * name
>  * pseudonym
>  * email
>  * role
>  * free form UTF-8 tag=value
> Then, contrarily to what currently happens with User IDs, I don't think
> the first four fields would really be misused: what's the point? there'd
> be a free form tag=value attribute type.

"What's the point?" isn't the question. Either you can enforce something
or you can't. If you can't, then you can't rely on it, and then the
value of the rule will be severly diminished.

The 4.5 million or so keys on the SKS keyservers are public, you can
download them and investigate yourself what the consistency of the
existing dataset is.  I haven't looked at photo ids yet in detail, so
those might look favorable, but that's probably just because there is
low-hanging fruit.

Just to give you an example: A local non-profit created hundreds of keys
and added signatures to the gpg maintainer's key to wish him a merry
christmas:
http://a.keyserver.pki.scientia.net/pks/lookup?op=vindex&search=0xF2AD85AC1E42B367
(scroll down)

> And this would already be enough to split the User ID tag into
> orthogonal parts that could be signed independently, depending on the
> signer's policy. And even type “free form tag=value” brings much more
> display-ability than private-use types 100-110 that cannot be assumed to
> have any type.
> 
> However, I do agree it'd be quite some maintenance burden, hence my hope
> to get some feedback from an implementer. But I think it's necessary for
> users and applications to behave consistently, and not mutilate the User
> ID field just because it is the only one that is sanely rendered :)

For NeoPG, I'd simply use an URI scheme in the user id field, if I felt
that it should be exported.

Thanks,
Marcus