<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.4 (Ruby 3.2.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-mcnally-deterministic-cbor-07" category="exp" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.19.0 -->
  <front>
    <title abbrev="dCBOR">dCBOR: A Deterministic CBOR Application Profile</title>
    <seriesInfo name="Internet-Draft" value="draft-mcnally-deterministic-cbor-07"/>
    <author initials="W." surname="McNally" fullname="Wolf McNally">
      <organization>Blockchain Commons</organization>
      <address>
        <email>wolf@wolfmcnally.com</email>
      </address>
    </author>
    <author initials="C." surname="Allen" fullname="Christopher Allen">
      <organization>Blockchain Commons</organization>
      <address>
        <email>christophera@lifewithalacrity.com</email>
      </address>
    </author>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2024" month="January" day="09"/>
    <area>Applications and Real-Time</area>
    <workgroup>Network Working Group</workgroup>
    <keyword>Internet-Draft</keyword>
    <abstract>
      <?line 75?>

<t>The purpose of determinism is to ensure that semantically equivalent data items are encoded into identical byte streams. CBOR (RFC 8949) defines "Deterministically Encoded CBOR" in its Section 4.2, but leaves some important choices up to the application developer. The CBOR Common Deterministic Encoding (CDE) Internet Draft builds on this by specifying a baseline for application profiles that wish to implement deterministic encoding with CBOR. The present document provides an application profile "dCBOR" that can be used to help achieve interoperable deterministic encoding based on CDE for a variety of applications wishing an even narrower and clearly defined set of choices.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-mcnally-deterministic-cbor/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/BlockchainCommons/WIPs-IETF-draft-deterministic-cbor"/>.</t>
    </note>
  </front>
  <middle>
    <?line 79?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>CBOR <xref target="RFC8949"/> has many advantages over other data serialization formats. One of its strengths is specifications and guidelines for serializing data deterministically, such that multiple agents serializing the same data automatically achieve consensus on the exact byte-level form of that serialized data. This is particularly useful when data must be compared for semantic equivalence by comparing the hash of its contents.</t>
      <t>Nonetheless, determinism is an opt-in feature of CBOR, and most existing CBOR codecs put the primary burden of correct deterministic serialization and validation of deterministic encoding during deserialization on the engineer. Furthermore, the specification leaves a number of important decisions around determinism up to the application developer. The CBOR Common Deterministic Encoding (CDE) Internet Draft <xref target="CDE"/> builds on the basic CBOR specification by providing a baseline for application profiles that wish to implement deterministic encoding with CBOR.</t>
      <t>This document narrows CDE further into a set of requirements for the application profile "dCBOR". These requirements include but go beyond CDE, including requiring that dCBOR decoders validate that encoded CDE conforms to the requirements of this document.</t>
      <section anchor="conventions-and-definitions">
        <name>Conventions and Definitions</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 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
        <?line -18?>

</section>
    </section>
    <section anchor="application-profile">
      <name>Application Profile</name>
      <t>The dCBOR Application Profile specifies the use of Deterministic Encoding as defined in <xref target="CDE"/> and adds several exclusions and reductions specified in this section.</t>
      <t>Just as CDE does not "fork" CBOR, the rules specified here do not "fork" CDE: A dCBOR implementation produces well-formed, deterministically encoded CDE according to <xref target="CDE"/>, and existing CBOR or CDE decoders will therefore be able to decode it. Similarly, CBOR or CDE encoders will be able to produce valid dCBOR if handed dCBOR conforming data model level information from an application.</t>
      <t>Note that the separation between standard CBOR or CDE processing and the processing required by the dCBOR application profile is a conceptual one: Both dCBOR processing and standard CDE/CBOR processing may be combined into a unified dCBOR/CDE/CBOR codec. The requirements in this document apply to encoding or decoding of dCBOR data, regardless of whether the codec is a unified dCBOR/CDE/CBOR codec operating in dCBOR-compliant modes, or a single-purpose dCBOR codec. Both of these are generically referred to as "dCBOR codecs" in this document.</t>
      <t>This application profile is intended to be used in conjunction with an application, which typically will use a subset of CDE/CBOR, which in turn influences which subset of the application profile is used. As a result, this application profile places no direct requirement on what subset of CDE/CBOR is implemented. For instance, there is no requirement that dCBOR implementations support floating point numbers (or any other kind of non-basic integer type, such as arbitrary precision integers or complex numbers) when they are used with applications that do not use them. However, this document does place requirements on dCBOR implementations that support negative 64-bit integers and 64-bit or smaller floating point numbers.</t>
      <section anchor="common-deterministic-encoding-conformance">
        <name>Common Deterministic Encoding Conformance</name>
        <t>dCBOR encoders:</t>
        <ol spacing="normal" type="1"><li>
            <t><bcp14>MUST</bcp14> only emit CBOR conforming "CBOR Common Deterministic Encoding (CDE)" <xref target="CDE"/>, including mandated preferred encoding of integers and floating point numbers and the lexicographic ordering of map keys.</t>
          </li>
        </ol>
        <t>dCBOR decoders:</t>
        <ol spacing="normal" type="1" start="2"><li>
            <t><bcp14>MUST</bcp14> validate that encoded CBOR conforms to the requirements of <xref target="CDE"/>.</t>
          </li>
        </ol>
      </section>
      <section anchor="duplicate-map-keys">
        <name>Duplicate Map Keys</name>
        <t>CBOR <xref target="RFC8949"/> defines maps with duplicate keys as invalid, but leaves how to handle such cases to the implementor (§2.2, §3.1, §5.4, §5.6). <xref target="CDE"/> provides no additional mandates on this issue.</t>
        <t>dCBOR encoders:</t>
        <ol spacing="normal" type="1"><li>
            <t><bcp14>MUST NOT</bcp14> emit CBOR maps that contain duplicate keys.</t>
          </li>
        </ol>
        <t>dCBOR decoders:</t>
        <ol spacing="normal" type="1" start="2"><li>
            <t><bcp14>MUST</bcp14> reject encoded maps with duplicate keys.</t>
          </li>
        </ol>
      </section>
      <section anchor="bit-negative-integers">
        <name>"65-bit" Negative Integers</name>
        <t>dCBOR limits the range of integers to those that can be contained in common 64-bit programming language integer types, either as a signed (<tt>int64</tt> or <tt>i64</tt>) or unsigned (<tt>uint64</tt> or <tt>u64</tt>) integer.
In other words, integer values in the range <tt>DCBOR_INT</tt> = [-2<sup>63</sup>, 2<sup>64</sup>-1] are valid.</t>
        <t>CBOR integers in the basic generic data model have an argument of up to 64 bits; whether the value is interpreted as non-negative or negative then depends on the additional bit provided by whether it is encoded as a major type 0 or 1 value.</t>
        <t>Many programming languages offer a separate type that covers the entire range of major type 0 (such as <tt>uint64</tt> or <tt>u64</tt>), but do not offer a type that provides the full range of negative integers that can be encoded in CBOR major type 1.
(If a two's-complement signed type were to be used to cover both ranges in full, it would need to have at least 65 bits.)
We therefore use the name <tt>NEG_65</tt> for the range of negative numbers that can be encoded in major type 1, but do not fit into <tt>int64</tt>, i.e., [-2<sup>64</sup>, -2<sup>63</sup> - 1].
Integer values in this range are invalid in dCBOR.</t>
        <t>dCBOR encoders:</t>
        <ol spacing="normal" type="1"><li>
            <t><bcp14>MUST NOT</bcp14> encode CBOR integer values in the range <tt>NEG_65</tt>.</t>
          </li>
        </ol>
        <t>dCBOR decoders:</t>
        <ol spacing="normal" type="1" start="2"><li>
            <t><bcp14>MUST</bcp14> reject CBOR integer values in the range <tt>NEG_65</tt>.</t>
          </li>
        </ol>
        <t>(As always with CBOR, whether the value is interpreted as non-negative or negative depends on whether it is encoded as a major type 0 or 1 value.)</t>
        <t>Specific applications will, of course, further restrict ranges of integers that are considered valid for the application, based on their position and semantics in the CBOR data item.</t>
      </section>
      <section anchor="numeric-reduction">
        <name>Numeric Reduction</name>
        <t>The purpose of determinism is to ensure that semantically equivalent data items are encoded into identical byte streams. Numeric reduction ensures that semantically equal numeric values (e.g. <tt>2</tt> and <tt>2.0</tt>) are encoded into identical byte streams (e.g. <tt>0x02</tt>) by encoding "Integral floating point values" (floating point values with a zero fractional part) as integers when possible.</t>
        <t>dCBOR implementations that support floating point numbers:</t>
        <ol spacing="normal" type="1"><li>
            <t><bcp14>MUST</bcp14> check whether floating point values to be encoded have the numerically equal value in <tt>DCBOR_INT</tt> as defined above. If that is the case, it <bcp14>MUST</bcp14> be converted to that numerically equal integer value before encoding it. (Preferred encoding will then ensure the shortest length encoding is used.) If a floating point value has a non-zero fractional part, or an exponent that takes it out of <tt>DCBOR_INT</tt>, the original floating point value is used for encoding. (Specifically, conversion to a CBOR bignum is never considered.)  </t>
            <t>
This also means that the three representations of a zero number in CBOR (<tt>0</tt>, <tt>0.0</tt>, <tt>-0.0</tt> in diagnostic notation) are all reduced to the basic integer <tt>0</tt> (with preferred encoding <tt>0x00</tt>).</t>
          </li>
        </ol>
        <aside>
          <t>Note that numeric reduction means that some maps that are valid CDE/CBOR cannot be reduced to valid dCBOR maps, as numeric reduction can result in multiple entries with the same keys ("duplicate keys"). For example, the following is a valid CBOR/CDE map:</t>
          <figure>
            <name>Valid CBOR data item with numeric map keys (also valid CDE)</name>
            <sourcecode type="cbor-diag"><![CDATA[
{
   10: "ten",
   10.0: "floating ten"
}
]]></sourcecode>
          </figure>
          <t>Applying numeric reduction to this map would yield the invalid map:</t>
          <figure>
            <name>Numeric reduction turns valid CBOR invalid</name>
            <sourcecode type="cbor-diag"><![CDATA[
{  / invalid: multiple entries with the same key /
   10: "ten",
   10: "floating ten"
}
]]></sourcecode>
          </figure>
          <t>In general, dCBOR applications need to avoid maps that have entries with keys that are semantically equivalent in dCBOR's numeric model.</t>
        </aside>
        <ol spacing="normal" type="1" start="2"><li>
            <t><bcp14>MUST</bcp14> reduce all encoded NaN values to the quiet NaN value having the half-width CBOR representation <tt>0xf97e00</tt>.</t>
          </li>
        </ol>
        <t>dCBOR decoders that support floating point numbers:</t>
        <ol spacing="normal" type="1" start="3"><li>
            <t><bcp14>MUST</bcp14> reject any encoded floating point values that are not encoded according to the above rules.</t>
          </li>
        </ol>
      </section>
      <section anchor="simple-values">
        <name>Simple Values</name>
        <t>Only the three "simple" (major type 7) values <tt>false</tt> (0xf4), <tt>true</tt> (0xf5), and <tt>null</tt> (0xf6) and the floating point values are valid in dCBOR.</t>
        <t>dCBOR encoders:</t>
        <ol spacing="normal" type="1"><li>
            <t><bcp14>MUST NOT</bcp14> encode major type 7 values other than <tt>false</tt>, <tt>true</tt>, <tt>null</tt>, and the floating point values.</t>
          </li>
        </ol>
        <t>dCBOR decoders:</t>
        <ol spacing="normal" type="1" start="2"><li>
            <t><bcp14>MUST</bcp14> reject any encoded major type 7 values other than <tt>false</tt>, <tt>true</tt>, <tt>null</tt>, and the floating point values.</t>
          </li>
        </ol>
      </section>
    </section>
    <section anchor="cddl-support">
      <name>CDDL support</name>
      <t>Similar to the CDDL <xref target="RFC8610"/> support in CDE <xref target="CDE"/>, this specification adds two CDDL control operators that can be used to specify that the data items should be encoded in CBOR Common Deterministic Encoding (CDE), with the dCBOR application profile applied as well.</t>
      <t>The control operators <tt>.dcbor</tt> and <tt>.dcborseq</tt> are exactly like <tt>.cde</tt> and <tt>.cdeseq</tt> except that they also require the encoded data item(s) to conform to the dCBOR application profile.</t>
      <t>For example, the normative comment in Section 3 of <xref target="GordianEnvelope"/>:</t>
      <sourcecode type="cddl"><![CDATA[
leaf = #6.24(bytes)  ; MUST be dCBOR
]]></sourcecode>
      <t>...can now be formalized as:</t>
      <sourcecode type="cddl"><![CDATA[
leaf = #6.24(bytes .dcbor any)
]]></sourcecode>
    </section>
    <section removeInRFC="true" anchor="implementation-status">
      <name>Implementation Status</name>
      <t>(Boilerplate as per <xref section="2.1" sectionFormat="of" target="RFC7942"/>:)</t>
      <t>This section records the status of known implementations of the
protocol defined by this specification at the time of posting of
this Internet-Draft, and is based on a proposal described in
<xref target="RFC7942"/>.  The description of implementations in this section is
intended to assist the IETF in its decision processes in
progressing drafts to RFCs.  Please note that the listing of any
individual implementation here does not imply endorsement by the
IETF.  Furthermore, no effort has been spent to verify the
information presented here that was supplied by IETF contributors.
This is not intended as, and must not be construed to be, a
catalog of available implementations or their features.  Readers
are advised to note that other implementations may exist.</t>
      <t>According to <xref target="RFC7942"/>, "this will allow reviewers and working
groups to assign due consideration to documents that have the
benefit of running code, which may serve as evidence of valuable
experimentation and feedback that have made the implemented
protocols more mature.  It is up to the individual working groups
to use this information as they see fit".
<?line -22?>
      </t>
      <section anchor="swift">
        <name>Swift</name>
        <ul spacing="normal">
          <li>
            <t>Description: Single-purpose dCBOR reference implementation for Swift.</t>
          </li>
          <li>
            <t>Organization: Blockchain Commons</t>
          </li>
          <li>
            <t>Implementation Location: <xref target="BCSwiftDCBOR"/></t>
          </li>
          <li>
            <t>Primary Maintainer: Wolf McNally</t>
          </li>
          <li>
            <t>Languages: Swift</t>
          </li>
          <li>
            <t>Coverage: Complete</t>
          </li>
          <li>
            <t>Testing: Unit tests</t>
          </li>
          <li>
            <t>Licensing: BSD-2-Clause-Patent</t>
          </li>
        </ul>
      </section>
      <section anchor="rust">
        <name>Rust</name>
        <ul spacing="normal">
          <li>
            <t>Description: Single-purpose dCBOR reference implementation for Rust.</t>
          </li>
          <li>
            <t>Organization: Blockchain Commons</t>
          </li>
          <li>
            <t>Implementation Location: <xref target="BCRustDCBOR"/></t>
          </li>
          <li>
            <t>Primary Maintainer: Wolf McNally</t>
          </li>
          <li>
            <t>Languages: Rust</t>
          </li>
          <li>
            <t>Coverage: Complete</t>
          </li>
          <li>
            <t>Testing: Unit tests</t>
          </li>
          <li>
            <t>Licensing: BSD-2-Clause-Patent</t>
          </li>
        </ul>
      </section>
      <section anchor="typescript">
        <name>TypeScript</name>
        <ul spacing="normal">
          <li>
            <t>Description: Single-purpose dCBOR reference implementation for TypeScript.</t>
          </li>
          <li>
            <t>Organization: Blockchain Commons</t>
          </li>
          <li>
            <t>Implementation Location: <xref target="BCTypescriptDCBOR"/></t>
          </li>
          <li>
            <t>Primary Maintainer: Wolf McNally</t>
          </li>
          <li>
            <t>Languages: TypeScript (transpiles to JavaScript)</t>
          </li>
          <li>
            <t>Coverage: Complete</t>
          </li>
          <li>
            <t>Testing: Unit tests</t>
          </li>
          <li>
            <t>Licensing: BSD-2-Clause-Patent</t>
          </li>
        </ul>
      </section>
      <section anchor="ruby">
        <name>Ruby</name>
        <ul spacing="normal">
          <li>
            <t>Implementation Location: <xref target="cbor-dcbor"/></t>
          </li>
          <li>
            <t>Primary Maintainer: Carsten Bormann</t>
          </li>
          <li>
            <t>Languages: Ruby</t>
          </li>
          <li>
            <t>Coverage: Complete specification; complemented by CBOR encoder/decoder and command line interface from <xref target="cbor-diag"/> and deterministic encoding from <xref target="cbor-deterministic"/>. Checking of dCBOR - exclusions not yet implemented.</t>
          </li>
          <li>
            <t>Testing: Also available at https://cbor.me</t>
          </li>
          <li>
            <t>Licensing: Apache-2.0</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document inherits the security considerations of CBOR <xref target="RFC8949"/>.</t>
      <t>Vulnerabilities regarding dCBOR will revolve around whether an attacker can find value in producing semantically equivalent documents that are nonetheless serialized into non-identical byte streams. Such documents could be used to contain malicious payloads or exfiltrate sensitive data. The ability to create such documents could indicate the failure of a dCBOR decoder to correctly validate according to this document, or the failure of the developer to properly specify or implement application protocol requirements using dCBOR. Whether these possibilities present an identifiable attack surface is a question that developers should consider.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>RFC Editor: please replace RFCXXXX with the RFC number of this RFC and remove this note.</t>
      <t>This document requests IANA to register the contents of Table 1 into the registry "CDDL Control Operators" of <xref target="IANACDDL"/>:</t>
      <table>
        <name>CDDL Control Operators for dCBOR</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">.dcbor</td>
            <td align="left">[RFCXXXX]</td>
          </tr>
          <tr>
            <td align="left">.dcborseq</td>
            <td align="left">[RFCXXXX]</td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC8949">
          <front>
            <title>Concise Binary Object Representation (CBOR)</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
            <date month="December" year="2020"/>
            <abstract>
              <t>The Concise Binary Object Representation (CBOR) 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. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t>
              <t>This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.</t>
            </abstract>
          </front>
          <seriesInfo name="STD" value="94"/>
          <seriesInfo name="RFC" value="8949"/>
          <seriesInfo name="DOI" value="10.17487/RFC8949"/>
        </reference>
        <reference anchor="RFC8610">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="C. Vigano" initials="C." surname="Vigano"/>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document proposes a notational convention to express Concise Binary Object Representation (CBOR) data structures (RFC 7049). Its main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </reference>
        <reference anchor="CDE">
          <front>
            <title>CBOR Common Deterministic Encoding (CDE)</title>
            <author fullname="Carsten Bormann" initials="C." surname="Bormann">
              <organization>Universität Bremen TZI</organization>
            </author>
            <date day="8" month="January" year="2024"/>
            <abstract>
              <t>   CBOR (STD 94, RFC 8949) defines "Deterministically Encoded CBOR" in
   its Section 4.2, providing some flexibility for application specific
   decisions.  To facilitate Deterministic Encoding to be offered as a
   selectable feature of generic encoders, the present document defines
   a CBOR Common Deterministic Encoding (CDE) Profile that can be shared
   by a large set of applications with potentially diverging detailed
   requirements.

   This document also introduces the concept of Application Profiles,
   which are layered on top of the CBOR CDE Profile and can address more
   application specific requirements.  Application Profiles are defined
   in separate documents.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-cbor-cde-01"/>
        </reference>
        <reference anchor="IANACDDL" target="https://www.iana.org/assignments/cddl">
          <front>
            <title>Concise Data Definition Language (CDDL)</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="BCSwiftDCBOR" target="https://github.com/BlockchainCommons/BCSwiftDCBOR">
          <front>
            <title>Deterministic CBOR (dCBOR) for Swift.</title>
            <author initials="W." surname="McNally" fullname="Wolf McNally">
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="BCRustDCBOR" target="https://github.com/BlockchainCommons/bc-dcbor-rust">
          <front>
            <title>Deterministic CBOR (dCBOR) for Rust.</title>
            <author initials="W." surname="McNally" fullname="Wolf McNally">
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="BCTypescriptDCBOR" target="https://github.com/BlockchainCommons/bc-dcbor-ts">
          <front>
            <title>Deterministic CBOR (dCBOR) for Typescript.</title>
            <author initials="W." surname="McNally" fullname="Wolf McNally">
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="GordianEnvelope">
          <front>
            <title>The Gordian Envelope Structured Data Format</title>
            <author fullname="Wolf McNally" initials="W." surname="McNally">
              <organization>Blockchain Commons</organization>
            </author>
            <author fullname="Christopher Allen" initials="C." surname="Allen">
              <organization>Blockchain Commons</organization>
            </author>
            <date day="20" month="August" year="2023"/>
            <abstract>
              <t>   Gordian Envelope specifies a structured format for hierarchical
   binary data focused on the ability to transmit it in a privacy-
   focused way, offering support for privacy as described in RFC 6973
   and human rights as described in RFC 8280.  Envelopes are designed to
   facilitate "smart documents" and have a number of unique features
   including: easy representation of a variety of semantic structures, a
   built-in Merkle-like digest tree, deterministic representation using
   CBOR, and the ability for the holder of a document to selectively
   elide specific parts of a document without invalidating the digest
   tree structure.  This document specifies the base Envelope format,
   which is designed to be extensible.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mcnally-envelope-05"/>
        </reference>
        <reference anchor="cbor-deterministic" target="https://github.com/cabo/cbor-deterministic">
          <front>
            <title>cbor-deterministic gem</title>
            <author initials="C." surname="Bormann" fullname="Carsten Bormann">
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="cbor-diag" target="https://github.com/cabo/cbor-diag">
          <front>
            <title>CBOR diagnostic utilities</title>
            <author initials="C." surname="Bormann" fullname="Carsten Bormann">
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="cbor-dcbor" target="https://github.com/cabo/cbor-dcbor">
          <front>
            <title>PoC of the McNally/Allen dCBOR application-level CBOR representation rules</title>
            <author initials="C." surname="Bormann" fullname="Carsten Bormann">
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="RFC7942">
          <front>
            <title>Improving Awareness of Running Code: The Implementation Status Section</title>
            <author fullname="Y. Sheffer" initials="Y." surname="Sheffer"/>
            <author fullname="A. Farrel" initials="A." surname="Farrel"/>
            <date month="July" year="2016"/>
            <abstract>
              <t>This document describes a simple process that allows authors of Internet-Drafts to record the status of known implementations by including an Implementation Status section. This will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.</t>
              <t>This process is not mandatory. Authors of Internet-Drafts are encouraged to consider using the process for their documents, and working groups are invited to think about applying the process to all of their protocol specifications. This document obsoletes RFC 6982, advancing it to a Best Current Practice.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="205"/>
          <seriesInfo name="RFC" value="7942"/>
          <seriesInfo name="DOI" value="10.17487/RFC7942"/>
        </reference>
      </references>
    </references>
    <?line 329?>

<section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The authors are grateful for the contributions of Joe Hildebrand, Laurence Lundblade, and Anders Rundgren in the CBOR working group.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA8Vb63bbRpL+j6fopX+MNIeELlaUmLnKkpwoa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