<?xml version="1.0" encoding="UTF-8"?>

<!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.4.13 -->
<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-cbor-tags-oid-08" number="9090" submissionType="IETF" category="std" consensus="true" obsoletes="" updates="" xml:lang="en" tocInclude="true" tocDepth="2" sortRefs="true" symRefs="true" version="3">

<!-- xml2rfc v2v3 conversion 3.7.0 -->
  <front>
    <title abbrev="CBOR Tags for OIDs">Concise Binary Object Representation (CBOR) Tags for Object&nbsp;Identifiers</title>
    <seriesInfo name="RFC" value="9090"/>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2021" month="July"/>

<keyword>binary format</keyword>
<keyword>data interchange format</keyword>
<keyword>ASN.1</keyword>
<keyword>OID</keyword>
<keyword>Object Identifier</keyword>

    <abstract>
      <t>The Concise Binary Object Representation (CBOR), defined in RFC 8949, is a data
format whose design goals include the possibility of extremely small
code size, fairly small message size, and extensibility without the
need for version negotiation.</t>
      <t>This document defines CBOR tags for
object identifiers (OIDs) and is
the reference document for the IANA registration of the CBOR tags
so defined.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" toc="default">
      <name>Introduction</name>
      <t>The Concise Binary Object Representation (CBOR) <xref target="RFC8949" format="default"/> provides
for the interchange of structured data without a requirement for a
pre-agreed schema.
<xref target="RFC8949" format="default"/> defines a basic set of data types, as well as a tagging
mechanism that enables extending the set of data types supported via
an IANA registry.</t>
      <t>This document defines CBOR tags for object identifiers
(OIDs) <xref target="X.660" format="default"/>, which many IETF protocols carry.
The ASN.1 Basic Encoding Rules
(BER) <xref target="X.690" format="default"/> specify binary encodings of both (absolute) object identifiers
and relative object identifiers.
The contents of these encodings (the "value" part of BER's
type-length-value structure) can be carried in a CBOR byte string.
This document defines two CBOR tags that cover the two kinds of
ASN.1 object identifiers encoded in this way and a third one to enable a
common optimization.
The tags can also be applied to arrays and maps to efficiently tag all
elements of an array or all keys of a map.
This document is the reference document for the IANA registration of
the tags so defined.</t>
      <section anchor="terms" toc="default">
        <name>Terminology</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
        <t>The terminology of <xref target="RFC8949" format="default"/> applies; in particular,
the term "byte" is used in its now-customary sense as a synonym for
"octet".
The verb "to tag (something)" is used to express the construction of a
CBOR tag, with the object (something) as the tag content and a tag
number indicated elsewhere in the sentence (for instance, in a "with"
clause or by the shorthand "an NNN tag" for "a tag with tag number NNN"). The term "SDNV" (Self-Delimiting Numeric Value) is used as defined in
<xref target="RFC6256" format="default"/>, with the additional restriction detailed in <xref target="reqts" format="default"/> (no
leading zeros).</t>
      </section>
    </section>
    <section anchor="oids" toc="default">
      <name>Object Identifiers</name>
      <t>The International Object Identifier tree <xref target="X.660" format="default"/> is
a hierarchically managed space of
identifiers, each of which is uniquely represented as a sequence of
unsigned integer values
<xref target="X.680" format="default"/>.
(These integer values are called "primary integer values" in <xref target="X.660" format="default"/> because they can be accompanied by (not necessarily unambiguous)
secondary identifiers.  We ignore the latter and simply use the term
"integer values" here, occasionally calling out their unsignedness.
We also use the term "arc" when the focus is on the edge of the tree
labeled by such an integer value, as well as in the sense of a "long
arc", i.e., a (sub)sequence of such integer values.)</t>
      <t>While these sequences can easily be represented in CBOR arrays of
unsigned integers, a more compact representation can often be achieved
by adopting the widely used representation of object identifiers
defined in BER; this representation may also be more amenable to
processing by other software that makes use of object identifiers.</t>
      <t>BER represents the sequence of unsigned integers by concatenating
self-delimiting representations <xref target="RFC6256" format="default"/> of each of the integer values in sequence.</t>
      <t>ASN.1 distinguishes absolute object identifiers (ASN.1 type <tt>OBJECT IDENTIFIER</tt>),
which begin at a root arc (<xref target="X.660" format="default"/>, Clause 3.5.21), from relative object
identifiers (ASN.1 type <tt>RELATIVE-OID</tt>), which begin
relative to some object identifier known from context (<xref target="X.680" format="default"/>,
Clause 3.8.63).
As a special optimization,
BER combines the first two integers in an absolute object identifier
into one numeric identifier by making use of the property of the
hierarchy that the first arc has only three integer values (0, 1, and 2)
and the second arcs under 0 and 1 are limited to the integer values between
0 and 39.  (The root arc <tt>joint-iso-itu-t(2)</tt> has
no such limitations on its second arc.)
If X and Y are the first two integer values,
the single integer value actually encoded is computed as:</t>

        <t indent="3">X * 40 + Y</t>

      <t>The inverse transformation (again making use of the known ranges of X
and Y) is applied when decoding the object identifier.</t>

      <t>Since the semantics of absolute and relative object identifiers
differ and since it is very common for companies to use self-assigned numbers
under the arc <tt>1.3.6.1.4.1</tt> (IANA Private Enterprise Number OID
<xref target="IANA.enterprise-numbers" format="default"/>) that adds 5 fixed bytes to an encoded OID value,
this specification defines three tags, collectively called the
"OID tags" here:</t>

<dl>
      <dt>Tag number 111:</dt><dd>Used to tag a byte string as the BER encoding <xref target="X.690" format="default"/> of an
absolute object identifier (simply "object identifier" or "OID").</dd>
      <dt>Tag number 110:</dt><dd>Used to tag a byte string as the BER encoding <xref target="X.690" format="default"/> of a relative
object identifier (also called "relative OID").  Since the encoding of each
number is the same as for Self-Delimiting Numeric Values
(SDNVs) <xref target="RFC6256" format="default"/>, this tag can also be used for tagging a byte string that
contains a sequence of zero or more SDNVs (or a more
application-specific tag can be created for such an application).</dd>
      <dt>Tag number 112:</dt><dd>Structurally like tag 110 but understood to be relative to
<tt>1.3.6.1.4.1</tt> (IANA Private Enterprise Number OID <xref target="IANA.enterprise-numbers" format="default"/>).  Hence, the
semantics of the result are that of an absolute object identifier.</dd>
</dl>
      <section anchor="reqts" toc="default">

        <name>Requirements on the Byte String Being Tagged</name>
        <t>To form a valid tag, a byte string tagged with 111, 110, or 112
<bcp14>MUST</bcp14> be syntactically valid contents (the value part) for a BER
representation of an object identifier (see <xref target="oid-x.690" format="default"/>): </t>

<table anchor="oid-x.690"> 
  <name>Tag Number and Section of X.690 Governing Tag Content</name>    
  <thead>
    <tr>
      <th>Tag number</th> 
      <th>Section of <xref target="X.690" format="default"/></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>111</td>
      <td>8.19</td>
    </tr>
    <tr>
      <td>110</td>
      <td>8.20</td>
    </tr>
    <tr>
      <td>112</td>
      <td>8.20</td>
    </tr>
  </tbody>
</table>


<t>This is a concatenation of zero or
more SDNV values, where each SDNV value is a sequence of one or more bytes that
all have their most significant bit set, except for the last byte,
where it is unset.
Also, the first byte of each SDNV cannot be a
leading zero in SDNV's base-128 arithmetic, so it cannot take the
value 0x80 (bullet (c) in Section 8.1.2.4.2 of <xref target="X.690" format="default"/>).</t>
        <t>In other words:</t>
        <ul spacing="normal">
          <li>The byte string's first byte, and any byte that follows a byte that has the most significant
bit unset, <bcp14>MUST NOT</bcp14> be 0x80 (this requirement requires expressing the
integer values in their shortest form, with no leading zeroes).</li>
          <li>The byte string's last byte <bcp14>MUST NOT</bcp14> have the most significant bit set (this
requirement excludes an incomplete final integer value).</li>
        </ul>
        <t>If either of these invalid conditions are encountered, the tag is
invalid.</t>
        <t><xref target="X.680" format="default"/> restricts RELATIVE-OID values to having at least
one arc, i.e., their encoding would have at least one SDNV.
This specification permits
empty relative object identifiers; they may
still be excluded by application semantics.</t>
        <t>To facilitate the search for specific object ID values, it is <bcp14>RECOMMENDED</bcp14>
that definite length encoding (see <xref target="RFC8949" sectionFormat="of" section="3.2.3"/>) be used
for the byte strings that are used as tag content for these tags.</t>

        <t>The valid set of byte strings can also be expressed using regular
expressions on bytes, using no specific notation but resembling Perl Compatible Regular Expressions
<xref target="PCRE" format="default"/>.  Unlike typical regular expressions that operate on
character sequences, the following regular expressions take bytes as
their domain, so they can be applied directly to CBOR byte strings.</t>
        <t>For byte strings with tag 111:</t>
          <t indent="3">
            <tt>/^(([\x81-\xFF][\x80-\xFF]*)?[\x00-\x7F])+$/</tt></t>

        <t>For byte strings with tags 110 or 112:</t>
          <t indent="3">
            <tt>/^(([\x81-\xFF][\x80-\xFF]*)?[\x00-\x7F])*$/</tt></t>

        <t>A tag with tagged content that does not conform to the applicable
regular expression is invalid.</t>
      </section>
      <section anchor="prefser" toc="default">
        <name>Preferred Serialization Considerations</name>
        <t>For an absolute OID with a prefix of <tt>1.3.6.1.4.1</tt>, representations
with both the 111 and 112 tags are applicable, where the
representation with 112 will be five bytes shorter (by leaving out
the prefix h'2b06010401' from the enclosed byte string).
This specification makes that shorter representation the preferred
serialization (see Sections <xref target="RFC8949" section="3.4" sectionFormat="bare" format="default"/> and <xref target="RFC8949" section="4.1" sectionFormat="bare" format="default"/> of <xref target="RFC8949" format="default"/>).
Note that this also implies that the Core Deterministic Encoding
Requirements (<xref section="4.2.1" sectionFormat="of" target="RFC8949" format="default"/>) require the use of 112
tags instead of 111 tags wherever that is possible.</t>
      </section>
      <section anchor="discussion" toc="default">
        <name>Discussion</name>
        <t>Staying close to the way object identifiers are encoded in ASN.1
BER makes back-and-forth translation easy; otherwise, we would choose a
more efficient encoding.  Object
identifiers in IETF protocols
are serialized in dotted decimal form or BER form, so
there is an advantage in not inventing a third form.  Also,
expectations of the cost of encoding object identifiers are
based on BER; using a different encoding might not be aligned with
these expectations. If additional information about an OID is desired,
lookup services such as
the <xref target="X.672" format="default">OID Resolution Service (ORS)</xref>
and the <xref target="OID-INFO" format="default">OID Repository</xref> are available.</t>
      </section>
    </section>
    <section anchor="examples" toc="default">
      <name>Basic Examples</name>
      <t>This section gives simple examples of an absolute and a relative
object identifier, represented via tag numbers 111 and 110,
respectively.</t>

      <section anchor="encoding-of-the-sha-256-oid" toc="default">
        <name>Encoding of the SHA-256 OID</name>
<dl>
<dt>ASN.1 Value Notation:</dt>
<dd><sourcecode type="asn.1">
{ joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101)
  csor(3) nistalgorithm(4) hashalgs(2) sha256(1) }
</sourcecode></dd>
<dt>
Dotted Decimal Notation:  </dt>
          <dd>
            <t>2.16.840.1.101.3.4.2.1</t>
          </dd>
        </dl>



        <figure anchor="fig-sha-ber">
          <name>SHA-256 OID in BER</name>
          <sourcecode type=""><![CDATA[
06                                # UNIVERSAL TAG 6
   09                             # 9 bytes, primitive
      60 86 48 01 65 03 04 02 01  # X.690 Clause 8.19
#      |   840  1  |  3  4  2  1    show component encoding
#   2.16         101
]]></sourcecode>
        </figure>
        <figure anchor="fig-sha-cbor">
          <name>SHA-256 OID in CBOR</name>
          <sourcecode type="cbor-pretty"><![CDATA[
D8 6F                             # tag(111)
   49                             # 0b010_01001: mt 2, 9 bytes
      60 86 48 01 65 03 04 02 01  # X.690 Clause 8.19
]]></sourcecode>
        </figure>
      </section>
      <section anchor="encoding-of-a-mib-relative-oid" toc="default">
        <name>Encoding of a MIB Relative OID</name>
        <t>Given some OID (e.g., <tt>lowpanMib</tt>, assumed to be <tt>1.3.6.1.2.1.226</tt> <xref target="RFC7388" format="default"/>),
to which the following is added:</t>
<dl>
<dt>ASN.1 Value Notation:</dt>
<dd>
<sourcecode type="asn.1">
{ lowpanObjects(1) lowpanStats(1) lowpanOutTransmits(29) }
</sourcecode>
</dd>
<dt>
Dotted Decimal Notation:  </dt>
          <dd>
            <t>.1.1.29</t>
          </dd>
        </dl>
        <figure anchor="fig-mib-ber">
          <name>MIB Relative Object Identifier in BER</name>
          <sourcecode type=""><![CDATA[
0D                                # UNIVERSAL TAG 13
   03                             # 3 bytes, primitive
      01 01 1D                    # X.690 Clause 8.20
#      1  1 29                      show component encoding
]]></sourcecode>
        </figure>
        <figure anchor="fig-mib-cbor">
          <name>MIB Relative Object Identifier in CBOR</name>
          <sourcecode type="cbor-pretty"><![CDATA[
D8 6E                             # tag(110)
   43                             # 0b010_00011: mt 2 (bstr), 3 bytes
      01 01 1D                    # X.690 Clause 8.20
]]></sourcecode>
        </figure>
        <t>This relative OID saves seven bytes compared to the full OID encoding.</t>
      </section>
    </section>
    <section anchor="tfs" toc="default">
      <name>Tag Factoring with Arrays and Maps</name>
      <t>The tag content of OID tags can be byte strings (as discussed above) but also CBOR arrays and maps.
The idea in the latter case is that
the tag construct is factored out from each individual item in the container;
the tag is placed on the array or map instead.</t>
      <t>When the tag content of an OID tag is an array, this means
that the respective tag is imputed to all elements of the array that are
byte strings, arrays, or maps.  (There is no effect on other elements,
including text strings or tags.)
For example, when the tag content of a 111 tag is an array,
every array element that is a byte string
is an OID, and every element that is an array or map is, in turn,
treated as discussed here.</t>
      <t>When the tag content of an OID tag is a map, this means that a tag
with the same tag number is imputed to all keys in the map that are byte
strings, arrays, or maps; again, there is no effect on keys of other major types.
Note that there is also no effect on the values in the map.</t>

      <t>As a result of these rules, tag factoring in nested arrays and maps is supported.
For example,
a 3-dimensional array of OIDs can be composed by using
a single 111 tag containing an array of arrays of arrays
of byte strings. All such byte strings are then considered OIDs.</t>
      <section anchor="preferred-serialization-considerations" toc="default">
        <name>Preferred Serialization Considerations</name>
        <t>Where tag factoring with tag number 111 is used, some OIDs enclosed in the
tag may be encoded in a shorter way by using tag number 112 instead of
encoding an unadorned byte string.
This remains the preferred serialization (see also <xref target="prefser" format="default"/>).
However, this specification does not make the presence or absence of
tag factoring a preferred serialization; application protocols can
define where tag factoring is to be used or not (and will need to do
so if they have deterministic encoding requirements).</t>
      </section>
      <section anchor="tag-factoring-example-x500-distinguished-name" toc="default">
        <name>Tag Factoring Example: X.500 Distinguished Name</name>
        <t>Consider the X.500 distinguished name:</t>
        <table anchor="tab-dn-data" align="center">
          <name>Example X.500 Distinguished Name</name>
          <thead>
            <tr>
              <th align="left">Attribute Types</th>
              <th align="left">Attribute Values</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">c (2.5.4.6)</td>
              <td align="left">US</td>
            </tr>
            <tr>
              <td align="left">l (2.5.4.7)<br/>s (2.5.4.8)<br/>postalCode (2.5.4.17)</td>
              <td align="left">Los Angeles<br/>CA<br/>90013</td>
            </tr>
            <tr>
              <td align="left">street (2.5.4.9)</td>
              <td align="left">532 S Olive St</td>
            </tr>
            <tr>
              <td align="left">businessCategory (2.5.4.15)<br/>buildingName (0.9.2342.19200300.100.1.48)</td>
              <td align="left">Public Park<br/>Pershing Square</td>
            </tr>
          </tbody>
        </table>
        <t><xref target="tab-dn-data" format="default"/> has four "relative distinguished names" (RDNs). The
country (first) and street (third) RDNs are single valued.
The second and fourth RDNs are multivalued.</t>
        <t>The equivalent representations in CBOR diagnostic notation (<xref section="8" sectionFormat="of" target="RFC8949" format="default"/>) and CBOR are:</t>
        <figure anchor="fig-dn-cbor-diag">
          <name>Distinguished Name in CBOR Diagnostic Notation</name>
          <sourcecode type="cbor-diag"><![CDATA[
111([{ h'550406': "US" },
     { h'550407': "Los Angeles",
       h'550408': "CA",
       h'550411': "90013" },
     { h'550409': "532 S Olive St" },
     { h'55040f': "Public Park",
       h'0992268993f22c640130': "Pershing Square" }])
]]></sourcecode>
        </figure>
        <figure anchor="fig-dn-cbor">
          <name>Distinguished Name in CBOR (109 Bytes)</name>
          <sourcecode type="cbor-pretty"><![CDATA[
d8 6f                                      # tag(111)
   84                                      # array(4)
      a1                                   # map(1)
         43 550406                         # 2.5.4.6 (4)
         62                                # text(2)
            5553                           # "US"
      a3                                   # map(3)
         43 550407                         # 2.5.4.7 (4)
         6b                                # text(11)
            4c6f7320416e67656c6573         # "Los Angeles"
         43 550408                         # 2.5.4.8 (4)
         62                                # text(2)
            4341                           # "CA"
         43 550411                         # 2.5.4.17 (4)
         65                                # text(5)
            3930303133                     # "90013"
      a1                                   # map(1)
         43 550409                         # 2.5.4.9 (4)
         6e                                # text(14)
            3533322053204f6c697665205374   # "532 S Olive St"
      a2                                   # map(2)
         43 55040f                         # 2.5.4.15 (4)
         6b                                # text(11)
            5075626c6963205061726b         # "Public Park"
         4a 0992268993f22c640130    # 0.9.2342.19200300.100.1.48 (11)
         6f                                # text(15)
            5065727368696e6720537175617265 # "Pershing Square"
]]></sourcecode>
        </figure>
        <t>(This example encoding assumes that all attribute values are UTF-8 strings or can be represented as UTF-8 strings with no loss of information.)</t>
      </section>
    </section>
    <section anchor="control" toc="default">
      <name>CDDL Control Operators</name>
      <t>Concise Data Definition Language (CDDL) specifications <xref target="RFC8610" format="default"/> may
want to specify the use of SDNVs or SDNV
sequences (as defined for the tag content for tag 110).  This document
introduces two new control operators that can be applied to a target
value that is a byte string:</t>
      <ul spacing="normal">
        <li>
          <tt>.sdnv</tt>, with a control type that contains unsigned integers.  The
byte string is specified to be encoded as an SDNV (BER
encoding) <xref target="RFC6256" format="default"/> for the matching values of the control type.</li>
        <li>
          <tt>.sdnvseq</tt>, with a control type that contains arrays of unsigned
integers.  The byte string is specified to be encoded as a sequence
of SDNVs (BER encoding) <xref target="RFC6256" format="default"/> that decodes to an array of
unsigned integers matching the control type.</li>
        <li>
          <tt>.oid</tt>, like <tt>.sdnvseq</tt>, except that the X*40+Y translation for
absolute OIDs is included (see <xref target="fig-dn-cddl-oid" format="default"/>).</li>
      </ul>
      <t><xref target="fig-dn-cddl" format="default"/> shows an example for the use of <tt>.sdnvseq</tt> for a part
of a structure using OIDs that could be used in <xref target="fig-dn-cbor" format="default"/>;
<xref target="fig-dn-cddl-oid" format="default"/> shows the same with the <tt>.oid</tt> operator.</t>
      <figure anchor="fig-dn-cddl">
        <name>Using .sdnvseq</name>
        <sourcecode type="cddl">
country-rdn = {country-oid =&gt; country-value}
country-oid = bytes .sdnvseq [85, 4, 6]
country-value = text .size 2
</sourcecode>
      </figure>
      <figure anchor="fig-dn-cddl-oid">
        <name>Using .oid</name>
        <sourcecode type="cddl">
country-rdn = {country-oid =&gt; country-value}
country-oid = bytes .oid [2, 5, 4, 6]
country-value = text .size 2
</sourcecode>
      </figure>

      <t>Note that the control type need not be a literal; for example, <tt>bytes .oid
[2, 5, 4, *uint]</tt> matches all OIDs inside OID arc <tt>2.5.4</tt>,
<tt>attributeType</tt>.</t>
    </section>

    <section anchor="cddl-typenames" toc="default">
      <name>CDDL Type Names</name>
      <t>For the use with CDDL, the
type names defined in <xref target="tag-cddl" format="default"/> are recommended:</t>
      <figure anchor="tag-cddl">
        <name>Recommended Type Names for CDDL</name>
        <sourcecode name="rfc9090.cddl" type="cddl">
oid = #6.111(bstr)
roid = #6.110(bstr)
pen = #6.112(bstr)
</sourcecode>
      </figure>
    </section>
    <section anchor="iana" toc="default">
      <name>IANA Considerations</name>


      <section anchor="cbor-tags" toc="default">
        <name>CBOR Tags</name>
        <t>IANA has assigned the CBOR tag numbers in <xref target="tab-tag-values-new" format="default"/> 
in the 1+1 byte space (24..255) of the "CBOR Tags" registry
<xref target="IANA.cbor-tags" format="default"/>, with this document as the specification reference.</t>
        <table anchor="tab-tag-values-new" align="center">
          <name>New Tag Numbers</name>
          <thead>
            <tr>
              <th align="left">Tag</th>
              <th align="left">Data Item</th>
              <th align="left">Semantics</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">111</td>
              <td align="left">byte string, array, or map</td>
              <td align="left">object identifier (BER encoding)</td>
              <td align="left">RFC 9090</td>
            </tr>
            <tr>
              <td align="left">110</td>
              <td align="left">byte string, array, or map</td>
              <td align="left">relative object identifier (BER encoding); SDNV <xref target="RFC6256" format="default"/> sequence</td>
              <td align="left">RFC 9090</td>
            </tr>
            <tr>
              <td align="left">112</td>
              <td align="left">byte string, array, or map</td>
              <td align="left">object identifier (BER encoding), relative to 1.3.6.1.4.1</td>
              <td align="left">RFC 9090</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="cddl-control-operators" toc="default">
        <name>CDDL Control Operators</name>
        <t>IANA has assigned the CDDL control operators in
<xref target="tab-operators-new" format="default"/> in the "CDDL Control Operators" registry
<xref target="IANA.cddl" format="default"/>, with this document as the specification
reference.</t>
        <table anchor="tab-operators-new" align="center">
          <name>New CDDL Control Operators</name>
          <thead>
            <tr>
              <th align="left">Name</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">.sdnv</td>
              <td align="left">RFC 9090</td>
            </tr>
            <tr>
              <td align="left">.sdnvseq</td>
              <td align="left">RFC 9090</td>
            </tr>
            <tr>
              <td align="left">.oid</td>
              <td align="left">RFC 9090</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="security-considerations" toc="default">
      <name>Security Considerations</name>
      <t>The security considerations of <xref target="RFC8949" format="default"/> apply.</t>

      <t>The encodings in Clauses 8.19 and 8.20 of <xref target="X.690" format="default"/> are quite compact and unambiguous
but <bcp14>MUST</bcp14> be followed precisely to avoid security pitfalls.
In particular, the requirements set out in <xref target="reqts" format="default"/> of this document need to be
followed; otherwise, an attacker may be able to subvert a checking
process by submitting alternative representations that are later taken
as the original (or even something else entirely) by another decoder
that is intended to be protected by the checking process.</t>
      <t>OIDs and relative OIDs can always be treated as opaque byte strings.
Actually understanding the structure that was used for generating them
is not necessary, and, except for checking the structure requirements,
it is strongly <bcp14>NOT RECOMMENDED</bcp14> to perform any
processing of this kind (e.g., converting into dotted notation and
back) unless absolutely necessary.
If the OIDs are translated into other representations, the usual
security considerations for non-trivial representation conversions
apply; the integer values are unlimited in range.</t>
      <t>An attacker might trick an application into using a byte string inside
a tag-factored data item, where the byte string is not actually
intended to fall under one of the tags defined here.  This may cause
the application to emit data with semantics different from what was
intended.  Applications therefore need to be restrictive with respect
to what data items they apply tag factoring to.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6256.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8949.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8610.xml"/>

        <reference anchor="X.660" target="https://www.itu.int/rec/T-REC-X.660">
          <front>
            <title>Information technology - Procedures for the operation of object identifier registration authorities: General procedures and top arcs of the international object identifier tree</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2011" month="July"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.660"/>
        </reference>

        <reference anchor="X.680" target="https://www.itu.int/rec/T-REC-X.680">
          <front>
            <title>Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.680"/>
        </reference>

        <reference anchor="X.690" target="https://www.itu.int/rec/T-REC-X.690">
          <front>
            <title>Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2015" month="August"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.690"/>
        </reference>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>

        <reference anchor="IANA.cbor-tags" target="https://www.iana.org/assignments/cbor-tags">
          <front>
            <title>Concise Binary Object Representation (CBOR) Tags</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>

        <reference anchor="IANA.cddl" target="https://www.iana.org/assignments/cddl">
          <front>
            <title>Concise Data Definition Language (CDDL)</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>

        <reference anchor="X.672" target="https://www.itu.int/rec/T-REC-X.672">
          <front>
            <title>Information technology - Open systems interconnection - Object identifier resolution system (ORS)</title>
            <author>
              <organization>ITU-T</organization>
            </author>
            <date year="2010" month="August"/>
          </front>
          <seriesInfo name="ITU-T Recommendation" value="X.672"/>
        </reference>

       <reference anchor="PCRE" target="http://www.pcre.org/">
          <front>
            <title>PCRE - Perl Compatible Regular Expressions</title>
<author/>
            <date/>
          </front>
        </reference>

        <reference anchor="OID-INFO" target="http://www.oid-info.com/">
          <front>
            <title>Object Identifier (OID) Repository</title>
            <author>
              <organization>Orange SA</organization>
            </author>
            <date/>
          </front>
        </reference>

        <reference anchor="IANA.enterprise-numbers" target="https://www.iana.org/assignments/enterprise-numbers">
          <front>
            <title>Private Enterprise Numbers</title>
            <author>
              <organization>IANA</organization>
            </author>
            <date/>
          </front>
        </reference>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7388.xml"/>

      </references>
    </references>

    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t><contact fullname="Sean Leonard"/> started the work on this document in 2014 with an
elaborate proposal.
<contact fullname="Jim Schaad"/> provided a significant review of this document.
<contact fullname="Rob Wilton"/>'s IESG review prompted us to provide preferred
serialization considerations.</t>
    </section>
    <section anchor="contributors" numbered="false" toc="include" removeInRFC="false">
      <name>Contributors</name>
      <contact initials="S." surname="Leonard" fullname="Sean Leonard">
        <organization>Penango, Inc.</organization>
        <address>
          <postal>
            <street>5900 Wilshire Boulevard</street>
            <street>21st Floor</street>
            <city>Los Angeles</city>
	    <region>CA</region>
            <code>90036</code>
            <country>United States of America</country>
          </postal>
          <email>dev+ietf@seantek.com</email>
        </address>
      </contact>
    </section>
  </back>

</rfc>
