Compact, Grammar-Friendly Representations for UUIDs
draft-taylor-uuid-ncname-00

Document Type Active Internet-Draft (individual)
Author Dorian Taylor 
Last updated 2020-07-26
Stream (None)
Intended RFC status (None)
Formats plain text html xml pdf htmlized (tools) htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                          D. Taylor
Internet-Draft                                               Independent
Updates: RFC4122 (if approved)                              26 July 2020
Intended status: Informational                                          
Expires: 27 January 2021

          Compact, Grammar-Friendly Representations for UUIDs
                      draft-taylor-uuid-ncname-00

Abstract

   The Universally Unique Identifier is a suitable standard for, as the
   name suggests, uniquely identifying entities in a symbol space large
   enough that the identifiers do not collide.  The literal
   representation, however, specified in RFC 4122 and elsewhere, cannot
   be used in conjunction with a number of formal grammars where it
   would be beneficial to do so.  This document provides the UUID with
   two additional representations to make these applications possible.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 27 January 2021.

Copyright Notice

   Copyright (c) 2020 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.

Taylor                   Expires 27 January 2021                [Page 1]
Internet-DraCompact, Grammar-Friendly Representations for UUI  July 2020

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Motivation & Applications . . . . . . . . . . . . . . . .   3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   3
   3.  Strategy  . . . . . . . . . . . . . . . . . . . . . . . . . .   3
   4.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . .   4
     4.1.  Recognizing UUID-NCName Symbols . . . . . . . . . . . . .   4
     4.2.  Equivalency . . . . . . . . . . . . . . . . . . . . . . .   5
   5.  Algorithms  . . . . . . . . . . . . . . . . . . . . . . . . .   5
     5.1.  Encoding Algorithm  . . . . . . . . . . . . . . . . . . .   5
     5.2.  Decoding Algorithm  . . . . . . . . . . . . . . . . . . .   6
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
   7.  Security Considerations . . . . . . . . . . . . . . . . . . .   7
   8.  Normative References  . . . . . . . . . . . . . . . . . . . .   7
   9.  Informative References  . . . . . . . . . . . . . . . . . . .   7
   Appendix A.  Samples  . . . . . . . . . . . . . . . . . . . . . .   8
   Appendix B.  Implementations  . . . . . . . . . . . . . . . . . .   9
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   9

1.  Introduction

   There are a number of places in formal languages where it would be
   useful to put UUIDs, but the grammar forbids it.  Many grammars
   forbid identifiers to begin with numbers, or contain hyphens, or
   contain colons (as with the URN representation in RFC 4122
   [RFC4122]).  The NCName production [XML-NAMES], which is pervasive in
   XML and RDF applications, is one such example.  Up until a recent
   change, the HTML ID production had similar constraints.  Virtually
   every programming language likewise requires identifiers such as
   variables and function names to start with a letter or underscore,
   and very few admit hyphens.  This constraint causes developers to
   turn to ad-hoc solutions when they want to use UUIDs in these places.

   This document specifies a representation - or rather, two
   representations - as well as the related transformations to and from
   the familiar UUID format.  A provisional name for these
   representations is _UUID-NCName_, with the two variants styled as
   _UUID-NCName-32_ and _UUID-NCName-64_, referring to the base of their
   respective encodings.  The goal of this specification is in part to
   eliminate an extra decision on the part of developers who find
   themselves in this position, and in part to provide alternative
   representations for UUIDs which remain valid but are shorter than the
   original.

Taylor                   Expires 27 January 2021                [Page 2]
Show full document text