Early Data Option for CoAP
Internet-Draft draft-tschofenig-core-early-data-option-00
Hannes Tschofenig
Arm Limited
Hannes.Tschofenig@gmx.net
Thomas Fossati
Arm Limited
Thomas.Fossati@arm.com
06 July 2022
ART
CoRE Working Group
CoAP, Option, Early Data, TLS 1.3
This document defines mechanisms that allow clients to communicate with servers about CoAP requests that are sent in early data. Techniques are described that use these mechanisms to mitigate the risk of replay.
Discussion Venues
Discussion of this document takes place on the Constrained RESTful Environments Working Group mailing list (core@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/core/.
Source for this draft and an issue tracker can be found at https://github.com/thomas-fossati/draft-coap-early-data.
Introduction
TLS and DTLS 1.3 provide a "zero round-trip time" (0-RTT) feature, the mechanics of which are described in Section 2.3 of [TLS13].
This feature provides a significant performance enhancement by enabling a client to send data to a server whom it has already spoken to in the first TLS handshake flight. However, TLS does not provide inherent replay protections for 0-RTT data, therefore the application running atop the TLS session has to take care of that. Specifically, Appendix E.5 of [TLS13] establishes that:
- Application protocols MUST NOT use 0-RTT data without a profile that defines its use. That profile needs to identify which messages or interactions are safe to use with 0-RTT and how to handle the situation when the server rejects 0-RTT and falls back to 1-RTT.
This document defines the application profile for CoAP [CoAP] to allow clients and servers to exchange CoAP requests that are sent in early data. It also describes how to mitigate the risk of replay. The design is inspired by [RFC8470].
Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
0-RTT Data
For a given request, the level of tolerance to replay risk is specific to the resource it operates upon (and therefore only known to the origin server). In general, if processing a request does not have state-changing side effects, the consequences of replay are not significant. The server can choose whether it will process early data before the TLS handshake completes.
It is RECOMMENDED that origin servers allow resources to explicitly configure whether early data is appropriate in requests.
This document specifies the Early-Data option, which indicates that the request has been conveyed in early data and that a client understands the 4.25 (Too Early) status code. The semantic follows [RFC8470].
Early-Data Option
No. | C | U | N | R | Name | Format | Length | Default | E
TBD | x | | | | Early-Data | empty | 0 | (none) | x
Note that 4.25 is just the suggested CoAP response code, which has not been registered yet.
Open Issues
A list of open issues can be found at https://github.com/thomas-fossati/draft-coap-early-data/issues
Security Considerations
Background:
- Appendix E.5 of [TLS13]
- Section 8 of [TLS13]
- Section 6 of [RFC8470]
IANA Considerations
New Option
IANA is asked to add the Option defined in Table 2 to the CoAP Option Numbers registry.
Early-Data Option
Number | Name | Reference
TBD | Early-Data | RFCthis
New Response Code
IANA is asked to add the Response Code defined in Table 3 to the CoAP Response Code registry.
Too Early Response Code
Code | Description | Reference
4.25 | Too Early | RFCthis
Normative References
[DTLS13]

The Datagram Transport Layer Security (DTLS) Protocol Version 1.3
E. Rescorla
H. Tschofenig
N. Modadugu
April 2022
RFC 9147
DOI 10.17487/RFC9147
[TLS13]

The Transport Layer Security (TLS) Protocol Version 1.3
E. Rescorla
August 2018
RFC 8446
DOI 10.17487/RFC8446
[CoAP]

The Constrained Application Protocol (CoAP)
Z. Shelby
K. Hartke
C. Bormann
June 2014
RFC 7252
DOI 10.17487/RFC7252
[RFC8470]

Using Early Data in HTTP
M. Thomson
M. Nottingham
W. Tarreau
September 2018
RFC 8470
DOI 10.17487/RFC8470
[RFC2119]

Key words for use in RFCs to Indicate Requirement Levels
S. Bradner
March 1997
BCP 14
RFC 2119
DOI 10.17487/RFC2119
[RFC8174]

Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
B. Leiba
May 2017
BCP 14
RFC 8174
DOI 10.17487/RFC8174