RE: UUID version 6 proposal, initial feedback

"Rob Wilton (rwilton)" <rwilton@cisco.com> Tue, 04 February 2020 11:36 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C06CA120108 for <ietf@ietfa.amsl.com>; Tue, 4 Feb 2020 03:36:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 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_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=WC7oGBw8; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=FzmESUqz
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 Z3M1OU9q1di7 for <ietf@ietfa.amsl.com>; Tue, 4 Feb 2020 03:36:53 -0800 (PST)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6CE8E120144 for <ietf@ietf.org>; Tue, 4 Feb 2020 03:36:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7042; q=dns/txt; s=iport; t=1580816213; x=1582025813; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=QJ9SUICMz7gX6UAc4bxxN3woPcTO5LX8Wedy3819qgM=; b=WC7oGBw8J9s3uR5wXvNwBcN9B7KOHGbt25Ggo1JTcylkoYxUTwP68Ov2 47lRbK02/HV4pA5ydBKOuJmG0iJXo+7yAJWkMOIr4SjdQa/M6Ex3nahFk byPOaCXzq4zx6WjToeX6drEWm22tx4AR15/W9mGTG0HEzFi3gof0YtjXy U=;
IronPort-PHdr: 9a23:C8DT0BdVmVKMt5lUOgF7jv5ilGMj4e+mNxMJ6pchl7NFe7ii+JKnJkHE+PFxlwGRD57D5adCjOzb++D7VGoM7IzJkUhKcYcEFnpnwd4TgxRmBceEDUPhK/u/dTM7GNhFUndu/mqwNg5eH8OtL1A=
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AlCAA4Vjle/5FdJa1lHQEBAQkBEQUFAYF7gVQkLAVsWCAECyoKhAqDRgOKeoJfmA+CUgNUCQEBAQwBASMKAgEBgUyCdAIXgiAkOBMCAw0BAQQBAQECAQUEbYU3DIVmAQEBAQIBEhERDAEBKQ4BBAcEAgEIEQQBAQMCJgICAjAVCAgCBA4FCBqDBYJKAw4gAQIBC6EtAoE5iGJ1gTKCfwEBBYEvAYN0GIIMAwaBDiqMIhqBQT+BEUeBTn4+gmQCAoE6K4MOMoIskFefEAqCO4dJjxWCSJN6hEaLAIUshxySMwIEAgQFAg4BAQWBaSJEgRRwFTuCbBM9GA2OHQkDF4NQilN0gSmKfYEzAYEPAQE
X-IronPort-AV: E=Sophos;i="5.70,401,1574121600"; d="scan'208";a="432296029"
Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 04 Feb 2020 11:36:52 +0000
Received: from XCH-RCD-007.cisco.com (xch-rcd-007.cisco.com [173.37.102.17]) by rcdn-core-9.cisco.com (8.15.2/8.15.2) with ESMTPS id 014Baq2Z006271 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 4 Feb 2020 11:36:52 GMT
Received: from xhs-aln-003.cisco.com (173.37.135.120) by XCH-RCD-007.cisco.com (173.37.102.17) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 4 Feb 2020 05:36:51 -0600
Received: from xhs-aln-001.cisco.com (173.37.135.118) by xhs-aln-003.cisco.com (173.37.135.120) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 4 Feb 2020 05:36:51 -0600
Received: from NAM11-DM6-obe.outbound.protection.outlook.com (173.37.151.57) by xhs-aln-001.cisco.com (173.37.135.118) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 4 Feb 2020 05:36:51 -0600
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XuzjCi0ECFcKr0uTdjTiPpRA4rd4+rqvK+CUT6ozHz8PIVfMe0AnryDhtuLy6tSMOCNCj6pwKn1hx08cKTs6jP0nV3gA7d5mP79BkAzBg+JiaJE7WsGFAq0C8EzMYWvm0wlq4sO3X7/JNuNn2f/+Ko2ynNKnl/dcgOZ4ftXC0Hdt5kL5eyIYqplN8FabNLFLFNAYEXB8DFqn3UU00p2eoLUWLeAJH6RqX0E7Qmo5fRMLgsRr/r43mynpU5+fFQ1IUvBAkzPvEylXgH1q10lO29U4r1exnF0DNN9fG8LXKW5VfHrchN6uwIISZXrLWnfqRknZ0QPI7AzVWqPadgAD0Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QJ9SUICMz7gX6UAc4bxxN3woPcTO5LX8Wedy3819qgM=; b=AE+1lnPLpGAHbYd8s/VIPjk689UHMbmC0d4dq7vF14vMgvMG+wv276CeUspBzO3EFa1tnEQsLkDObhVLieV5rPdx5zPa8hEbke3fdGfdYlk+yRlf6Zi3F0gSadu7Hf9J2fV8Fmbxm6I9hW4LjrEhtIhwMpylxnXYgKNVm5t1+WOA0qNSFrVHLk5kOZW/JcHNia61XYe7XeauwXqmZtPeAJTasAWQbfcbUyf371XKBAhtbDcA4fEmyFAkeGLi5G5+nJGshwFhnYLD1j6bMsKQgXYrPe2RBmkRoA8XvK2AO3SaTsedlb9eqXYXsxdXHUFK+4vPGYhxK/CM0cRd8TqWUg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QJ9SUICMz7gX6UAc4bxxN3woPcTO5LX8Wedy3819qgM=; b=FzmESUqzMEJOlK6rVPhw/sYTMwg7j6HGIJ/Dr8LPHbzx7ZB6l3a3qMVowhD1GAmsedclMK6UmiQr9CLlZ3MVl35tuYnjiyfvIrF1jMQLtiQGGjNZEshYAbKagv1tdHu1Gag2kyLq7cc87jEu3gYnoBouwuTFAPxo3k4QhAwoAMM=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (52.135.38.209) by MN2PR11MB3791.namprd11.prod.outlook.com (20.178.254.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2686.32; Tue, 4 Feb 2020 11:36:50 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::b9ce:1058:5fa6:44a1]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::b9ce:1058:5fa6:44a1%7]) with mapi id 15.20.2686.031; Tue, 4 Feb 2020 11:36:50 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Brad Peabody <bradgareth@gmail.com>
CC: IETF discussion list <ietf@ietf.org>, "Theodore Y. Ts'o" <tytso@mit.edu>
Subject: RE: UUID version 6 proposal, initial feedback
Thread-Topic: UUID version 6 proposal, initial feedback
Thread-Index: AQHV2HhquYR4sBYvEUmOq4hs2uJXCagFTneAgAAGGwCAAIZGgIAA1+4AgAAphICAA/faAIAADa4A
Date: Tue, 04 Feb 2020 11:36:49 +0000
Message-ID: <MN2PR11MB4366243F3EFEDB637AADFA35B5030@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <D0894516-3F20-4545-BD7D-BE4FA96FAF75@gmail.com> <CABkgnnXSxqqinyK4QiwVv-VuzAraHFUGCrm0K0e9dJX_F80bWg@mail.gmail.com> <D3517A2C-1FCC-42D2-9AB6-248680BE89E1@gmail.com> <c5ba6f5d-7c61-bfdf-63e6-be7d640ee50c@gmail.com> <6E165220-7D1F-4AD8-B4F3-DDCB8F1DA6E2@akamai.com> <b4b73e11-7e21-03ae-0ebf-badcc2bf9d7e@gmail.com> <20200201060733.GD454818@mit.edu> <75dff0d7-3e2b-8f2a-c8b1-46d27004cce3@gmail.com> <20200201212859.GB528198@mit.edu> <62568ffb-8e95-f331-7790-3ff0f496de87@gmail.com>
In-Reply-To: <62568ffb-8e95-f331-7790-3ff0f496de87@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rwilton@cisco.com;
x-originating-ip: [82.15.79.32]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 582f1ea4-35d2-4c77-413d-08d7a9668651
x-ms-traffictypediagnostic: MN2PR11MB3791:
x-microsoft-antispam-prvs: <MN2PR11MB3791780E0A3DC603DEE3DDF6B5030@MN2PR11MB3791.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 03030B9493
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(396003)(39860400002)(366004)(136003)(346002)(189003)(199004)(966005)(6916009)(478600001)(53546011)(6506007)(26005)(81166006)(81156014)(8936002)(8676002)(71200400001)(55016002)(9686003)(33656002)(4326008)(2906002)(86362001)(52536014)(66446008)(66476007)(66946007)(54906003)(316002)(64756008)(66556008)(186003)(7696005)(76116006)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB3791; H:MN2PR11MB4366.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: v11GiP8rO+Xkxwp2AccTAFuEVY5T+5m8CkKoBJoHZ0r9bCvfcdUtoZLJXZalt/UftPANRlZamWZqY9Tf6NRkTApHcdpjbmhyRH4jKHKmoa4Gcf4SCJiwkL/LlOLAkOov8z+HaziicOold3RSZ5yukWq4TInk7ioA+TSxznRBdAhIULklj2j2XS9FpU+4w1bnEQ97lMRjY9b73MhIWmSFqrPEYvEK/PCca6QEa9qGQAofStLJ4ujXeii5HwtsidJE9wStwQWi0EBhzdDofSAVHh7KeVZ0ZsOQvS4Hz4keFJdcFMjXM9rQJTTgH9aIUtaNtTpDjI7frYvDTDWl8jdoL/ojsub3fWm6LEvUGnSOQBREjMXRtLQvtFGrM6QNyzptsp+3oA3BWVXn4J7goY86MHsYG2Fy0h89wCM9M/HjqleGNJiH9I94IHFhXzaJ3gw5hyY3W/J9WQ+ckp5RItRKvEIGKTn67arjwyXdwu/Ach3/5GZRxqBCA5pKb8ICnycDIClv55+te8Dk4mWCFyfBGQ==
x-ms-exchange-antispam-messagedata: /ElV/OIij8/xklOxwIWwTMM3zdVMmKbToMo52SxeE+nrklV2prtvZi7DuUYuxQstQIEunPcscAd0CdLJkiFxJbiNOWnf/u+sjfsmVDS1j3CgolsekaRcJdc92ZzrYzbOcf8YknBxab/gvjdySSZgkQ==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 582f1ea4-35d2-4c77-413d-08d7a9668651
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2020 11:36:49.9366 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: aLSWuE7kJrY/ljoELQcuEdBvqXFBqkeaG2uI0c8Gp4eSmkDbu2EYvljEm7BTjaapdDzGajX4i9AAQPP5H9Wzjw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3791
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.17, xch-rcd-007.cisco.com
X-Outbound-Node: rcdn-core-9.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/jQq50YVWdD7TNvwCAwsuQNavUTA>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Feb 2020 11:36:56 -0000

Hi Brad,

I'm no expert on UUID's but some thoughts (as an individual contributor):

What you describe does sound to me like it could be a new form of UUID (if limited to a 128 bit format), and it could potentially also be useful.  E.g. a 128 bit UUID that has good database locality properties and minimizes the leakage of private information sounds useful if it can be reasonably specified and implemented.

I also note that RFC 4122 is 15 years old, and as Martin previously indicated there are security and privacy considerations that have evolved over time, hence updating RFC 4122 to make readers aware of those considerations also seems like it could potentially be useful.

Writing this up as a draft sounds like a good next step to see if there is enough wider interest.

Regards,
Rob


-----Original Message-----
From: ietf <ietf-bounces@ietf.org> On Behalf Of Brad Peabody
Sent: 04 February 2020 10:05
To: Theodore Y. Ts'o <tytso@mit.edu>
Cc: IETF discussion list <ietf@ietf.org>
Subject: Re: UUID version 6 proposal, initial feedback


> For very specialized use cases (e.g., where 16 binary bytes is too 
> long), I'm not sure it makes sense to create a fully general 
> specification which is so abstract that it becomes hard to use, since 
> you have to customize it for a particular application.
>
> Past a certain point, you might as well say that you want to 
> standardize "b-trees" --- and that's something which belongs in an 
> algorithms book, and not an I-D or an RFC.
>
In practical terms, the issue I'm concerned about is that there are various points where software from different projects needs to communicate UUIDs to each other and so it turns from a general thing into something very specific. In this link I mentioned earlier
https://github.com/uuidjs/uuid/issues/303#issuecomment-575992079 it's all about how UUIDs work with Postgres as primary keys.

The text encoding is particularly relevant, since hexes with dashes is not a particularly practical format (too long) for a many use cases.  So if you have a column in a database of type 'UUID' (or some other similar ID type) and then issue an update statement - there needs to be known text format and it would be great if it were more compact.   And if it were standardized then eventually various databases would implement it. The sorting is also a thing - see below.

But I do get what you mean on shorter IDs with less uniqueness guarantee
- a spec isn't need to just generate a random opaque string that you're just going to have to check a database for to ensure you don't have a duplicate.

> Again, I'd urge you to consider that you should build on *top* of the 
> standard UUID spec, since there are already implementations that will 
> do the right thing as far as time-based and random-based UUID's (the 
> latter will provide all the unguessability you need) and then just 
> create a library which *transforms* the UUID into a convenient 
> encoding form that makes it be convenient for key-indexing, or a more 
> compact text encoding, etc.
>
> There are already very good implementations for UUID generation, and 
> if you create something which re-invents the wheel at a spec level, it 
> will cause people to reinvent the wheel (possibly badly) at the 
> implementation level.

I think a part of the issue here is that since there is an existing UUID spec people then try to use it for things like database keys, and then run into these various rough edges:

- hex text format too long

- sorting is extra work for no benefit, having the raw bytes sort naturally in time sequence (for UUIDs with a timestamp) would seem to be a better way

- there is no official form of UUID that has a timestamp and then random data - the spec says to use the MAC address of the machine (version 1) which can be a security issue; and version 4 is not time-ordered.

So that's more info on the motivation and, at least from my perspective, the practical concerns that are driving this.

It would certainly be less of a change to just propose an update to the UUID spec that puts the date in a sequence that sorts as raw bytes and says feel free to use random data from a properly seeded CSPRNG instead of a MAC address if you're willing to have X collision probability in exchange for not having your MAC address there.  And also says btw hex encoding is big, so feel free also to use base32 or base64 according to what you want for your app. It would be great if these things had good names too so that when someone goes to implement this in a new database column type they can be referred to with sane names that match the spec.  Those points might be all it would take. And that was more or less my original intention with coming up with the original "UUID version 6" concept.

At the end of the day I guess the main driving use case is as a database primary key (and then also being able to easily use that PK in the same human readable form in things like URLs or written in documents), but the above sillyness ("rough edges") make this difficult with the current specification.