<?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.19 (Ruby 3.3.3) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-taylor-dtn-demux-02" category="std" consensus="true" submissionType="IETF" updates="[9171]" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.23.1 -->
  <front>
    <title abbrev="dtn-demux">Bundle Protocol Version Demultiplexing</title>
    <seriesInfo name="Internet-Draft" value="draft-taylor-dtn-demux-02"/>
    <author fullname="Rick Taylor">
      <organization>Aalyria Technologies</organization>
      <address>
        <email>rtaylor@aalyria.com</email>
      </address>
    </author>
    <date year="2024" month="October" day="01"/>
    <area>Internet Area (int)</area>
    <workgroup>DTN Working Group</workgroup>
    <keyword>DTN</keyword>
    <keyword>BPv7</keyword>
    <keyword>Bundle Protocol</keyword>
    <abstract>
      <?line 44?>

<t>Since the publication of <xref target="RFC5050"/> a number of transport and convergence layer protocols have been developed to carry bundles between nodes in a delay-tolerant network.  Before the publication of Bundle Protocol version 7 (BPv7) in <xref target="RFC9171"/>, there was only one standardized version of the Bundle Protocol, version 6, and as many of these transport and convergence-layer protocols pre-date the publication of version 7, they do not include any protocol mechanism to differentiate between versions of the Bundle Protocol.</t>
      <t>This document describes a mechanism by which an implementation can efficiently determine validity and the version of the Bundle Protocol that was used to encode a bundle by examining the initial octets of the encoded data, allowing this document to be used as a normative reference for updates to existing protocols.</t>
      <t>Additionally, this document updates <xref target="RFC9171"/> by defining a CBOR <xref target="RFC8949"/> tag that may be used as an explicit indicator that a particular indefinite-length CBOR array is a Bundle Protocol version 7 bundle.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://example.com/LATEST"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-taylor-dtn-demux/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Delay/Disruption Tolerant Networking Working Group mailing list (<eref target="mailto:dtn@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/dtn/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/dtn/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/ietf-wg-dtn/draft-dtn-demux"/>.</t>
    </note>
  </front>
  <middle>
    <?line 52?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>With the publication of the Bundle Protocol version 6 (BPv6) in <xref target="RFC5050"/>, many groups began experimenting and deploying Delay and Disruption Tolerant Networks (DTNs).  These networks relied on Convergence Layer Adaptors (CLAs) to perform the hop-by-hop transport of bundles, and several specifications emerged defining how to encapsulate bundles in suitable wrappers for transport over existing space data-links.  At the same time, new link-layer protocols were developed and standardized to provide the efficient transport of bundles between nodes of larger DTN networks.</t>
      <t>The success of these networks drove the development of Bundle Protocol version 7 (BPv7), incorporating the lessons learned from BPv6, resulting in <xref target="RFC9171"/> some fifteen years later.  Since the publication of BPv7 there has been impetus to deploy larger, more capable BPv7 DTNs, but there remains a need to update the existing BPv6 networks to support in some way coexistence with BPv6.  Many of the CLAs and link-layer encapsulations were defined with a completely reasonable assumption that any future bundle protocol version would maintain a similar binary representation to BPv6, and hence determining the version in use would be a matter for the Bundle Processing Agent (BPA) and not a concern of the CLA or encapsulation protocol.  Hence many of these existing specifications lack a field an implementation can use to distinguish the version of the bundle protocol used to format the bundle.</t>
      <t>Unfortunately, Bundle Protocol version 6 and 7 fundamentally differ in binary representation: the former uses Self-Delimiting Numeric Values (SDNVs), see <xref section="4.1" sectionFormat="of" target="RFC5050"/>, and the latter Concise Binary Object Representation (CBOR), see <xref section="4.1" sectionFormat="of" target="RFC9171"/>.  Luckily differentiating between SDNVs and CBOR is simple: the first octet of a SDNV encoded BPv6 bundle is not a valid first octet of the CBOR representation of a BPv7 bundle.  However, given CBOR is a general-purpose representation of binary encoded objects, differentiating between a CBOR-encoded BPv7 bundle and another data item that is not a bundle, but is binary encoded using CBOR, is less simple and can require more expensive parsing to determine the difference.</t>
      <t>The purpose of this document is to provide two simple to implement mechanisms that can:</t>
      <ol spacing="normal" type="1"><li>
          <t>Avoid the need to upgrade every CLA and bundle encapsulation specification published in the era of BPv6 that lack an explicit version indicator, to support BPv7.  This document can instead be normatively referenced as a standard demultiplexing mechanism in a simple update to an affected specification.</t>
        </li>
        <li>
          <t>Avoid the need for a bundle processing agent to fully parse every received sequence of octets with an SDNV parser and a CBOR parser, both reasonably expensive operations, just to determine if the octets are even a binary encoding of a version 6 or 7 bundle.</t>
        </li>
      </ol>
      <section anchor="applicability">
        <name>Applicability</name>
        <t>The following protocols are known to be capable of transporting or encapsulating bundles, but to not have an in-band mechanism to differentiate between versions 6 and 7 of the Bundle Protocol:</t>
        <ul spacing="normal">
          <li>
            <t>Licklider Transmission Protocol (LTP) <xref target="RFC5326"/></t>
          </li>
          <li>
            <t>Delay-Tolerant Networking TCP Convergence-Layer Protocol (TCP-CLv3) <xref target="RFC7242"/></t>
          </li>
          <li>
            <t>Datagram Convergence Layers for the Delay- and Disruption-Tolerant Networking (DTN) Bundle Protocol and Licklider Transmission Protocol (LTP) <xref target="RFC7122"/></t>
          </li>
          <li>
            <t>CCSDS Encapsulation Packet Protocol (EPP) <xref target="EPP"/></t>
          </li>
        </ul>
        <t>Other protocols which lack a bundle version indication field may also exist for which this document is relevant.</t>
      </section>
    </section>
    <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 anchor="bundle-version-detection">
      <name>Bundle version detection</name>
      <t>In order to make the determination of the version of the Bundle Protocol used to encode a particular bundle, or even if a sequence of octets is an encoded bundle at all, the following demultiplexing logic is <bcp14>RECOMMENDED</bcp14> to implementations.</t>
      <t>The <xref target="tab-demux">table below</xref> describes the range of values of the initial octets of a sequence of octets and the likely data item that the octet stream represents.  By matching the initial octets of a protocol data unit to the values in this table the likely format of the encoded bundle can be efficiently determined, avoiding repeated processor-intensive parsing.  An implementation <bcp14>MAY</bcp14> match against the first octet only, or up to all four initial octets, depending on the accuracy of determination required.</t>
      <t>The ability to make a distinction between the types and representations of data items by examining the initial octets makes the technique suitable for implementation in firmware, however this mechanism does not indicate the correctness of any encoding or data represented, and further parsing and validation <bcp14>MUST</bcp14> be performed.</t>
      <table align="left" anchor="tab-demux">
        <name>Initial octets and likely data item</name>
        <thead>
          <tr>
            <th align="left">Octet[0]</th>
            <th align="left">Octet[1]</th>
            <th align="left">Octet[2]</th>
            <th align="left">Octet[3]</th>
            <th align="left">Likely data item</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">0x06</td>
            <td align="left">any</td>
            <td align="left">any</td>
            <td align="left">any</td>
            <td align="left">BPv6 bundle, encoded as per <xref target="RFC5050"/>.</td>
          </tr>
          <tr>
            <td align="left">0x9F</td>
            <td align="left">0x88..0x8B</td>
            <td align="left">0x07</td>
            <td align="left">0x00..0x1B</td>
            <td align="left">BPv7 bundle, encoded as per <xref target="RFC9171"/>.</td>
          </tr>
          <tr>
            <td align="left">0xD9</td>
            <td align="left">0x23</td>
            <td align="left">0xD3</td>
            <td align="left">0x9F</td>
            <td align="left">
              <xref target="tag">Tagged</xref> BPv7 bundle.</td>
          </tr>
          <tr>
            <td align="left">0xD9</td>
            <td align="left">0xD9</td>
            <td align="left">0xF7</td>
            <td align="left">0x9F</td>
            <td align="left">BPv7 bundle, encoded as per <xref section="B" sectionFormat="of" target="RFC9171"/>.</td>
          </tr>
        </tbody>
      </table>
      <t><strong>Note</strong>: Octet ranges in the <xref target="tab-demux">table above</xref> are inclusive, meaning that for every value V in X..Y, X &lt;= V &lt;= Y.</t>
    </section>
    <section anchor="tag">
      <name>The BPv7 CBOR Tag type</name>
      <t>The absence of any standard tag complicates the implementation of any transport protocol that must handle not only BPv7 bundles, but also other protocol data units that may be represented as CBOR indefinite-length arrays.  In order to reduce the complexity of demultiplexing CBOR-encoded BPv7 bundles from other CBOR-encoded protocol data units, the presence of a IANA registered tag can provide additional assurance to a decoding implementation that a CBOR-encoded indefinite array is most likely a CBOR-representation of a BPv7 bundle.  This document requests a new CBOR Tag <xref section="3.4" sectionFormat="of" target="RFC8949"/> from IANA, see <xref target="iana">IANA Considerations</xref>, to indicate that the array is indeed the CBOR representation of a BPv7 bundle.</t>
      <t>The addition of this CBOR tag increases the overall size of the CBOR representation of a bundle by three octets, and in some resource constrained environments this may be unwanted overhead.  However, in environments where speed of processing is more important than the size of encoded bundles, the improvement in accuracy of fast bundle validity and version detection gained by using the tag may be advantageous.</t>
      <t>The addition of this tag updates <xref section="4.1" sectionFormat="of" target="RFC9171"/> in the following way:</t>
      <ul spacing="normal">
        <li>
          <t>An implementation <bcp14>MAY</bcp14> tag the CBOR representation of the outermost indefinite-length array of blocks of a BPv7 bundle with the tag defined in this document.</t>
        </li>
        <li>
          <t>Implementations that process bundles <bcp14>MAY</bcp14> use the presence of this tag to determine that the CBOR array encodes a Bundle Protocol version 7 bundle.</t>
        </li>
      </ul>
      <t>TBD: What about tag(55799)?</t>
      <section anchor="convergence-layer-adaptor-configuration">
        <name>Convergence Layer Adaptor configuration</name>
        <t>Given a CBOR tag can be removed from the CBOR encoding of an array without affecting the content of the array, and this tag, if used, would be the first three octets of any encoded bundle, it is reasonable for this tag to be added or removed from an encoded bundle as it passes hop-by-hop across a DTN.</t>
        <t>Therefore it is <bcp14>RECOMMENDED</bcp14> that the use of this tag be a per-CLA configuration option, whereby a system administrator can configure a BPv7 BPA to either add or remove the tag on a bundle at both ingress and egress from each available Convergence Layer Adaptor.</t>
        <t>By default, unless configured otherwise, a BPA <bcp14>SHOULD NOT</bcp14> add a tag if it does not already exist, and <bcp14>SHOULD NOT</bcp14> remove a tag if it does; i.e. the presence or absence of the tag is maintained unless alternate behavior is explicitly configured.</t>
        <t>The use of the tag can also be powerful with non-traditional CLAs.  For example, a CLA which is implemented using a general purpose shared filesystem such as NFS <xref target="RFC7530"/> or a portable storage device to distribute bundles could enforce that a tag is used when writing the encoded bundle to the filesystem, and then UNIX tools such as <tt>file</tt> could confidently verify that the file content was indeed a BPv7 bundle, and the default 'open' verb used by a desktop environment could be associated with a local bundle processing application.</t>
        <t>TBD: Is it worth registering a MIME/Media type for BPv7?</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This document does not impact or alter the existing security considerations described in <xref section="8" sectionFormat="of" target="RFC9171"/>, however it adds an additional consideration.</t>
      <section anchor="abuse-of-tags-as-a-side-channel">
        <name>Abuse of Tags as a side-channel</name>
        <t>As permitted in <xref section="4.1" sectionFormat="of" target="RFC9171"/>, implementations can follow "Postel's Law" by parsing and silently ignoring any tags, as tags are just type metadata that do not alter the content of the encoded bundle.  Given the processing cost of re-encoding bundles hop-by-hop, implementations could decide to forward bundles containing these silently-ignored tags to the next hop unmodified, but that creates an uncontrolled side-channel in the bundle protocol.</t>
        <t>To mitigate against the creation of a uncontrolled side-channel by the use of silently-ignored tags, <xref section="4.1" sectionFormat="of" target="RFC9171"/> is updated in the following way:</t>
        <ul spacing="normal">
          <li>
            <t>Even if an implementation of the Bundle Protocol accepts a sequence of bytes that does not conform to the protocol format requirements, the implementation <bcp14>MUST NOT</bcp14> transmit a CBOR representation of a bundle that does not conform to the protocol format requirements.</t>
          </li>
        </ul>
      </section>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>IANA is requested to allocate a new entry in the "CBOR Tags" sub-registry of the IANA "Concise Binary Object Representation (CBOR) Tags" registry, with the following values:</t>
      <ul spacing="normal">
        <li>
          <t>Tag: <tt>9171</tt>, to correspond with <xref target="RFC9171"/></t>
        </li>
        <li>
          <t>Data Item: <tt>array</tt></t>
        </li>
        <li>
          <t>Semantics: "Bundle Protocol version 7 bundle"</t>
        </li>
        <li>
          <t>Reference: This document</t>
        </li>
      </ul>
    </section>
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC9171">
          <front>
            <title>Bundle Protocol Version 7</title>
            <author fullname="S. Burleigh" initials="S." surname="Burleigh"/>
            <author fullname="K. Fall" initials="K." surname="Fall"/>
            <author fullname="E. Birrane, III" initials="E." surname="Birrane, III"/>
            <date month="January" year="2022"/>
            <abstract>
              <t>This document presents a specification for the Bundle Protocol, adapted from the experimental Bundle Protocol specification developed by the Delay-Tolerant Networking Research Group of the Internet Research Task Force and documented in RFC 5050.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9171"/>
          <seriesInfo name="DOI" value="10.17487/RFC9171"/>
        </reference>
        <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="RFC2119">
          <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">
          <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="EPP" target="https://public.ccsds.org/Pubs/133x1b3e1.pdf">
          <front>
            <title>CCSDS Encapsulation Packet Protocol</title>
            <author>
              <organization/>
            </author>
            <date>n.d.</date>
          </front>
        </reference>
        <reference anchor="RFC5050">
          <front>
            <title>Bundle Protocol Specification</title>
            <author fullname="K. Scott" initials="K." surname="Scott"/>
            <author fullname="S. Burleigh" initials="S." surname="Burleigh"/>
            <date month="November" year="2007"/>
            <abstract>
              <t>This document describes the end-to-end protocol, block formats, and abstract service description for the exchange of messages (bundles) in Delay Tolerant Networking (DTN).</t>
              <t>This document was produced within the IRTF's Delay Tolerant Networking Research Group (DTNRG) and represents the consensus of all of the active contributors to this group. See http://www.dtnrg.org for more information. This memo defines an Experimental Protocol for the Internet community.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5050"/>
          <seriesInfo name="DOI" value="10.17487/RFC5050"/>
        </reference>
        <reference anchor="RFC5326">
          <front>
            <title>Licklider Transmission Protocol - Specification</title>
            <author fullname="M. Ramadas" initials="M." surname="Ramadas"/>
            <author fullname="S. Burleigh" initials="S." surname="Burleigh"/>
            <author fullname="S. Farrell" initials="S." surname="Farrell"/>
            <date month="September" year="2008"/>
            <abstract>
              <t>This document describes the Licklider Transmission Protocol (LTP), designed to provide retransmission-based reliability over links characterized by extremely long message round-trip times (RTTs) and/or frequent interruptions in connectivity. Since communication across interplanetary space is the most prominent example of this sort of environment, LTP is principally aimed at supporting "long-haul" reliable transmission in interplanetary space, but it has applications in other environments as well.</t>
              <t>This document is a product of the Delay Tolerant Networking Research Group and has been reviewed by that group. No objections to its publication as an RFC were raised. This memo defines an Experimental Protocol for the Internet community.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="5326"/>
          <seriesInfo name="DOI" value="10.17487/RFC5326"/>
        </reference>
        <reference anchor="RFC7242">
          <front>
            <title>Delay-Tolerant Networking TCP Convergence-Layer Protocol</title>
            <author fullname="M. Demmer" initials="M." surname="Demmer"/>
            <author fullname="J. Ott" initials="J." surname="Ott"/>
            <author fullname="S. Perreault" initials="S." surname="Perreault"/>
            <date month="June" year="2014"/>
            <abstract>
              <t>This document describes the protocol for the TCP-based convergence layer for Delay-Tolerant Networking (DTN). It is the product of the IRTF's DTN Research Group (DTNRG).</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7242"/>
          <seriesInfo name="DOI" value="10.17487/RFC7242"/>
        </reference>
        <reference anchor="RFC7122">
          <front>
            <title>Datagram Convergence Layers for the Delay- and Disruption-Tolerant Networking (DTN) Bundle Protocol and Licklider Transmission Protocol (LTP)</title>
            <author fullname="H. Kruse" initials="H." surname="Kruse"/>
            <author fullname="S. Jero" initials="S." surname="Jero"/>
            <author fullname="S. Ostermann" initials="S." surname="Ostermann"/>
            <date month="March" year="2014"/>
            <abstract>
              <t>This document specifies the preferred method for transporting Delay- and Disruption-Tolerant Networking (DTN) protocol data over the Internet using datagrams. It covers convergence layers for the Bundle Protocol (RFC 5050), as well as the transportation of segments using the Licklider Transmission Protocol (LTP) (RFC 5326). UDP and the Datagram Congestion Control Protocol (DCCP) are the candidate datagram protocols discussed. UDP can only be used on a local network or in cases where the DTN node implements explicit congestion control. DCCP addresses the congestion control problem, and its use is recommended whenever possible. This document is a product of the Delay-Tolerant Networking Research Group (DTNRG) and represents the consensus of the DTNRG.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7122"/>
          <seriesInfo name="DOI" value="10.17487/RFC7122"/>
        </reference>
        <reference anchor="RFC7530">
          <front>
            <title>Network File System (NFS) Version 4 Protocol</title>
            <author fullname="T. Haynes" initials="T." role="editor" surname="Haynes"/>
            <author fullname="D. Noveck" initials="D." role="editor" surname="Noveck"/>
            <date month="March" year="2015"/>
            <abstract>
              <t>The Network File System (NFS) version 4 protocol is a distributed file system protocol that builds on the heritage of NFS protocol version 2 (RFC 1094) and version 3 (RFC 1813). Unlike earlier versions, the NFS version 4 protocol supports traditional file access while integrating support for file locking and the MOUNT protocol. In addition, support for strong security (and its negotiation), COMPOUND operations, client caching, and internationalization has been added. Of course, attention has been applied to making NFS version 4 operate well in an Internet environment.</t>
              <t>This document, together with the companion External Data Representation (XDR) description document, RFC 7531, obsoletes RFC 3530 as the definition of the NFS version 4 protocol.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7530"/>
          <seriesInfo name="DOI" value="10.17487/RFC7530"/>
        </reference>
      </references>
    </references>
    <?line 165?>

<section numbered="false" anchor="are-random-tags-allowed-to-be-removed">
      <name>Are random tags allowed? (To be removed)</name>
      <t>This behavior is already prohibited by <xref section="4.1-2" sectionFormat="of" target="RFC9171"/>, which states:</t>
      <ul empty="true">
        <li>
          <t>To ensure that blocks are always in canonical representation when they are transmitted and received, the CBOR encodings of the values of all fields in all blocks <bcp14>MUST</bcp14> conform to the core deterministic encoding requirements as specified in [RFC8949], except that indefinite-length items are not prohibited.</t>
        </li>
      </ul>
      <t><xref section="4.2.1" sectionFormat="of" target="RFC8949"/> sets out the core deterministic encoding requirements, but is a little non-obvious on the correct behavior with respect to tags.  <xref section="4.2.2-1" sectionFormat="of" target="RFC8949"/> however clarifies the situation with the following statement:</t>
      <ul empty="true">
        <li>
          <t>... the deterministic format would not allow the presence of the tag, based on the "shortest form" principle.</t>
        </li>
      </ul>
      <t>Indicating that tags appearing in an encoding that are not explicitly permitted by the relevant protocol specification, that requires compliance with the core deterministic encoding requirements, means the encoded value is not Well-formed as defined in <xref section="1.2" sectionFormat="of" target="RFC8949"/>.  Therefore a compliant BPv7 implementation <bcp14>MUST</bcp14> consider any CBOR representation of a bundle that includes tags not specified in <xref section="B" sectionFormat="of" target="RFC9171"/> or this document, as not Well-formed.</t>
    </section>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>Thanks are owed to Brian Sipos for doing similar work on demultiplexing the initial octets of bundles for the UDP-CL update, and Erik Kline for his valuable discussion and early review of this document.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA51a23bbRpZ9x1fU0A+xvEjKkp0o5iSdliy5ozWyrLHkXJY7
a6UIFMlqgQC7ChDNOP6X+Zb5stnnnCpcKMpJxg8WCdblXPe5YTQaJY8ePUoe
qfOiMq4w1ejU6VmlXmt3m5XrQt2Y5SrXlUlo0c3CelWFJ6r2xqtbp5e0cORm
6UQtqmrlJ/v7c1st6uk4LZf7qZ6W+91VdBKurGyVm4kanNRFlht15cqqTMtc
/WCct2WhTs2yziu7ys0HW8wHiZ5OnbnDhqwqRhl+/DBIUpAxL91monyVJUlW
poVe4tCMeBhVepOXbtSsHz09THw9XVpPF1SbFVaen928UuqR0rkvcbYtMrMy
+K+oBkM1MJmtSmd1Tl/Oj0/wp3T49Pbm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