Re: UUID version 6 proposal, initial feedback

Martin Thomson <martin.thomson@gmail.com> Wed, 04 July 2018 02:11 UTC

Return-Path: <martin.thomson@gmail.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 ED1DD130EAC for <ietf@ietfa.amsl.com>; Tue, 3 Jul 2018 19:11:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 eT-JJffc9eAZ for <ietf@ietfa.amsl.com>; Tue, 3 Jul 2018 19:11:23 -0700 (PDT)
Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2B1BD130934 for <ietf@ietf.org>; Tue, 3 Jul 2018 19:11:23 -0700 (PDT)
Received: by mail-oi0-x235.google.com with SMTP id s198-v6so7719135oih.11 for <ietf@ietf.org>; Tue, 03 Jul 2018 19:11:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=tJNBW6/zM8G6tBfB7V18sex2SkeKzfFb4gw2yPa21FM=; b=T/GnkdoJztePJihiwGJz3Zbzu26WrhPF4m0+Z3KZTR53V7sE9+pZxVmqCmJe8bhKkl gO5SrD6/Txcx1QBHnqb4OXgzwsB4tYH+yRfWCupSmTpDLULzXEK3hPEz/E8oeojpa76B vSTLCLAM19i9huoEyJqME6JddFz7jyq0cSkWihziwUICMkcK/5NwwCoIZvSpGE4XQV+5 KTfj3enDwxIrguRhFobKWxYzj0hBioFAZ9VJGyH/T5m5VdGcsz8/guaw+cENm1zrfj0B yHcFaNAGL33BNtkkfOlunlZAxruHSvVRXL926DbNVOqNkq1wFS2rk8c7Hi/bIblN9SFr DsLQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=tJNBW6/zM8G6tBfB7V18sex2SkeKzfFb4gw2yPa21FM=; b=ugKUQfBlrPpK5Yy8uf4UNSaBzZx5OsjSRuwETcdG9x386Vfhb37N/HRQDmTcPyZrIy bjB745lkRK6YvL1KSYDCys4wr1hW40pgHqei62a3rV+WQ2u09CYLJNtSNUKYFN31Xp5h 6i9f/sydMoe4PlZDNa+fUmWdmbJZjCCJptgRNp/RBPwvhgle251HlCSdJjUOsJdZBtij oNw6LQ2sAI5sYuBBhAfpDfsjZTfuYS7xJqSDckO06tds7sEAHpdzQOrWut18a46A+hTb RE8mqJg588cXWclGtADrDQ0OdFDN0ut0Gb9QpkFNNtipUtPkTMa6SLs0UNVrL8KJ0kzr ex9A==
X-Gm-Message-State: APt69E1/jMQMkF2DgCaCUVa6yUMcYB2ZfpTIllWpOmOpKuGE98Pvcho7 3NI2K8gtO34Cvq5iBth3V6N6ZZrrDqpfOC/llBg=
X-Google-Smtp-Source: AAOMgpfc6qK3bIpB6lC8L/byXqgP8NB6/EkHPN8hdoJuCMoRBQS2rTrw7ZYwhH4deMQtrVUDM1/+d1hjrkeF/SdBw+c=
X-Received: by 2002:aca:745:: with SMTP id 66-v6mr108249oih.295.1530670282354; Tue, 03 Jul 2018 19:11:22 -0700 (PDT)
MIME-Version: 1.0
References: <D0894516-3F20-4545-BD7D-BE4FA96FAF75@gmail.com>
In-Reply-To: <D0894516-3F20-4545-BD7D-BE4FA96FAF75@gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Wed, 04 Jul 2018 12:11:11 +1000
Message-ID: <CABkgnnXSxqqinyK4QiwVv-VuzAraHFUGCrm0K0e9dJX_F80bWg@mail.gmail.com>
Subject: Re: UUID version 6 proposal, initial feedback
To: bradgareth@gmail.com
Cc: IETF discussion list <ietf@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ietf/byPH5YTMxh7BMDv8nzf5KxVKtl4>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.26
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: Wed, 04 Jul 2018 02:11:25 -0000

Nice presentation.

I've always been skeptical of the value of UUIDs.  It's very easy to
make a unique string.  Formatting it in a particular way, however,
serves no real purpose and it might not be necessary for your use
case.

UUIDs (aside from v4) also have some nasty properties.  For instance,
revealing a MAC address is now considered problematic.  As is exposing
the output of a clock, which has been used in interesting ways to
undermine privacy (clock skew can be used for de-anonymisation, even
for determining CPU load).  Counters and timers also allow an observer
to correlate the creation of different identifiers.

Why not make a string with the properties you desire?  You might need
more than 120 bits to achieve all that, but that's just another reason
not to use UUIDs.  A library that provided these functions (maybe
while addressing the above concerns), would be a valuable addition.
On Wed, Jul 4, 2018 at 10:42 AM Brad Peabody <bradgareth@gmail.com> wrote:
>
> I would like to get some initial feedback, and suggested next steps, on the idea of making an RFC that covers a version 6 for UUIDs.  It would have an embedded timestamp and sorting by its raw bytes results in a sequence equivalent to sorting by time.  This is not addressed by existing UUID types.  (The closest one is version 1, but due to the byte encoding it does not sort correctly.)
>
> There is also seems to be some ambiguity in the existing RFC on when to increment the counter field which I think can be clarified.
>
> I did a prototype implementation and basic write-up on the details here: https://bradleypeabody.github.io/uuidv6/
>
> I’m also thinking of covering the base64 encoding form which retains the sorting properties but makes it human readable and is significantly shorter than the long hex encoded form.
>
> Having these things is very useful when considering UUIDs as database primary keys, which is becoming more and more common in distributed systems; and indeed this is the main motivation.
>
> Any help or advice on moving forward with this would be appreciated.
>
> - Brad
>