<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-core-echo-request-tag-14" indexInclude="true" ipr="trust200902" number="9175" prepTime="2022-02-24T13:19:47" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" updates="7252" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-core-echo-request-tag-14" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9175" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="Echo, Request-Tag, and Token Processing">Constrained Application Protocol (CoAP): Echo, Request-Tag, and Token Processing</title>
    <seriesInfo name="RFC" value="9175" stream="IETF"/>
    <author initials="C." surname="Amsüss" fullname="Christian Amsüss">
      <organization showOnFrontPage="true"/>
      <address>
        <email>christian@amsuess.com</email>
      </address>
    </author>
    <author initials="J." surname="Preuß Mattsson" fullname="John Preuß Mattsson">
      <organization showOnFrontPage="true">Ericsson AB</organization>
      <address>
        <email>john.mattsson@ericsson.com</email>
      </address>
    </author>
    <author initials="G." surname="Selander" fullname="Göran Selander">
      <organization showOnFrontPage="true">Ericsson AB</organization>
      <address>
        <email>goran.selander@ericsson.com</email>
      </address>
    </author>
    <date month="02" year="2022"/>
    <area>ART</area>
    <workgroup>CoRE</workgroup>
    <keyword>OSCORE</keyword>
    <keyword>block-wise</keyword>
    <keyword>DTLS</keyword>
    <keyword>freshness</keyword>
    <keyword>delay</keyword>
    <keyword>denial-of-service</keyword>
    <keyword>amplification</keyword>
    <keyword>Message Body Integrity</keyword>
    <keyword>Concurrent Block-Wise</keyword>
    <keyword>Request-Response Binding</keyword>
    <keyword>Token Reuse</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">This document specifies enhancements to the Constrained Application Protocol
      (CoAP) that mitigate security issues in particular use cases. The Echo option enables
      a CoAP server to verify the freshness of a request or to force a client to
      demonstrate reachability at its claimed network address. The Request-Tag option
      allows the CoAP server to match block-wise message fragments belonging to the same
      request. This document updates RFC 7252 with respect to the following: processing
      requirements for client Tokens, forbidding non-secure reuse of Tokens to ensure response-to-request binding when CoAP is used with a security protocol, and
      amplification mitigation (where the use of the Echo option is now recommended).</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9175" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2022 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Revised BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Revised BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-request-freshness-and-the-e">Request Freshness and the Echo Option</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-request-freshness">Request Freshness</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-echo-option">The Echo Option</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.2.2">
                  <li pn="section-toc.1-1.2.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.2.2.1.1"><xref derivedContent="2.2.1" format="counter" sectionFormat="of" target="section-2.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-echo-option-format">Echo Option Format</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-echo-processing">Echo Processing</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.4">
                <t indent="0" pn="section-toc.1-1.2.2.4.1"><xref derivedContent="2.4" format="counter" sectionFormat="of" target="section-2.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-applications-of-the-echo-op">Applications of the Echo Option</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.5">
                <t indent="0" pn="section-toc.1-1.2.2.5.1"><xref derivedContent="2.5" format="counter" sectionFormat="of" target="section-2.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-characterization-of-echo-ap">Characterization of Echo Applications</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.5.2">
                  <li pn="section-toc.1-1.2.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.5.2.1.1"><xref derivedContent="2.5.1" format="counter" sectionFormat="of" target="section-2.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-time-based-versus-event-bas">Time-Based versus Event-Based Freshness</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.2.2.5.2.2.1"><xref derivedContent="2.5.2" format="counter" sectionFormat="of" target="section-2.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-authority-over-used-informa">Authority over Used Information</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.5.2.3">
                    <t indent="0" pn="section-toc.1-1.2.2.5.2.3.1"><xref derivedContent="2.5.3" format="counter" sectionFormat="of" target="section-2.5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protection-by-a-security-pr">Protection by a Security Protocol</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.6">
                <t indent="0" pn="section-toc.1-1.2.2.6.1"><xref derivedContent="2.6" format="counter" sectionFormat="of" target="section-2.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-updated-amplification-mitig">Updated Amplification Mitigation Requirements for Servers</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protecting-message-bodies-u">Protecting Message Bodies Using Request Tags</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2">
              <li pn="section-toc.1-1.3.2.1">
                <t indent="0" pn="section-toc.1-1.3.2.1.1"><xref derivedContent="3.1" format="counter" sectionFormat="of" target="section-3.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-fragmented-message-body-int">Fragmented Message Body Integrity</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.2">
                <t indent="0" pn="section-toc.1-1.3.2.2.1"><xref derivedContent="3.2" format="counter" sectionFormat="of" target="section-3.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-the-request-tag-option">The Request-Tag Option</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.2.2">
                  <li pn="section-toc.1-1.3.2.2.2.1">
                    <t indent="0" pn="section-toc.1-1.3.2.2.2.1.1"><xref derivedContent="3.2.1" format="counter" sectionFormat="of" target="section-3.2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-request-tag-option-format">Request-Tag Option Format</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.3.2.3">
                <t indent="0" pn="section-toc.1-1.3.2.3.1"><xref derivedContent="3.3" format="counter" sectionFormat="of" target="section-3.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-request-tag-processing-by-s">Request-Tag Processing by Servers</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.4">
                <t indent="0" pn="section-toc.1-1.3.2.4.1"><xref derivedContent="3.4" format="counter" sectionFormat="of" target="section-3.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-setting-the-request-tag">Setting the Request-Tag</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.5">
                <t indent="0" pn="section-toc.1-1.3.2.5.1"><xref derivedContent="3.5" format="counter" sectionFormat="of" target="section-3.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-applications-of-the-request">Applications of the Request-Tag Option</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.3.2.5.2">
                  <li pn="section-toc.1-1.3.2.5.2.1">
                    <t indent="0" pn="section-toc.1-1.3.2.5.2.1.1"><xref derivedContent="3.5.1" format="counter" sectionFormat="of" target="section-3.5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-body-integrity-based-on-pay">Body Integrity Based on Payload Integrity</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.5.2.2">
                    <t indent="0" pn="section-toc.1-1.3.2.5.2.2.1"><xref derivedContent="3.5.2" format="counter" sectionFormat="of" target="section-3.5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-multiple-concurrent-block-w">Multiple Concurrent Block-Wise Operations</xref></t>
                  </li>
                  <li pn="section-toc.1-1.3.2.5.2.3">
                    <t indent="0" pn="section-toc.1-1.3.2.5.2.3.1"><xref derivedContent="3.5.3" format="counter" sectionFormat="of" target="section-3.5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-simplified-block-wise-handl">Simplified Block-Wise Handling for Constrained Proxies</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.3.2.6">
                <t indent="0" pn="section-toc.1-1.3.2.6.1"><xref derivedContent="3.6" format="counter" sectionFormat="of" target="section-3.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rationale-for-the-option-pr">Rationale for the Option Properties</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.7">
                <t indent="0" pn="section-toc.1-1.3.2.7.1"><xref derivedContent="3.7" format="counter" sectionFormat="of" target="section-3.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-rationale-for-introducing-t">Rationale for Introducing the Option</xref></t>
              </li>
              <li pn="section-toc.1-1.3.2.8">
                <t indent="0" pn="section-toc.1-1.3.2.8.1"><xref derivedContent="3.8" format="counter" sectionFormat="of" target="section-3.8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-block2-and-etag-processing">Block2 and ETag Processing</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-token-processing-for-secure">Token Processing for Secure Request-Response Binding</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-request-response-binding">Request-Response Binding</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-updated-token-processing-re">Updated Token Processing Requirements for Clients</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-token-reuse">Token Reuse</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-privacy-considerations">Privacy Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-methods-for-generating-echo">Methods for Generating Echo Option Values</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="Appendix B" format="default" sectionFormat="of" target="section-appendix.b"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-request-tag-message-size-im">Request-Tag Message Size Impact</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.d"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The initial suite of specifications for the Constrained Application Protocol (CoAP)
      (<xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>, <xref target="RFC7641" format="default" sectionFormat="of" derivedContent="RFC7641"/>, and
      <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/>) was designed with the assumption that
      security could be provided on a separate layer, in particular, by using DTLS <xref target="RFC6347" format="default" sectionFormat="of" derivedContent="RFC6347"/>. However, for some use cases, additional
      functionality or extra processing is needed to support secure CoAP operations. This
      document specifies security enhancements to CoAP.</t>
      <t indent="0" pn="section-1-2">This document specifies two CoAP options, the Echo option and the Request-Tag
      option. The Echo option enables a CoAP server to verify the freshness of a request,
      which can be used to synchronize state, or to force a client to demonstrate
      reachability at its claimed network address. The Request-Tag option allows the CoAP
      server to match message fragments belonging to the same request, fragmented using the
      CoAP block-wise transfer mechanism, which mitigates attacks and enables concurrent
      block-wise operations. These options in themselves do not replace the need for a
      security protocol; they specify the format and processing of data that, when
      integrity protected using, e.g., DTLS <xref target="RFC6347" format="default" sectionFormat="of" derivedContent="RFC6347"/>, TLS
      <xref target="RFC8446" format="default" sectionFormat="of" derivedContent="RFC8446"/>, or Object Security for Constrained
      RESTful Environments (OSCORE) <xref target="RFC8613" format="default" sectionFormat="of" derivedContent="RFC8613"/>, provide the additional security features.</t>
      <t indent="0" pn="section-1-3">This document updates <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/> with a
      recommendation that servers use the Echo option to mitigate amplification attacks.</t>
      <t indent="0" pn="section-1-4">The document also updates the Token processing requirements for clients specified
      in <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>. The updated processing forbids
      non-secure reuse of Tokens to ensure binding of responses to requests when CoAP is
      used with security, thus mitigating error cases and attacks where the client may
      erroneously associate the wrong response to a request.</t>
      <t indent="0" pn="section-1-5">Each of the following sections provides a more-detailed introduction to the topic
      at hand in its first subsection.</t>
      <section anchor="terminology" numbered="true" toc="include" removeInRFC="false" pn="section-1.1">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.1-1">
	  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" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and only when, they appear in all capitals, as shown
	  here.
        </t>
        <t indent="0" pn="section-1.1-2">Like <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>, this document relies
	on the Representational State Transfer <xref target="REST" format="default" sectionFormat="of" derivedContent="REST"/>
	architecture of the Web.</t>
        <t indent="0" pn="section-1.1-3">Unless otherwise specified, the terms "client" and "server" refer to "CoAP
	client" and "CoAP server", respectively, as defined in <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>.</t>
        <t indent="0" pn="section-1.1-4">A message's "freshness" is a measure of when a message was sent on a timescale
	of the recipient. A server that receives a request can either verify that the
	request is fresh or determine that it cannot be verified that the request is fresh.
	What is considered a fresh message is application dependent;
	exemplary uses are "no more than 42 seconds ago" or "after this server's last
	reboot".</t>
        <t indent="0" pn="section-1.1-5">The terms "payload" and "body" of a message are used as in <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/>.  The complete interchange of a request and a
	response body is called a (REST) "operation". An operation fragmented using <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/> is called a "block-wise operation". A
	block-wise operation that is fragmenting the request body is called a "block-wise
	request operation".  A block-wise operation that is fragmenting the response body
	is called a "block-wise response operation".</t>
        <t indent="0" pn="section-1.1-6">Two request messages are said to be "matchable" if they occur between the same
	endpoint pair, have the same code, and have the same set of options, with the
	exception that elective NoCacheKey options and options involved in block-wise
	transfer (Block1, Block2, and Request-Tag) need not be the same.
        Two blockwise request operations are said to be matchable if their request
	messages are matchable.</t>
        <t indent="0" pn="section-1.1-7">Two matchable block-wise request operations are said to be "concurrent" if a
	block of
	the second request is exchanged even though the client still intends to exchange
	further blocks in the first operation. (Concurrent block-wise request operations
	from a single endpoint are impossible with the options of <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/> -- see the last paragraphs of Sections <xref target="RFC7959" section="2.4" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7959#section-2.4" derivedContent="RFC7959"/> and <xref target="RFC7959" section="2.5" sectionFormat="bare" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7959#section-2.5" derivedContent="RFC7959"/> -- because the second operation's block overwrites any state
	of the first exchange.)</t>
        <t indent="0" pn="section-1.1-8">The Echo and Request-Tag options are defined in this document.</t>
      </section>
    </section>
    <section anchor="echo" numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-request-freshness-and-the-e">Request Freshness and the Echo Option</name>
      <section anchor="req-fresh" numbered="true" toc="include" removeInRFC="false" pn="section-2.1">
        <name slugifiedName="name-request-freshness">Request Freshness</name>
        <t indent="0" pn="section-2.1-1">A CoAP server receiving a request is, in general, not able to verify when the
	request was sent by the CoAP client. This remains true even if the request was
	protected with a security protocol, such as DTLS. This makes CoAP requests
	vulnerable to certain delay attacks that are particularly perilous in the case of
	actuators <xref target="I-D.mattsson-core-coap-attacks" format="default" sectionFormat="of" derivedContent="COAP-ATTACKS"/>. Some
	attacks can be mitigated by establishing fresh session keys, e.g., performing a DTLS
	handshake for each request, but, in general, this is not a solution suitable for
	constrained environments, for example, due to increased message overhead and
	latency. Additionally, if there are proxies, fresh DTLS session keys between the
	server
	and the proxy do not say anything about when the client made the request. In a
	general hop-by-hop setting, freshness may need to be verified in each hop.</t>
        <t indent="0" pn="section-2.1-2">A straightforward mitigation of potential delayed requests is that the CoAP
	server rejects a request the first time it appears and asks the CoAP client to
	prove that it intended to make the request at this point in time.</t>
      </section>
      <section anchor="the-echo-option" numbered="true" toc="include" removeInRFC="false" pn="section-2.2">
        <name slugifiedName="name-the-echo-option">The Echo Option</name>
        <t indent="0" pn="section-2.2-1">This document defines the Echo option, a lightweight challenge-response
	mechanism for CoAP that enables a CoAP server to verify the freshness of a request.
	A fresh request is one whose age has not yet exceeded the freshness requirements
	set by the server. The freshness requirements are application specific and may vary
	based on resource, method, and parameters outside of CoAP, such as policies. The
	Echo option value is a challenge from the server to the client included in a CoAP
	response and echoed back to the server in one or more CoAP requests.</t>
        <t indent="0" pn="section-2.2-2">This mechanism is not only important in the case of actuators, or other use
	cases where the CoAP operations require freshness of requests, but also in general
	for synchronizing state between a CoAP client and server, cryptographically
	verifying
	the aliveness of the client or forcing a client to demonstrate reachability at its
	claimed network address. The same functionality can be provided by echoing
	freshness indicators in CoAP payloads, but this only works for methods and response
	codes defined to have a payload. The Echo option provides a convention to transfer
	freshness indicators that works for all methods and response codes.</t>
        <section anchor="echo-format" numbered="true" toc="include" removeInRFC="false" pn="section-2.2.1">
          <name slugifiedName="name-echo-option-format">Echo Option Format</name>
          <t indent="0" pn="section-2.2.1-1">The Echo option is elective, safe to forward, not part of the cache-key, and
	  not repeatable (see <xref target="echo-table" format="default" sectionFormat="of" derivedContent="Table 1"/>, which extends
	  Table 4 of <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>).</t>
          <table anchor="echo-table" align="left" pn="table-1">
            <name slugifiedName="name-echo-option-summary">Echo Option Summary</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">No.</th>
                <th align="left" colspan="1" rowspan="1">C</th>
                <th align="left" colspan="1" rowspan="1">U</th>
                <th align="left" colspan="1" rowspan="1">N</th>
                <th align="left" colspan="1" rowspan="1">R</th>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Format</th>
                <th align="left" colspan="1" rowspan="1">Length</th>
                <th align="left" colspan="1" rowspan="1">Default</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">252</td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">x</td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">Echo</td>
                <td align="left" colspan="1" rowspan="1">opaque</td>
                <td align="left" colspan="1" rowspan="1">1-40</td>
                <td align="left" colspan="1" rowspan="1">(none)</td>
              </tr>
            </tbody>
          </table>
          <t indent="0" pn="section-2.2.1-3">C=Critical, U=Unsafe, N=NoCacheKey, R=Repeatable</t>
          <t indent="0" pn="section-2.2.1-4">The Echo option value is generated by a server, and its content and structure
	  are implementation specific. Different methods for generating Echo option values
	  are outlined in <xref target="echo-state" format="default" sectionFormat="of" derivedContent="Appendix A"/>. Clients and
	  intermediaries <bcp14>MUST</bcp14> treat an Echo option value as opaque and make
	  no assumptions about its content or structure.</t>
          <t indent="0" pn="section-2.2.1-5">When receiving an Echo option in a request, the server <bcp14>MUST</bcp14> be
	  able to verify that the Echo option value (a) was generated by the server or some
	  other party that the server trusts and (b) fulfills the freshness requirements
	  of the application. Depending on the freshness requirements, the server may verify
	  exactly when the Echo option value was generated (time-based freshness) or verify
	  that the Echo option was generated after a specific event (event-based
	  freshness). As the request is bound to the Echo option value, the server can
	  determine that the request is not older than the Echo option value.</t>
          <t indent="0" pn="section-2.2.1-6">When the Echo option is used with OSCORE <xref target="RFC8613" format="default" sectionFormat="of" derivedContent="RFC8613"/>, it <bcp14>MAY</bcp14> be an Inner or Outer option, and the
	  Inner and Outer values are independent. OSCORE servers <bcp14>MUST</bcp14> only
	  produce Inner Echo options unless they are merely testing for reachability of the
	  client (the same as proxies may do). The Inner option is encrypted and integrity
	  protected between the endpoints, whereas the Outer option is not protected by
	  OSCORE. As always with OSCORE, Outer options are visible to (and may be acted on
	  by) all proxies and are visible on all links where no additional encryption
	  (like TLS between client and proxy) is used.</t>
        </section>
      </section>
      <section anchor="echo-proc" numbered="true" toc="include" removeInRFC="false" pn="section-2.3">
        <name slugifiedName="name-echo-processing">Echo Processing</name>
        <t indent="0" pn="section-2.3-1">The Echo option <bcp14>MAY</bcp14> be included in any request or response (see
	<xref target="echo-app" format="default" sectionFormat="of" derivedContent="Section 2.4"/> for different applications).</t>
        <t indent="0" pn="section-2.3-2">The application decides under what conditions a CoAP request to a resource is
	required to be fresh. These conditions can, for example, include what resource is
	requested, the request method and other data in the request, and conditions in the
	environment, such as the state of the server or the time of the day.</t>
        <t indent="0" pn="section-2.3-3">If a certain request is required to be fresh, the request does not contain a
	fresh Echo option value, and the server cannot verify the freshness of the request
	in some other way, the server <bcp14>MUST NOT</bcp14> process the request further
	and <bcp14>SHOULD</bcp14> send a 4.01 (Unauthorized) response with an Echo option.
	The server <bcp14>MAY</bcp14> include the same Echo option value in several
	different response messages and to different clients. Examples of this could be
	time-based freshness (when several responses are sent closely after each other) or
	event-based freshness (with no event taking place between the responses).</t>
        <t indent="0" pn="section-2.3-4">The server may use request freshness provided by the Echo option to verify the
	aliveness of a client or to synchronize state. The server may also include the Echo
	option in a response to force a client to demonstrate reachability at its claimed
	network address. Note that the Echo option does not bind a request to any
	particular previous response but provides an indication that the client had access
	to the previous response at the time when it created the request.</t>
        <t indent="0" pn="section-2.3-5">Upon receiving a 4.01 (Unauthorized) response with the Echo option, the client
	<bcp14>SHOULD</bcp14> resend the original request with the addition of an Echo
	option with the received Echo option value. The client <bcp14>MAY</bcp14> send a
	different request compared to the original request. Upon receiving any other
	response with the Echo option, the client <bcp14>SHOULD</bcp14> echo the Echo
	option value in the next request to the server. The client <bcp14>MAY</bcp14>
	include the same Echo option value in several different requests to the server or
	discard it at any time (especially to avoid tracking; see <xref target="priv-cons" format="default" sectionFormat="of" derivedContent="Section 6"/>).</t>
        <t indent="0" pn="section-2.3-6">A client <bcp14>MUST</bcp14> only send Echo option values to endpoints it
	received them
	from (where, as defined in <xref target="RFC7252" section="1.2" sectionFormat="of" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7252#section-1.2" derivedContent="RFC7252"/>, the security association is part of the endpoint). In
	OSCORE processing, that means sending Echo option values from Outer options (or
	from non-OSCORE responses) back in Outer options and sending those from Inner
	options in Inner options in the same security context.</t>
        <t indent="0" pn="section-2.3-7">Upon receiving a request with the Echo option, the server determines if the
	request is required to be fresh. If not, the Echo option <bcp14>MAY</bcp14> be
	ignored. If the request is required to be fresh and the server cannot verify the
	freshness of the request in some other way, the server <bcp14>MUST</bcp14> use the
	Echo option to verify that the request is fresh. If the server cannot verify that
	the request is fresh, the request is not processed further, and an error message
	<bcp14>MAY</bcp14> be sent. The error message <bcp14>SHOULD</bcp14> include a new
	Echo option.</t>
        <t indent="0" pn="section-2.3-8">One way for the server to verify freshness is to bind the Echo option value to a
	specific point in time and verify that the request is not older than a certain
	threshold T. The server can verify this by checking that (t1 - t0) &lt; T, where t1
	is the request receive time and t0 is the time when the Echo option value was
	generated. An example message flow over DTLS is shown <xref target="echo-figure-time" format="default" sectionFormat="of" derivedContent="Figure 1"/>.</t>
        <figure anchor="echo-figure-time" align="left" suppress-title="false" pn="figure-1">
          <name slugifiedName="name-example-message-flow-for-ti">Example Message Flow for Time-Based Freshness Using the
	  'Integrity‑Protected Timestamp' Construction of Appendix A</name>
          <artwork align="center" name="" type="" alt="" pn="section-2.3-9.1">
Client   Server
   |       |
   +------&gt;|        Code: 0.03 (PUT)
   |  PUT  |       Token: 0x41
   |       |    Uri-Path: lock
   |       |     Payload: 0 (Unlock)
   |       |
   |&lt;------+        Code: 4.01 (Unauthorized)
   |  4.01 |       Token: 0x41
   |       |        Echo: 0x00000009437468756c687521 (t0 = 9, +MAC)
   |       |
   | ...   | The round trips take 1 second, time is now t1 = 10.
   |       |
   +------&gt;|        Code: 0.03 (PUT)
   |  PUT  |       Token: 0x42
   |       |    Uri-Path: lock
   |       |        Echo: 0x00000009437468756c687521 (t0 = 9, +MAC)
   |       |     Payload: 0 (Unlock)
   |       |
   |       | Verify MAC, compare t1 - t0 = 1 &lt; T =&gt; permitted.
   |       |
   |&lt;------+        Code: 2.04 (Changed)
   |  2.04 |       Token: 0x42
   |       |
</artwork>
        </figure>
        <t indent="0" pn="section-2.3-10">Another way for the server to verify freshness is to maintain a cache of values
	associated to events. The size of the cache is defined by the application. In the
	following, we assume the cache size is 1, in which case, freshness is defined as
	"no new event has taken place". At each event, a new value is written into the
	cache. The cache values <bcp14>MUST</bcp14> be different or chosen in a way so the
	probability for collisions is negligible.
	The server verifies freshness by checking that e0 equals e1, where e0 is the cached
	value when the Echo option value was generated, and e1 is the cached value at the
	reception of the request. An example message flow over DTLS is shown in <xref target="echo-figure-event" format="default" sectionFormat="of" derivedContent="Figure 2"/>.</t>
        <figure anchor="echo-figure-event" align="left" suppress-title="false" pn="figure-2">
          <name slugifiedName="name-example-message-flow-for-ev">Example Message Flow for Event-Based Freshness Using the 'Persistent
	  Counter' Construction of Appendix A</name>
          <artwork align="center" name="" type="" alt="" pn="section-2.3-11.1">
Client   Server
   |       |
   +------&gt;|        Code: 0.03 (PUT)
   |  PUT  |       Token: 0x41
   |       |    Uri-Path: lock
   |       |     Payload: 0 (Unlock)
   |       |
   |&lt;------+        Code: 4.01 (Unauthorized)
   |  4.01 |       Token: 0x41
   |       |        Echo: 0x05 (e0 = 5, number of total lock
   |       |                            operations performed)
   |       |
   | ...   | No alterations happen to the lock state, e1 has the
   |       | same value e1 = 5.
   |       |
   +------&gt;|        Code: 0.03 (PUT)
   |  PUT  |       Token: 0x42
   |       |    Uri-Path: lock
   |       |        Echo: 0x05
   |       |     Payload: 0 (Unlock)
   |       |
   |       | Compare e1 = e0 =&gt; permitted.
   |       |
   |&lt;------+        Code: 2.04 (Changed)
   |  2.04 |       Token: 0x42
   |       |        Echo: 0x06 (e2 = 6, to allow later locking
   |       |                            without more round trips)
   |       |
</artwork>
        </figure>
        <t indent="0" pn="section-2.3-12">When used to serve freshness requirements (including client aliveness and state
	synchronizing), the Echo option value <bcp14>MUST</bcp14> be integrity protected
	between the intended endpoints, e.g., using DTLS, TLS, or an OSCORE Inner option
	<xref target="RFC8613" format="default" sectionFormat="of" derivedContent="RFC8613"/>.
	When used to demonstrate reachability
	at a claimed network address, the Echo option <bcp14>SHOULD</bcp14> be a Message
	Authentication Code (MAC) of the
	claimed address but <bcp14>MAY</bcp14> be unprotected. Combining different Echo
	applications can necessitate different choices; see <xref target="echo-state" format="default" sectionFormat="of" derivedContent="Appendix A"/>, item 2 for an example.</t>
        <t indent="0" pn="section-2.3-13">An Echo option <bcp14>MAY</bcp14> be sent with a successful response, i.e., even though
	the request satisfied any freshness requirements on the operation. This is called a
	"preemptive" Echo option value and is useful when the server anticipates that the client
	will need to demonstrate freshness relative to the current response in the near future.</t>
        <t indent="0" pn="section-2.3-14">A CoAP-to-CoAP proxy <bcp14>MAY</bcp14> set an Echo option on responses, both on
	forwarded ones that had no Echo option or ones generated by the proxy (from cache
	or as an error). If it does so, it <bcp14>MUST</bcp14> remove the Echo option it
	recognizes as one generated by itself on follow-up requests. When it receives an
	Echo option in a response, it <bcp14>MAY</bcp14> forward it to the client (and, not
	recognizing it as its own in future requests, relay it in the other direction as
	well) or process it on its own. If it does so, it <bcp14>MUST</bcp14> ensure that
	the client's request was generated (or is regenerated) after the Echo option value
	used
	to send to the server was first seen. (In most cases, this means that the proxy
	needs to ask the client to repeat the request with a new Echo option value.)</t>
        <t indent="0" pn="section-2.3-15">The CoAP server side of CoAP-to-HTTP proxies <bcp14>MAY</bcp14> request
	freshness, especially if they have reason to assume that access may require it
	(e.g., because it is a PUT or POST); how this is determined is out of scope for this
	document. The CoAP client side of HTTP-to-CoAP proxies <bcp14>MUST</bcp14> respond
	to Echo challenges itself if the proxy knows from the recent establishing of the
	connection that the HTTP request is fresh. Otherwise, it <bcp14>MUST NOT</bcp14>
	repeat an unsafe request and <bcp14>SHOULD</bcp14> respond with a 503 (Service
	Unavailable) with a Retry-After value of 0 seconds and terminate any underlying
	Keep-Alive connection. If
	the HTTP request arrived in early data, the proxy <bcp14>SHOULD</bcp14> use a 425
	(Too Early) response instead (see <xref target="RFC8470" format="default" sectionFormat="of" derivedContent="RFC8470"/>). The
	proxy <bcp14>MAY</bcp14> also use other mechanisms to establish freshness of the
	HTTP request that are not specified here.</t>
      </section>
      <section anchor="echo-app" numbered="true" toc="include" removeInRFC="false" pn="section-2.4">
        <name slugifiedName="name-applications-of-the-echo-op">Applications of the Echo Option</name>
        <t indent="0" pn="section-2.4-1">Unless otherwise noted, all these applications require a security protocol to be
	used and the Echo option to be protected by it.</t>
        <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-2.4-2">
          <li pn="section-2.4-2.1" derivedCounter="1.">
            <t indent="0" pn="section-2.4-2.1.1">Actuation requests often require freshness guarantees to avoid accidental or
	    malicious delayed actuator actions. In general, all unsafe methods (e.g.,
	    POST, PUT, and DELETE) may require freshness guarantees for secure operation.
            </t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2.4-2.1.2">
              <li pn="section-2.4-2.1.2.1">The same Echo option value may be used for multiple actuation requests
	      to the
	      same server, as long as the total time since the Echo option value was
	      generated is below the freshness threshold.</li>
              <li pn="section-2.4-2.1.2.2">For actuator applications with low delay tolerance, to avoid additional
	      round trips for multiple requests in rapid sequence, the server may send
	      preemptive Echo option values in successful requests, irrespectively of
	      whether or not the
	      request contained an Echo option. The client then uses the Echo option
	      with the new value in the next actuation request, and the server compares the
	      receive time accordingly.</li>
            </ul>
          </li>
          <li pn="section-2.4-2.2" derivedCounter="2.">
            <t indent="0" pn="section-2.4-2.2.1">A server may use the Echo option to synchronize properties (such as state or
	    time) with a requesting client. A server <bcp14>MUST NOT</bcp14> synchronize a
	    property with a client that is not the authority of the property being
	    synchronized. For example, if access to a server resource is dependent on time,
	    then the server <bcp14>MUST NOT</bcp14> synchronize time with a client
	    requesting access unless the client is a time authority for the server. </t>
            <t indent="0" pn="section-2.4-2.2.2">Note that the state to be synchronized is not carried inside the Echo option.
	    Any explicit state information needs to be carried along in the messages the
	    Echo option value is sent in; the Echo mechanism only provides a partial order
	    on the messages' processing.  </t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2.4-2.2.3">
              <li pn="section-2.4-2.2.3.1">If a server reboots during operation, it may need to synchronize
	      state or
	      time before continuing the interaction. For example, with OSCORE, it is
	      possible to reuse a partly persistently stored security context by
	      synchronizing the Partial IV (sequence number) using the Echo option, as
	      specified in <xref target="RFC8613" sectionFormat="of" section="7.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8613#section-7.5" derivedContent="RFC8613"/>.</li>
              <li pn="section-2.4-2.2.3.2">A device joining a CoAP group communication <xref target="I-D.ietf-core-groupcomm-bis" format="default" sectionFormat="of" derivedContent="GROUP-COAP"/> protected with OSCORE
	      <xref target="I-D.ietf-core-oscore-groupcomm" format="default" sectionFormat="of" derivedContent="GROUP-OSCORE"/> may be
	      required to initially synchronize its replay window state with a client by
	      using the Echo option in a unicast response to a multicast request. The
	      client receiving the response with the Echo option includes the Echo option
	      value in a subsequent unicast request to the responding server.</li>
            </ul>
          </li>
          <li pn="section-2.4-2.3" derivedCounter="3.">
            <t indent="0" pn="section-2.4-2.3.1">An attacker can perform a denial-of-service attack by putting a victim's
	    address in the source address of a CoAP request and sending the request to a
	    resource with a large amplification factor. The amplification factor is the
	    ratio between the size of the request and the total size of the response(s) to
	    that request. A server that provides a large amplification factor to an
	    unauthenticated peer <bcp14>SHOULD</bcp14> mitigate amplification attacks, as
	    described in <xref target="RFC7252" sectionFormat="of" section="11.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7252#section-11.3" derivedContent="RFC7252"/>. One way
	    to mitigate such attacks is for the server to respond to the alleged source
	    address of the request with an Echo option in a short response message (e.g.,
	    4.01 (Unauthorized)), thereby requesting the client to verify its source
	    address. This
	    needs to be done only once per endpoint and limits the range of potential
	    victims from the general Internet to endpoints that have been previously in
	    contact with the server. For this application, the Echo option can be used in
	    messages that are not integrity protected, for example, during discovery. (This
	    is formally recommended in <xref target="ampl-mit" format="default" sectionFormat="of" derivedContent="Section 2.6"/>.)</t>
            <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-2.4-2.3.2">
              <li pn="section-2.4-2.3.2.1">In the presence of a proxy, a server will not be able to distinguish
	      different origin client endpoints, i.e., the client from which a request
	      originates. Following from the recommendation above, a
	      proxy that provides a large amplification factor to unauthenticated peers
	      <bcp14>SHOULD</bcp14> mitigate amplification attacks. The proxy
	      <bcp14>SHOULD</bcp14> use the Echo option to verify origin reachability, as
	      described in
	      <xref target="echo-proc" format="default" sectionFormat="of" derivedContent="Section 2.3"/>. The proxy <bcp14>MAY</bcp14>
	      forward safe requests immediately to have a cached result available when the
	      client's repeated request arrives.</li>
              <li pn="section-2.4-2.3.2.2">
                <t indent="0" pn="section-2.4-2.3.2.2.1">Amplification mitigation is a trade-off between giving leverage to an
		attacker and causing overhead. An amplification factor of 3 (i.e., don't
		send more than three times the number of bytes received until the peer's
		address is confirmed) is considered acceptable for unconstrained
		applications in <xref target="RFC9000" sectionFormat="comma" section="8" format="default" derivedLink="https://rfc-editor.org/rfc/rfc9000#section-8" derivedContent="RFC9000"/>.</t>
                <t indent="0" pn="section-2.4-2.3.2.2.2">When that limit is applied and no further context is available, a safe
		default is sending initial responses no larger than 136 bytes in CoAP
		serialization. (The number is assuming Ethernet, IP, and UDP headers of
		14, 40, and 8 bytes, respectively, with 4 bytes added for the CoAP header.
		Triple that minus the
		non-CoAP headers gives the 136 bytes.) Given the token also takes up space
		in the request, responding with 132 bytes after the token is safe as
		well.</t>
              </li>
              <li pn="section-2.4-2.3.2.3">When an Echo response is sent to mitigate amplification, it
	      <bcp14>MUST</bcp14> be sent as a piggybacked or Non-confirmable response,
	      never as a separate one (which would cause amplification due to
	      retransmission).</li>
            </ul>
          </li>
          <li pn="section-2.4-2.4" derivedCounter="4.">A server may want to use the request freshness provided by the Echo option
	  to verify the aliveness of a client. Note that, in a deployment with hop-by-hop
	  security and proxies, the server can only verify aliveness of the closest
	  proxy.</li>
        </ol>
      </section>
      <section anchor="characterization-of-echo-applications" numbered="true" toc="include" removeInRFC="false" pn="section-2.5">
        <name slugifiedName="name-characterization-of-echo-ap">Characterization of Echo Applications</name>
        <t indent="0" pn="section-2.5-1">Use cases for the Echo option can be characterized by several criteria that help
	determine the required properties of the Echo option value. These criteria apply
	both to those listed in <xref target="echo-app" format="default" sectionFormat="of" derivedContent="Section 2.4"/> and any novel
	applications. They provide rationale for the statements in the former and guidance
	for the latter.</t>
        <section anchor="time-versus-event-based-freshness" numbered="true" toc="include" removeInRFC="false" pn="section-2.5.1">
          <name slugifiedName="name-time-based-versus-event-bas">Time-Based versus Event-Based Freshness</name>
          <t indent="0" pn="section-2.5.1-1">The property a client demonstrates by sending an Echo option value is that the
	  request was sent after a certain point in time or after some event happened on
	  the server.</t>
          <t indent="0" pn="section-2.5.1-2">When events are counted, they form something that can be used as a monotonic
	  but very non-uniform time line. With highly regular events and low-resolution
	  time, the distinction between time-based and event-based freshness can be blurred:
	  "no longer than a month ago" is similar to "since the last full moon".</t>
          <t indent="0" pn="section-2.5.1-3">In an extreme form of event-based freshness,
	  the server can place an event whenever an Echo option value is used.
	  This makes the Echo option value effectively single use.</t>
          <t indent="0" pn="section-2.5.1-4">Event-based and time-based freshness can be combined in a single Echo option
	  value,
	  e.g., by encrypting a timestamp with a key that changes with every event
	  to obtain semantics in the style of "usable once but only for 5 minutes".</t>
        </section>
        <section anchor="source-of-truth" numbered="true" toc="include" removeInRFC="false" pn="section-2.5.2">
          <name slugifiedName="name-authority-over-used-informa">Authority over Used Information</name>
          <t indent="0" pn="section-2.5.2-1">Information conveyed to the server in the request Echo option value has
	  different
	  authority depending on the application. Understanding who or what is the
	  authoritative source of that information helps the server implementor decide the
	  necessary protection of the Echo option value.</t>
          <t indent="0" pn="section-2.5.2-2">If all that is conveyed to the server is information that the client is
	  authorized to provide arbitrarily (which is another way of saying that the
	  server has to trust the client on whatever the Echo option is being used for),
	  then the server can issue Echo option values that do not need to be protected on
	  their own. They still need to be covered by the security protocol that covers
	  the rest of the message, but the Echo option value can be just short enough to
	  be unique between this server and client.</t>
          <t indent="0" pn="section-2.5.2-3">For example, the client's OSCORE Sender Sequence Number (as used in <xref target="RFC8613" sectionFormat="comma" section="B.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8613#appendix-B.1.2" derivedContent="RFC8613"/>) is such information.</t>
          <t indent="0" pn="section-2.5.2-4">In most other cases, there is information conveyed for which the server is the
	  authority ("the request must not be older than five minutes" is counted on the
	  server's clock, not the client's) or which even involve the network (as when
	  performing amplification mitigation). In these cases, the Echo option value
	  itself needs
	  to be protected against forgery by the client, e.g., by using a sufficiently
	  large, random value or a MAC, as described in <xref target="echo-state" format="default" sectionFormat="of" derivedContent="Appendix A"/>, items 1 and 2.</t>
          <t indent="0" pn="section-2.5.2-5">For some applications, the server may be able to trust the client to also act
	  as the authority (e.g., when using time-based freshness purely to mitigate request
	  delay attacks); these need careful case-by-case evaluation.
          </t>
          <t indent="0" pn="section-2.5.2-6">To issue Echo option values without integrity protection of its own, the server needs to trust the
	  client to never produce requests with attacker-controlled Echo option values.
	  The provisions of <xref target="echo-proc" format="default" sectionFormat="of" derivedContent="Section 2.3"/> (saying that an
	  Echo option value may only be sent as received from the same server) allow that.
	  The requirement stated there for the client to treat the Echo option value as
	  opaque
	  holds for these applications like for all others.</t>
          <t indent="0" pn="section-2.5.2-7">When the client is the sole authority over the synchronized property,
	  the server can still use time or events to issue new Echo option values.
	  Then, the request's Echo option value not so much proves the indicated freshness
	  to the
	  server but reflects the client's intention to indicate reception of responses
	  containing that value when sending the later ones.</t>
          <t indent="0" pn="section-2.5.2-8">Note that a single Echo option value can be used for multiple purposes (e.g.,
	  to both get
	  the sequence number information and perform amplification mitigation). In
	  this case, the stricter protection requirements apply.</t>
        </section>
        <section anchor="protection-by-a-security-protocol" numbered="true" toc="include" removeInRFC="false" pn="section-2.5.3">
          <name slugifiedName="name-protection-by-a-security-pr">Protection by a Security Protocol</name>
          <t indent="0" pn="section-2.5.3-1">For meaningful results, the Echo option needs to be used in combination with a
	  security protocol in almost all applications.</t>
          <t indent="0" pn="section-2.5.3-2">When the information extracted by the server is only about a part of the
	  system outside of any security protocol, then the Echo option can also be used
	  without a security protocol (in case of OSCORE, as an Outer option).</t>
          <t indent="0" pn="section-2.5.3-3">The only known application satisfying this requirement is network address
	  reachability, where unprotected Echo option values are used both by servers
	  (e.g., during
	  setup of a security context) and proxies (which do not necessarily have a
	  security association with their clients) for amplification mitigation.</t>
        </section>
      </section>
      <section anchor="ampl-mit" numbered="true" toc="include" removeInRFC="false" pn="section-2.6">
        <name slugifiedName="name-updated-amplification-mitig">Updated Amplification Mitigation Requirements for Servers</name>
        <t indent="0" pn="section-2.6-1">This section updates the amplification mitigation requirements for servers in
	<xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/> to recommend the use of the Echo option to
	mitigate amplification attacks. The requirements for clients are not updated. <xref target="RFC7252" sectionFormat="of" section="11.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7252#section-11.3" derivedContent="RFC7252"/> is updated by adding the
	following text:</t>
        <blockquote pn="section-2.6-2">A CoAP server <bcp14>SHOULD</bcp14> mitigate potential amplification
	attacks by responding to unauthenticated clients with 4.01 (Unauthorized) including
	an Echo option, as described in item 3 in <xref target="echo-app" format="default" sectionFormat="of" derivedContent="Section 2.4"/> of RFC 9175.</blockquote>
      </section>
    </section>
    <section anchor="request-tag" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-protecting-message-bodies-u">Protecting Message Bodies Using Request Tags</name>
      <section anchor="body-int" numbered="true" toc="include" removeInRFC="false" pn="section-3.1">
        <name slugifiedName="name-fragmented-message-body-int">Fragmented Message Body Integrity</name>
        <t indent="0" pn="section-3.1-1">CoAP was designed to work over unreliable transports, such as UDP, and includes
	a lightweight reliability feature to handle messages that are lost or arrive out
	of order. In order for a security protocol to support CoAP operations over
	unreliable transports, it must allow out-of-order delivery of messages.</t>
        <t indent="0" pn="section-3.1-2">The block-wise transfer mechanism <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/>
	extends CoAP by defining the transfer of a large resource representation (CoAP
	message body) as a sequence of blocks (CoAP message payloads). The mechanism uses a
	pair of CoAP options, Block1 and Block2, pertaining to the request and response
	payload, respectively. The block-wise functionality does not support the detection
	of interchanged blocks between different message bodies to the same resource having
	the same block number. This remains true even when CoAP is used together with a
	security protocol (such as DTLS or OSCORE) within the replay window <xref target="I-D.mattsson-core-coap-attacks" format="default" sectionFormat="of" derivedContent="COAP-ATTACKS"/>, which is a
	vulnerability of the block-wise functionality of CoAP <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/>.</t>
        <t indent="0" pn="section-3.1-3">A straightforward mitigation of mixing up blocks from different messages is to
	use unique identifiers for different message bodies, which would provide equivalent
	protection to the case where the complete body fits into a single payload. The ETag
	option <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>, set by the CoAP server,
	identifies a response body fragmented using the Block2 option.</t>
      </section>
      <section anchor="the-request-tag-option" numbered="true" toc="include" removeInRFC="false" pn="section-3.2">
        <name slugifiedName="name-the-request-tag-option">The Request-Tag Option</name>
        <t indent="0" pn="section-3.2-1">This document defines the Request-Tag option for identifying request bodies,
	similar to ETag, but ephemeral and set by the CoAP client. The Request-Tag is
	intended for use as a short-lived identifier for keeping apart distinct block-wise
	request operations on one resource from one client, addressing the issue described
	in <xref target="body-int" format="default" sectionFormat="of" derivedContent="Section 3.1"/>. It enables the receiving server to
	reliably assemble request payloads (blocks) to their message bodies and, if it
	chooses to support it, to reliably process simultaneous block-wise request
	operations on a single resource. The requests must be integrity protected if they
	should protect against interchange of blocks between different message bodies. The
	Request-Tag option is mainly used in requests that carry the Block1 option and in
	Block2 requests following these.</t>
        <t indent="0" pn="section-3.2-2">In essence, it is an implementation of the "proxy-safe elective option" used
	just to "vary the cache key", as suggested in <xref target="RFC7959" sectionFormat="comma" section="2.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7959#section-2.4" derivedContent="RFC7959"/>.</t>
        <section anchor="req-tag-format" numbered="true" toc="include" removeInRFC="false" pn="section-3.2.1">
          <name slugifiedName="name-request-tag-option-format">Request-Tag Option Format</name>
          <t indent="0" pn="section-3.2.1-1">The Request-Tag option is elective, safe to forward, repeatable, and
	  part of the cache key (see <xref target="req-tag-table" format="default" sectionFormat="of" derivedContent="Table 2"/>, which
	  extends Table 4 of <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>).</t>
          <table anchor="req-tag-table" align="left" pn="table-2">
            <name slugifiedName="name-request-tag-option-summary">Request-Tag Option Summary</name>
            <thead>
              <tr>
                <th align="left" colspan="1" rowspan="1">No.</th>
                <th align="left" colspan="1" rowspan="1">C</th>
                <th align="left" colspan="1" rowspan="1">U</th>
                <th align="left" colspan="1" rowspan="1">N</th>
                <th align="left" colspan="1" rowspan="1">R</th>
                <th align="left" colspan="1" rowspan="1">Name</th>
                <th align="left" colspan="1" rowspan="1">Format</th>
                <th align="left" colspan="1" rowspan="1">Length</th>
                <th align="left" colspan="1" rowspan="1">Default</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left" colspan="1" rowspan="1">292</td>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1"/>
                <td align="left" colspan="1" rowspan="1">x</td>
                <td align="left" colspan="1" rowspan="1">Request-Tag</td>
                <td align="left" colspan="1" rowspan="1">opaque</td>
                <td align="left" colspan="1" rowspan="1">0-8</td>
                <td align="left" colspan="1" rowspan="1">(none)</td>
              </tr>
            </tbody>
          </table>
          <t indent="0" pn="section-3.2.1-3">C=Critical, U=Unsafe, N=NoCacheKey, R=Repeatable</t>
          <t indent="0" pn="section-3.2.1-4">Request-Tag, like the Block options, is both a class E and a class U option in
	  terms of OSCORE processing (see <xref target="RFC8613" sectionFormat="of" section="4.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8613#section-4.1" derivedContent="RFC8613"/>). The Request-Tag <bcp14>MAY</bcp14> be an Inner or Outer option.
	  It influences the Inner or Outer block operations, respectively. The Inner and
	  Outer values are therefore independent of each other. The Inner option is
	  encrypted and integrity protected between the client and server, and it provides
	  message
	  body identification in case of end-to-end fragmentation of requests. The Outer
	  option is visible to proxies and labels message bodies in case of hop-by-hop
	  fragmentation of requests.</t>
          <t indent="0" pn="section-3.2.1-5">The Request-Tag option is only used in the request messages of block-wise
	  operations.</t>
          <t indent="0" pn="section-3.2.1-6">The Request-Tag mechanism can be applied independently on the server and
	  client sides of CoAP-to-CoAP proxies, as are the Block options. However, given it
	  is safe to forward, a proxy is free to just forward it when processing an
	  operation.
	  CoAP-to-HTTP proxies and HTTP-to-CoAP proxies can use Request-Tag on their CoAP
	  sides; it is not applicable to HTTP requests.</t>
        </section>
      </section>
      <section anchor="request-tag-processing" numbered="true" toc="include" removeInRFC="false" pn="section-3.3">
        <name slugifiedName="name-request-tag-processing-by-s">Request-Tag Processing by Servers</name>
        <t indent="0" pn="section-3.3-1">The Request-Tag option does not require any particular processing on the server
	side outside of the processing already necessary for any unknown elective
	proxy-safe cache-key option. The option varies the properties that distinguish
	block-wise operations (which includes all options except Block1, Block2, and all
	operations that are elective NoCacheKey). Thus, the server cannot treat messages
	with a different list of Request-Tag options as belonging to the same operation.
        </t>
        <t indent="0" pn="section-3.3-2">To keep utilizing the cache, a server (including proxies) <bcp14>MAY</bcp14>
	discard the Request-Tag option from an assembled block-wise request when consulting
	its cache, as the option relates to the operation on the wire and not its semantics.
	For example, a FETCH request with the same body as an older one can be served from
	the cache if the older's Max-Age has not expired yet, even if the second operation
	uses a Request-Tag and the first did not. (This is similar to the situation about
	ETag in that it is formally part of the cache key, but implementations that are
	aware of its meaning can cache more efficiently (see <xref target="RFC7252" sectionFormat="comma" section="5.4.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7252#section-5.4.2" derivedContent="RFC7252"/>).</t>
        <t indent="0" pn="section-3.3-3">A server receiving a Request-Tag <bcp14>MUST</bcp14> treat it as opaque and make
	no assumptions about its content or structure.</t>
        <t indent="0" pn="section-3.3-4">Two messages carrying the same Request-Tag is a necessary but not sufficient
	condition for being part of the same operation. For one, a server may still treat
	them as independent messages when it sends 2.01 (Created) and 2.04 (Changed)
	responses for every block.
	Also, a client that lost interest in an old operation but wants to start over can
	overwrite the server's old state with a new initial (num=0) Block1 request and the
	same Request-Tag under some circumstances. Likewise, that results in the new
	message not being part of the old operation.</t>
        <t indent="0" pn="section-3.3-5">As it has always been, a server that can only serve a limited number of
	block-wise operations at the same time can delay the start of the operation by
	replying with 5.03 (Service Unavailable) and a Max-Age indicating how long it
	expects the existing operation to go on, or it can forget about the state
	established with the older operation and respond with 4.08 (Request Entity
	Incomplete) to later blocks on the first operation.</t>
      </section>
      <section anchor="setting-the-request-tag" numbered="true" toc="include" removeInRFC="false" pn="section-3.4">
        <name slugifiedName="name-setting-the-request-tag">Setting the Request-Tag</name>
        <t indent="0" pn="section-3.4-1">For each separate block-wise request operation, the client can choose a
	Request-Tag value or choose not to set a Request-Tag. It needs to be set to the
	same value (or unset) in all messages belonging to the same operation; otherwise,
	they are treated as separate operations by the server.</t>
        <t indent="0" pn="section-3.4-2">Starting a request operation matchable to a previous operation and even using
	the same Request-Tag value is called "request tag recycling". The absence of a
	Request-Tag option is viewed as a value distinct from all values with a single
	Request-Tag option set; starting a request operation matchable to a previous
	operation where neither has a Request-Tag option therefore constitutes request tag
	recycling just as well (also called "recycling the absent option").</t>
        <t indent="0" pn="section-3.4-3">Clients that use Request-Tag for a particular purpose (like in <xref target="req-tag-applications" format="default" sectionFormat="of" derivedContent="Section 3.5"/>) <bcp14>MUST NOT</bcp14> recycle a
	request tag unless the first operation has concluded. What constitutes a
	concluded
	operation depends on the purpose and is defined accordingly; see examples in <xref target="req-tag-applications" format="default" sectionFormat="of" derivedContent="Section 3.5"/>.</t>
        <t indent="0" pn="section-3.4-4">When Block1 and Block2 are combined in an operation, the Request-Tag of the
	Block1 phase is set in the Block2 phase as well; otherwise, the request would
	have a different set of options and would not be recognized any more.</t>
        <t indent="0" pn="section-3.4-5">Clients are encouraged to generate compact messages. This means sending messages
	without Request-Tag options whenever possible and using short values when the
	absent option cannot be recycled.</t>
        <t indent="0" pn="section-3.4-6">Note that Request-Tag options can be present in request messages that carry no
	Block options (for example, because a proxy unaware of Request-Tag reassembled them).</t>
        <t indent="0" pn="section-3.4-7">The Request-Tag option <bcp14>MUST NOT</bcp14> be present in response
	messages.</t>
      </section>
      <section anchor="req-tag-applications" numbered="true" toc="include" removeInRFC="false" pn="section-3.5">
        <name slugifiedName="name-applications-of-the-request">Applications of the Request-Tag Option</name>
        <section anchor="body-integrity" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.1">
          <name slugifiedName="name-body-integrity-based-on-pay">Body Integrity Based on Payload Integrity</name>
          <t indent="0" pn="section-3.5.1-1">When a client fragments a request body into multiple message payloads, even if
	  the individual messages are integrity protected, it is still possible for an
	  attacker to maliciously replace a later operation's blocks with an earlier
	  operation's blocks (see <xref target="I-D.mattsson-core-coap-attacks" sectionFormat="of" section="2.5" format="default" derivedLink="https://datatracker.ietf.org/doc/html/draft-mattsson-core-coap-attacks-01#section-2.5" derivedContent="COAP-ATTACKS"/>). Therefore, the integrity protection of each
	  block does not extend to the operation's request body.</t>
          <t indent="0" pn="section-3.5.1-2">In order to gain that protection, use the Request-Tag mechanism as follows:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.5.1-3">
            <li pn="section-3.5.1-3.1">The individual exchanges <bcp14>MUST</bcp14> be integrity protected
	    end to end between the client and server.</li>
            <li pn="section-3.5.1-3.2">
              <t indent="0" pn="section-3.5.1-3.2.1">The client <bcp14>MUST NOT</bcp14> recycle a request tag in a new
	      operation unless the previous operation matchable to the new one has concluded.  </t>
              <t indent="0" pn="section-3.5.1-3.2.2">If any future security mechanisms allow a block-wise transfer to continue
	      after an endpoint's details (like the IP address) have changed, then
	      the client <bcp14>MUST</bcp14> consider messages matchable if they were sent
	      to any endpoint address using the new operation's security
	      context.</t>
            </li>
            <li pn="section-3.5.1-3.3">
              <t indent="0" pn="section-3.5.1-3.3.1">The client <bcp14>MUST NOT</bcp14> regard a block-wise request operation
	      as concluded unless all of the messages the client has sent in the operation
	      would be regarded as invalid by the server if they were replayed.</t>
              <t indent="0" pn="section-3.5.1-3.3.2">When security services are provided by OSCORE, these confirmations
	      typically result either from the client receiving an OSCORE response message
	      matching the request (an empty Acknowledgement (ACK) is insufficient) or
	      because the message's
	      sequence number is old enough to be outside the server's receive window.</t>
              <t indent="0" pn="section-3.5.1-3.3.3">When security services are provided by DTLS, this can only be confirmed if
	      there was no CoAP retransmission of the request, the request was responded
	      to, and the server uses replay protection.</t>
            </li>
          </ul>
          <t indent="0" pn="section-3.5.1-4">Authors of other documents (e.g., applications of <xref target="RFC8613" format="default" sectionFormat="of" derivedContent="RFC8613"/>) are invited to mandate this subsection's behavior for clients
	  that execute block-wise interactions over secured transports. In this way, the
	  server can rely on a conforming client to set the Request-Tag option when
	  required and thereby have confidence in the integrity of the assembled body.</t>
          <t indent="0" pn="section-3.5.1-5">Note that this mechanism is implicitly implemented when the security layer
	  guarantees ordered delivery (e.g., CoAP over TLS <xref target="RFC8323" format="default" sectionFormat="of" derivedContent="RFC8323"/>). This is because, with each message, any earlier message
	  cannot be replayed any more, so the client never needs to set the Request-Tag
	  option unless it wants to perform concurrent operations.</t>
          <t indent="0" pn="section-3.5.1-6">Body integrity only makes sense in applications that have stateful block-wise
	  transfers. On applications where all the state is in the application (e.g.,
	  because rather than POSTing a large representation to a collection in a stateful
	  block-wise transfer, a collection item is created first, then written to once and
	  available when written completely), clients need not concern themselves with body
	  integrity and thus the Request-Tag.</t>
          <t indent="0" pn="section-3.5.1-7">Body integrity is largely independent from replay protection. When no replay
	  protection is available (it is optional in DTLS), a full block-wise operation may
	  be replayed, but, by adhering to the above, no operations will be mixed up.
	  The only link between body integrity and replay protection is that, without replay
	  protection, recycling is not possible.</t>
        </section>
        <section anchor="multiple-concurrent-block-wise-operations" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.2">
          <name slugifiedName="name-multiple-concurrent-block-w">Multiple Concurrent Block-Wise Operations</name>
          <t indent="0" pn="section-3.5.2-1">CoAP clients, especially CoAP proxies, may initiate a block-wise request
	  operation to a resource, to which a previous one is already in progress, which
	  the new request should not cancel. A CoAP proxy would be in such a situation when
	  it forwards operations with the same cache-key options but possibly different
	  payloads.</t>
          <t indent="0" pn="section-3.5.2-2">For those cases, Request-Tag is the proxy-safe elective option suggested in
	  the last paragraph of
	  <xref target="RFC7959" sectionFormat="of" section="2.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7959#section-2.4" derivedContent="RFC7959"/>.</t>
          <t indent="0" pn="section-3.5.2-3">When initializing a new block-wise operation, a client has to look at other
	  active operations:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-3.5.2-4">
            <li pn="section-3.5.2-4.1">If any of them is matchable to the new one, and the client neither wants to
	    cancel the old one nor postpone the new one, it can pick a Request-Tag value
	    (including the absent option) that is not in use by the other matchable
	    operations for the new operation.</li>
            <li pn="section-3.5.2-4.2">Otherwise, it can start the new operation without setting the Request-Tag
	    option on it.</li>
          </ul>
        </section>
        <section anchor="simpleproxy" numbered="true" toc="include" removeInRFC="false" pn="section-3.5.3">
          <name slugifiedName="name-simplified-block-wise-handl">Simplified Block-Wise Handling for Constrained Proxies</name>
          <t indent="0" pn="section-3.5.3-1">The Block options were defined to be unsafe to forward because a proxy that
	  would forward blocks as plain messages would risk mixing up clients' requests.</t>
          <t indent="0" pn="section-3.5.3-2">In some cases, for example, when forwarding block-wise request operations,
	  appending a Request-Tag value unique to the client can satisfy the requirements
	  on the proxy that come from the presence of a Block option.</t>
          <t indent="0" pn="section-3.5.3-3">This is particularly useful to proxies that strive for stateless operations,
	  as described in <xref target="RFC8974" sectionFormat="comma" section="4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8974#section-4" derivedContent="RFC8974"/>.</t>
          <t indent="0" pn="section-3.5.3-4">The precise classification of cases in which such a Request-Tag option is
	  sufficient is not trivial, especially when both request and response body are
	  fragmented, and is out of scope for this document.</t>
        </section>
      </section>
      <section anchor="rationale-for-the-option-properties" numbered="true" toc="include" removeInRFC="false" pn="section-3.6">
        <name slugifiedName="name-rationale-for-the-option-pr">Rationale for the Option Properties</name>
        <t indent="0" pn="section-3.6-1">The Request-Tag option can be elective, because to servers unaware of the
	Request-Tag option, operations with differing request tags will not be
	matchable.</t>
        <t indent="0" pn="section-3.6-2">The Request-Tag option can be safe to forward but part of the cache key, because
	proxies unaware of the Request-Tag option will consider operations with differing
	request tags unmatchable but can still forward them.</t>
        <t indent="0" pn="section-3.6-3">The Request-Tag option is repeatable because this easily allows several cascaded
	stateless proxies to each put in an origin address. They can perform the steps of
	<xref target="simpleproxy" format="default" sectionFormat="of" derivedContent="Section 3.5.3"/> without the need to create an option
	value that is the concatenation of the received option and their own value
	and can simply add a new Request-Tag option unconditionally.</t>
        <t indent="0" pn="section-3.6-4">In draft versions of this document, the Request-Tag option used to be critical
	and unsafe to forward. That design was based on an erroneous understanding of which
	blocks could be composed according to <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/>.</t>
      </section>
      <section anchor="rationale-for-introducing-the-option" numbered="true" toc="include" removeInRFC="false" pn="section-3.7">
        <name slugifiedName="name-rationale-for-introducing-t">Rationale for Introducing the Option</name>
        <t indent="0" pn="section-3.7-1">An alternative that was considered to the Request-Tag option for coping with the
	problem of fragmented message body integrity (<xref target="body-integrity" format="default" sectionFormat="of" derivedContent="Section 3.5.1"/>) was to update <xref target="RFC7959" format="default" sectionFormat="of" derivedContent="RFC7959"/> to say
	that blocks could only be assembled if their fragments' order corresponded to the
	sequence numbers.</t>
        <t indent="0" pn="section-3.7-2">That approach would have been difficult to roll out reliably on DTLS,
	where many implementations do not expose sequence numbers, and would still not
	prevent attacks like in <xref target="I-D.mattsson-core-coap-attacks" sectionFormat="of" section="2.5.2" format="default" derivedLink="https://datatracker.ietf.org/doc/html/draft-mattsson-core-coap-attacks-01#section-2.5.2" derivedContent="COAP-ATTACKS"/>.</t>
      </section>
      <section anchor="etag" numbered="true" toc="include" removeInRFC="false" pn="section-3.8">
        <name slugifiedName="name-block2-and-etag-processing">Block2 and ETag Processing</name>
        <t indent="0" pn="section-3.8-1">The same security properties as in <xref target="body-integrity" format="default" sectionFormat="of" derivedContent="Section 3.5.1"/> can be obtained for block-wise response operations. The threat
	model here does not depend on an attacker; a client can construct a wrong
	representation by assembling it from blocks from different resource states. That
	can happen when a resource is modified during a transfer or when some blocks are
	still valid in the client's cache.</t>
        <t indent="0" pn="section-3.8-2">Rules stating that response body reassembly is conditional on matching ETag
	values are already in place from <xref target="RFC7959" sectionFormat="of" section="2.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7959#section-2.4" derivedContent="RFC7959"/>.</t>
        <t indent="0" pn="section-3.8-3">To gain protection equivalent to that described in <xref target="body-integrity" format="default" sectionFormat="of" derivedContent="Section 3.5.1"/>, a server <bcp14>MUST</bcp14> use the Block2 option in
	conjunction with the ETag option (<xref target="RFC7252" sectionFormat="comma" section="5.10.6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7252#section-5.10.6" derivedContent="RFC7252"/>) and <bcp14>MUST NOT</bcp14> use the same ETag value for
	different representations of a resource.</t>
      </section>
    </section>
    <section anchor="token" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-token-processing-for-secure">Token Processing for Secure Request-Response Binding</name>
      <section anchor="req-resp-bind" numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-request-response-binding">Request-Response Binding</name>
        <t indent="0" pn="section-4.1-1">A fundamental requirement of secure REST operations is that the client can bind
	a response to a particular request. If this is not ensured, a client may
	erroneously associate the wrong response to a request. The wrong response may be an
	old response for the same resource or a response for a completely different
	resource (e.g., see <xref target="I-D.mattsson-core-coap-attacks" sectionFormat="of" section="2.3" format="default" derivedLink="https://datatracker.ietf.org/doc/html/draft-mattsson-core-coap-attacks-01#section-2.3" derivedContent="COAP-ATTACKS"/>). For example, a request for the alarm status "GET /status" may be
	associated to a prior response "on", instead of the correct response "off".</t>
        <t indent="0" pn="section-4.1-2">In HTTP/1.1, this type of binding is always assured by the ordered and reliable
	delivery, as well as mandating that the server sends responses in the same order
	that the requests were received. The same is not true for CoAP, where the server (or
	an attacker) can return responses in any order and where there can be any number of
	responses to a request (e.g., see <xref target="RFC7641" format="default" sectionFormat="of" derivedContent="RFC7641"/>). In
	CoAP, concurrent requests are differentiated by their Token. Note that the CoAP
	Message ID cannot be used for this purpose since those are typically different for
	the REST request and corresponding response in case of "separate response" (see
	<xref target="RFC7252" sectionFormat="of" section="2.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7252#section-2.2" derivedContent="RFC7252"/>).</t>
        <t indent="0" pn="section-4.1-3">CoAP <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/> does not treat the Token as a
	cryptographically important value and does not give stricter guidelines than that
	the Tokens currently "in use" <bcp14>SHOULD</bcp14> (not <bcp14>SHALL</bcp14>) be
	unique. If used with a security protocol not providing bindings between requests
	and responses (e.g., DTLS and TLS), Token reuse may result in situations where a
	client matches a response to the wrong request. Note that mismatches can also
	happen for other reasons than a malicious attacker, e.g., delayed delivery or a
	server sending notifications to an uninterested client.</t>
        <t indent="0" pn="section-4.1-4">A straightforward mitigation is to mandate clients to not reuse Tokens until the
	traffic keys have been replaced. The following section formalizes that.</t>
      </section>
      <section anchor="updated-token-processing-requirements-for-clients" numbered="true" toc="include" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-updated-token-processing-re">Updated Token Processing Requirements for Clients</name>
        <t indent="0" pn="section-4.2-1">As described in <xref target="req-resp-bind" format="default" sectionFormat="of" derivedContent="Section 4.1"/>, the client must
	be able to verify that a response corresponds to a particular request. This section
	updates the Token processing requirements for clients in <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/> to always assure a cryptographically secure binding of responses
	to requests for secure REST operations like "coaps". The Token processing for
	servers is not updated. Token processing in <xref target="RFC7252" sectionFormat="of" section="5.3.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc7252#section-5.3.1" derivedContent="RFC7252"/> is updated by adding the following text:</t>
        <blockquote pn="section-4.2-2">
          <t indent="0" pn="section-4.2-2.1">When CoAP is used with a security protocol not providing bindings between
	requests and responses, the Tokens have cryptographic importance. The client
	<bcp14>MUST</bcp14> make sure that Tokens are not used in a way so that responses
	risk being associated with the wrong request.</t>
          <t indent="0" pn="section-4.2-2.2">One easy way to accomplish this is to implement the Token (or part of the Token)
	as a sequence number, starting at zero for each new or rekeyed secure connection.
	This approach <bcp14>SHOULD</bcp14> be followed.</t>
        </blockquote>
      </section>
    </section>
    <section anchor="sec-cons" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-5-1">The freshness assertion of the Echo option comes from the client reproducing the
      same value of the Echo option in a request as it received in a previous response. If
      the Echo option value is a large random number, then there is a high probability
      that the request is generated after having seen the response. If the Echo option
      value of the response can be guessed, e.g., if based on a small random number or a
      counter (see <xref target="echo-state" format="default" sectionFormat="of" derivedContent="Appendix A"/>), then it is possible to
      compose a request with the right Echo option value ahead of time. Using guessable
      Echo option values is only permissible in a narrow set of cases described in <xref target="source-of-truth" format="default" sectionFormat="of" derivedContent="Section 2.5.2"/>. Echo option values <bcp14>MUST</bcp14>
      be set by the CoAP server such that the risk associated with unintended reuse can be
      managed.</t>
      <t indent="0" pn="section-5-2">If uniqueness of the Echo option value is based on randomness, then the
      availability of a
      secure pseudorandom number generator and truly random seeds are essential for the
      security of the Echo option. If no true random number generator is available, a truly
      random seed must be provided from an external source. As each pseudorandom number
      must only be used once, an implementation needs to get a new truly random seed after
      reboot or continuously store the state in nonvolatile memory. See <xref target="RFC8613" sectionFormat="comma" section="B.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8613#appendix-B.1.1" derivedContent="RFC8613"/> for issues and approaches for
      writing to nonvolatile memory.</t>
      <t indent="0" pn="section-5-3">A single active Echo option value with 64 (pseudo)random bits gives the same theoretical
      security level as a 64-bit MAC (as used in, e.g., AES_128_CCM_8). If a random unique
      Echo option value is intended, the Echo option value <bcp14>SHOULD</bcp14> contain 64
      (pseudo)random bits that are not predictable for any other party than the server. A
      server <bcp14>MAY</bcp14> use different security levels for different use cases
      (client aliveness, request freshness, state synchronization, network address
      reachability, etc.).</t>
      <t indent="0" pn="section-5-4">The security provided by the Echo and Request-Tag options depends on the security
      protocol used. CoAP and HTTP proxies require (D)TLS to be terminated at the proxies.
      The proxies are therefore able to manipulate, inject, delete, or reorder options or
      packets. The security claims in such architectures only hold under the assumption
      that all intermediaries are fully trusted and have not been compromised.</t>
      <t indent="0" pn="section-5-5">Echo option values without the protection of randomness or a MAC are limited to cases
      when the client is the trusted source of all derived properties (as per <xref target="source-of-truth" format="default" sectionFormat="of" derivedContent="Section 2.5.2"/>). Using them needs per-application
      consideration of both the impact of a malicious client and of implementation errors
      in clients. These Echo option values are the only legitimate case for Echo option
      values shorter
      than four bytes, which are not necessarily secret. They <bcp14>MUST NOT</bcp14> be
      used unless the Echo option values in the request are integrity protected, as per <xref target="echo-proc" format="default" sectionFormat="of" derivedContent="Section 2.3"/>.</t>
      <t indent="0" pn="section-5-6">Servers <bcp14>SHOULD</bcp14> use a monotonic clock to generate timestamps and
      compute round-trip times. Use of non-monotonic clocks is not secure, as the server
      will accept expired Echo option values if the clock is moved backward. The server
      will also reject fresh Echo option values if the clock is moved forward.
      Non-monotonic clocks <bcp14>MAY</bcp14> be used as long as they have deviations that
      are acceptable given the freshness requirements. If the deviations from a monotonic
      clock are known, it may be possible to adjust the threshold accordingly.</t>
      <t indent="0" pn="section-5-7">An attacker may be able to affect the server's system time in various ways, such as
      setting up a fake NTP server or broadcasting false time signals to radio-controlled
      clocks.</t>
      <t indent="0" pn="section-5-8">For the purpose of generating timestamps for the Echo option, a server
      <bcp14>MAY</bcp14> set
      a timer at reboot and use the time since reboot, choosing the granularity such that
      different requests arrive at different times. Servers <bcp14>MAY</bcp14>
      intermittently reset the timer and <bcp14>MAY</bcp14> generate a random offset
      applied to all timestamps. When resetting the timer, the server <bcp14>MUST</bcp14>
      reject all Echo option values that were created before the reset.</t>
      <t indent="0" pn="section-5-9">Servers that use the "List of Cached Random Values and Timestamps" method described
      in <xref target="echo-state" format="default" sectionFormat="of" derivedContent="Appendix A"/> may be vulnerable to resource
      exhaustion attacks. One way to minimize the state is to use the "Integrity-Protected
      Timestamp" method described in <xref target="echo-state" format="default" sectionFormat="of" derivedContent="Appendix A"/>.</t>
      <section anchor="token-reuse" numbered="true" toc="include" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-token-reuse">Token Reuse</name>
        <t indent="0" pn="section-5.1-1">Reusing Tokens in a way so that responses are guaranteed to not be associated
	with the wrong request is not trivial. The server may process requests in any
	order and send multiple responses to the same request. An attacker may block,
	delay, and reorder messages. The use of a sequence number is therefore recommended
	when CoAP is used with a security protocol that does not provide bindings between
	requests and responses, such as DTLS or TLS.</t>
        <t indent="0" pn="section-5.1-2">For a generic response to a Confirmable request over DTLS, binding can only be
	claimed without out-of-band knowledge if:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.1-3">
          <li pn="section-5.1-3.1">the original request was never retransmitted and</li>
          <li pn="section-5.1-3.2">the response was piggybacked in an Acknowledgement message (as a Confirmable
	  or Non-confirmable response may have been transmitted multiple times).</li>
        </ul>
        <t indent="0" pn="section-5.1-4">If observation was used, the same holds for the registration, all
	  reregistrations, and the cancellation.</t>
        <t indent="0" pn="section-5.1-5">(In addition, for observations, any responses using that Token and a DTLS
	sequence number earlier than the cancellation Acknowledgement message need to be
	discarded. This is typically not supported in DTLS implementations.)</t>
        <t indent="0" pn="section-5.1-6">In some setups, Tokens can be reused without the above constraints, as a
	different component in the setup provides the associations:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.1-7">
          <li pn="section-5.1-7.1">In CoAP over TLS, retransmissions are not handled by the CoAP layer and
	  behave like a replay window size of 1. When a client is sending TLS-protected
	  requests without Observe to a single server, the client can reuse a Token as soon
	  as the previous response with that Token has been received.</li>
          <li pn="section-5.1-7.2">Requests whose responses are cryptographically bound to the requests (like in
	  OSCORE) can reuse Tokens indefinitely.
          </li>
        </ul>
        <t indent="0" pn="section-5.1-8">In all other cases, a sequence number approach is <bcp14>RECOMMENDED</bcp14>, as
	per <xref target="token" format="default" sectionFormat="of" derivedContent="Section 4"/>.</t>
        <t indent="0" pn="section-5.1-9">Tokens that cannot be reused need to be handled appropriately. This could be
	solved by increasing the Token as soon as the currently used Token cannot be
	reused or by keeping a list of all Tokens unsuitable for reuse.</t>
        <t indent="0" pn="section-5.1-10">When the Token (or part of the Token) contains a sequence number, the encoding
	of the sequence number has to be chosen in a way to avoid any collisions. This is
	especially true when the Token contains more information than just the sequence
	number, e.g., the serialized state, as in <xref target="RFC8974" format="default" sectionFormat="of" derivedContent="RFC8974"/>.</t>
      </section>
    </section>
    <section anchor="priv-cons" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-privacy-considerations">Privacy Considerations</name>
      <t indent="0" pn="section-6-1">Implementations <bcp14>SHOULD NOT</bcp14> put any privacy-sensitive information in
      the Echo or Request-Tag option values. Unencrypted timestamps could reveal
      information about the server, such as location, time since reboot, or that the
      server will accept expired certificates. Timestamps <bcp14>MAY</bcp14> be used if
      the Echo option is encrypted between the client and the server, e.g., in the case of
      DTLS without
      proxies or when using OSCORE with an Inner Echo option.</t>
      <t indent="0" pn="section-6-2">Like HTTP cookies, the Echo option could potentially be abused as a tracking
      mechanism that identifies a client across requests. This is especially true for
      preemptive Echo option values. Servers <bcp14>MUST NOT</bcp14> use the Echo option to
      correlate requests for other purposes than freshness and reachability. Clients only
      send Echo option values to the same server from which the values were received. Compared to
      HTTP, CoAP clients are often authenticated and non-mobile, and servers can therefore
      often correlate requests based on the security context, the client credentials, or
      the network address. Especially when the Echo option increases a server's ability to
      correlate requests, clients <bcp14>MAY</bcp14> discard all preemptive Echo option values.</t>
      <t indent="0" pn="section-6-3">Publicly visible generated identifiers, even when opaque (as all defined in this
      document are), can leak information as described in <xref target="I-D.irtf-pearg-numeric-ids-generation" format="default" sectionFormat="of" derivedContent="NUMERIC-IDS"/>. To avoid the effects
      described there, the absent Request-Tag option should be recycled as much as possible.
      (That is generally possible as long as a security mechanism is in place -- even in the
      case of OSCORE outer block-wise transfers, as the OSCORE option's variation ensures
      that no matchable requests are created by different clients.) When an unprotected
      Echo option is used to demonstrate reachability, the recommended mechanism of <xref target="echo-proc" format="default" sectionFormat="of" derivedContent="Section 2.3"/> keeps the effects to a minimum.</t>
    </section>
    <section anchor="iana" numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-7-1">IANA has added the following option numbers to the "CoAP Option Numbers"
      registry defined by <xref target="RFC7252" format="default" sectionFormat="of" derivedContent="RFC7252"/>:</t>
      <table anchor="iana-table" align="left" pn="table-3">
        <name slugifiedName="name-additions-to-coap-option-nu">Additions to CoAP Option Numbers Registry</name>
        <thead>
          <tr>
            <th align="left" colspan="1" rowspan="1">Number</th>
            <th align="left" colspan="1" rowspan="1">Name</th>
            <th align="left" colspan="1" rowspan="1">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">252</td>
            <td align="left" colspan="1" rowspan="1">Echo</td>
            <td align="left" colspan="1" rowspan="1">RFC 9175</td>
          </tr>
          <tr>
            <td align="left" colspan="1" rowspan="1">292</td>
            <td align="left" colspan="1" rowspan="1">Request-Tag</td>
            <td align="left" colspan="1" rowspan="1">RFC 9175</td>
          </tr>
        </tbody>
      </table>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.ietf-core-groupcomm-bis" to="GROUP-COAP"/>
    <displayreference target="I-D.ietf-core-oscore-groupcomm" to="GROUP-OSCORE"/>
    <displayreference target="I-D.irtf-pearg-numeric-ids-generation" to="NUMERIC-IDS"/>
    <displayreference target="I-D.mattsson-core-coap-attacks" to="COAP-ATTACKS"/>
    <references pn="section-8">
      <name slugifiedName="name-references">References</name>
      <references pn="section-8.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t indent="0">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="RFC6347" target="https://www.rfc-editor.org/info/rfc6347" quoteTitle="true" derivedAnchor="RFC6347">
          <front>
            <title>Datagram Transport Layer Security Version 1.2</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="N." surname="Modadugu" fullname="N. Modadugu">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2012" month="January"/>
            <abstract>
              <t indent="0">This document specifies version 1.2 of the Datagram Transport Layer Security (DTLS) protocol.  The DTLS protocol provides communications privacy for datagram protocols.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  The DTLS protocol is based on the Transport Layer Security (TLS) protocol and provides equivalent security guarantees.  Datagram semantics of the underlying transport are preserved by the DTLS protocol.  This document updates DTLS 1.0 to work with TLS version 1.2.  [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="6347"/>
          <seriesInfo name="DOI" value="10.17487/RFC6347"/>
        </reference>
        <reference anchor="RFC7252" target="https://www.rfc-editor.org/info/rfc7252" quoteTitle="true" derivedAnchor="RFC7252">
          <front>
            <title>The Constrained Application Protocol (CoAP)</title>
            <author initials="Z." surname="Shelby" fullname="Z. Shelby">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Hartke" fullname="K. Hartke">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Bormann" fullname="C. Bormann">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2014" month="June"/>
            <abstract>
              <t indent="0">The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained nodes and constrained (e.g., low-power, lossy) networks.  The nodes often have 8-bit microcontrollers with small amounts of ROM and RAM, while constrained networks such as IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs) often have high packet error rates and a typical throughput of 10s of kbit/s.  The protocol is designed for machine- to-machine (M2M) applications such as smart energy and building automation.</t>
              <t indent="0">CoAP provides a request/response interaction model between application endpoints, supports built-in discovery of services and resources, and includes key concepts of the Web such as URIs and Internet media types.  CoAP is designed to easily interface with HTTP for integration with the Web while meeting specialized requirements such as multicast support, very low overhead, and simplicity for constrained environments.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7252"/>
          <seriesInfo name="DOI" value="10.17487/RFC7252"/>
        </reference>
        <reference anchor="RFC7959" target="https://www.rfc-editor.org/info/rfc7959" quoteTitle="true" derivedAnchor="RFC7959">
          <front>
            <title>Block-Wise Transfers in the Constrained Application Protocol (CoAP)</title>
            <author initials="C." surname="Bormann" fullname="C. Bormann">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="Z." surname="Shelby" fullname="Z. Shelby" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2016" month="August"/>
            <abstract>
              <t indent="0">The Constrained Application Protocol (CoAP) is a RESTful transfer protocol for constrained nodes and networks.  Basic CoAP messages work well for small payloads from sensors and actuators; however, applications will need to transfer larger payloads occasionally -- for instance, for firmware updates.  In contrast to HTTP, where TCP does the grunt work of segmenting and resequencing, CoAP is based on datagram transports such as UDP or Datagram Transport Layer Security (DTLS).  These transports only offer fragmentation, which is even more problematic in constrained nodes and networks, limiting the maximum size of resource representations that can practically be transferred.</t>
              <t indent="0">Instead of relying on IP fragmentation, this specification extends basic CoAP with a pair of "Block" options for transferring multiple blocks of information from a resource representation in multiple request-response pairs.  In many important cases, the Block options enable a server to be truly stateless: the server can handle each block transfer separately, with no need for a connection setup or other server-side memory of previous block transfers.  Essentially, the Block options provide a minimal way to transfer larger representations in a block-wise fashion.</t>
              <t indent="0">A CoAP implementation that does not support these options generally is limited in the size of the representations that can be exchanged, so there is an expectation that the Block options will be widely used in CoAP implementations.  Therefore, this specification updates RFC 7252.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7959"/>
          <seriesInfo name="DOI" value="10.17487/RFC7959"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t indent="0">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>
        <reference anchor="RFC8470" target="https://www.rfc-editor.org/info/rfc8470" quoteTitle="true" derivedAnchor="RFC8470">
          <front>
            <title>Using Early Data in HTTP</title>
            <author initials="M." surname="Thomson" fullname="M. Thomson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Nottingham" fullname="M. Nottingham">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="W." surname="Tarreau" fullname="W. Tarreau">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="September"/>
            <abstract>
              <t indent="0">Using TLS early data creates an exposure to the possibility of a replay attack.  This document defines mechanisms that allow clients to communicate with servers about HTTP requests that are sent in early data.  Techniques are described that use these mechanisms to mitigate the risk of replay.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8470"/>
          <seriesInfo name="DOI" value="10.17487/RFC8470"/>
        </reference>
        <reference anchor="RFC8613" target="https://www.rfc-editor.org/info/rfc8613" quoteTitle="true" derivedAnchor="RFC8613">
          <front>
            <title>Object Security for Constrained RESTful Environments (OSCORE)</title>
            <author initials="G." surname="Selander" fullname="G. Selander">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Mattsson" fullname="J. Mattsson">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="F." surname="Palombini" fullname="F. Palombini">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Seitz" fullname="L. Seitz">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2019" month="July"/>
            <abstract>
              <t indent="0">This document defines Object Security for Constrained RESTful Environments (OSCORE), a method for application-layer protection of the Constrained Application Protocol (CoAP), using CBOR Object Signing and Encryption (COSE).  OSCORE provides end-to-end protection between endpoints communicating using CoAP or CoAP-mappable HTTP. OSCORE is designed for constrained nodes and networks supporting a range of proxy operations, including translation between different transport protocols.</t>
              <t indent="0">Although an optional functionality of CoAP, OSCORE alters CoAP options processing and IANA registration.  Therefore, this document updates RFC 7252.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8613"/>
          <seriesInfo name="DOI" value="10.17487/RFC8613"/>
        </reference>
      </references>
      <references pn="section-8.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="I-D.mattsson-core-coap-attacks" quoteTitle="true" target="https://datatracker.ietf.org/doc/html/draft-mattsson-core-coap-attacks-01" derivedAnchor="COAP-ATTACKS">
          <front>
            <title>Attacks on the Constrained Application Protocol (CoAP)</title>
            <author initials="J" surname="Preuß Mattsson" fullname="John Preuß Mattsson">
              <organization showOnFrontPage="true">Ericsson AB</organization>
            </author>
            <author fullname="John Fornehed">
              <organization showOnFrontPage="true">Ericsson AB</organization>
            </author>
            <author fullname="Göran Selander">
              <organization showOnFrontPage="true">Ericsson AB</organization>
            </author>
            <author fullname="Francesca Palombini">
              <organization showOnFrontPage="true">Ericsson AB</organization>
            </author>
            <author fullname="Christian Amsüss">
              <organization showOnFrontPage="true">Energy Harvesting Solutions</organization>
            </author>
            <date month="July" day="27" year="2021"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-mattsson-core-coap-attacks-01"/>
          <format type="TXT" target="https://www.ietf.org/archive/id/draft-mattsson-core-coap-attacks-01.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.ietf-core-groupcomm-bis" quoteTitle="true" target="https://datatracker.ietf.org/doc/html/draft-ietf-core-groupcomm-bis-05" derivedAnchor="GROUP-COAP">
          <front>
            <title>Group Communication for the Constrained Application Protocol (CoAP)</title>
            <author fullname="Esko Dijk">
              <organization showOnFrontPage="true">IoTconsultancy.nl</organization>
            </author>
            <author fullname="Chonggang Wang">
              <organization showOnFrontPage="true">InterDigital</organization>
            </author>
            <author fullname="Marco Tiloca">
              <organization showOnFrontPage="true">RISE AB</organization>
            </author>
            <date month="October" day="25" year="2021"/>
            <abstract>
              <t indent="0">   This document specifies the use of the Constrained Application
   Protocol (CoAP) for group communication, including the use of UDP/IP
   multicast as the default underlying data transport.  Both unsecured
   and secured CoAP group communication are specified.  Security is
   achieved by use of the Group Object Security for Constrained RESTful
   Environments (Group OSCORE) protocol.  The target application area of
   this specification is any group communication use cases that involve
   resource-constrained devices or networks that support CoAP.  This
   document replaces RFC 7390, while it updates RFC 7252 and RFC 7641.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-core-groupcomm-bis-05"/>
          <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-core-groupcomm-bis-05.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.ietf-core-oscore-groupcomm" quoteTitle="true" target="https://datatracker.ietf.org/doc/html/draft-ietf-core-oscore-groupcomm-13" derivedAnchor="GROUP-OSCORE">
          <front>
            <title>Group OSCORE - Secure Group Communication for CoAP</title>
            <author fullname="Marco Tiloca">
              <organization showOnFrontPage="true">RISE AB</organization>
            </author>
            <author fullname="Göran Selander">
              <organization showOnFrontPage="true">Ericsson AB</organization>
            </author>
            <author fullname="Francesca Palombini">
              <organization showOnFrontPage="true">Ericsson AB</organization>
            </author>
            <author initials="J" surname="Preuß Mattsson" fullname="John Preuß Mattsson">
              <organization showOnFrontPage="true">Ericsson AB</organization>
            </author>
            <author fullname="Jiye Park">
              <organization showOnFrontPage="true">Universitaet Duisburg-Essen</organization>
            </author>
            <date month="October" day="25" year="2021"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-ietf-core-oscore-groupcomm-13"/>
          <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-core-oscore-groupcomm-13.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="I-D.irtf-pearg-numeric-ids-generation" quoteTitle="true" target="https://datatracker.ietf.org/doc/html/draft-irtf-pearg-numeric-ids-generation-08" derivedAnchor="NUMERIC-IDS">
          <front>
            <title>On the Generation of Transient Numeric Identifiers</title>
            <author fullname="Fernando Gont">
              <organization showOnFrontPage="true">EdgeUno</organization>
            </author>
            <author fullname="Ivan Arce">
              <organization showOnFrontPage="true">Quarkslab</organization>
            </author>
            <date month="January" day="31" year="2022"/>
            <abstract>
              <t indent="0">   This document performs an analysis of the security and privacy
   implications of different types of "transient numeric identifiers"
   used in IETF protocols, and tries to categorize them based on their
   interoperability requirements and their associated failure severity
   when such requirements are not met.  Subsequently, it provides advice
   on possible algorithms that could be employed to satisfy the
   interoperability requirements of each identifier category, while
   minimizing the negative security and privacy implications, thus
   providing guidance to protocol designers and protocol implementers.
   Finally, it describes a number of algorithms that have been employed
   in real implementations to generate transient numeric identifiers,
   and analyzes their security and privacy properties.  This document is
   a product of the Privacy Enhancement and Assessment Research Group
   (PEARG) in the IRTF.

              </t>
            </abstract>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-irtf-pearg-numeric-ids-generation-08"/>
          <format type="TXT" target="https://www.ietf.org/archive/id/draft-irtf-pearg-numeric-ids-generation-08.txt"/>
          <refcontent>Work in Progress</refcontent>
        </reference>
        <reference anchor="REST" target="https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation.pdf" quoteTitle="true" derivedAnchor="REST">
          <front>
            <title>Architectural Styles and the Design of Network-based Software Architectures</title>
            <author initials="R." surname="Fielding">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2000"/>
          </front>
        </reference>
        <reference anchor="RFC7641" target="https://www.rfc-editor.org/info/rfc7641" quoteTitle="true" derivedAnchor="RFC7641">
          <front>
            <title>Observing Resources in the Constrained Application Protocol (CoAP)</title>
            <author initials="K." surname="Hartke" fullname="K. Hartke">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2015" month="September"/>
            <abstract>
              <t indent="0">The Constrained Application Protocol (CoAP) is a RESTful application protocol for constrained nodes and networks.  The state of a resource on a CoAP server can change over time.  This document specifies a simple protocol extension for CoAP that enables CoAP clients to "observe" resources, i.e., to retrieve a representation of a resource and keep this representation updated by the server over a period of time.  The protocol follows a best-effort approach for sending new representations to clients and provides eventual consistency between the state observed by each client and the actual resource state at the server.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7641"/>
          <seriesInfo name="DOI" value="10.17487/RFC7641"/>
        </reference>
        <reference anchor="RFC8323" target="https://www.rfc-editor.org/info/rfc8323" quoteTitle="true" derivedAnchor="RFC8323">
          <front>
            <title>CoAP (Constrained Application Protocol) over TCP, TLS, and WebSockets</title>
            <author initials="C." surname="Bormann" fullname="C. Bormann">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Lemay" fullname="S. Lemay">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="H." surname="Tschofenig" fullname="H. Tschofenig">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="K." surname="Hartke" fullname="K. Hartke">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Silverajan" fullname="B. Silverajan">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="B." surname="Raymor" fullname="B. Raymor" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="February"/>
            <abstract>
              <t indent="0">The Constrained Application Protocol (CoAP), although inspired by HTTP, was designed to use UDP instead of TCP.  The message layer of CoAP over UDP includes support for reliable delivery, simple congestion control, and flow control.</t>
              <t indent="0">Some environments benefit from the availability of CoAP carried over reliable transports such as TCP or Transport Layer Security (TLS). This document outlines the changes required to use CoAP over TCP, TLS, and WebSockets transports.  It also formally updates RFC 7641 for use with these transports and RFC 7959 to enable the use of larger messages over a reliable transport.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8323"/>
          <seriesInfo name="DOI" value="10.17487/RFC8323"/>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446" quoteTitle="true" derivedAnchor="RFC8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author initials="E." surname="Rescorla" fullname="E. Rescorla">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="August"/>
            <abstract>
              <t indent="0">This document specifies version 1.3 of the Transport Layer Security (TLS) protocol.  TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
              <t indent="0">This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961.  This document also specifies new requirements for TLS 1.2 implementations.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8446"/>
          <seriesInfo name="DOI" value="10.17487/RFC8446"/>
        </reference>
        <reference anchor="RFC8974" target="https://www.rfc-editor.org/info/rfc8974" quoteTitle="true" derivedAnchor="RFC8974">
          <front>
            <title>Extended Tokens and Stateless Clients in the Constrained Application Protocol (CoAP)</title>
            <author initials="K." surname="Hartke" fullname="K. Hartke">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Richardson" fullname="M. Richardson">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2021" month="January"/>
            <abstract>
              <t indent="0">This document provides considerations for alleviating Constrained Application Protocol (CoAP) clients and intermediaries of keeping per-request state. To facilitate this, this document additionally introduces a new, optional CoAP protocol extension for extended token lengths. </t>
              <t indent="0">This document updates RFCs 7252 and 8323 with an extended definition of the "TKL" field in the CoAP message header.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8974"/>
          <seriesInfo name="DOI" value="10.17487/RFC8974"/>
        </reference>
        <reference anchor="RFC9000" target="https://www.rfc-editor.org/info/rfc9000" quoteTitle="true" derivedAnchor="RFC9000">
          <front>
            <title>QUIC: A UDP-Based Multiplexed and Secure Transport</title>
            <author initials="J." surname="Iyengar" fullname="J. Iyengar" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="M." surname="Thomson" fullname="M. Thomson" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2021" month="May"/>
            <abstract>
              <t indent="0">This document defines the core of the QUIC transport protocol.  QUIC provides applications with flow-controlled streams for structured communication, low-latency connection establishment, and network path migration. QUIC includes security measures that ensure confidentiality, integrity, and availability in a range of deployment circumstances.  Accompanying documents describe the integration of TLS for key negotiation, loss detection, and an exemplary congestion control algorithm.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9000"/>
          <seriesInfo name="DOI" value="10.17487/RFC9000"/>
        </reference>
      </references>
    </references>
    <section anchor="echo-state" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-methods-for-generating-echo">Methods for Generating Echo Option Values</name>
      <t indent="0" pn="section-appendix.a-1">The content and structure of the Echo option value are implementation specific and
      determined by the server. Two simple mechanisms for time-based freshness and one for
      event-based freshness are outlined in this appendix. The "List of Cached Random
      Values and Timestamps" mechanism is
      <bcp14>RECOMMENDED</bcp14> in general. The "Integrity-Protected Timestamp"
      mechanism is <bcp14>RECOMMENDED</bcp14>
      in case the Echo option is encrypted between the client and the server.</t>
      <t indent="0" pn="section-appendix.a-2">Different mechanisms have different trade-offs between the size of the Echo option
      value, the amount of server state, the amount of computation, and the security
      properties offered. A server <bcp14>MAY</bcp14> use different methods and security
      levels for different use cases (client aliveness, request freshness, state
      synchronization, network address reachability, etc.).</t>
      <ol spacing="normal" indent="adaptive" start="1" type="1" pn="section-appendix.a-3">
	<li pn="section-appendix.a-3.1" derivedCounter="1.">
          <t indent="0" pn="section-appendix.a-3.1.1">List of Cached Random Values and Timestamps. The Echo option value is a
	  (pseudo)random byte string called r. The server caches a list containing the
	  random byte strings and their initial transmission times. Assuming 72-bit random
	  values
	  and 32-bit timestamps, the size of the Echo option value is 9 bytes and the
	  amount of server state is 13n bytes, where n is the number of active Echo option
	  values. The security against an attacker guessing Echo option values is given by
	  s = bit
	  length of r - log2(n). The length of r and the maximum allowed n should be set so
	  that the security level is harmonized with other parts of the deployment, e.g., s
	  &gt;= 64. If the server loses time continuity, e.g., due to reboot, the entries
	  in the old list <bcp14>MUST</bcp14> be deleted.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-appendix.a-3.1.2">
            <dt pn="section-appendix.a-3.1.2.1">Echo option value:</dt>
            <dd pn="section-appendix.a-3.1.2.2">random value r</dd>
            <dt pn="section-appendix.a-3.1.2.3">Server State:</dt>
            <dd pn="section-appendix.a-3.1.2.4">random value r, timestamp t0</dd>
          </dl>
          <t indent="0" pn="section-appendix.a-3.1.3">This method is suitable for both time-based and event-based freshness (e.g.,
	  by clearing the cache when an event occurs) and is independent of the client
	  authority.</t>
        </li>
        <li pn="section-appendix.a-3.2" derivedCounter="2.">
          <t indent="0" pn="section-appendix.a-3.2.1">Integrity-Protected Timestamp. The Echo option value is an
	integrity-protected
	  timestamp. The timestamp can have a different resolution and range. A 32-bit
	  timestamp can, e.g., give a resolution of 1 second with a range of 136 years. The
	  (pseudo)random secret key is generated by the server and not shared with any
	  other party. The use of truncated HMAC-SHA-256 is <bcp14>RECOMMENDED</bcp14>.
	  With a 32-bit timestamp and a 64-bit MAC, the size of the Echo option value is 12
	  bytes, and the server state is small and constant. The security against an
	  attacker guessing Echo option values is given by the MAC length. If the server loses
	  time continuity, e.g., due to reboot, the old key <bcp14>MUST</bcp14> be deleted
	  and replaced by a new random secret key. Note that the privacy considerations in
	  <xref target="priv-cons" format="default" sectionFormat="of" derivedContent="Section 6"/> may apply to the timestamp.
	  Therefore, it might be important to encrypt it. Depending on the choice of
	  encryption algorithms, this may require an initialization vector to be included
	  in the Echo option value (see below).</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-appendix.a-3.2.2">
            <dt pn="section-appendix.a-3.2.2.1">Echo option value:</dt>
            <dd pn="section-appendix.a-3.2.2.2">timestamp t0, MAC(k, t0)</dd>
            <dt pn="section-appendix.a-3.2.2.3">Server State:</dt>
            <dd pn="section-appendix.a-3.2.2.4">secret key k</dd>
          </dl>
          <t indent="0" pn="section-appendix.a-3.2.3">This method is suitable for both time-based and event-based freshness (by the
	  server remembering the time at which the event took place) and independent of
	  the client authority.</t>
          <t indent="0" pn="section-appendix.a-3.2.4">If this method is used to additionally obtain network reachability of the
	  client, the server <bcp14>MUST</bcp14> use the client's network address too, e.g.,
	  as in MAC(k, t0, claimed network address).</t>
        </li>
        <li pn="section-appendix.a-3.3" derivedCounter="3.">
          <t indent="0" pn="section-appendix.a-3.3.1">Persistent Counter. This can be used in OSCORE for sequence number recovery,
	per <xref target="RFC8613" sectionFormat="of" section="B.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8613#appendix-B.1.2" derivedContent="RFC8613"/>. The Echo option
	value is a simple counter without integrity protection of its own, serialized in
	uint format. The counter is incremented in a persistent way every time the state
	that needs to be synchronized is changed (in the case described in <xref target="RFC8613" sectionFormat="of" section="B.1.2" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8613#appendix-B.1.2" derivedContent="RFC8613"/>, when a reboot
	indicates that volatile state may have been lost). An example of how such a
	persistent counter can be implemented efficiently is the OSCORE server Sender
	Sequence Number mechanism described in <xref target="RFC8613" sectionFormat="of" section="B.1.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8613#appendix-B.1.1" derivedContent="RFC8613"/>.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-appendix.a-3.3.2">
            <dt pn="section-appendix.a-3.3.2.1">Echo option value:</dt>
            <dd pn="section-appendix.a-3.3.2.2">counter</dd>
            <dt pn="section-appendix.a-3.3.2.3">Server State:</dt>
            <dd pn="section-appendix.a-3.3.2.4">counter</dd>
          </dl>
          <t indent="0" pn="section-appendix.a-3.3.3">This method is suitable only if the client is the authority over the
	  synchronized property. Consequently, it cannot be used to show client aliveness.
	  It provides statements from the client similar to event-based freshness (but
	  without a proof of freshness).</t>
        </li>
      </ol>
      <t indent="0" pn="section-appendix.a-4">Other mechanisms complying with the security and privacy considerations may be
	  used. The use of encrypted timestamps in the Echo option provides additional
	  protection but typically requires an initialization vector (a.k.a. nonce) as
	  input to the encryption algorithm, which adds a slight complication to the
	  procedure as well as overhead.</t>
    </section>
    <section anchor="request-tag-message-size-impact" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-request-tag-message-size-im">Request-Tag Message Size Impact</name>
      <t indent="0" pn="section-appendix.b-1">In absence of concurrent operations, the Request-Tag mechanism for body integrity
      (<xref target="body-integrity" format="default" sectionFormat="of" derivedContent="Section 3.5.1"/>) incurs no overhead if no messages
      are lost (more precisely, in OSCORE, if no operations are aborted due to repeated
      transmission failure and, in DTLS, if no packets are lost and replay protection is
      active) or when block-wise request operations happen rarely (in OSCORE, if there is
      always only one request block-wise operation in the replay window).</t>
      <t indent="0" pn="section-appendix.b-2">In those situations, no message has any Request-Tag option set, and the
      Request-Tag value can be recycled indefinitely.</t>
      <t indent="0" pn="section-appendix.b-3">When the absence of a Request-Tag option cannot be recycled any more within a
      security context, the messages with a present but empty Request-Tag option can be
      used (1 byte overhead), and when that is used up, 256 values from 1-byte
      options (2 bytes overhead) are available.</t>
      <t indent="0" pn="section-appendix.b-4">In situations where that overhead is unacceptable (e.g., because the payloads
      are known to be at a fragmentation threshold), the absent Request-Tag value can be
      made usable again:</t>
      <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-appendix.b-5">
        <li pn="section-appendix.b-5.1">In DTLS, a new session can be established.</li>
        <li pn="section-appendix.b-5.2">In OSCORE, the sequence number can be artificially increased so that all lost
	messages are outside of the replay window by the time the first request of the new
	operation gets processed, and all earlier operations can therefore be regarded as
	concluded.</li>
      </ul>
    </section>
    <section numbered="false" anchor="acknowledgements" toc="include" removeInRFC="false" pn="section-appendix.c">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.c-1">The authors want to thank <contact fullname="Carsten Bormann"/>, <contact fullname="Roman Danyliw"/>, <contact fullname="Benjamin Kaduk"/>, <contact fullname="Murray Kucherawy"/>, <contact fullname="Francesca Palombini"/>, and
      <contact fullname="Jim Schaad"/> for providing valuable input to the document.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.d">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="C." surname="Amsüss" fullname="Christian Amsüss">
        <organization showOnFrontPage="true"/>
        <address>
          <email>christian@amsuess.com</email>
        </address>
      </author>
      <author initials="J." surname="Preuß Mattsson" fullname="John Preuß Mattsson">
        <organization showOnFrontPage="true">Ericsson AB</organization>
        <address>
          <email>john.mattsson@ericsson.com</email>
        </address>
      </author>
      <author initials="G." surname="Selander" fullname="Göran Selander">
        <organization showOnFrontPage="true">Ericsson AB</organization>
        <address>
          <email>goran.selander@ericsson.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
