<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.6.17 (Ruby 3.0.2) -->
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc iprnotified="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-core-attacks-on-coap-02" category="info" submissionType="IETF" tocDepth="3" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.15.3 -->
  <front>
    <title abbrev="Attacks on CoAP">Attacks on the Constrained Application Protocol (CoAP)</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-core-attacks-on-coap-02"/>
    <author initials="J." surname="Preuß Mattsson" fullname="John Preuß Mattsson">
      <organization abbrev="Ericsson">Ericsson AB</organization>
      <address>
        <postal>
          <street>SE-164 80 Stockholm</street>
          <country>Sweden</country>
        </postal>
        <email>john.mattsson@ericsson.com</email>
      </address>
    </author>
    <author initials="J." surname="Fornehed" fullname="John Fornehed">
      <organization abbrev="Ericsson">Ericsson AB</organization>
      <address>
        <postal>
          <street>SE-164 80 Stockholm</street>
          <country>Sweden</country>
        </postal>
        <email>john.fornehed@ericsson.com</email>
      </address>
    </author>
    <author initials="G." surname="Selander" fullname="Göran Selander">
      <organization abbrev="Ericsson">Ericsson AB</organization>
      <address>
        <postal>
          <street>SE-164 80 Stockholm</street>
          <country>Sweden</country>
        </postal>
        <email>goran.selander@ericsson.com</email>
      </address>
    </author>
    <author initials="F." surname="Palombini" fullname="Francesca Palombini">
      <organization abbrev="Ericsson">Ericsson AB</organization>
      <address>
        <postal>
          <street>SE-164 80 Stockholm</street>
          <country>Sweden</country>
        </postal>
        <email>francesca.palombini@ericsson.com</email>
      </address>
    </author>
    <author initials="C." surname="Amsüss" fullname="Christian Amsüss">
      <organization>Energy Harvesting Solutions</organization>
      <address>
        <email>c.amsuess@energyharvesting.at</email>
      </address>
    </author>
    <date year="2022" month="December" day="23"/>
    <area/>
    <workgroup/>
    <keyword/>
    <abstract>
      <t>Being able to securely read information from sensors, to securely control actuators, and
to not enable distributed denial-of-service attacks are essential in a world of
connected and networking things interacting with
the physical world. Using a security protocol such as DTLS, TLS, or OSCORE to protect CoAP is a requirement for secure operation and protects against many attacks. This document summarizes a number of known attacks on CoAP deployments and
show that just using CoAP with a security protocol like DTLS, TLS, or OSCORE is not
enough for secure operation. Several of the
discussed attacks can be mitigated with the solutions in RFC 9175.</t>
    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-core-attacks-on-coap/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Constrained RESTful Environments (CoRE) Working Group mailing list (<eref target="mailto:core@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/core/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/core/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/core-wg/attacks-on-coap"/>.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Being able to securely read information from sensors and to securely control actuators
are essential in a world of connected and networking things interacting with
the physical world. One protocol used to interact with sensors and actuators
is the Constrained Application Protocol (CoAP) <xref target="RFC7252"/>. Any
Internet-of-Things (IoT) deployment valuing security and privacy would
use a security protocol such as DTLS <xref target="RFC9147"/>, TLS <xref target="RFC8446"/>, or
OSCORE <xref target="RFC8613"/> to protect CoAP, where the choice of security
protocol depends on the transport protocol and the presence of intermediaries.
The use of CoAP over UDP and DTLS is specified in <xref target="RFC7252"/> and the
use of CoAP over TCP and TLS is specified in <xref target="RFC8323"/>. OSCORE
protects CoAP end-to-end with the use of COSE <xref target="RFC9052"/> and the CoAP
Object-Security option <xref target="RFC8613"/>, and can therefore be used over any
transport. Using a security protocol to protect CoAP is a requirement for secure operation and protects against many attacks. The CoAP NoSec mode does not provide any security as an attacker can easily eavesdrop on all messages and forge false requests and responses.</t>
      <t>The four properties traditionally provided by security protocols are:</t>
      <ul spacing="normal">
        <li>Data confidentiality</li>
        <li>Data origin authentication</li>
        <li>Data integrity protection</li>
        <li>Data replay protection</li>
      </ul>
      <t>In this document we show that protecting CoAP with a security protocol is
not enough to securely control actuators (and in
many cases sensors) and that secure operation often demands far more than
the four properties traditionally provided by security protocols. We describe
several serious attacks any on-path attacker (i.e., not only "trusted intermediaries")
can do and discusses tougher requirements and mechanisms to mitigate the
attacks. In general, secure operation also requires these four
properties:</t>
      <ul spacing="normal">
        <li>Availability</li>
        <li>Data-to-data binding</li>
        <li>Data-to-space binding</li>
        <li>Data-to-time binding</li>
      </ul>
      <t>Availability means that services and information must be available when needed.
"Data-to-data binding" is e.g., binding of responses to a request or binding
of data fragments to each other. "Data-to-space binding" is the binding of
data to an absolute or relative point in space (i.e., a location) and may
in the relative case be referred to as proximity. "Data-to-time binding"
is the binding of data to an absolute or relative point in time and may in
the relative case be referred to as freshness. The two last properties may
be bundled together as "Data-to-spacetime binding".</t>
      <t>Freshness (as defined in <xref target="RFC9175"/>) is a measure of when a message was sent on a timescale of
the recipient.  A client or server that receives a message can either
verify that the message is fresh or determine that it cannot be
verified that the message is fresh.  What is considered fresh is
application dependent.  Freshness is completely different from replay
protection, but most replay protection mechanism use a sequence
number.  Assuming the client is well-behaving, such a sequence number
that can be used by the server as a relative measure of when a
message was sent on a timescale of the sender.  Replay protection is
mandatory in TLS and OSCORE and optional in DTLS.  DTLS and TLS
use sequence numbers for both requests and responses. In TLS the
sequence numbers are implicit and not sent in the record.
OSCORE use sequence numbers for requests and some responses.
Most OSCORE responses are bound to the request and therefore,
enable the client to determine if the response is fresh or not.</t>
      <t>Some of the presented attacks such as the blocking attack, the
request delay attack, and the relay attack are not specific to CoAP.
The request delay attack (valid for DTLS, TLS, and OSCORE and
described in <xref target="reqdelay"/>) lets an attacker control an actuator at a
much later time than the client anticipated. The response delay and
mismatch attack (valid for DTLS and TLS and described in <xref target="resdelay"/>)
lets an attacker respond to a client with a response meant for an
older request. The request fragment rearrangement attack (valid for
DTLS, TLS, and OSCORE and described in <xref target="fragment"/>) lets an attacker
cause unauthorized operations to be performed on the server, and
responses to unauthorized operations to be mistaken for responses to
authorized operations.</t>
      <t>The goal with this document is motivating generic
and protocol-specific recommendations on the usage of CoAP.
Mechanisms mitigating some of the attacks discussed in this document can
be found in <xref target="RFC9175"/>. This document is a companion document to <xref target="RFC9175"/>
giving more information on the attacks motivating the mechanisms.</t>
    </section>
    <section anchor="attacks-on-coap">
      <name>Attacks on CoAP</name>
      <t>Internet-of-Things (IoT) deployments valuing security and privacy, need to use
a security protocol such as DTLS, TLS, or OSCORE to protect CoAP. This is
especially true for deployments of actuators where attacks often (but not
always) have serious consequences. The attacks described in this section
are made under the assumption that CoAP is already protected with a security
protocol such as DTLS, TLS, or OSCORE, as an attacker otherwise can easily
forge false requests and responses.</t>
      <section anchor="the-blocking-attack">
        <name>The Blocking Attack</name>
        <t>An on-path attacker can block the delivery of any number of requests or responses.
The attack can also be performed by an attacker jamming the lower layer radio
protocol. This is true even if a security protocol like DTLS, TLS, or OSCORE
is used. Encryption makes selective blocking of messages harder, but not
impossible or even infeasible. With DTLS and TLS, proxies can read
the complete CoAP message, and with OSCORE, the CoAP header and several CoAP
options are not encrypted. In all three security protocols, the IP-addresses,
ports, and CoAP message lengths are available to all on-path attackers, which
may be enough to determine the server, resource, and command.  The blocking
attack is illustrated in Figures <xref target="blockreq" format="counter"/> and <xref target="blockres" format="counter"/>.</t>
        <figure anchor="blockreq">
          <name>Blocking a request</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="144" width="344" viewBox="0 0 344 144" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,128" fill="none" stroke="black"/>
                <path d="M 96,80 L 96,128" fill="none" stroke="black"/>
                <path d="M 160,48 L 160,128" fill="none" stroke="black"/>
                <path d="M 32,64 L 80,64" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="88,64 76,58.4 76,69.6" fill="black" transform="rotate(0,80,64)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="164" y="36">Server</text>
                  <text x="96" y="52">|</text>
                  <text x="96" y="68">X</text>
                  <text x="232" y="68">Code:</text>
                  <text x="276" y="68">0.03</text>
                  <text x="320" y="68">(PUT)</text>
                  <text x="56" y="84">PUT</text>
                  <text x="228" y="84">Token:</text>
                  <text x="276" y="84">0x47</text>
                  <text x="216" y="100">Uri-Path:</text>
                  <text x="276" y="100">lock</text>
                  <text x="220" y="116">Payload:</text>
                  <text x="264" y="116">1</text>
                  <text x="300" y="116">(Lock)</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe    Server
   |       |       |
   +-----> X       |      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x47
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 1 (Lock)
   |       |       |
]]></artwork>
          </artset>
        </figure>
        <t>Where 'X' means the attacker is blocking delivery of the message.</t>
        <figure anchor="blockres">
          <name>Blocking a response</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="192" width="376" viewBox="0 0 376 192" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,176" fill="none" stroke="black"/>
                <path d="M 96,72 L 96,128" fill="none" stroke="black"/>
                <path d="M 96,160 L 96,176" fill="none" stroke="black"/>
                <path d="M 160,48 L 160,176" fill="none" stroke="black"/>
                <path d="M 32,64 L 152,64" fill="none" stroke="black"/>
                <path d="M 112,144 L 160,144" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="160,64 148,58.4 148,69.6" fill="black" transform="rotate(0,152,64)"/>
                <polygon class="arrowhead" points="120,144 108,138.4 108,149.6" fill="black" transform="rotate(180,112,144)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="164" y="36">Server</text>
                  <text x="96" y="52">|</text>
                  <text x="232" y="68">Code:</text>
                  <text x="276" y="68">0.03</text>
                  <text x="320" y="68">(PUT)</text>
                  <text x="56" y="84">PUT</text>
                  <text x="228" y="84">Token:</text>
                  <text x="276" y="84">0x47</text>
                  <text x="216" y="100">Uri-Path:</text>
                  <text x="276" y="100">lock</text>
                  <text x="220" y="116">Payload:</text>
                  <text x="264" y="116">1</text>
                  <text x="300" y="116">(Lock)</text>
                  <text x="96" y="148">X</text>
                  <text x="232" y="148">Code:</text>
                  <text x="276" y="148">2.04</text>
                  <text x="336" y="148">(Changed)</text>
                  <text x="132" y="164">2.04</text>
                  <text x="228" y="164">Token:</text>
                  <text x="276" y="164">0x47</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe    Server
   |       |       |
   +-------------->|      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x47
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 1 (Lock)
   |       |       |
   |       X <-----+      Code: 2.04 (Changed)
   |       |  2.04 |     Token: 0x47
   |       |       |
]]></artwork>
          </artset>
        </figure>
        <t>While blocking requests to, or responses from, a sensor is just a denial-of-service attack,
blocking a request to, or a response from, an actuator
results in the client losing information about the server's status. If the
actuator e.g., is a lock (door, car, etc.), the attack results in the client
not knowing (except by using out-of-band information) whether the lock is
unlocked or locked, just like the observer in the famous <contact fullname="Schrödinger’s"/> cat
thought experiment. Due to the nature of the attack, the client cannot distinguish
the attack from connectivity problems, offline servers, or unexpected behavior
from middle boxes such as NATs and firewalls.</t>
        <t>Remedy: Any IoT deployment of actuators where synchronized state is important need to
use confirmable messages and the client need to take appropriate actions when a response
is not received and it therefore loses information about the server's status.</t>
      </section>
      <section anchor="reqdelay">
        <name>The Request Delay Attack</name>
        <t>An on-path attacker may not only block packets, but can also delay the delivery
of any packet (request or response) by a chosen amount of time. If CoAP is
used over a reliable and ordered transport such as TCP with TLS or OSCORE (with
TLS-like sequence number handling), no messages can be delivered before the
delayed message. If CoAP is used
over an unreliable and unordered transport such as UDP with DTLS or OSCORE,
other messages can be delivered before the delayed message as long as the
delayed packet is delivered inside the replay window. When CoAP is used over
UDP, both DTLS and OSCORE allow out-of-order delivery and uses sequence numbers
together with a replay window to protect against replay attacks against requests.
The replay window has a default length of 64 in DTLS and 32 in OSCORE. The attacker
can influence the replay window state by blocking and delaying packets. By first
delaying a request, and then later, after delivery, blocking the response
to the request, the client is not made aware of the delayed delivery except
by the missing response. In general, the server has no way of knowing that
the request was delayed and will therefore happily process the request.
Note that delays can also happen for other reasons than a malicious attacker.</t>
        <t>If some wireless low-level protocol is used, the attack can also be performed
by the attacker simultaneously recording what the client transmits while
at the same time jamming the server. The request delay attack is illustrated
in <xref target="delayreq"/>.</t>
        <figure anchor="delayreq">
          <name>Delaying a request</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="304" width="376" viewBox="0 0 376 304" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,128" fill="none" stroke="black"/>
                <path d="M 32,160 L 32,288" fill="none" stroke="black"/>
                <path d="M 96,80 L 96,128" fill="none" stroke="black"/>
                <path d="M 96,192 L 96,240" fill="none" stroke="black"/>
                <path d="M 96,272 L 96,288" fill="none" stroke="black"/>
                <path d="M 160,48 L 160,128" fill="none" stroke="black"/>
                <path d="M 160,160 L 160,288" fill="none" stroke="black"/>
                <path d="M 32,64 L 80,64" fill="none" stroke="black"/>
                <path d="M 104,176 L 152,176" fill="none" stroke="black"/>
                <path d="M 112,256 L 160,256" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="160,176 148,170.4 148,181.6" fill="black" transform="rotate(0,152,176)"/>
                <polygon class="arrowhead" points="120,256 108,250.4 108,261.6" fill="black" transform="rotate(180,112,256)"/>
                <polygon class="arrowhead" points="88,64 76,58.4 76,69.6" fill="black" transform="rotate(0,80,64)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="164" y="36">Server</text>
                  <text x="96" y="52">|</text>
                  <text x="96" y="68">@</text>
                  <text x="232" y="68">Code:</text>
                  <text x="276" y="68">0.03</text>
                  <text x="320" y="68">(PUT)</text>
                  <text x="56" y="84">PUT</text>
                  <text x="228" y="84">Token:</text>
                  <text x="276" y="84">0x9c</text>
                  <text x="216" y="100">Uri-Path:</text>
                  <text x="276" y="100">lock</text>
                  <text x="220" y="116">Payload:</text>
                  <text x="264" y="116">0</text>
                  <text x="308" y="116">(Unlock)</text>
                  <text x="64" y="148">.....</text>
                  <text x="128" y="148">.....</text>
                  <text x="96" y="164">|</text>
                  <text x="96" y="180">@</text>
                  <text x="232" y="180">Code:</text>
                  <text x="276" y="180">0.03</text>
                  <text x="320" y="180">(PUT)</text>
                  <text x="128" y="196">PUT</text>
                  <text x="228" y="196">Token:</text>
                  <text x="276" y="196">0x9c</text>
                  <text x="216" y="212">Uri-Path:</text>
                  <text x="276" y="212">lock</text>
                  <text x="220" y="228">Payload:</text>
                  <text x="264" y="228">0</text>
                  <text x="308" y="228">(Unlock)</text>
                  <text x="96" y="260">X</text>
                  <text x="232" y="260">Code:</text>
                  <text x="276" y="260">2.04</text>
                  <text x="336" y="260">(Changed)</text>
                  <text x="132" y="276">2.04</text>
                  <text x="228" y="276">Token:</text>
                  <text x="276" y="276">0x9c</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe    Server
   |       |       |
   +-----> @       |      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x9c
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 0 (Unlock)
   |       |       |
     .....   .....
   |       |       |
   |       @------>|      Code: 0.03 (PUT)
   |       |  PUT  |     Token: 0x9c
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 0 (Unlock)
   |       |       |
   |       X <-----+      Code: 2.04 (Changed)
   |       |  2.04 |     Token: 0x9c
   |       |       |
]]></artwork>
          </artset>
        </figure>
        <t>Where '@' means the attacker is storing and later forwarding the message
(@ may alternatively be seen as a wormhole connecting two points in time).</t>
        <t>While an attacker delaying a request to a sensor is often not a security
problem, an attacker delaying a request to an actuator performing an action
is often a serious problem. A request to an actuator (for example a request
to unlock a lock) is often only meant to be valid for a short time frame,
and if the request does not reach the actuator during this short timeframe,
the request should not be fulfilled. In the unlock example, if the client
does not get any response and does not physically see the lock opening, the
user is likely to walk away, calling the locksmith (or the IT-support).</t>
        <t>If a non-zero replay window is used (the default when CoAP is used
over UDP), the attacker can let the client interact with the actuator
before delivering the delayed request to the server (illustrated in
<xref target="delayreqreorder"/>).  In the lock example, the attacker may store the
first "unlock" request for later use.  The client will likely resend
the request with the same token.  If DTLS is used, the resent packet
will have a different sequence number and the attacker can forward
it. If OSCORE is used, resent packets will have the same sequence
number and the attacker must block them all until the client sends a
new message with a new sequence number (not shown in
<xref target="delayreqreorder"/>). After a while when the client has locked the
door again, the attacker can deliver the delayed "unlock" message to
the door, a very serious attack.</t>
        <figure anchor="delayreqreorder">
          <name>Delaying request with reordering</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="560" width="376" viewBox="0 0 376 560" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,256" fill="none" stroke="black"/>
                <path d="M 32,288 L 32,544" fill="none" stroke="black"/>
                <path d="M 96,80 L 96,136" fill="none" stroke="black"/>
                <path d="M 96,152 L 96,216" fill="none" stroke="black"/>
                <path d="M 96,232 L 96,256" fill="none" stroke="black"/>
                <path d="M 96,312 L 96,376" fill="none" stroke="black"/>
                <path d="M 96,392 L 96,416" fill="none" stroke="black"/>
                <path d="M 96,448 L 96,496" fill="none" stroke="black"/>
                <path d="M 96,528 L 96,544" fill="none" stroke="black"/>
                <path d="M 160,48 L 160,256" fill="none" stroke="black"/>
                <path d="M 160,288 L 160,544" fill="none" stroke="black"/>
                <path d="M 32,64 L 80,64" fill="none" stroke="black"/>
                <path d="M 32,144 L 152,144" fill="none" stroke="black"/>
                <path d="M 40,224 L 160,224" fill="none" stroke="black"/>
                <path d="M 32,304 L 152,304" fill="none" stroke="black"/>
                <path d="M 40,384 L 160,384" fill="none" stroke="black"/>
                <path d="M 104,432 L 152,432" fill="none" stroke="black"/>
                <path d="M 112,512 L 160,512" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="160,432 148,426.4 148,437.6" fill="black" transform="rotate(0,152,432)"/>
                <polygon class="arrowhead" points="160,304 148,298.4 148,309.6" fill="black" transform="rotate(0,152,304)"/>
                <polygon class="arrowhead" points="160,144 148,138.4 148,149.6" fill="black" transform="rotate(0,152,144)"/>
                <polygon class="arrowhead" points="120,512 108,506.4 108,517.6" fill="black" transform="rotate(180,112,512)"/>
                <polygon class="arrowhead" points="88,64 76,58.4 76,69.6" fill="black" transform="rotate(0,80,64)"/>
                <polygon class="arrowhead" points="48,384 36,378.4 36,389.6" fill="black" transform="rotate(180,40,384)"/>
                <polygon class="arrowhead" points="48,224 36,218.4 36,229.6" fill="black" transform="rotate(180,40,224)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="164" y="36">Server</text>
                  <text x="96" y="52">|</text>
                  <text x="96" y="68">@</text>
                  <text x="232" y="68">Code:</text>
                  <text x="276" y="68">0.03</text>
                  <text x="320" y="68">(PUT)</text>
                  <text x="56" y="84">PUT</text>
                  <text x="228" y="84">Token:</text>
                  <text x="276" y="84">0x9c</text>
                  <text x="216" y="100">Uri-Path:</text>
                  <text x="276" y="100">lock</text>
                  <text x="220" y="116">Payload:</text>
                  <text x="264" y="116">0</text>
                  <text x="308" y="116">(Unlock)</text>
                  <text x="232" y="148">Code:</text>
                  <text x="276" y="148">0.03</text>
                  <text x="320" y="148">(PUT)</text>
                  <text x="56" y="164">PUT</text>
                  <text x="228" y="164">Token:</text>
                  <text x="276" y="164">0x9c</text>
                  <text x="216" y="180">Uri-Path:</text>
                  <text x="276" y="180">lock</text>
                  <text x="220" y="196">Payload:</text>
                  <text x="264" y="196">0</text>
                  <text x="308" y="196">(Unlock)</text>
                  <text x="232" y="228">Code:</text>
                  <text x="276" y="228">2.04</text>
                  <text x="336" y="228">(Changed)</text>
                  <text x="132" y="244">2.04</text>
                  <text x="228" y="244">Token:</text>
                  <text x="276" y="244">0x9c</text>
                  <text x="64" y="276">.....</text>
                  <text x="128" y="276">.....</text>
                  <text x="96" y="292">|</text>
                  <text x="232" y="308">Code:</text>
                  <text x="276" y="308">0.03</text>
                  <text x="320" y="308">(PUT)</text>
                  <text x="56" y="324">PUT</text>
                  <text x="228" y="324">Token:</text>
                  <text x="276" y="324">0x7a</text>
                  <text x="216" y="340">Uri-Path:</text>
                  <text x="276" y="340">lock</text>
                  <text x="220" y="356">Payload:</text>
                  <text x="264" y="356">1</text>
                  <text x="300" y="356">(Lock)</text>
                  <text x="232" y="388">Code:</text>
                  <text x="276" y="388">2.04</text>
                  <text x="336" y="388">(Changed)</text>
                  <text x="132" y="404">2.04</text>
                  <text x="228" y="404">Token:</text>
                  <text x="276" y="404">0x7a</text>
                  <text x="96" y="436">@</text>
                  <text x="232" y="436">Code:</text>
                  <text x="276" y="436">0.03</text>
                  <text x="320" y="436">(PUT)</text>
                  <text x="128" y="452">PUT</text>
                  <text x="228" y="452">Token:</text>
                  <text x="276" y="452">0x9c</text>
                  <text x="216" y="468">Uri-Path:</text>
                  <text x="276" y="468">lock</text>
                  <text x="220" y="484">Payload:</text>
                  <text x="264" y="484">0</text>
                  <text x="308" y="484">(Unlock)</text>
                  <text x="96" y="516">X</text>
                  <text x="232" y="516">Code:</text>
                  <text x="276" y="516">2.04</text>
                  <text x="336" y="516">(Changed)</text>
                  <text x="132" y="532">2.04</text>
                  <text x="228" y="532">Token:</text>
                  <text x="276" y="532">0x9c</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe    Server
   |       |       |
   +-----> @       |      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x9c
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 0 (Unlock)
   |       |       |
   +-------------->|      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x9c
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 0 (Unlock)
   |       |       |
   |<--------------+      Code: 2.04 (Changed)
   |       |  2.04 |     Token: 0x9c
   |       |       |
     .....   .....
   |       |       |
   +-------------->|      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x7a
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 1 (Lock)
   |       |       |
   |<--------------+      Code: 2.04 (Changed)
   |       |  2.04 |     Token: 0x7a
   |       |       |
   |       @------>|      Code: 0.03 (PUT)
   |       |  PUT  |     Token: 0x9c
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 0 (Unlock)
   |       |       |
   |       X <-----+      Code: 2.04 (Changed)
   |       |  2.04 |     Token: 0x9c
   |       |       |
]]></artwork>
          </artset>
        </figure>
        <t>While the second attack (<xref target="delayreqreorder"/>) can be mitigated by
using a replay window of length zero, the first attack (<xref target="delayreq"/>)
cannot. A solution must enable the server to verify that the request
was received within a certain time frame after it was sent or enable
the server to securely determine an absolute point in time when the
request is to be executed. This can be accomplished with either a
challenge-response pattern, by exchanging timestamps between client
and server, or by only allowing requests a short period after client
authentication.</t>
        <t>Requiring a fresh client authentication (such as a new TLS/DTLS handshake
or an EDHOC key exchange <xref target="I-D.ietf-lake-edhoc"/>) mitigates the
problem, but requires larger messages and more processing
than a dedicated solution. Security solutions based on exchanging timestamps
require exactly synchronized time between client and server, and this may
be hard to control with complications such as time zones and daylight saving.
Wall clock time is not monotonic, may reveal that the endpoints will accept
expired certificates, or reveal the endpoint's
location. Use of non-monotonic clocks is problematic as the server will accept
requests if the clock is moved backward and reject requests if the clock
is moved forward. Even if the clocks are synchronized at one point in time,
they may easily get out-of-sync and an attacker may even be able to affect
the client or the server time in various ways such as setting up a fake NTP
server, broadcasting false time signals to radio-controlled clocks, or exposing
one of them to a strong gravity field. As soon as client falsely believes
it is time synchronized with the server, delay attacks are possible. A challenge
response mechanism where the server does not need to synchronize its time
with the client is easier to analyze but require more roundtrips. The challenges,
responses, and timestamps may be sent in a CoAP option or in the CoAP payload.</t>
        <t>Remedy: Any IoT deployment of actuators where freshness is important should use
the mechanisms specified in <xref target="RFC9175"/> unless another
application specific challenge-response or timestamp mechanism is used.</t>
      </section>
      <section anchor="resdelay">
        <name>The Response Delay and Mismatch Attack</name>
        <t>The following attack can be performed if CoAP is protected by a security
protocol where the response is not bound to the request in any way except
by the CoAP token. This would include most general security protocols, such
as DTLS, TLS, and IPsec, but not OSCORE. CoAP <xref target="RFC7252"/> uses a
client generated token that the server echoes to match responses to
request, but does not give any guidelines for the use of token with DTLS
and TLS, except that the tokens currently "in use" SHOULD (not SHALL) be
unique. In HTTPS, 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.</t>
        <t>The attacker performs the attack by delaying delivery of a response
until the client sends a request with the same token, the response will be
accepted by the client as a valid response to the later request. If CoAP
is used over a reliable and ordered transport such as TCP with TLS, no messages
can be delivered before the delayed message. If CoAP is used over an unreliable
and unordered transport such as UDP with DTLS, other messages can be delivered
before the delayed message as long as the delayed packet is delivered inside
the replay window. 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>The attack can be performed by an attacker on the wire, or an attacker simultaneously
recording what the server transmits while at the same time jamming the client.
As (D)TLS encrypts the Token, the attacker needs to predict when the Token is reused.
How hard that is depends on the CoAP library, but some implementations are known
to omit the Token as much as possible and others lets the application chose the
Token. If the response is a "piggybacked response", the client may additionally check
the Message ID and drop it on mismatch. That doesn't make the attack impossible,
but lowers the probability.</t>
        <t>The response delay and mismatch attack is illustrated in <xref target="delayresPUT"/>.</t>
        <figure anchor="delayresPUT">
          <name>Delaying and mismatching response to PUT</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="352" width="376" viewBox="0 0 376 352" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,176" fill="none" stroke="black"/>
                <path d="M 32,208 L 32,336" fill="none" stroke="black"/>
                <path d="M 96,72 L 96,128" fill="none" stroke="black"/>
                <path d="M 96,160 L 96,176" fill="none" stroke="black"/>
                <path d="M 96,240 L 96,288" fill="none" stroke="black"/>
                <path d="M 96,320 L 96,336" fill="none" stroke="black"/>
                <path d="M 160,48 L 160,176" fill="none" stroke="black"/>
                <path d="M 160,208 L 160,336" fill="none" stroke="black"/>
                <path d="M 32,64 L 152,64" fill="none" stroke="black"/>
                <path d="M 112,144 L 160,144" fill="none" stroke="black"/>
                <path d="M 32,224 L 80,224" fill="none" stroke="black"/>
                <path d="M 40,304 L 88,304" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="160,64 148,58.4 148,69.6" fill="black" transform="rotate(0,152,64)"/>
                <polygon class="arrowhead" points="120,144 108,138.4 108,149.6" fill="black" transform="rotate(180,112,144)"/>
                <polygon class="arrowhead" points="88,224 76,218.4 76,229.6" fill="black" transform="rotate(0,80,224)"/>
                <polygon class="arrowhead" points="48,304 36,298.4 36,309.6" fill="black" transform="rotate(180,40,304)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="164" y="36">Server</text>
                  <text x="96" y="52">|</text>
                  <text x="232" y="68">Code:</text>
                  <text x="276" y="68">0.03</text>
                  <text x="320" y="68">(PUT)</text>
                  <text x="56" y="84">PUT</text>
                  <text x="228" y="84">Token:</text>
                  <text x="276" y="84">0x77</text>
                  <text x="216" y="100">Uri-Path:</text>
                  <text x="276" y="100">lock</text>
                  <text x="220" y="116">Payload:</text>
                  <text x="264" y="116">0</text>
                  <text x="308" y="116">(Unlock)</text>
                  <text x="96" y="148">@</text>
                  <text x="232" y="148">Code:</text>
                  <text x="276" y="148">2.04</text>
                  <text x="336" y="148">(Changed)</text>
                  <text x="132" y="164">2.04</text>
                  <text x="228" y="164">Token:</text>
                  <text x="276" y="164">0x77</text>
                  <text x="64" y="196">.....</text>
                  <text x="128" y="196">.....</text>
                  <text x="96" y="212">|</text>
                  <text x="96" y="228">X</text>
                  <text x="232" y="228">Code:</text>
                  <text x="276" y="228">0.03</text>
                  <text x="320" y="228">(PUT)</text>
                  <text x="56" y="244">PUT</text>
                  <text x="228" y="244">Token:</text>
                  <text x="276" y="244">0x77</text>
                  <text x="216" y="260">Uri-Path:</text>
                  <text x="276" y="260">lock</text>
                  <text x="220" y="276">Payload:</text>
                  <text x="264" y="276">0</text>
                  <text x="300" y="276">(Lock)</text>
                  <text x="96" y="308">@</text>
                  <text x="232" y="308">Code:</text>
                  <text x="276" y="308">2.04</text>
                  <text x="336" y="308">(Changed)</text>
                  <text x="68" y="324">2.04</text>
                  <text x="228" y="324">Token:</text>
                  <text x="276" y="324">0x77</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe    Server
   |       |       |
   +-------------->|      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x77
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 0 (Unlock)
   |       |       |
   |       @ <-----+      Code: 2.04 (Changed)
   |       |  2.04 |     Token: 0x77
   |       |       |
     .....   .....
   |       |       |
   +-----> X       |      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x77
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 0 (Lock)
   |       |       |
   |<------@       |      Code: 2.04 (Changed)
   |  2.04 |       |     Token: 0x77
   |       |       |
]]></artwork>
          </artset>
        </figure>
        <t>If we once again take a lock as an example, the security consequences may
be severe as the client receives a response message likely to be interpreted
as confirmation of a locked door, while the received response message is
in fact confirming an earlier unlock of the door. As the client is likely
to leave the (believed to be locked) door unattended, the attacker may enter
the home, enterprise, or car protected by the lock.</t>
        <t>The same attack may be performed on sensors. As illustrated in <xref target="delayresGET"/>, an attacker may convince the client
that the lock is locked, when it in fact is not. The "Unlock" request
may be also be sent by another client authorized to control the lock.</t>
        <figure anchor="delayresGET">
          <name>Delaying and mismatching response to GET</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="448" width="376" viewBox="0 0 376 448" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,432" fill="none" stroke="black"/>
                <path d="M 96,72 L 96,112" fill="none" stroke="black"/>
                <path d="M 96,144 L 96,184" fill="none" stroke="black"/>
                <path d="M 96,200 L 96,256" fill="none" stroke="black"/>
                <path d="M 96,288 L 96,304" fill="none" stroke="black"/>
                <path d="M 96,336 L 96,368" fill="none" stroke="black"/>
                <path d="M 96,400 L 96,432" fill="none" stroke="black"/>
                <path d="M 160,48 L 160,432" fill="none" stroke="black"/>
                <path d="M 32,64 L 152,64" fill="none" stroke="black"/>
                <path d="M 112,128 L 160,128" fill="none" stroke="black"/>
                <path d="M 32,192 L 152,192" fill="none" stroke="black"/>
                <path d="M 112,272 L 160,272" fill="none" stroke="black"/>
                <path d="M 32,320 L 80,320" fill="none" stroke="black"/>
                <path d="M 40,384 L 88,384" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="160,192 148,186.4 148,197.6" fill="black" transform="rotate(0,152,192)"/>
                <polygon class="arrowhead" points="160,64 148,58.4 148,69.6" fill="black" transform="rotate(0,152,64)"/>
                <polygon class="arrowhead" points="120,272 108,266.4 108,277.6" fill="black" transform="rotate(180,112,272)"/>
                <polygon class="arrowhead" points="120,128 108,122.4 108,133.6" fill="black" transform="rotate(180,112,128)"/>
                <polygon class="arrowhead" points="88,320 76,314.4 76,325.6" fill="black" transform="rotate(0,80,320)"/>
                <polygon class="arrowhead" points="48,384 36,378.4 36,389.6" fill="black" transform="rotate(180,40,384)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="164" y="36">Server</text>
                  <text x="96" y="52">|</text>
                  <text x="232" y="68">Code:</text>
                  <text x="276" y="68">0.01</text>
                  <text x="320" y="68">(GET)</text>
                  <text x="56" y="84">GET</text>
                  <text x="228" y="84">Token:</text>
                  <text x="276" y="84">0x77</text>
                  <text x="216" y="100">Uri-Path:</text>
                  <text x="276" y="100">lock</text>
                  <text x="96" y="132">@</text>
                  <text x="232" y="132">Code:</text>
                  <text x="276" y="132">2.05</text>
                  <text x="336" y="132">(Content)</text>
                  <text x="132" y="148">2.05</text>
                  <text x="228" y="148">Token:</text>
                  <text x="276" y="148">0x77</text>
                  <text x="220" y="164">Payload:</text>
                  <text x="264" y="164">1</text>
                  <text x="308" y="164">(Locked)</text>
                  <text x="232" y="196">Code:</text>
                  <text x="276" y="196">0.03</text>
                  <text x="320" y="196">(PUT)</text>
                  <text x="56" y="212">PUT</text>
                  <text x="228" y="212">Token:</text>
                  <text x="276" y="212">0x34</text>
                  <text x="216" y="228">Uri-Path:</text>
                  <text x="276" y="228">lock</text>
                  <text x="220" y="244">Payload:</text>
                  <text x="264" y="244">1</text>
                  <text x="308" y="244">(Unlock)</text>
                  <text x="96" y="276">X</text>
                  <text x="232" y="276">Code:</text>
                  <text x="276" y="276">2.04</text>
                  <text x="336" y="276">(Changed)</text>
                  <text x="132" y="292">2.04</text>
                  <text x="228" y="292">Token:</text>
                  <text x="276" y="292">0x34</text>
                  <text x="96" y="324">X</text>
                  <text x="232" y="324">Code:</text>
                  <text x="276" y="324">0.01</text>
                  <text x="320" y="324">(GET)</text>
                  <text x="56" y="340">GET</text>
                  <text x="228" y="340">Token:</text>
                  <text x="276" y="340">0x77</text>
                  <text x="216" y="356">Uri-Path:</text>
                  <text x="276" y="356">lock</text>
                  <text x="96" y="388">@</text>
                  <text x="232" y="388">Code:</text>
                  <text x="276" y="388">2.05</text>
                  <text x="336" y="388">(Content)</text>
                  <text x="68" y="404">2.05</text>
                  <text x="228" y="404">Token:</text>
                  <text x="276" y="404">0x77</text>
                  <text x="220" y="420">Payload:</text>
                  <text x="264" y="420">1</text>
                  <text x="308" y="420">(Locked)</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe    Server
   |       |       |
   +-------------->|      Code: 0.01 (GET)
   | GET   |       |     Token: 0x77
   |       |       |  Uri-Path: lock
   |       |       |
   |       @ <-----+      Code: 2.05 (Content)
   |       |  2.05 |     Token: 0x77
   |       |       |   Payload: 1 (Locked)
   |       |       |
   +-------------->|      Code: 0.03 (PUT)
   | PUT   |       |     Token: 0x34
   |       |       |  Uri-Path: lock
   |       |       |   Payload: 1 (Unlock)
   |       |       |
   |       X <-----+      Code: 2.04 (Changed)
   |       |  2.04 |     Token: 0x34
   |       |       |
   +-----> X       |      Code: 0.01 (GET)
   | GET   |       |     Token: 0x77
   |       |       |  Uri-Path: lock
   |       |       |
   |<------@       |      Code: 2.05 (Content)
   |  2.05 |       |     Token: 0x77
   |       |       |   Payload: 1 (Locked)
   |       |       |
]]></artwork>
          </artset>
        </figure>
        <t>As illustrated in <xref target="delayresother"/>, an attacker may even mix
responses from different resources as long as the two resources share
the same (D)TLS connection on some part of the path towards the
client. This can happen if the resources are located behind a common
gateway, or are served by the same CoAP proxy. An on-path attacker
(not necessarily a (D)TLS endpoint such as a proxy) may e.g., deceive a
client that the living room is on fire by responding with an earlier
delayed response from the oven (temperatures in degree Celsius).</t>
        <figure anchor="delayresother">
          <name>Delaying and mismatching response from other resource</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="352" width="440" viewBox="0 0 440 352" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,176" fill="none" stroke="black"/>
                <path d="M 32,208 L 32,336" fill="none" stroke="black"/>
                <path d="M 96,72 L 96,112" fill="none" stroke="black"/>
                <path d="M 96,144 L 96,176" fill="none" stroke="black"/>
                <path d="M 96,240 L 96,272" fill="none" stroke="black"/>
                <path d="M 96,304 L 96,336" fill="none" stroke="black"/>
                <path d="M 160,48 L 160,176" fill="none" stroke="black"/>
                <path d="M 160,208 L 160,336" fill="none" stroke="black"/>
                <path d="M 32,64 L 152,64" fill="none" stroke="black"/>
                <path d="M 112,128 L 160,128" fill="none" stroke="black"/>
                <path d="M 32,224 L 80,224" fill="none" stroke="black"/>
                <path d="M 40,288 L 88,288" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="160,64 148,58.4 148,69.6" fill="black" transform="rotate(0,152,64)"/>
                <polygon class="arrowhead" points="120,128 108,122.4 108,133.6" fill="black" transform="rotate(180,112,128)"/>
                <polygon class="arrowhead" points="88,224 76,218.4 76,229.6" fill="black" transform="rotate(0,80,224)"/>
                <polygon class="arrowhead" points="48,288 36,282.4 36,293.6" fill="black" transform="rotate(180,40,288)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="164" y="36">Server</text>
                  <text x="96" y="52">|</text>
                  <text x="232" y="68">Code:</text>
                  <text x="276" y="68">0.01</text>
                  <text x="320" y="68">(GET)</text>
                  <text x="56" y="84">GET</text>
                  <text x="228" y="84">Token:</text>
                  <text x="276" y="84">0x77</text>
                  <text x="216" y="100">Uri-Path:</text>
                  <text x="324" y="100">oven/temperature</text>
                  <text x="96" y="132">@</text>
                  <text x="232" y="132">Code:</text>
                  <text x="276" y="132">2.05</text>
                  <text x="336" y="132">(Content)</text>
                  <text x="132" y="148">2.05</text>
                  <text x="228" y="148">Token:</text>
                  <text x="276" y="148">0x77</text>
                  <text x="220" y="164">Payload:</text>
                  <text x="272" y="164">225</text>
                  <text x="64" y="196">.....</text>
                  <text x="128" y="196">.....</text>
                  <text x="96" y="212">|</text>
                  <text x="96" y="228">X</text>
                  <text x="232" y="228">Code:</text>
                  <text x="276" y="228">0.01</text>
                  <text x="320" y="228">(GET)</text>
                  <text x="56" y="244">GET</text>
                  <text x="228" y="244">Token:</text>
                  <text x="276" y="244">0x77</text>
                  <text x="216" y="260">Uri-Path:</text>
                  <text x="348" y="260">livingroom/temperature</text>
                  <text x="96" y="292">@</text>
                  <text x="232" y="292">Code:</text>
                  <text x="276" y="292">2.05</text>
                  <text x="336" y="292">(Content)</text>
                  <text x="68" y="308">2.05</text>
                  <text x="228" y="308">Token:</text>
                  <text x="276" y="308">0x77</text>
                  <text x="220" y="324">Payload:</text>
                  <text x="272" y="324">225</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe    Server
   |       |       |
   +-------------->|      Code: 0.01 (GET)
   | GET   |       |     Token: 0x77
   |       |       |  Uri-Path: oven/temperature
   |       |       |
   |       @ <-----+      Code: 2.05 (Content)
   |       |  2.05 |     Token: 0x77
   |       |       |   Payload: 225
   |       |       |
     .....   .....
   |       |       |
   +-----> X       |      Code: 0.01 (GET)
   | GET   |       |     Token: 0x77
   |       |       |  Uri-Path: livingroom/temperature
   |       |       |
   |<------@       |      Code: 2.05 (Content)
   |  2.05 |       |     Token: 0x77
   |       |       |   Payload: 225
   |       |       |
]]></artwork>
          </artset>
        </figure>
        <t>Remedy: Section 4.2 of <xref target="RFC9175"/> formally updates the client token processing for CoAP <xref target="RFC7252"/>.
Following this updated processing mitigates the attack.</t>
      </section>
      <section anchor="fragment">
        <name>The Request Fragment Rearrangement Attack</name>
        <t>These attack scenarios show that the Request Delay and Blocking Attacks can
be
used against block-wise transfers to cause unauthorized operations to be
performed on the server, and responses to unauthorized operations to be
mistaken for responses to authorized operations.
The combination of these attacks is described as a separate attack because
it makes the Request Delay Attack
relevant to systems that are otherwise not time-dependent, which means that
they could disregard the Request Delay Attack.</t>
        <t>This attack works even if the individual request/response pairs are encrypted,
authenticated and protected against the Response Delay and Mismatch Attack,
provided the attacker is on the network path and can correctly guess which
operations the respective packages belong to.</t>
        <t>The attacks can be performed on any security protocol where the attacker can
delay the delivery of a message unnoticed. This inclused DTLS, IPsec, and most OSCORE
configurations. The attacks does not work on TCP with TLS or OSCORE (with
TLS-like sequence number handling) as in these cases no messages can be
delivered before the delayed message.</t>
        <section anchor="fragment-earlierfinal">
          <name>Completing an Operation with an Earlier Final Block</name>
          <t>In this scenario (illustrated in <xref target="promotevaljean"/>), blocks from two
operations on a POST-accepting resource are combined to make the
server execute an action that was not intended by the authorized
client. This works only if the client attempts a second operation
after the first operation failed (due to what the attacker made appear
like a network outage) within the replay window. The client does not
receive a confirmation on the second operation either, but, by the
time the client acts on it, the server has already executed the
unauthorized action.</t>
          <figure anchor="promotevaljean">
            <name>Completing an operation with an earlier final block</name>
            <artset>
              <artwork type="svg"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="384" width="560" viewBox="0 0 560 384" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                  <path d="M 32,48 L 32,176" fill="none" stroke="black"/>
                  <path d="M 32,240 L 32,368" fill="none" stroke="black"/>
                  <path d="M 160,48 L 160,176" fill="none" stroke="black"/>
                  <path d="M 160,240 L 160,368" fill="none" stroke="black"/>
                  <path d="M 32,64 L 152,64" fill="none" stroke="black"/>
                  <path d="M 40,96 L 160,96" fill="none" stroke="black"/>
                  <path d="M 32,128 L 80,128" fill="none" stroke="black"/>
                  <path d="M 32,160 L 80,160" fill="none" stroke="black"/>
                  <path d="M 32,256 L 152,256" fill="none" stroke="black"/>
                  <path d="M 112,288 L 160,288" fill="none" stroke="black"/>
                  <path d="M 104,320 L 152,320" fill="none" stroke="black"/>
                  <path d="M 112,352 L 160,352" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="160,320 148,314.4 148,325.6" fill="black" transform="rotate(0,152,320)"/>
                  <polygon class="arrowhead" points="160,256 148,250.4 148,261.6" fill="black" transform="rotate(0,152,256)"/>
                  <polygon class="arrowhead" points="160,64 148,58.4 148,69.6" fill="black" transform="rotate(0,152,64)"/>
                  <polygon class="arrowhead" points="120,352 108,346.4 108,357.6" fill="black" transform="rotate(180,112,352)"/>
                  <polygon class="arrowhead" points="120,288 108,282.4 108,293.6" fill="black" transform="rotate(180,112,288)"/>
                  <polygon class="arrowhead" points="88,160 76,154.4 76,165.6" fill="black" transform="rotate(0,80,160)"/>
                  <polygon class="arrowhead" points="88,128 76,122.4 76,133.6" fill="black" transform="rotate(0,80,128)"/>
                  <polygon class="arrowhead" points="48,96 36,90.4 36,101.6" fill="black" transform="rotate(180,40,96)"/>
                  <g class="text">
                    <text x="28" y="36">Client</text>
                    <text x="96" y="36">Foe</text>
                    <text x="164" y="36">Server</text>
                    <text x="96" y="52">|</text>
                    <text x="212" y="68">POST</text>
                    <text x="288" y="68">"incarcerate"</text>
                    <text x="380" y="68">(Block1:</text>
                    <text x="428" y="68">0,</text>
                    <text x="460" y="68">more</text>
                    <text x="492" y="68">to</text>
                    <text x="528" y="68">come)</text>
                    <text x="96" y="84">|</text>
                    <text x="212" y="100">2.31</text>
                    <text x="268" y="100">Continue</text>
                    <text x="340" y="100">(Block1:</text>
                    <text x="384" y="100">0</text>
                    <text x="432" y="100">received,</text>
                    <text x="492" y="100">send</text>
                    <text x="536" y="100">more)</text>
                    <text x="96" y="116">|</text>
                    <text x="96" y="132">@</text>
                    <text x="212" y="132">POST</text>
                    <text x="272" y="132">"valjean"</text>
                    <text x="348" y="132">(Block1:</text>
                    <text x="396" y="132">1,</text>
                    <text x="428" y="132">last</text>
                    <text x="476" y="132">block)</text>
                    <text x="96" y="148">|</text>
                    <text x="96" y="164">X</text>
                    <text x="208" y="164">All</text>
                    <text x="288" y="164">retransmissions</text>
                    <text x="384" y="164">dropped</text>
                    <text x="96" y="180">|</text>
                    <text x="36" y="212">(Client:</text>
                    <text x="92" y="212">Odd,</text>
                    <text x="128" y="212">but</text>
                    <text x="168" y="212">let's</text>
                    <text x="204" y="212">go</text>
                    <text x="228" y="212">on</text>
                    <text x="256" y="212">and</text>
                    <text x="304" y="212">promote</text>
                    <text x="368" y="212">Javert)</text>
                    <text x="96" y="244">|</text>
                    <text x="212" y="260">POST</text>
                    <text x="272" y="260">"promote"</text>
                    <text x="348" y="260">(Block1:</text>
                    <text x="396" y="260">0,</text>
                    <text x="428" y="260">more</text>
                    <text x="460" y="260">to</text>
                    <text x="496" y="260">come)</text>
                    <text x="96" y="276">|</text>
                    <text x="96" y="292">X</text>
                    <text x="212" y="292">2.31</text>
                    <text x="268" y="292">Continue</text>
                    <text x="340" y="292">(Block1:</text>
                    <text x="384" y="292">0</text>
                    <text x="432" y="292">received,</text>
                    <text x="492" y="292">send</text>
                    <text x="536" y="292">more)</text>
                    <text x="96" y="308">|</text>
                    <text x="96" y="324">@</text>
                    <text x="212" y="324">POST</text>
                    <text x="272" y="324">"valjean"</text>
                    <text x="348" y="324">(Block1:</text>
                    <text x="396" y="324">1,</text>
                    <text x="428" y="324">last</text>
                    <text x="476" y="324">block)</text>
                    <text x="96" y="340">|</text>
                    <text x="96" y="356">X</text>
                    <text x="212" y="356">2.04</text>
                    <text x="264" y="356">Valjean</text>
                    <text x="332" y="356">Promoted</text>
                    <text x="96" y="372">|</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art"><![CDATA[
Client    Foe    Server
   |       |       |
   +-------------->|    POST "incarcerate" (Block1: 0, more to come)
   |       |       |
   |<--------------+    2.31 Continue (Block1: 0 received, send more)
   |       |       |
   +-----> @       |    POST "valjean" (Block1: 1, last block)
   |       |       |
   +-----> X       |    All retransmissions dropped
   |       |       |

(Client: Odd, but let's go on and promote Javert)

   |       |       |
   +-------------->|    POST "promote" (Block1: 0, more to come)
   |       |       |
   |       X <-----+    2.31 Continue (Block1: 0 received, send more)
   |       |       |
   |       @------>|    POST "valjean" (Block1: 1, last block)
   |       |       |
   |       X <-----+    2.04 Valjean Promoted
   |       |       |
]]></artwork>
            </artset>
          </figure>
          <t>Remedy: If a client starts new block-wise operations on a security
context that has lost packets, it needs to label the fragments in
such a way that the server will not mix them up.</t>
          <t>A mechanism to that effect is described as Request-Tag
<xref target="RFC9175"/>. Had it been in place in the
example and used for body integrity protection, the client would have
set the Request-Tag option in the "promote" request.
Depending on the server's capabilities and setup, either of four
outcomes could have occurred:</t>
          <ol spacing="normal" type="1"><li>The server could have processed the reinjected POST "valjean" as belonging
to the original "incarcerate" block; that's the expected case when the server
can handle simultaneous block transfers.</li>
            <li>The server could respond 5.03 Service Unavailable, including a Max-Age option
indicating how
long it prefers not to take any requests that force it to overwrite the state
kept for the "incarcerate" request.</li>
            <li>The server could decide to drop the state kept for the
"incarcerate" request's state, and process the "promote"
request. The reinjected POST "valjean" will then fail with 4.08
Request Entity incomplete, indicating that the server does not have
the start of the operation any more.</li>
          </ol>
        </section>
        <section anchor="injecting-a-withheld-first-block">
          <name>Injecting a Withheld First Block</name>
          <t>If the first block of a request is withheld by the attacker for later use,
it can be used to have the server process a different request body than
intended by the client. Unlike in the previous scenario, it will return a
response based on that body to the client.</t>
          <t>Again, a first operation (that would go like "Girl stole
apple. What shall we do with her?" - "Set her free.") is aborted by
the proxy, and a part of that operation is later used in a different
operation to prime the server for responding leniently to another
operation that would originally have been "Evil Queen poisoned apple. What
shall we do with her?" - "Lock her up.". The attack is illustrated in
<xref target="freethequeen"/>.</t>
          <figure anchor="freethequeen">
            <name>Injecting a withheld first block</name>
            <artset>
              <artwork type="svg"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="448" width="560" viewBox="0 0 560 448" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                  <path d="M 32,48 L 32,80" fill="none" stroke="black"/>
                  <path d="M 32,160 L 32,432" fill="none" stroke="black"/>
                  <path d="M 96,184 L 96,208" fill="none" stroke="black"/>
                  <path d="M 96,272 L 96,288" fill="none" stroke="black"/>
                  <path d="M 96,376 L 96,408" fill="none" stroke="black"/>
                  <path d="M 160,48 L 160,80" fill="none" stroke="black"/>
                  <path d="M 160,160 L 160,432" fill="none" stroke="black"/>
                  <path d="M 32,64 L 80,64" fill="none" stroke="black"/>
                  <path d="M 32,176 L 152,176" fill="none" stroke="black"/>
                  <path d="M 112,224 L 160,224" fill="none" stroke="black"/>
                  <path d="M 104,256 L 152,256" fill="none" stroke="black"/>
                  <path d="M 112,304 L 160,304" fill="none" stroke="black"/>
                  <path d="M 40,336 L 88,336" fill="none" stroke="black"/>
                  <path d="M 32,368 L 152,368" fill="none" stroke="black"/>
                  <path d="M 40,416 L 160,416" fill="none" stroke="black"/>
                  <polygon class="arrowhead" points="160,368 148,362.4 148,373.6" fill="black" transform="rotate(0,152,368)"/>
                  <polygon class="arrowhead" points="160,256 148,250.4 148,261.6" fill="black" transform="rotate(0,152,256)"/>
                  <polygon class="arrowhead" points="160,176 148,170.4 148,181.6" fill="black" transform="rotate(0,152,176)"/>
                  <polygon class="arrowhead" points="120,304 108,298.4 108,309.6" fill="black" transform="rotate(180,112,304)"/>
                  <polygon class="arrowhead" points="120,224 108,218.4 108,229.6" fill="black" transform="rotate(180,112,224)"/>
                  <polygon class="arrowhead" points="88,64 76,58.4 76,69.6" fill="black" transform="rotate(0,80,64)"/>
                  <polygon class="arrowhead" points="48,416 36,410.4 36,421.6" fill="black" transform="rotate(180,40,416)"/>
                  <polygon class="arrowhead" points="48,336 36,330.4 36,341.6" fill="black" transform="rotate(180,40,336)"/>
                  <g class="text">
                    <text x="28" y="36">Client</text>
                    <text x="96" y="36">Foe</text>
                    <text x="164" y="36">Server</text>
                    <text x="96" y="52">|</text>
                    <text x="96" y="68">@</text>
                    <text x="212" y="68">POST</text>
                    <text x="256" y="68">"Girl</text>
                    <text x="304" y="68">stole</text>
                    <text x="356" y="68">apple.</text>
                    <text x="400" y="68">Wh"</text>
                    <text x="96" y="84">|</text>
                    <text x="260" y="84">(Block1:</text>
                    <text x="308" y="84">0,</text>
                    <text x="340" y="84">more</text>
                    <text x="372" y="84">to</text>
                    <text x="408" y="84">come)</text>
                    <text x="36" y="116">(Client:</text>
                    <text x="96" y="116">We'll</text>
                    <text x="136" y="116">try</text>
                    <text x="172" y="116">that</text>
                    <text x="208" y="116">one</text>
                    <text x="248" y="116">later</text>
                    <text x="300" y="116">again;</text>
                    <text x="344" y="116">for</text>
                    <text x="380" y="116">now,</text>
                    <text x="412" y="116">we</text>
                    <text x="444" y="116">have</text>
                    <text x="504" y="116">something</text>
                    <text x="20" y="132">more</text>
                    <text x="76" y="132">urgent:)</text>
                    <text x="96" y="164">|</text>
                    <text x="212" y="180">POST</text>
                    <text x="256" y="180">"Evil</text>
                    <text x="304" y="180">Queen</text>
                    <text x="364" y="180">poisened</text>
                    <text x="428" y="180">apple.</text>
                    <text x="472" y="180">Wh"</text>
                    <text x="260" y="196">(Block1:</text>
                    <text x="308" y="196">0,</text>
                    <text x="340" y="196">more</text>
                    <text x="372" y="196">to</text>
                    <text x="408" y="196">come)</text>
                    <text x="96" y="228">@</text>
                    <text x="212" y="228">2.31</text>
                    <text x="268" y="228">Continue</text>
                    <text x="340" y="228">(Block1:</text>
                    <text x="384" y="228">0</text>
                    <text x="432" y="228">received,</text>
                    <text x="492" y="228">send</text>
                    <text x="536" y="228">more)</text>
                    <text x="96" y="244">|</text>
                    <text x="96" y="260">@</text>
                    <text x="212" y="260">POST</text>
                    <text x="256" y="260">"Girl</text>
                    <text x="304" y="260">stole</text>
                    <text x="356" y="260">apple.</text>
                    <text x="400" y="260">Wh"</text>
                    <text x="260" y="276">(Block1:</text>
                    <text x="308" y="276">0,</text>
                    <text x="340" y="276">more</text>
                    <text x="372" y="276">to</text>
                    <text x="408" y="276">come)</text>
                    <text x="96" y="308">X</text>
                    <text x="212" y="308">2.31</text>
                    <text x="268" y="308">Continue</text>
                    <text x="340" y="308">(Block1:</text>
                    <text x="384" y="308">0</text>
                    <text x="432" y="308">received,</text>
                    <text x="492" y="308">send</text>
                    <text x="536" y="308">more)</text>
                    <text x="96" y="324">|</text>
                    <text x="96" y="340">@</text>
                    <text x="212" y="340">2.31</text>
                    <text x="268" y="340">Continue</text>
                    <text x="340" y="340">(Block1:</text>
                    <text x="384" y="340">0</text>
                    <text x="432" y="340">received,</text>
                    <text x="492" y="340">send</text>
                    <text x="536" y="340">more)</text>
                    <text x="96" y="356">|</text>
                    <text x="212" y="372">POST</text>
                    <text x="248" y="372">"at</text>
                    <text x="288" y="372">shall</text>
                    <text x="324" y="372">we</text>
                    <text x="348" y="372">do</text>
                    <text x="380" y="372">with</text>
                    <text x="424" y="372">her?"</text>
                    <text x="260" y="388">(Block1:</text>
                    <text x="308" y="388">1,</text>
                    <text x="340" y="388">last</text>
                    <text x="388" y="388">block)</text>
                    <text x="212" y="420">2.05</text>
                    <text x="252" y="420">"Set</text>
                    <text x="288" y="420">her</text>
                    <text x="332" y="420">free."</text>
                    <text x="96" y="436">|</text>
                    <text x="260" y="436">(Block1:</text>
                    <text x="304" y="436">1</text>
                    <text x="352" y="436">received,</text>
                    <text x="412" y="436">this</text>
                    <text x="444" y="436">is</text>
                    <text x="472" y="436">the</text>
                    <text x="520" y="436">result)</text>
                  </g>
                </svg>
              </artwork>
              <artwork type="ascii-art"><![CDATA[
Client    Foe    Server
   |       |       |
   +-----> @       |    POST "Girl stole apple. Wh"
   |       |       |        (Block1: 0, more to come)

(Client: We'll try that one later again; for now, we have something
more urgent:)

   |       |       |
   +-------------->|    POST "Evil Queen poisened apple. Wh"
   |       |       |        (Block1: 0, more to come)
   |       |       |
   |       @ <-----+    2.31 Continue (Block1: 0 received, send more)
   |       |       |
   |       @------>|    POST "Girl stole apple. Wh"
   |       |       |        (Block1: 0, more to come)
   |       |       |
   |       X <-----+    2.31 Continue (Block1: 0 received, send more)
   |       |       |
   |<------@       |    2.31 Continue (Block1: 0 received, send more)
   |       |       |
   +-------------->|    POST "at shall we do with her?"
   |       |       |        (Block1: 1, last block)
   |       |       |
   |<--------------+    2.05 "Set her free."
   |       |       |        (Block1: 1 received, this is the result)
]]></artwork>
            </artset>
          </figure>
          <t>The remedy described in <xref target="fragment-earlierfinal"/> works also for this case.
Note that merely requiring that blocks of an operation should have incrementing sequence numbers
would be insufficient to remedy this attack.</t>
        </section>
        <section anchor="attack-difficulty">
          <name>Attack difficulty</name>
          <t>The success of any fragment rearrangement attack has multiple prerequisites:</t>
          <ul spacing="normal">
            <li>
              <t>A client sends different block-wise requests that are only distinguished by their content.  </t>
              <t>
This is generally rare in typical CoRE applications,
but can happen when the bodies of FETCH requests exceed the fragmentation threshold,
or when SOAP patterns are emulated.</t>
            </li>
            <li>
              <t>A client starts later block-wise operations after an earlier one has failed.  </t>
              <t>
This happens regularly as a consequence of operating in a low-power and lossy network:
Losses can cause failed operation (especially when the network is unavailable for time exceeding the "few expected round-trips" they may be limited to per <xref target="RFC7959"/>),
and the cost of reestablishing a security context.</t>
            </li>
            <li>
              <t>The attacker needs to be able to determine which packets contain which fragments.  </t>
              <t>
This can be achieved by an on-path attacker by observing request timing,
or simply by observing request sizes in the case when a body is split into precisely two blocks.</t>
            </li>
          </ul>
          <t>It is <em>not</em> a prerequisite that the resulting misassembled request body is syntactically correct:
As the server erroneously expects the body to be integrity protected from an authorized source,
it might be using a parser not suitable for untrusted input.
Such a parser might crash the server in extreme cases,
but might also produce a valid but incorrect response to the request the client associates the response with.
Note that many constrained applications aim to minimize traffic and thus employ compact data formats;
that compactness leaves little room for syntactically invalid messages.</t>
          <t>The attack is easier if the attacker has control over the request bodies
(which would be the case when a trusted proxy validates the attacker's authorization to perform two given requests,
and an attack on the path between the proxy and the server recombines the blocks to a semantically different request).
Attacks of that shape can easily result in reassembled bodies chosen by the attacker,
but no services are currently known that operate in this way.</t>
          <t>Summarizing,
it is unlikely that an attacker can perform any of the fragment rearrangement attacks on any given system --
but given the diversity of applications built on CoAP, it is easily to imagine that single applications would be vulnerable.
As block-wise transfer is a basic feature of CoAP and its details are sometimes hidden behind abstractions or proxies,
application authors can not be expected to design their applications with these attacks in mind,
and mitigation on the protocol level is prudent.</t>
        </section>
      </section>
      <section anchor="the-relay-attack">
        <name>The Relay Attack</name>
        <t>Yet another type of attack can be performed in deployments where actuator
actions are triggered automatically based on proximity and without any user
interaction, e.g., a car (the client) constantly polling for the car key (the
server) and unlocking both doors and engine as soon as the car key responds.
An attacker (or pair of attackers) may simply relay the CoAP messages out-of-band,
using for examples some other radio technology. By doing this, the actuator
(i.e., the car) believes that the client is close by and performs actions
based on that false assumption. The attack is illustrated in
<xref target="relay"/>. In this example the car is using an application specific
challenge-response mechanism transferred as CoAP payloads.</t>
        <figure anchor="relay">
          <name>Relay attack (the client is the actuator)</name>
          <artset>
            <artwork type="svg" align="center"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="208" width="560" viewBox="0 0 560 208" class="diagram" text-anchor="middle" font-family="monospace" font-size="13px">
                <path d="M 32,48 L 32,192" fill="none" stroke="black"/>
                <path d="M 96,48 L 96,192" fill="none" stroke="black"/>
                <path d="M 184,48 L 184,192" fill="none" stroke="black"/>
                <path d="M 248,48 L 248,192" fill="none" stroke="black"/>
                <path d="M 32,64 L 88,64" fill="none" stroke="black"/>
                <path d="M 184,64 L 240,64" fill="none" stroke="black"/>
                <path d="M 40,144 L 96,144" fill="none" stroke="black"/>
                <path d="M 192,144 L 248,144" fill="none" stroke="black"/>
                <polygon class="arrowhead" points="248,64 236,58.4 236,69.6" fill="black" transform="rotate(0,240,64)"/>
                <polygon class="arrowhead" points="200,144 188,138.4 188,149.6" fill="black" transform="rotate(180,192,144)"/>
                <polygon class="arrowhead" points="96,64 84,58.4 84,69.6" fill="black" transform="rotate(0,88,64)"/>
                <polygon class="arrowhead" points="48,144 36,138.4 36,149.6" fill="black" transform="rotate(180,40,144)"/>
                <g class="text">
                  <text x="28" y="36">Client</text>
                  <text x="96" y="36">Foe</text>
                  <text x="184" y="36">Foe</text>
                  <text x="252" y="36">Server</text>
                  <text x="140" y="68">........</text>
                  <text x="320" y="68">Code:</text>
                  <text x="364" y="68">0.02</text>
                  <text x="412" y="68">(POST)</text>
                  <text x="60" y="84">POST</text>
                  <text x="212" y="84">POST</text>
                  <text x="316" y="84">Token:</text>
                  <text x="364" y="84">0x3a</text>
                  <text x="304" y="100">Uri-Path:</text>
                  <text x="364" y="100">lock</text>
                  <text x="308" y="116">Payload:</text>
                  <text x="404" y="116">JwePR2iCe8b0ux</text>
                  <text x="512" y="116">(Challenge)</text>
                  <text x="140" y="148">........</text>
                  <text x="320" y="148">Code:</text>
                  <text x="364" y="148">2.04</text>
                  <text x="424" y="148">(Changed)</text>
                  <text x="68" y="164">2.04</text>
                  <text x="220" y="164">2.04</text>
                  <text x="316" y="164">Token:</text>
                  <text x="364" y="164">0x3a</text>
                  <text x="308" y="180">Payload:</text>
                  <text x="404" y="180">RM8i13G8D5vfXK</text>
                  <text x="508" y="180">(Response)</text>
                </g>
              </svg>
            </artwork>
            <artwork type="ascii-art" align="center"><![CDATA[
Client    Foe        Foe    Server
   |       |          |       |
   +------>| ........ +------>|      Code: 0.02 (POST)
   | POST  |          | POST  |     Token: 0x3a
   |       |          |       |  Uri-Path: lock
   |       |          |       |   Payload: JwePR2iCe8b0ux (Challenge)
   |       |          |       |
   |<------+ ........ |<------+      Code: 2.04 (Changed)
   |  2.04 |          |  2.04 |     Token: 0x3a
   |       |          |       |   Payload: RM8i13G8D5vfXK (Response)
   |       |          |       |
]]></artwork>
          </artset>
        </figure>
        <t>The consequences may be severe, and in the case of a car, lead to the attacker
unlocking and driving away with the car, an attack that unfortunately is
happening in practice.</t>
        <t>Remedy: Getting a response over a short-range radio cannot be taken as
proof of proximity and can therefore not be used to take actions based on
such proximity. Any automatically triggered mechanisms relying on proximity
need to use other stronger mechanisms to establish proximity. Mechanisms that
can be used are: measuring the round-trip time and calculating the maximum
possible distance based on the speed of light, or using radio with an extremely
short range like NFC (centimeters instead of meters). Another option is to
include geographical coordinates (from e.g., GPS) in the messages and calculate
proximity based on these, but in this case the location measurements need to be
very precise and the system need to make sure that an attacker cannot
influence the location estimation. Some types of global navigation satellite
systems (GNSS) receivers are vulnerable to spoofing attacks.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>The whole document can be seen as security considerations for CoAP.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no actions for IANA.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>Informative References</name>
      <reference anchor="RFC7252" target="https://www.rfc-editor.org/info/rfc7252">
        <front>
          <title>The Constrained Application Protocol (CoAP)</title>
          <author fullname="Z. Shelby" initials="Z." surname="Shelby">
            <organization/>
          </author>
          <author fullname="K. Hartke" initials="K." surname="Hartke">
            <organization/>
          </author>
          <author fullname="C. Bormann" initials="C." surname="Bormann">
            <organization/>
          </author>
          <date month="June" year="2014"/>
          <abstract>
            <t>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>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">
        <front>
          <title>Block-Wise Transfers in the Constrained Application Protocol (CoAP)</title>
          <author fullname="C. Bormann" initials="C." surname="Bormann">
            <organization/>
          </author>
          <author fullname="Z. Shelby" initials="Z." role="editor" surname="Shelby">
            <organization/>
          </author>
          <date month="August" year="2016"/>
          <abstract>
            <t>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>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>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="RFC8323" target="https://www.rfc-editor.org/info/rfc8323">
        <front>
          <title>CoAP (Constrained Application Protocol) over TCP, TLS, and WebSockets</title>
          <author fullname="C. Bormann" initials="C." surname="Bormann">
            <organization/>
          </author>
          <author fullname="S. Lemay" initials="S." surname="Lemay">
            <organization/>
          </author>
          <author fullname="H. Tschofenig" initials="H." surname="Tschofenig">
            <organization/>
          </author>
          <author fullname="K. Hartke" initials="K." surname="Hartke">
            <organization/>
          </author>
          <author fullname="B. Silverajan" initials="B." surname="Silverajan">
            <organization/>
          </author>
          <author fullname="B. Raymor" initials="B." role="editor" surname="Raymor">
            <organization/>
          </author>
          <date month="February" year="2018"/>
          <abstract>
            <t>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>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">
        <front>
          <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
          <author fullname="E. Rescorla" initials="E." surname="Rescorla">
            <organization/>
          </author>
          <date month="August" year="2018"/>
          <abstract>
            <t>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>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="RFC8613" target="https://www.rfc-editor.org/info/rfc8613">
        <front>
          <title>Object Security for Constrained RESTful Environments (OSCORE)</title>
          <author fullname="G. Selander" initials="G." surname="Selander">
            <organization/>
          </author>
          <author fullname="J. Mattsson" initials="J." surname="Mattsson">
            <organization/>
          </author>
          <author fullname="F. Palombini" initials="F." surname="Palombini">
            <organization/>
          </author>
          <author fullname="L. Seitz" initials="L." surname="Seitz">
            <organization/>
          </author>
          <date month="July" year="2019"/>
          <abstract>
            <t>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>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>
      <reference anchor="RFC9052" target="https://www.rfc-editor.org/info/rfc9052">
        <front>
          <title>CBOR Object Signing and Encryption (COSE): Structures and Process</title>
          <author fullname="J. Schaad" initials="J." surname="Schaad">
            <organization/>
          </author>
          <date month="August" year="2022"/>
          <abstract>
            <t>Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size.  There is a need to be able to define basic security services for this data format.  This document defines the CBOR Object Signing and Encryption (COSE) protocol.  This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization.  This specification additionally describes how to represent cryptographic keys using CBOR.  </t>
            <t>This document, along with RFC 9053, obsoletes RFC 8152.</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="96"/>
        <seriesInfo name="RFC" value="9052"/>
        <seriesInfo name="DOI" value="10.17487/RFC9052"/>
      </reference>
      <reference anchor="RFC9147" target="https://www.rfc-editor.org/info/rfc9147">
        <front>
          <title>The Datagram Transport Layer Security (DTLS) Protocol Version 1.3</title>
          <author fullname="E. Rescorla" initials="E." surname="Rescorla">
            <organization/>
          </author>
          <author fullname="H. Tschofenig" initials="H." surname="Tschofenig">
            <organization/>
          </author>
          <author fullname="N. Modadugu" initials="N." surname="Modadugu">
            <organization/>
          </author>
          <date month="April" year="2022"/>
          <abstract>
            <t>This document specifies version 1.3 of the Datagram Transport Layer Security (DTLS) protocol. DTLS 1.3 allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t>
            <t>The DTLS 1.3 protocol is based on the Transport Layer Security (TLS) 1.3 protocol and provides equivalent security guarantees with the exception of order protection / non-replayability.  Datagram semantics of the underlying transport are preserved by the DTLS protocol.</t>
            <t>This document obsoletes RFC 6347.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="9147"/>
        <seriesInfo name="DOI" value="10.17487/RFC9147"/>
      </reference>
      <reference anchor="RFC9175" target="https://www.rfc-editor.org/info/rfc9175">
        <front>
          <title>Constrained Application Protocol (CoAP): Echo, Request-Tag, and Token Processing</title>
          <author fullname="C. Amsüss" initials="C." surname="Amsüss">
            <organization/>
          </author>
          <author fullname="J. Preuß Mattsson" initials="J." surname="Preuß Mattsson">
            <organization/>
          </author>
          <author fullname="G. Selander" initials="G." surname="Selander">
            <organization/>
          </author>
          <date month="February" year="2022"/>
          <abstract>
            <t>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>
        </front>
        <seriesInfo name="RFC" value="9175"/>
        <seriesInfo name="DOI" value="10.17487/RFC9175"/>
      </reference>
      <reference anchor="I-D.ietf-lake-edhoc" target="https://www.ietf.org/archive/id/draft-ietf-lake-edhoc-18.txt">
        <front>
          <title>Ephemeral Diffie-Hellman Over COSE (EDHOC)</title>
          <author fullname="Göran Selander" initials="G." surname="Selander">
            <organization>Ericsson AB</organization>
          </author>
          <author fullname="John Preuß Mattsson" initials="J. P." surname="Mattsson">
            <organization>Ericsson AB</organization>
          </author>
          <author fullname="Francesca Palombini" initials="F." surname="Palombini">
            <organization>Ericsson AB</organization>
          </author>
          <date day="28" month="November" year="2022"/>
          <abstract>
            <t>   This document specifies Ephemeral Diffie-Hellman Over COSE (EDHOC), a
   very compact and lightweight authenticated Diffie-Hellman key
   exchange with ephemeral keys.  EDHOC provides mutual authentication,
   forward secrecy, and identity protection.  EDHOC is intended for
   usage in constrained scenarios and a main use case is to establish an
   OSCORE security context.  By reusing COSE for cryptography, CBOR for
   encoding, and CoAP for transport, the additional code size can be
   kept very low.

            </t>
          </abstract>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-ietf-lake-edhoc-18"/>
      </reference>
    </references>
    <section numbered="false" anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>The authors would like to thank
<contact fullname="Carsten Bormann"/>,
<contact fullname="Klaus Hartke"/>,
<contact fullname="Jaime Jiménez"/>,
<contact fullname="Ari Keränen"/>,
<contact fullname="Matthias Kovatsch"/>,
<contact fullname="Achim Kraus"/>,
<contact fullname="Sandeep Kumar"/>,
and
<contact fullname="András Méhes"/>
for their valuable comments and feedback.</t>
    </section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA+19W3McR7LeOyLwHyqgBwK7M7MkRa4k7tljQrxI1I00AVrr
J0dNd81Miz3dc/oCcETjxP6H8+QIOxyO8Mv5A+fJb/on+0ucX2bWpecCghIl
n40wFSEAM93VVVlZmV9eezweHx60na3y/2LLunIPTNf07vCgWDX8a9vdvX37
s9t3Dw/yOqvski7IGzvrxoXrZuOsbtzYdp3NXrfjuqK/7Wpc2s613eFBZrsH
pqhmNT2gny6Lti3qqluvaIhnT86fHh6sigeHB8a0XVNkdOmttWtv4YOuzoZ/
5W7VLeijj/mDdr1s3KxNLmnrptv4KKuXKzsYleYQP6xq/oxWWdVdMStc7j/s
iq6kGZ7KokxdmW7hzKO6omnaonK5OV2tyoIWR6sxL5qa5leX5vhRffri5PDA
TqeNuxjcj2/oi8ZZegY94XIuP19fyk/bd4u6IVKMjRD4q3qBkV3/0/803xJ1
27aueLZV0RW2pGV+NZEVNXLDjmvrhp7yhAiLD8zp5/jMz81/rMR3jihy9mR8
54/3zKe3zRkt6PWiLpdCxr7qmjV9f+lyx3e4pS3KB+YHmuRkqU986HTICZF4
YyFP66ZyC5cPZpx++NtMdaZP3DPVL376t8ZW5syVdBRcM5hs+uGvPtl5TfOY
tPrIPbN9Stdkrs2seUGndjklzhgyRPrprz7lmZ/NZOWfu2fejxZN0RIP0zSW
7U//p20Hs04+kzlXrpmvzZe2uSCBUlRzc1aXPc5dmzw9m9hl27u2fej4+kW4
fGJJCkEANcSnxYVjafPy6aNP7t6/G37/7P5n/vdPP777cfj93r0/ht//eCd8
/tnteO9nd+59En//5D7//mz8eMKysbSv3djlCxJmhweHBxeu6mUG86buVw8G
IuXlk7PzWV/Sii+Kpq6WrupaiJSXT05why6UhO1DDD0h6vBARbf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