draft-ietf-lake-edhoc-10.txt   draft-ietf-lake-edhoc-11.txt 
Network Working Group G. Selander Network Working Group G. Selander
Internet-Draft J. Preuß Mattsson Internet-Draft J. Preuß Mattsson
Intended status: Standards Track F. Palombini Intended status: Standards Track F. Palombini
Expires: 8 March 2022 Ericsson Expires: 28 March 2022 Ericsson
4 September 2021 24 September 2021
Ephemeral Diffie-Hellman Over COSE (EDHOC) Ephemeral Diffie-Hellman Over COSE (EDHOC)
draft-ietf-lake-edhoc-10 draft-ietf-lake-edhoc-11
Abstract Abstract
This document specifies Ephemeral Diffie-Hellman Over COSE (EDHOC), a This document specifies Ephemeral Diffie-Hellman Over COSE (EDHOC), a
very compact and lightweight authenticated Diffie-Hellman key very compact and lightweight authenticated Diffie-Hellman key
exchange with ephemeral keys. EDHOC provides mutual authentication, exchange with ephemeral keys. EDHOC provides mutual authentication,
forward secrecy, and identity protection. EDHOC is intended for forward secrecy, and identity protection. EDHOC is intended for
usage in constrained scenarios and a main use case is to establish an usage in constrained scenarios and a main use case is to establish an
OSCORE security context. By reusing COSE for cryptography, CBOR for OSCORE security context. By reusing COSE for cryptography, CBOR for
encoding, and CoAP for transport, the additional code size can be encoding, and CoAP for transport, the additional code size can be
kept very low. kept very low.
Discussion Venues
This note is to be removed before publishing as an RFC.
Discussion of this document takes place on the Lightweight
Authenticated Key Exchange Working Group mailing list
(lake@ietf.org), which is archived at
https://mailarchive.ietf.org/arch/browse/lake/.
Source for this draft and an issue tracker can be found at
https://github.com/lake-wg/edhoc.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 28 March 2022.
This Internet-Draft will expire on 8 March 2022.
Copyright Notice Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the Copyright (c) 2021 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Motivation . . . . . . . . . . . . . . . . . . . . . . . 4
1.2. Use of EDHOC . . . . . . . . . . . . . . . . . . . . . . 5 1.2. Use of EDHOC . . . . . . . . . . . . . . . . . . . . . . 5
1.3. Message Size Examples . . . . . . . . . . . . . . . . . . 5 1.3. Message Size Examples . . . . . . . . . . . . . . . . . . 6
1.4. Document Structure . . . . . . . . . . . . . . . . . . . 6 1.4. Document Structure . . . . . . . . . . . . . . . . . . . 6
1.5. Terminology and Requirements Language . . . . . . . . . . 6 1.5. Terminology and Requirements Language . . . . . . . . . . 6
2. EDHOC Outline . . . . . . . . . . . . . . . . . . . . . . . . 7 2. EDHOC Outline . . . . . . . . . . . . . . . . . . . . . . . . 7
3. Protocol Elements . . . . . . . . . . . . . . . . . . . . . . 8 3. Protocol Elements . . . . . . . . . . . . . . . . . . . . . . 9
3.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1. General . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2. Method . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2. Method . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3. Connection Identifiers . . . . . . . . . . . . . . . . . 10 3.3. Connection Identifiers . . . . . . . . . . . . . . . . . 10
3.4. Transport . . . . . . . . . . . . . . . . . . . . . . . . 11 3.4. Transport . . . . . . . . . . . . . . . . . . . . . . . . 11
3.5. Authentication Parameters . . . . . . . . . . . . . . . . 12 3.5. Authentication Parameters . . . . . . . . . . . . . . . . 12
3.6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 18 3.6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 18
3.7. Ephemeral Public Keys . . . . . . . . . . . . . . . . . . 20 3.7. Ephemeral Public Keys . . . . . . . . . . . . . . . . . . 20
3.8. External Authorization Data (EAD) . . . . . . . . . . . . 20 3.8. External Authorization Data (EAD) . . . . . . . . . . . . 20
3.9. Applicability Statement . . . . . . . . . . . . . . . . . 21 3.9. Applicability Statement . . . . . . . . . . . . . . . . . 21
4. Key Derivation . . . . . . . . . . . . . . . . . . . . . . . 23 4. Key Derivation . . . . . . . . . . . . . . . . . . . . . . . 23
4.1. Extract . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.1. Extract . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2. Expand . . . . . . . . . . . . . . . . . . . . . . . . . 24 4.2. Expand . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.3. EDHOC-Exporter . . . . . . . . . . . . . . . . . . . . . 26 4.3. EDHOC-Exporter . . . . . . . . . . . . . . . . . . . . . 26
4.4. EDHOC-KeyUpdate . . . . . . . . . . . . . . . . . . . . . 27 4.4. EDHOC-KeyUpdate . . . . . . . . . . . . . . . . . . . . . 27
5. Message Formatting and Processing . . . . . . . . . . . . . . 27 5. Message Formatting and Processing . . . . . . . . . . . . . . 27
5.1. Message Processing Outline . . . . . . . . . . . . . . . 27 5.1. Message Processing Outline . . . . . . . . . . . . . . . 27
5.2. EDHOC Message 1 . . . . . . . . . . . . . . . . . . . . . 28 5.2. EDHOC Message 1 . . . . . . . . . . . . . . . . . . . . . 28
5.3. EDHOC Message 2 . . . . . . . . . . . . . . . . . . . . . 30 5.3. EDHOC Message 2 . . . . . . . . . . . . . . . . . . . . . 30
5.4. EDHOC Message 3 . . . . . . . . . . . . . . . . . . . . . 32 5.4. EDHOC Message 3 . . . . . . . . . . . . . . . . . . . . . 32
5.5. EDHOC Message 4 . . . . . . . . . . . . . . . . . . . . . 36 5.5. EDHOC Message 4 . . . . . . . . . . . . . . . . . . . . . 36
6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 37 6. Error Handling . . . . . . . . . . . . . . . . . . . . . . . 38
6.1. Success . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.1. Success . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2. Unspecified . . . . . . . . . . . . . . . . . . . . . . . 39 6.2. Unspecified . . . . . . . . . . . . . . . . . . . . . . . 39
6.3. Wrong Selected Cipher Suite . . . . . . . . . . . . . . . 39 6.3. Wrong Selected Cipher Suite . . . . . . . . . . . . . . . 39
7. Security Considerations . . . . . . . . . . . . . . . . . . . 41 7. Mandatory-to-Implement Compliance Requirements . . . . . . . 41
7.1. Security Properties . . . . . . . . . . . . . . . . . . . 41 8. Security Considerations . . . . . . . . . . . . . . . . . . . 42
7.2. Cryptographic Considerations . . . . . . . . . . . . . . 44 8.1. Security Properties . . . . . . . . . . . . . . . . . . . 42
7.3. Cipher Suites and Cryptographic Algorithms . . . . . . . 45 8.2. Cryptographic Considerations . . . . . . . . . . . . . . 45
7.4. Unprotected Data . . . . . . . . . . . . . . . . . . . . 45 8.3. Cipher Suites and Cryptographic Algorithms . . . . . . . 45
7.5. Denial-of-Service . . . . . . . . . . . . . . . . . . . . 46 8.4. Unprotected Data . . . . . . . . . . . . . . . . . . . . 46
7.6. Implementation Considerations . . . . . . . . . . . . . . 46 8.5. Denial-of-Service . . . . . . . . . . . . . . . . . . . . 46
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 48 8.6. Implementation Considerations . . . . . . . . . . . . . . 46
8.1. EDHOC Exporter Label Registry . . . . . . . . . . . . . . 48 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 48
8.2. EDHOC Cipher Suites Registry . . . . . . . . . . . . . . 48 9.1. EDHOC Exporter Label Registry . . . . . . . . . . . . . . 48
8.3. EDHOC Method Type Registry . . . . . . . . . . . . . . . 50 9.2. EDHOC Cipher Suites Registry . . . . . . . . . . . . . . 49
8.4. EDHOC Error Codes Registry . . . . . . . . . . . . . . . 50 9.3. EDHOC Method Type Registry . . . . . . . . . . . . . . . 51
8.5. EDHOC External Authorization Data Registry . . . . . . . 50 9.4. EDHOC Error Codes Registry . . . . . . . . . . . . . . . 51
8.6. COSE Header Parameters Registry . . . . . . . . . . . . . 51 9.5. EDHOC External Authorization Data Registry . . . . . . . 51
8.7. COSE Header Parameters Registry . . . . . . . . . . . . . 51 9.6. COSE Header Parameters Registry . . . . . . . . . . . . . 51
8.8. COSE Key Common Parameters Registry . . . . . . . . . . . 51 9.7. COSE Header Parameters Registry . . . . . . . . . . . . . 52
8.9. CWT Confirmation Methods Registry . . . . . . . . . . . . 52 9.8. COSE Key Common Parameters Registry . . . . . . . . . . . 52
8.10. The Well-Known URI Registry . . . . . . . . . . . . . . . 52 9.9. CWT Confirmation Methods Registry . . . . . . . . . . . . 53
8.11. Media Types Registry . . . . . . . . . . . . . . . . . . 52 9.10. The Well-Known URI Registry . . . . . . . . . . . . . . . 53
8.12. CoAP Content-Formats Registry . . . . . . . . . . . . . . 53 9.11. Media Types Registry . . . . . . . . . . . . . . . . . . 53
8.13. Expert Review Instructions . . . . . . . . . . . . . . . 54 9.12. CoAP Content-Formats Registry . . . . . . . . . . . . . . 54
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 54 9.13. Resource Type (rt=) Link Target Attribute Values
9.1. Normative References . . . . . . . . . . . . . . . . . . 54 Registry . . . . . . . . . . . . . . . . . . . . . . . . 55
9.2. Informative References . . . . . . . . . . . . . . . . . 57 9.14. Expert Review Instructions . . . . . . . . . . . . . . . 55
Appendix A. Use with OSCORE and Transfer over CoAP . . . . . . . 60 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 55
A.1. Selecting EDHOC Connection Identifier . . . . . . . . . . 60 10.1. Normative References . . . . . . . . . . . . . . . . . . 55
A.2. Deriving the OSCORE Security Context . . . . . . . . . . 61 10.2. Informative References . . . . . . . . . . . . . . . . . 58
A.3. Transferring EDHOC over CoAP . . . . . . . . . . . . . . 62 Appendix A. Use with OSCORE and Transfer over CoAP . . . . . . . 61
Appendix B. Compact Representation . . . . . . . . . . . . . . . 65 A.1. Selecting EDHOC Connection Identifier . . . . . . . . . . 61
Appendix C. Use of CBOR, CDDL and COSE in EDHOC . . . . . . . . 65 A.2. Deriving the OSCORE Security Context . . . . . . . . . . 62
C.1. CBOR and CDDL . . . . . . . . . . . . . . . . . . . . . . 66 A.3. Transferring EDHOC over CoAP . . . . . . . . . . . . . . 63
C.2. CDDL Definitions . . . . . . . . . . . . . . . . . . . . 66 Appendix B. Compact Representation . . . . . . . . . . . . . . . 66
C.3. COSE . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Appendix C. Use of CBOR, CDDL and COSE in EDHOC . . . . . . . . 66
Appendix D. Test Vectors . . . . . . . . . . . . . . . . . . . . 68 C.1. CBOR and CDDL . . . . . . . . . . . . . . . . . . . . . . 67
Appendix E. Applicability Template . . . . . . . . . . . . . . . 68 C.2. CDDL Definitions . . . . . . . . . . . . . . . . . . . . 68
Appendix F. EDHOC Message Deduplication . . . . . . . . . . . . 69 C.3. COSE . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Appendix G. Transports Not Natively Providing Correlation . . . 70 Appendix D. Applicability Template . . . . . . . . . . . . . . . 71
Appendix H. Change Log . . . . . . . . . . . . . . . . . . . . . 70 Appendix E. EDHOC Message Deduplication . . . . . . . . . . . . 72
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 75 Appendix F. Transports Not Natively Providing Correlation . . . 73
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 75 Appendix G. Change Log . . . . . . . . . . . . . . . . . . . . . 73
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . 78
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 78
1. Introduction 1. Introduction
1.1. Motivation 1.1. Motivation
Many Internet of Things (IoT) deployments require technologies which Many Internet of Things (IoT) deployments require technologies which
are highly performant in constrained environments [RFC7228]. IoT are highly performant in constrained environments [RFC7228]. IoT
devices may be constrained in various ways, including memory, devices may be constrained in various ways, including memory,
storage, processing capacity, and power. The connectivity for these storage, processing capacity, and power. The connectivity for these
settings may also exhibit constraints such as unreliable and lossy settings may also exhibit constraints such as unreliable and lossy
skipping to change at page 4, line 43 skipping to change at page 5, line 10
lightweight authenticated key exchange protocol providing good lightweight authenticated key exchange protocol providing good
security properties including forward secrecy, identity protection, security properties including forward secrecy, identity protection,
and cipher suite negotiation. Authentication can be based on raw and cipher suite negotiation. Authentication can be based on raw
public keys (RPK) or public key certificates and requires the public keys (RPK) or public key certificates and requires the
application to provide input on how to verify that endpoints are application to provide input on how to verify that endpoints are
trusted. This specification focuses on referencing instead of trusted. This specification focuses on referencing instead of
transporting credentials to reduce message overhead. EDHOC does transporting credentials to reduce message overhead. EDHOC does
currently not support pre-shared key (PSK) authentication as currently not support pre-shared key (PSK) authentication as
authentication with static Diffie-Hellman public keys by reference authentication with static Diffie-Hellman public keys by reference
produces equally small message sizes but with much simpler key produces equally small message sizes but with much simpler key
distribution. distribution and identity protection.
EDHOC makes use of known protocol constructions, such as SIGMA EDHOC makes use of known protocol constructions, such as SIGMA
[SIGMA] and Extract-and-Expand [RFC5869]. COSE also provides crypto [SIGMA] and Extract-and-Expand [RFC5869]. EDHOC uses COSE for
agility and enables the use of future algorithms targeting IoT. cryptography and identification of credentials (including COSE_Key,
CWT, CCS, X.509, C509, see Section 3.5.3). COSE provides crypto
agility and enables the use of future algorithms and credentials
targeting IoT.
1.2. Use of EDHOC 1.2. Use of EDHOC
EDHOC is designed for highly constrained settings making it EDHOC is designed for highly constrained settings making it
especially suitable for low-power wide area networks [RFC8376] such especially suitable for low-power wide area networks [RFC8376] such
as Cellular IoT, 6TiSCH, and LoRaWAN. A main objective for EDHOC is as Cellular IoT, 6TiSCH, and LoRaWAN. A main objective for EDHOC is
to be a lightweight authenticated key exchange for OSCORE, i.e., to to be a lightweight authenticated key exchange for OSCORE, i.e., to
provide authentication and session key establishment for IoT use provide authentication and session key establishment for IoT use
cases such as those built on CoAP [RFC7252]. CoAP is a specialized cases such as those built on CoAP [RFC7252]. CoAP is a specialized
web transfer protocol for use with constrained nodes and networks, web transfer protocol for use with constrained nodes and networks,
skipping to change at page 5, line 27 skipping to change at page 5, line 41
actuators. actuators.
A typical setting is when one of the endpoints is constrained or in a A typical setting is when one of the endpoints is constrained or in a
constrained network, and the other endpoint is a node on the Internet constrained network, and the other endpoint is a node on the Internet
(such as a mobile phone) or at the edge of the constrained network (such as a mobile phone) or at the edge of the constrained network
(such as a gateway). Thing-to-thing interactions over constrained (such as a gateway). Thing-to-thing interactions over constrained
networks are also relevant since both endpoints would then benefit networks are also relevant since both endpoints would then benefit
from the lightweight properties of the protocol. EDHOC could e.g., from the lightweight properties of the protocol. EDHOC could e.g.,
be run when a device connects for the first time, or to establish be run when a device connects for the first time, or to establish
fresh keys which are not revealed by a later compromise of the long- fresh keys which are not revealed by a later compromise of the long-
term keys. Further security properties are described in Section 7.1. term keys. Further security properties are described in Section 8.1.
EDHOC enables the reuse of the same lightweight primitives as OSCORE: EDHOC enables the reuse of the same lightweight primitives as OSCORE:
CBOR for encoding, COSE for cryptography, and CoAP for transport. By CBOR for encoding, COSE for cryptography, and CoAP for transport. By
reusing existing libraries, the additional code size can be kept very reusing existing libraries, the additional code size can be kept very
low. Note that, while CBOR and COSE primitives are built into the low. Note that, while CBOR and COSE primitives are built into the
protocol messages, EDHOC is not bound to a particular transport. protocol messages, EDHOC is not bound to a particular transport.
Transfer of EDHOC messages in CoAP payloads is detailed in Transfer of EDHOC messages in CoAP payloads is detailed in
Appendix A.3. Appendix A.3.
1.3. Message Size Examples 1.3. Message Size Examples
Compared to the DTLS 1.3 handshake [I-D.ietf-tls-dtls13] with ECDHE Compared to the DTLS 1.3 handshake [I-D.ietf-tls-dtls13] with ECDHE
and connection ID, the number of bytes in EDHOC + CoAP can be less and connection ID, the number of bytes in EDHOC + CoAP can be less
than 1/6 when RPK authentication is used, see than 1/6 when RPK authentication is used, see
[I-D.ietf-lwig-security-protocol-comparison]. Figure 1 shows two [I-D.ietf-lwig-security-protocol-comparison]. Figure 1 shows
examples of message sizes for EDHOC with different kinds of examples of message sizes for EDHOC with different kinds of
authentication keys and different COSE header parameters for authentication keys and different COSE header parameters for
identification: static Diffie-Hellman keys identified by 'kid' identification: static Diffie-Hellman keys or signature keys, either
[I-D.ietf-cose-rfc8152bis-struct], and X.509 signature certificates in CBOR Web Token (CWT) / CWT Claims Set (CCS) [RFC8392] identified
identified by a hash value using 'x5t' [I-D.ietf-cose-x509]. by a key identifier using 'kid' [I-D.ietf-cose-rfc8152bis-struct], or
in X.509 certificates identified by a hash value using 'x5t'
[I-D.ietf-cose-x509].
================================= ========================================================
kid x5t Static DH Keys Signature Keys
--------------------------------- -------------- --------------
message_1 37 37 kid x5t kid x5t
message_2 45 116 --------------------------------------------------------
message_3 19 90 message_1 37 37 37 37
--------------------------------- message_2 45 58 102 115
Total 101 243 message_3 19 33 77 90
================================= --------------------------------------------------------
Total 101 128 216 242
========================================================
Figure 1: Example of message sizes in bytes. Figure 1: Example of message sizes in bytes.
1.4. Document Structure 1.4. Document Structure
The remainder of the document is organized as follows: Section 2 The remainder of the document is organized as follows: Section 2
outlines EDHOC authenticated with digital signatures, Section 3 outlines EDHOC authenticated with digital signatures, Section 3
describes the protocol elements of EDHOC, including formatting of the describes the protocol elements of EDHOC, including formatting of the
ephemeral public keys, Section 4 specifies the key derivation, ephemeral public keys, Section 4 specifies the key derivation,
Section 5 specifies message processing for EDHOC authenticated with Section 5 specifies message processing for EDHOC authenticated with
skipping to change at page 6, line 38 skipping to change at page 7, line 7
1.5. Terminology and Requirements Language 1.5. Terminology and Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP "OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all 14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here. capitals, as shown here.
Readers are expected to be familiar with the terms and concepts Readers are expected to be familiar with the terms and concepts
described in CBOR [RFC8949], CBOR Sequences [RFC8742], COSE described in CBOR [RFC8949], CBOR Sequences [RFC8742], COSE
structures and process [I-D.ietf-cose-rfc8152bis-struct], COSE structures and processing [I-D.ietf-cose-rfc8152bis-struct], COSE
algorithms [I-D.ietf-cose-rfc8152bis-algs], and CDDL [RFC8610]. The algorithms [I-D.ietf-cose-rfc8152bis-algs], CWT and CWT Claims Set
Concise Data Definition Language (CDDL) is used to express CBOR data [RFC8392], and CDDL [RFC8610]. The Concise Data Definition Language
structures [RFC8949]. Examples of CBOR and CDDL are provided in (CDDL) is used to express CBOR data structures [RFC8949]. Examples
Appendix C.1. When referring to CBOR, this specification always of CBOR and CDDL are provided in Appendix C.1. When referring to
refers to Deterministically Encoded CBOR as specified in Sections CBOR, this specification always refers to Deterministically Encoded
4.2.1 and 4.2.2 of [RFC8949]. CBOR as specified in Sections 4.2.1 and 4.2.2 of [RFC8949]. The
single output from authenticated encryption (including the
The single output from authenticated encryption (including the
authentication tag) is called "ciphertext", following [RFC5116]. authentication tag) is called "ciphertext", following [RFC5116].
We use the term Unprotected CWT Claims Set (UCCS) just as in
[I-D.ietf-rats-uccs] to denote a CBOR Web Token [RFC8392] without
wrapping it into a COSE object, i.e., a CBOR map consisting of
claims.
Editor's note: If [I-D.ietf-rats-uccs] completes before this draft,
make it a normative reference.
2. EDHOC Outline 2. EDHOC Outline
EDHOC specifies different authentication methods of the Diffie- EDHOC specifies different authentication methods of the Diffie-
Hellman key exchange: digital signatures and static Diffie-Hellman Hellman key exchange: digital signatures and static Diffie-Hellman
keys. This section outlines the digital signature-based method. keys. This section outlines the digital signature-based method.
Further details of protocol elements and other authentication methods Further details of protocol elements and other authentication methods
are provided in the remainder of this document. are provided in the remainder of this document.
SIGMA (SIGn-and-MAc) is a family of theoretical protocols with a SIGMA (SIGn-and-MAc) is a family of theoretical protocols with a
large number of variants [SIGMA]. Like IKEv2 [RFC7296] and (D)TLS large number of variants [SIGMA]. Like IKEv2 [RFC7296] and (D)TLS
1.3 [RFC8446], EDHOC authenticated with digital signatures is built 1.3 [RFC8446], EDHOC authenticated with digital signatures is built
on a variant of the SIGMA protocol which provides identity protection on a variant of the SIGMA protocol which provides identity protection
of the initiator (SIGMA-I), and like IKEv2 [RFC7296], EDHOC of the initiator (SIGMA-I), and like IKEv2 [RFC7296], EDHOC
implements the SIGMA-I variant as MAC-then-Sign. The SIGMA-I implements the MAC-then-Sign variant of the SIGMA-I protocol shown in
protocol using an authenticated encryption algorithm is shown in
Figure 2. Figure 2.
Initiator Responder Initiator Responder
| G_X | | G_X |
+-------------------------------------------------------->| +------------------------------------------------------------------>|
| | | |
| G_Y, AEAD( K_2; ID_CRED_R, Sig(R; CRED_R, G_X, G_Y) ) | | G_Y, Enc( ID_CRED_R, Sig( R; MAC( CRED_R, G_X, G_Y ) ) ) |
|<--------------------------------------------------------+ |<------------------------------------------------------------------+
| | | |
| AEAD( K_3; ID_CRED_I, Sig(I; CRED_I, G_Y, G_X) ) | | AEAD( ID_CRED_I, Sig( I; MAC( CRED_I, G_Y, G_X ) ) ) |
+-------------------------------------------------------->| +------------------------------------------------------------------>|
| | | |
Figure 2: Authenticated encryption variant of the SIGMA-I protocol. Figure 2: MAC-then-Sign variant of the SIGMA-I protocol.
The parties exchanging messages are called Initiator (I) and The parties exchanging messages are called Initiator (I) and
Responder (R). They exchange ephemeral public keys, compute a shared Responder (R). They exchange ephemeral public keys, compute a shared
secret, and derive symmetric application keys used to protect secret, and derive symmetric application keys used to protect
application data. application data.
* G_X and G_Y are the ECDH ephemeral public keys of I and R, * G_X and G_Y are the ECDH ephemeral public keys of I and R,
respectively. respectively.
* CRED_I and CRED_R are the credentials containing the public * CRED_I and CRED_R are the credentials containing the public
authentication keys of I and R, respectively. authentication keys of I and R, respectively.
* ID_CRED_I and ID_CRED_R are credential identifiers enabling the * ID_CRED_I and ID_CRED_R are credential identifiers enabling the
recipient party to retrieve the credential of I and R, recipient party to retrieve the credential of I and R,
respectively. respectively.
* Sig(I; . ) and Sig(R; . ) denote signatures made with the private * Sig(I; . ) and Sig(R; . ) denote signatures made with the private
authentication key of I and R, respectively. authentication key of I and R, respectively.
* AEAD(K; . ) denotes authenticated encryption with additional data * Enc(), AEAD(), and MAC() denotes encryption, authenticated
using a key K derived from the shared secret. encryption with additional data, and message authentication code
using keys derived from the shared secret.
In order to create a "full-fledged" protocol some additional protocol In order to create a "full-fledged" protocol some additional protocol
elements are needed. EDHOC adds: elements are needed. EDHOC adds:
* Transcript hashes (hashes of message data) TH_2, TH_3, TH_4 used * Transcript hashes (hashes of message data) TH_2, TH_3, TH_4 used
for key derivation and as additional authenticated data. for key derivation and as additional authenticated data.
* Computationally independent keys derived from the ECDH shared * Computationally independent keys derived from the ECDH shared
secret and used for authenticated encryption of different secret and used for authenticated encryption of different
messages. messages.
skipping to change at page 8, line 45 skipping to change at page 9, line 6
* Transport of external authorization data. * Transport of external authorization data.
EDHOC is designed to encrypt and integrity protect as much EDHOC is designed to encrypt and integrity protect as much
information as possible, and all symmetric keys are derived using as information as possible, and all symmetric keys are derived using as
much previous information as possible. EDHOC is furthermore designed much previous information as possible. EDHOC is furthermore designed
to be as compact and lightweight as possible, in terms of message to be as compact and lightweight as possible, in terms of message
sizes, processing, and the ability to reuse already existing CBOR, sizes, processing, and the ability to reuse already existing CBOR,
COSE, and CoAP libraries. COSE, and CoAP libraries.
To simplify for implementors, the use of CBOR and COSE in EDHOC is To simplify for implementors, the use of CBOR and COSE in EDHOC is
summarized in Appendix C and test vectors including CBOR diagnostic summarized in Appendix C. Test vectors including CBOR diagnostic
notation are given in Appendix D. notation are provided in [I-D.selander-lake-traces].
3. Protocol Elements 3. Protocol Elements
3.1. General 3.1. General
The EDHOC protocol consists of three mandatory messages (message_1, The EDHOC protocol consists of three mandatory messages (message_1,
message_2, message_3) between Initiator and Responder, an optional message_2, message_3) between Initiator and Responder, an optional
fourth message (message_4), plus an error message. EDHOC messages fourth message (message_4), and an error message. All EDHOC messages
are CBOR Sequences [RFC8742], see Figure 3. The protocol elements in are CBOR Sequences [RFC8742]. Figure 3 illustrates an EDHOC message
the figure are introduced in the following sections. Message flow with the optional fourth message as well as the content of each
formatting and processing is specified in Section 5 and Section 6. message. The protocol elements in the figure are introduced in
An implementation may support only Initiator or only Responder. Section 3 and Section 5. Message formatting and processing is
specified in Section 5 and Section 6.
Application data is protected using the agreed application algorithms Application data may be protected using the agreed application
(AEAD, hash) in the selected cipher suite (see Section 3.6) and the algorithms (AEAD, hash) in the selected cipher suite (see
application can make use of the established connection identifiers Section 3.6) and the application can make use of the established
C_I and C_R (see Section 3.3). EDHOC may be used with the media type connection identifiers C_I and C_R (see Section 3.3). EDHOC may be
application/edhoc defined in Section 8. used with the media type application/edhoc defined in Section 9.
The Initiator can derive symmetric application keys after creating The Initiator can derive symmetric application keys after creating
EDHOC message_3, see Section 4.3. Protected application data can EDHOC message_3, see Section 4.3. Protected application data can
therefore be sent in parallel or together with EDHOC message_3. therefore be sent in parallel or together with EDHOC message_3.
EDHOC message_4 is typically not sent.
Initiator Responder Initiator Responder
| METHOD, SUITES_I, G_X, C_I, EAD_1 | | METHOD, SUITES_I, G_X, C_I, EAD_1 |
+------------------------------------------------------------------>| +------------------------------------------------------------------>|
| message_1 | | message_1 |
| | | |
| G_Y, Enc(ID_CRED_R, Signature_or_MAC_2, EAD_2), C_R | | G_Y, Enc( ID_CRED_R, Signature_or_MAC_2, EAD_2 ), C_R |
|<------------------------------------------------------------------+ |<------------------------------------------------------------------+
| message_2 | | message_2 |
| | | |
| AEAD(K_3ae; ID_CRED_I, Signature_or_MAC_3, EAD_3) | | AEAD( ID_CRED_I, Signature_or_MAC_3, EAD_3 ) |
+------------------------------------------------------------------>| +------------------------------------------------------------------>|
| message_3 | | message_3 |
| |
| AEAD( EAD_4 ) |
|<- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
| message_4 |
Figure 3: EDHOC Message Flow Figure 3: EDHOC Message Flow with the Optional Fourth Message
3.2. Method 3.2. Method
The data item METHOD in message_1 (see Section 5.2.1), is an integer The data item METHOD in message_1 (see Section 5.2.1), is an integer
specifying the authentication method. EDHOC supports authentication specifying the authentication method. EDHOC supports authentication
with signature or static Diffie-Hellman keys, as defined in the four with signature or static Diffie-Hellman keys, as defined in the four
authentication methods: 0, 1, 2, and 3, see Figure 4. (Method 0 authentication methods: 0, 1, 2, and 3, see Figure 4. When using a
corresponds to the case outlined in Section 2 where both Initiator static Diffie-Hellman key the authentication is provided by a Message
and Responder authenticate with signature keys.) Authentication Code (MAC) computed from an ephemeral-static ECDH
shared secret which enables significant reductions in message sizes.
An implementation may support only a single method. The Initiator The Initiator and the Responder need to have agreed on a single
and the Responder need to have agreed on a single method to be used method to be used for EDHOC, see Section 3.9.
for EDHOC, see Section 3.9.
+-------+-------------------+-------------------+-------------------+ +-------+-------------------+-------------------+-------------------+
| Value | Initiator | Responder | Reference | | Value | Initiator | Responder | Reference |
+-------+-------------------+-------------------+-------------------+ +-------+-------------------+-------------------+-------------------+
| 0 | Signature Key | Signature Key | [[this document]] | | 0 | Signature Key | Signature Key | [[this document]] |
| 1 | Signature Key | Static DH Key | [[this document]] | | 1 | Signature Key | Static DH Key | [[this document]] |
| 2 | Static DH Key | Signature Key | [[this document]] | | 2 | Static DH Key | Signature Key | [[this document]] |
| 3 | Static DH Key | Static DH Key | [[this document]] | | 3 | Static DH Key | Static DH Key | [[this document]] |
+-------+-------------------+-------------------+-------------------+ +-------+-------------------+-------------------+-------------------+
Figure 4: Method Types Figure 4: Method Types
3.3. Connection Identifiers 3.3. Connection Identifiers
EDHOC includes the selection of connection identifiers (C_I, C_R) EDHOC includes the selection of connection identifiers (C_I, C_R)
identifying a connection for which keys are agreed. Connection identifying a connection for which keys are agreed.
identifiers may be used in the ongoing EDHOC protocol (see
Section 3.3.2) or in a subsequent application protocol, e.g., OSCORE Connection identifiers may be used to correlate EDHOC messages and
(see Section 3.3.3). The connection identifiers do not have any facilitate the retrieval of protocol state during EDHOC protocol
cryptographic purpose in EDHOC. execution (see Section 3.4) or in a subsequent application protocol,
e.g., OSCORE (see Section 3.3.2). The connection identifiers do not
have any cryptographic purpose in EDHOC.
Connection identifiers in EDHOC are byte strings or integers, encoded Connection identifiers in EDHOC are byte strings or integers, encoded
in CBOR. One byte connection identifiers (the integers -24 to 23 and in CBOR. One byte connection identifiers (the integers -24 to 23 and
the empty byte string h'') are realistic in many scenarios as most the empty CBOR byte string h'') are realistic in many scenarios as
constrained devices only have a few connections. most constrained devices only have a few connections.
3.3.1. Selection of Connection Identifiers 3.3.1. Selection of Connection Identifiers
C_I and C_R are chosen by I and R, respectively. The Initiator C_I and C_R are chosen by I and R, respectively. The Initiator
selects C_I and sends it in message_1 for the Responder to use as a selects C_I and sends it in message_1 for the Responder to use as a
reference to the connection in communications with the Initiator. reference to the connection in communications with the Initiator.
The Responder selects C_R and sends in message_2 for the Initiator to The Responder selects C_R and sends in message_2 for the Initiator to
use as a reference to the connection in communications with the use as a reference to the connection in communications with the
Responder. Responder.
If connection identifiers are used by an application protocol for If connection identifiers are used by an application protocol for
which EDHOC establishes keys then the selected connection identifiers which EDHOC establishes keys then the selected connection identifiers
SHALL adhere to the requirements for that protocol, see Section 3.3.3 SHALL adhere to the requirements for that protocol, see Section 3.3.2
for an example. for an example.
3.3.2. Use of Connection Identifiers with EDHOC 3.3.2. Use of Connection Identifiers with OSCORE
Connection identifiers may be used to correlate EDHOC messages and
facilitate the retrieval of protocol state during EDHOC protocol
execution. EDHOC transports that do not inherently provide
correlation across all messages of an exchange can send connection
identifiers along with EDHOC messages to gain that required
capability, see Section 3.4. For an example of using connection
identifiers when CoAP is used as transport, see Appendix A.3.
3.3.3. Use of Connection Identifiers with OSCORE
For OSCORE, the choice of a connection identifier results in the For OSCORE, the choice of a connection identifier results in the
endpoint selecting its Recipient ID, see Section 3.1 of [RFC8613], endpoint selecting its Recipient ID, see Section 3.1 of [RFC8613],
for which certain uniqueness requirements apply, see Section 3.3 of for which certain uniqueness requirements apply, see Section 3.3 of
[RFC8613]. Therefore, the Initiator and the Responder MUST NOT [RFC8613]. Therefore, the Initiator and the Responder MUST NOT
select connection identifiers such that it results in same OSCORE select connection identifiers such that it results in same OSCORE
Recipient ID. Since the Recipient ID is a byte string and a EDHOC Recipient ID. Since the Recipient ID is a byte string and a EDHOC
connection identifier is either a CBOR byte string or a CBOR integer, connection identifier is either a CBOR byte string or a CBOR integer,
care must be taken when selecting the connection identifiers and care must be taken when selecting the connection identifiers and
converting them to Recipient IDs. A mapping from EDHOC connection converting them to Recipient IDs. A mapping from EDHOC connection
skipping to change at page 11, line 33 skipping to change at page 11, line 38
responsible, where necessary, to handle: responsible, where necessary, to handle:
* message loss, * message loss,
* message reordering, * message reordering,
* message duplication, * message duplication,
* fragmentation, * fragmentation,
* demultiplex EDHOC messages from other types of messages, and * demultiplex EDHOC messages from other types of messages,
* denial-of-service protection. * denial-of-service protection,
Besides these common transport-oriented properties, EDHOC transport * message correlation.
additionally needs to support the correlation between EDHOC messages,
including an indication of a message being message_1. The The Initiator and the Responder need to have agreed on a transport to
be used for EDHOC, see Section 3.9.
3.4.1. Use of Connection Identifiers for EDHOC Message Correlation
The transport needs to support the correlation between EDHOC messages
and facilitate the retrieval of protocol state during EDHOC protocol
execution, including an indication of a message being message_1. The
correlation may reuse existing mechanisms in the transport protocol. correlation may reuse existing mechanisms in the transport protocol.
For example, the CoAP Token may be used to correlate EDHOC messages For example, the CoAP Token may be used to correlate EDHOC messages
in a CoAP response and an associated CoAP request. In the absence of in a CoAP response and an associated CoAP request.
correlation between a message received and a message previously sent
inherent to the transport, the EDHOC connection identifiers may be Connection identifiers may be used to correlate EDHOC messages and
added, e.g., by prepending the appropriate connection identifier facilitate the retrieval of protocol state during EDHOC protocol
execution. EDHOC transports that do not inherently provide
correlation across all messages of an exchange can send connection
identifiers along with EDHOC messages to gain that required
capability, e.g., by prepending the appropriate connection identifier
(when available from the EDHOC protocol) to the EDHOC message. (when available from the EDHOC protocol) to the EDHOC message.
Transport of EDHOC in CoAP payloads is described in Appendix A.3, Transport of EDHOC in CoAP payloads is described in Appendix A.3,
which also shows how to use connection identifiers and message_1 which also shows how to use connection identifiers and message_1
indication with CoAP. indication with CoAP.
The Initiator and the Responder need to have agreed on a transport to
be used for EDHOC, see Section 3.9.
3.5. Authentication Parameters 3.5. Authentication Parameters
EDHOC enables public-key based authentication and supports various EDHOC supports various settings for how the other endpoint's
settings for how the other endpoint's public key is transported, authentication (public) key is transported, identified, and trusted
identified, and trusted. as described in this section.
The authentication key (i.e., the public key) appears in different The authentication key (see Section 3.5.2) is used in several parts
functions: of EDHOC:
1. as part of the authentication credential CRED_x included in the 1. as part of the authentication credential included in the
integrity calculation integrity calculation
2. for verification of the Signature_or_MAC field in message_2 and 2. for verification of the Signature_or_MAC field in message_2 and
message_3 (see Section 5.3.2 and Section 5.4.2) message_3 (see Section 5.3.2 and Section 5.4.2)
3. in the key derivation (in case of a static Diffie-Hellman key, 3. in the key derivation (in case of a static Diffie-Hellman key,
see Section 4). see Section 4).
The choice of authentication key has an impact on the message size The authentication credential (CRED_x) contains, in addition to the
(see Section 3.5.1), and even more so the choice of authentication authentication key, also the authentication key algorithm and
credential (see Section 3.5.2) in case it is transported within the optionally other parameters such as identity, key usage, expiry,
protocol (see Section 3.5.4). EDHOC supports authentication issuer, etc. (see Section 3.5.3). Identical authentication
credentials for which COSE header parameters are defined, including: credentials need to be established in both endpoints to be able to
verify integrity. For many settings it is not necessary to transport
the authentication credential within EDHOC over constrained links,
for example, it may be pre-provisioned or acquired out-of-band over
less constrained links.
* X.509 v3 certificate [RFC5280] EDHOC relies on COSE for identification of authentication credentials
(using ID_CRED_x, see Section 3.5.4) and supports all credential
types for which COSE header parameters are defined (see
Section 3.5.3).
* C509 certificate [I-D.ietf-cose-cbor-encoded-cert] The choice of authentication credential depends also on the trust
model (see Section 3.5.1). For example, a certificate or CWT may
rely on a trusted third party, whereas a CCS or a self-signed
certificate/CWT may be used when trust in the public key can be
achieved by other means, or in the case of trust-on-first-use.
* CBOR Web Token (CWT, [RFC8392]) The type of authentication key, authentication credential, and the
way to identify the credential have a large impact on the message
size. For example, the signature_or_MAC field is much smaller with a
static DH key than with a signature key. A CCS is much smaller than
a self-signed certificate/CWT, but if it is possible to reference the
credential with a COSE header like 'kid', then that is typically much
smaller than to transport a CCS.
* Unprotected CWT Claims Set (UCCS, see Section 1.5) 3.5.1. Identities and trust anchors
For CWT and UCCS, the authentication key is represented with a 'cnf' Policies for what connections to allow are typically set based on the
claim [RFC8747] containing a COSE_Key identity of the other party, and parties typically only allow
[I-D.ietf-cose-rfc8152bis-struct]. UCCS can be seen as a generic connections from a specific identity or a small restricted set of
representation of a raw public key, see Section 3.5.2 for an example. identities. For example, in the case of a device connecting to a
COSE_Key is omitted from the list above because of limitations to network, the network may only allow connections from devices which
represent the identity (see Section 3.5.3) and because it can easily authenticate with certificates having a particular range of serial
be embedded in a UCCS. numbers and signed by a particular CA. On the other hand, the device
may only be allowed to connect to a network which authenticates with
a particular public key (information of which may be provisioned,
e.g., out of band or in the external authorization data, see
Section 3.8). The EDHOC implementation or the application must
enforce information about the intended endpoint, and in particular
whether it is a specific identity or a set of identities. Either
EDHOC passes information about identity to the application for a
decision, or EDHOC needs to have access to relevant information and
makes the decision on its own.
Identical authentication credentials need to be established in both EDHOC assumes the existence of mechanisms (certification authority,
endpoints to accomplish item 1 above (see Section 3.5.2) but for many trusted third party, pre-provisioning, etc.) for specifying and
settings it is not necessary to transport the authentication distributing authentication credentials.
credential over constrained links. It may, for example, be pre-
provisioned or acquired out-of-band over less constrained links.
ID_CRED_x coincides with the authentication credential CRED_x in case
it is transported, or else contains a reference to the authentication
credential to facilitate its retrieval (see Section 3.5.4).
The choice of authentication credential also depends on the trust * When a Public Key Infrastructure (PKI) is used with certificates,
model. For example, a certificate or CWT may rely on a trusted third the trust anchor is a Certification Authority (CA) certificate,
party, whereas a UCCS may be used when trust in the public key can be and the identity is the subject whose unique name (e.g., a domain
achieved by other means, or in the case of trust-on-first-use. A name, NAI, or EUI) is included in the endpoint's certificate. In
UCCS as authentication credential provides essentially the same order to run EDHOC each party needs at least one CA public key
trustworthiness as a self-signed certificate or CWT but has smaller certificate, or just the public key, and a specific identity or
size. set of identities it is allowed to communicate with. Only
validated public-key certificates with an allowed subject name, as
specified by the application, are to be accepted. EDHOC provides
proof that the other party possesses the private authentication
key corresponding to the public authentication key in its
certificate. The certification path provides proof that the
subject of the certificate owns the public key in the certificate.
More details are provided in the following subsections. * Similarly, when a PKI is used with CWTs, each party needs to have
a trusted third party public key as trust anchor to verify the
end-entity CWTs, and a specific identity or set of identities in
the 'sub' (subject) claim of the CWT to determine if it is allowed
to communicate with. The trusted third party public key can,
e.g., be stored in a self-signed CWT or in a CCS.
3.5.1. Authentication Keys * When PKI is not used (CCS, self-signed certificate/CWT), the trust
anchor is the authentication key of the other party. In this
case, the identity is typically directly associated to the
authentication key of the other party. For example, the name of
the subject may be a canonical representation of the public key.
Alternatively, if identities can be expressed in the form of
unique subject names assigned to public keys, then a binding to
identity can be achieved by including both public key and
associated subject name in the protocol message computation:
CRED_I or CRED_R may be a self-signed certificate/CWT or CCS
containing the authentication key and the subject name, see
Section 3.5.3. In order to run EDHOC, each endpoint needs a
specific authentication key/unique associated subject name, or a
set of public authentication keys/unique associated subject names,
which it is allowed to communicate with. EDHOC provides the proof
that the other party possesses the private authentication key
corresponding to the public authentication key.
The authentication key MUST be a signature key or static Diffie- To prevent misbinding attacks in systems where an attacker can
Hellman key. The Initiator and the Responder MAY use different types register public keys without proving knowledge of the private key,
of authentication keys, e.g., one uses a signature key and the other SIGMA [SIGMA] enforces a MAC to be calculated over the "identity".
uses a static Diffie-Hellman key. When using a signature key, the EDHOC follows SIGMA by calculating a MAC over the whole credential,
authentication is provided by a signature. When using a static which in case of a X.509 or C509 certificate includes the "subject"
Diffie-Hellman key the authentication is provided by a Message and "subjectAltName" fields, and in the case of CWT or CCS includes
Authentication Code (MAC) computed from an ephemeral-static ECDH the "sub" claim. While the SIGMA paper only focuses on the identity,
shared secret which enables significant reductions in message sizes. the same principle is true for other information such as policies
When using static Diffie-Hellman keys the Initiator's and Responder's associated to the public key.
private authentication keys are called I and R, respectively, and the
public authentication keys are called G_I and G_R, respectively.
The authentication key algorithm needs to be specified with enough 3.5.2. Authentication Keys
parameters to make it completely determined. Note that for most
signature algorithms, the signature is determined jointly by the
signature algorithm and the authentication key algorithm. For
example, the curve used in the signature is typically determined by
the authentication key parameters.
* Only the Responder SHALL have access to the Responder's private The authentication key (i.e. the public key used for authentication)
authentication key. MUST be a signature key or static Diffie-Hellman key. The Initiator
and the Responder MAY use different types of authentication keys,
e.g., one uses a signature key and the other uses a static Diffie-
Hellman key. The authentication key algorithm needs to be compatible
with the method and the cipher suite. The authentication key
algorithm needs to be compatible with the EDHOC key exchange
algorithm when static Diffie-Hellman authentication is used and
compatible with the EDHOC signature algorithm when signature
authentication is used.
* Only the Initiator SHALL have access to the Initiator's private Note that for most signature algorithms, the signature is determined
authentication key. by the signature algorithm and the authentication key algorithm
together. When using static Diffie-Hellman keys the Initiator's and
Responder's private authentication keys are called I and R,
respectively, and the public authentication keys are called G_I and
G_R, respectively.
3.5.2. Authentication Credentials For X.509 the authentication key is represented with a
SubjectPublicKeyInfo field. For CWT and CCS, the authentication key
is represented with a 'cnf' claim [RFC8747] containing a COSE_Key
[I-D.ietf-cose-rfc8152bis-struct].
3.5.3. Authentication Credentials
The authentication credentials, CRED_I and CRED_R, contain the public The authentication credentials, CRED_I and CRED_R, contain the public
authentication key of the Initiator and the Responder, respectively. authentication key of the Initiator and the Responder, respectively.
The Initiator and the Responder MAY use different types of
credentials, e.g., one uses an UCCS and the other uses an X.509
certificate.
The credentials CRED_I and CRED_R are MACed by the Initiator and the
Responder, respectively, see Section 5.4.2 and Section 5.3.2, and
thus included in the message integrity calculation.
To prevent misbinding attacks in systems where an attacker can
register public keys without proving knowledge of the private key,
SIGMA [SIGMA] enforces a MAC to be calculated over the "identity".
EDHOC follows SIGMA by calculating a MAC over the whole credential,
which in case of a X.509 or C509 certificate includes the "subject"
and "subjectAltName" fields, and in the case of CWT or UCCS includes
the "sub" claim, see Section 3.5.3. While the SIGMA paper only
focuses on the identity, the same principle is true for any
information such as policies connected to the public key.
When the credential is a certificate, CRED_x is an end-entity EDHOC relies on COSE for identification of authentication credentials
certificate (i.e., not the certificate chain). In X.509 and C509 (see Section 3.5.4) and supports all credential types for which COSE
certificates, signature keys typically have key usage header parameters are defined including X.509 [RFC5280], C509
[I-D.ietf-cose-cbor-encoded-cert], CWT [RFC8392] and CWT Claims Set
(CCS) [RFC8392]. When the identified credential is a chain or bag,
CRED_x is just the end-entity X.509 or C509 certificate / CWT. In
X.509 and C509 certificates, signature keys typically have key usage
"digitalSignature" and Diffie-Hellman public keys typically have key "digitalSignature" and Diffie-Hellman public keys typically have key
usage "keyAgreement". usage "keyAgreement".
In case of elliptic curve based credential the claims set for CWT or CRED_x needs to be defined such that it is identical when used by
UCCS includes: Initiator or Responder. The Initiator and Responder are expected to
agree on a specific encoding of the credential, see Section 3.9. It
* the 'cnf' claim with value COSE_Key, see [RFC8747], where the is RECOMMENDED that the COSE 'kid' parameter, when used, refers to a
public key parameters depend on key type: specific encoding. The Initiator and Responder SHOULD use an
available authentication credential (transported in EDHOC or
otherwise provisioned) without re-encoding. If for some reason re-
encoding of the authentication credential may occur, then a potential
common encoding for CBOR based credentials is bytewise lexicographic
order of their deterministic encodings as specified in Section 4.2.1
of [RFC8949].
- for OKP the CBOR map typically includes the parameters 1 (kty), * When the authentication credential is a X.509 certificate, CRED_x
-1 (crv), and -2 (x-coordinate) SHALL be the end-entity DER encoded certificate wrapped in a bstr
[I-D.ietf-cose-x509].
- for EC2 the CBOR map typically includes the parameters 1 (kty), * When the authentication credential is a C509 certificate, CRED_x
-1 (crv), -2 (x-coordinate), and -3 (y-coordinate) SHALL be the end-entity C509Certificate
[I-D.ietf-cose-cbor-encoded-cert]
* the 'sub' (subject) claim containing the "identity", if the * When the authentication credential is a COSE_Key in a CWT, CRED_x
parties have agreed on an identity besides the public key. SHALL be the untagged CWT.
CRED_x needs to be defined such that it is identical when generated * When the authentication credential is a COSE_Key but not in a CWT,
by Initiator or Responder, see Section 3.9. The parameters SHALL be CRED_x SHALL be an untagged CCS. * Naked COSE_Keys are thus
encoded in bytewise lexicographic order of their deterministic dressed as CCS when used in EDHOC, which is done by prefixing the
encodings as specified in Section 4.2.1 of [RFC8949]. COSE_Key with 0xA108A101.
An example of CRED_x being a UCCS in bytewise lexicographic order An example of a CRED_x is shown below:
containing an X25519 static Diffie-Hellman key and where the parties
have agreed on an EUI-64 identity is shown below:
{ /UCCS/ { /CCS/
2 : "42-50-31-FF-EF-37-32-39", /sub/ 2 : "42-50-31-FF-EF-37-32-39", /sub/
8 : { /cnf/ 8 : { /cnf/
1 : { /COSE_Key/ 1 : { /COSE_Key/
1 : 1, /kty/ 1 : 1, /kty/
2 : 0, /kid/ 2 : 0, /kid/
-1 : 4, /crv/ -1 : 4, /crv/
-2 : h'b1a3e89460e88d3a8d54211dc95f0b90 /x/ -2 : h'b1a3e89460e88d3a8d54211dc95f0b90 /x/
3ff205eb71912d6db8f4af980d2db83a' 3ff205eb71912d6db8f4af980d2db83a'
} }
} }
} }
3.5.3. Identities Figure 5: A CCS Containing an X25519 Static Diffie-Hellman Key
and an EUI-64 Identity.
EDHOC assumes the existence of mechanisms (certification authority,
trusted third party, pre-provisioning, etc.) for specifying and
distributing authentication keys and identities. Policies are
typically set based on the identity of the other party, and parties
typically only allow connections from a specific identity or a small
restricted set of identities. For example, in the case of a device
connecting to a network, the network may only allow connections from
devices which authenticate with certificates having a particular
range of serial numbers in the subject field and signed by a
particular CA. On the other side, the device may only be allowed to
connect to a network which authenticates with a particular public key
(information of which may be provisioned, e.g., out of band or in the
external authorization data, see Section 3.8).
The EDHOC implementation or the application must enforce information
about the intended endpoint, and in particular whether it is a
specific identity or a set of identities. Either EDHOC passes
information about identity to the application for a decision, or
EDHOC needs to have access to relevant information and makes the
decision on its own.
* When a Public Key Infrastructure (PKI) is used with certificates,
the trust anchor is a Certification Authority (CA) certificate,
and the identity is the subject whose unique name (e.g. a domain
name, NAI, or EUI) is included in the endpoint's certificate.
Before running EDHOC each party needs at least one CA public key
certificate, or just the public key, and a specific identity or
set of identities it is allowed to communicate with. Only
validated public-key certificates with an allowed subject name, as
specified by the application, are to be accepted. EDHOC provides
proof that the other party possesses the private authentication
key corresponding to the public authentication key in its
certificate. The certification path provides proof that the
subject of the certificate owns the public key in the certificate.
* Similarly, when a PKI is used with CWTs, each party needs to have
a trusted third party self-signed CWT, or just the UCCS/raw public
key, to verify the CWTs, and a specific identity or set of
identities in the 'sub'(subject) claim of the CWT to determine if
it is allowed to communicate with.
* When public keys are used but not with a PKI (UCCS, self-signed
certificate/CWT), the trust anchor is the authentication key of
the other party. In this case, the identity is typically directly
associated to the authentication key of the other party. For
example, the name of the subject may be a canonical representation
of the public key. Alternatively, if identities can be expressed
in the form of unique subject names assigned to public keys, then
a binding to identity can be achieved by including both public key
and associated subject name in the protocol message computation:
CRED_I or CRED_R may be a self-signed certificate/CWT or UCCS
containing the authentication key and the subject name, see
Section 3.5.2. Before running EDHOC, each endpoint needs a
specific authentication key/unique associated subject name, or a
set of public authentication keys/unique associated subject names,
which it is allowed to communicate with. EDHOC provides proof
that the other party possesses the private authentication key
corresponding to the public authentication key.
3.5.4. Identification of Credentials 3.5.4. Identification of Credentials
ID_CRED_I and ID_CRED_R are used to identify and optionally transport ID_CRED_R and ID_CRED_I are transported in message_2 and message_3,
the public authentication keys of the Initiator and the Responder, respectively (see Section 5.3.2 and Section 5.4.2). They are used to
respectively. ID_CRED_I and ID_CRED_R do not have any cryptographic identify and optionally transport the authentication keys of the
purpose in EDHOC. Initiator and the Responder, respectively. ID_CRED_I and ID_CRED_R
do not have any cryptographic purpose in EDHOC since EDHOC integrity
protects the authentication credential. EDHOC relies on COSE for
identification of authentication credentials and supports all COSE
header parameters used to identify authentication credentials
including X.509, C509, CWT and CCS.
* ID_CRED_R is intended to facilitate for the Initiator to retrieve * ID_CRED_R is intended to facilitate for the Initiator to retrieve
the Responder's public authentication key. the Responder's authentication key.
* ID_CRED_I is intended to facilitate for the Responder to retrieve * ID_CRED_I is intended to facilitate for the Responder to retrieve
the Initiator's public authentication key. the Initiator's authentication key.
The identifiers ID_CRED_I and ID_CRED_R are registered in the "COSE
Header Parameters" IANA registry. As such, ID_CRED_I and ID_CRED_R
typically also provide information about the format of authentication
credential, CRED_I and CRED_R, respectively. ID_CRED_I and ID_CRED_R
MAY be of different types.
Public key certificates can be identified in different ways. COSE
header parameters for identifying X.509 or C509 certificates are
defined in [I-D.ietf-cose-x509] and
[I-D.ietf-cose-cbor-encoded-cert], for example:
* by a hash value with the 'x5t' or 'c5t' parameters, respectively:
- ID_CRED_x = { 34 : COSE_CertHash }, for x = I or R,
- ID_CRED_x = { TBD3 : COSE_CertHash }, for x = I or R;
* or by a URI with the 'x5u' or 'c5u' parameters, respectively:
- ID_CRED_x = { 35 : uri }, for x = I or R,
- ID_CRED_x = { TBD4 : uri }, for x = I or R.
ID_CRED_x MAY contain the actual credential used for authentication,
CRED_x. For example, a certificate chain can be transported in
ID_CRED_x with COSE header parameter c5c or x5chain, defined in
[I-D.ietf-cose-cbor-encoded-cert] and [I-D.ietf-cose-x509].
Credentials of type CWT and UCCS are transported with the COSE header
parameters registered in Section 8.6:
* ID_CRED_x = { TBD1 : CWT }, for x = I or R, ID_CRED_I and ID_CRED_R are COSE header maps and contains one or more
COSE header parameter. ID_CRED_I and ID_CRED_R MAY contain different
header parameters. The header parameters typically provide some
information about the format of authentication credential.
* ID_CRED_x = { TBD2 : UCCS }, for x = I or R. Example: X.509 certificates can be identified by a hash value using
the 'x5t' parameter:
It is RECOMMENDED that ID_CRED_x uniquely identify the public * ID_CRED_x = { 34 : COSE_CertHash }, for x = I or R,
authentication key as the recipient may otherwise have to try several
keys. ID_CRED_I and ID_CRED_R are transported in the 'ciphertext',
see Section 5.4.2 and Section 5.3.2.
When ID_CRED_x does not contain the actual credential, it may be very Example: CWT or CCS can be identified by a key identifier using the
short, e.g., if the endpoints have agreed to use a key identifier 'kid' parameter:
parameter 'kid':
* ID_CRED_x = { 4 : key_id_x }, where key_id_x : kid, for x = I or * ID_CRED_x = { 4 : key_id_x }, where key_id_x : kid, for x = I or
R. R.
Note that 'kid' is extended to support int values to allow more one- Note that 'kid' is extended to support int values to allow more one-
byte identifiers (see Section 8.7 and Section 8.8) which may be byte identifiers (see Section 9.7 and Section 9.8) which may be
useful in many scenarios since constrained devices only have a few useful in many scenarios since constrained devices only have a few
keys. keys. As stated in Section 3.1 of [I-D.ietf-cose-rfc8152bis-struct],
applications MUST NOT assume that 'kid' values are unique and several
keys associated with a 'kid' may need to be checked before the
correct one is found. Applications might use additional information
such as 'kid context' or lower layers to determine which key to try
first. Applications should strive to make ID_CRED_x as unique as
possible, since the recipient may otherwise have to try several keys.
See Appendix C.3 for more examples.
3.6. Cipher Suites 3.6. Cipher Suites
An EDHOC cipher suite consists of an ordered set of algorithms from An EDHOC cipher suite consists of an ordered set of algorithms from
the "COSE Algorithms" and "COSE Elliptic Curves" registries as well the "COSE Algorithms" and "COSE Elliptic Curves" registries as well
as the EDHOC MAC length. Algorithms need to be specified with enough as the EDHOC MAC length. Algorithms need to be specified with enough
parameters to make them completely determined. Currently, none of parameters to make them completely determined. EDHOC is only
the algorithms require parameters. EDHOC is only specified for use specified for use with key exchange algorithms of type ECDH curves.
with key exchange algorithms of type ECDH curves. Use with other Use with other types of key exchange algorithms would likely require
types of key exchange algorithms would likely require a specification a specification updating EDHOC. Note that for most signature
updating EDHOC. Note that for most signature algorithms, the algorithms, the signature is determined by the signature algorithm
signature is determined by the signature algorithm and the and the authentication key algorithm together, see Section 3.5.2.
authentication key algorithm together, see Section 3.5.1. The authentication key algorithm needs to be compatible with the
EDHOC key exchange algorithm when static Diffie-Hellman
authentication is used and compatible with the EDHOC signature
algorithm when signature authentication is used.
* EDHOC AEAD algorithm * EDHOC AEAD algorithm
* EDHOC hash algorithm * EDHOC hash algorithm
* EDHOC MAC length in bytes (Static DH) * EDHOC MAC length in bytes (Static DH)
* EDHOC key exchange algorithm (ECDH curve) * EDHOC key exchange algorithm (ECDH curve)
* EDHOC signature algorithm * EDHOC signature algorithm
* Application AEAD algorithm * Application AEAD algorithm
* Application hash algorithm * Application hash algorithm
Each cipher suite is identified with a pre-defined int label. Each cipher suite is identified with a pre-defined int label.
EDHOC can be used with all algorithms and curves defined for COSE. EDHOC can be used with all algorithms and curves defined for COSE.
Implementation can either use one of the pre-defined cipher suites Implementation can either use one of the pre-defined cipher suites
(Section 8.2) or use any combination of COSE algorithms and (Section 9.2) or use any combination of COSE algorithms and
parameters to define their own private cipher suite. Private cipher parameters to define their own private cipher suite. Private cipher
suites can be identified with any of the four values -24, -23, -22, suites can be identified with any of the four values -24, -23, -22,
-21. -21.
The following CCM cipher suites are for constrained IoT where message The following CCM cipher suites are for constrained IoT where message
overhead is a very important factor. Cipher suites 1 and 3 use a overhead is a very important factor. Cipher suites 1 and 3 use a
larger tag length (128-bit) in the EDHOC AEAD algorithm than the larger tag length (128-bit) in EDHOC than in the Application AEAD
Application AEAD algorithm (64-bit): algorithm (64-bit):
0. ( 10, -16, 8, 4, -8, 10, -16 ) 0. ( 10, -16, 8, 4, -8, 10, -16 )
(AES-CCM-16-64-128, SHA-256, 8, X25519, EdDSA, (AES-CCM-16-64-128, SHA-256, 8, X25519, EdDSA,
AES-CCM-16-64-128, SHA-256) AES-CCM-16-64-128, SHA-256)
1. ( 30, -16, 16, 4, -8, 10, -16 ) 1. ( 30, -16, 16, 4, -8, 10, -16 )
(AES-CCM-16-128-128, SHA-256, 16, X25519, EdDSA, (AES-CCM-16-128-128, SHA-256, 16, X25519, EdDSA,
AES-CCM-16-64-128, SHA-256) AES-CCM-16-64-128, SHA-256)
2. ( 10, -16, 8, 1, -7, 10, -16 ) 2. ( 10, -16, 8, 1, -7, 10, -16 )
skipping to change at page 20, line 41 skipping to change at page 20, line 41
In order to reduce round trips and number of messages or to simplify In order to reduce round trips and number of messages or to simplify
processing, external security applications may be integrated into processing, external security applications may be integrated into
EDHOC by transporting authorization related data in the messages. EDHOC by transporting authorization related data in the messages.
One example is third-party identity and authorization information One example is third-party identity and authorization information
protected out of scope of EDHOC [I-D.selander-ace-ake-authz]. protected out of scope of EDHOC [I-D.selander-ace-ake-authz].
Another example is a certificate enrolment request or the resulting Another example is a certificate enrolment request or the resulting
issued certificate. issued certificate.
EDHOC allows opaque external authorization data (EAD) to be sent in EDHOC allows opaque external authorization data (EAD) to be sent in
the EDHOC messages. External authorization data sent in message_1 the EDHOC messages. External authorization data sent in message_1
(EAD_1) or message_2 (EAD_2) must be considered unprotected by EDHOC, (EAD_1) or message_2 (EAD_2) should be considered unprotected by
see Section 7.4. External authorization data sent in message_3 EDHOC, see Section 8.4. External authorization data sent in
(EAD_3) or message_4 (EAD_4) is protected between Initiator and message_3 (EAD_3) or message_4 (EAD_4) is protected between Initiator
Responder. and Responder.
External authorization data is a CBOR sequence (see Appendix C.1) External authorization data is a CBOR sequence (see Appendix C.1)
consisting of one or more (type, ext_authz_data) pairs as defined consisting of one or more (ead_label, ead_value) pairs as defined
below: below:
ead = 1* ( ead = 1* (
type : int, ead_label : int,
ext_authz_data : any, ead_value : any,
) )
where ext_authz_data is authorization related data defined in a Applications using external authorization data need to specify
separate specification and its type is an int. Different types of format, processing, and security considerations and register the
ext_authz_data are registered in Section 8.5. (ead_label, ead_value) pair, see Section 9.5. The CDDL type of
ead_value is determined by the int ead_label and MUST be specified.
The EAD fields of EDHOC are not intended for generic application The EAD fields of EDHOC are not intended for generic application
data. Since data carried in EAD_1 and EAD_2 fields may not be data. Since data carried in EAD_1 and EAD_2 fields may not be
protected, special considerations need to be made such that it does protected, special considerations need to be made such that it does
not violate security and privacy requirements of the service which not violate security and privacy requirements of the service which
uses this data. Moreover, the content in an EAD field may impact the uses this data. Moreover, the content in an EAD field may impact the
security properties provided by EDHOC. Security applications making security properties provided by EDHOC. Security applications making
use of the EAD fields must perform the necessary security analysis. use of the EAD fields must perform the necessary security analysis.
3.9. Applicability Statement 3.9. Applicability Statement
skipping to change at page 21, line 48 skipping to change at page 21, line 49
* The method of transporting EDHOC messages may also describe * The method of transporting EDHOC messages may also describe
data carried along with the messages that are needed for the data carried along with the messages that are needed for the
transport to satisfy the requirements of Section 3.4, e.g., transport to satisfy the requirements of Section 3.4, e.g.,
connection identifiers used with certain messages, see connection identifiers used with certain messages, see
Appendix A.3. Appendix A.3.
2. Authentication method (METHOD; see Section 3.2). 2. Authentication method (METHOD; see Section 3.2).
3. Profile for authentication credentials (CRED_I, CRED_R; see 3. Profile for authentication credentials (CRED_I, CRED_R; see
Section 3.5.2), e.g., profile for certificate or UCCS, including Section 3.5.3), e.g., profile for certificate or CCS, including
supported authentication key algorithms (subject public key supported authentication key algorithms (subject public key
algorithm in X.509 or C509 certificate). algorithm in X.509 or C509 certificate).
4. Type used to identify authentication credentials (ID_CRED_I, 4. Type used to identify authentication credentials (ID_CRED_I,
ID_CRED_R; see Section 3.5.4). ID_CRED_R; see Section 3.5.4).
5. Use and type of external authorization data (EAD_1, EAD_2, EAD_3, 5. Use and type of external authorization data (EAD_1, EAD_2, EAD_3,
EAD_4; see Section 3.8). EAD_4; see Section 3.8).
6. Identifier used as identity of endpoint; see Section 3.5.3. 6. Identifier used as identity of endpoint; see Section 3.5.1.
7. If message_4 shall be sent/expected, and if not, how to ensure a 7. If message_4 shall be sent/expected, and if not, how to ensure a
protected application message is sent from the Responder to the protected application message is sent from the Responder to the
Initiator; see Section 5.5. Initiator; see Section 5.5.
The applicability statement may also contain information about The applicability statement may also contain information about
supported cipher suites. The procedure for selecting and verifying supported cipher suites. The procedure for selecting and verifying
cipher suite is still performed as described in Section 5.2.1 and cipher suite is still performed as described in Section 5.2.1 and
Section 6.3, but it may become simplified by this knowledge. Section 6.3, but it may become simplified by this knowledge.
An example of an applicability statement is shown in Appendix E. An example of an applicability statement is shown in Appendix D.
For some parameters, like METHOD, ID_CRED_x, type of EAD, the For some parameters, like METHOD, ID_CRED_x, type of EAD, the
receiver is able to verify compliance with applicability statement, receiver is able to verify compliance with applicability statement,
and if it needs to fail because of incompliance, to infer the reason and if it needs to fail because of incompliance, to infer the reason
why the protocol failed. why the protocol failed.
For other parameters, like CRED_x in the case that it is not For other parameters, like CRED_x in the case that it is not
transported, it may not be possible to verify that incompliance with transported, it may not be possible to verify that incompliance with
applicability statement was the reason for failure: Integrity applicability statement was the reason for failure: Integrity
verification in message_2 or message_3 may fail not only because of verification in message_2 or message_3 may fail not only because of
skipping to change at page 24, line 5 skipping to change at page 24, line 5
= KMAC128( salt, IKM, 256, "" ) = KMAC128( salt, IKM, 256, "" )
* if the EDHOC hash algorithm is SHAKE256, then Extract( salt, IKM ) * if the EDHOC hash algorithm is SHAKE256, then Extract( salt, IKM )
= KMAC256( salt, IKM, 512, "" ) = KMAC256( salt, IKM, 512, "" )
4.1.1. PRK_2e 4.1.1. PRK_2e
PRK_2e is used to derive a keystream to encrypt message_2. PRK_2e is PRK_2e is used to derive a keystream to encrypt message_2. PRK_2e is
derived with the following input: derived with the following input:
* The salt SHALL be the empty byte string. Note that [RFC5869] * The salt SHALL be a zero-length byte string. Note that [RFC5869]
specifies that if the salt is not provided, it is set to a string specifies that if the salt is not provided, it is set to a string
of zeros (see Section 2.2 of [RFC5869]). For implementation of zeros (see Section 2.2 of [RFC5869]). For implementation
purposes, not providing the salt is the same as setting the salt purposes, not providing the salt is the same as setting the salt
to the empty byte string. to the zero-length byte string (0x).
* The IKM SHALL be the ECDH shared secret G_XY (calculated from G_X * The IKM SHALL be the ECDH shared secret G_XY (calculated from G_X
and Y or G_Y and X) as defined in Section 6.3.1 of and Y or G_Y and X) as defined in Section 6.3.1 of
[I-D.ietf-cose-rfc8152bis-algs]. [I-D.ietf-cose-rfc8152bis-algs].
Example: Assuming the use of curve25519, the ECDH shared secret G_XY Example: Assuming the use of curve25519, the ECDH shared secret G_XY
is the output of the X25519 function [RFC7748]: is the output of the X25519 function [RFC7748]:
G_XY = X25519( Y, G_X ) = X25519( X, G_Y ) G_XY = X25519( Y, G_X ) = X25519( X, G_Y )
Example: Assuming the use of SHA-256 the extract phase of HKDF Example: Assuming the use of SHA-256 the extract phase of HKDF
produces PRK_2e as follows: produces PRK_2e as follows:
PRK_2e = HMAC-SHA-256( salt, G_XY ) PRK_2e = HMAC-SHA-256( salt, G_XY )
where salt = 0x (the empty byte string). where salt = 0x (zero-length byte string).
4.1.2. PRK_3e2m 4.1.2. PRK_3e2m
PRK_3e2m is used to produce a MAC in message_2 and to encrypt PRK_3e2m is used to produce a MAC in message_2 and to encrypt
message_3. PRK_3e2m is derived as follows: message_3. PRK_3e2m is derived as follows:
If the Responder authenticates with a static Diffie-Hellman key, then If the Responder authenticates with a static Diffie-Hellman key, then
PRK_3e2m = Extract( PRK_2e, G_RX ), where G_RX is the ECDH shared PRK_3e2m = Extract( PRK_2e, G_RX ), where G_RX is the ECDH shared
secret calculated from G_R and X, or G_X and R, else PRK_3e2m = secret calculated from G_R and X, or G_X and R, else PRK_3e2m =
PRK_2e. PRK_2e.
skipping to change at page 25, line 11 skipping to change at page 25, line 11
The keys, IVs and MACs used in EDHOC are derived from the PRKs using The keys, IVs and MACs used in EDHOC are derived from the PRKs using
Expand, and instantiated with the EDHOC AEAD algorithm in the Expand, and instantiated with the EDHOC AEAD algorithm in the
selected cipher suite. selected cipher suite.
OKM = EDHOC-KDF( PRK, transcript_hash, label, context, length ) OKM = EDHOC-KDF( PRK, transcript_hash, label, context, length )
= Expand( PRK, info, length ) = Expand( PRK, info, length )
where info is encoded as the CBOR sequence where info is encoded as the CBOR sequence
info = ( info = (
edhoc_aead_id : int / tstr, transcript_hash : bstr,
transcript_hash : bstr, label : tstr,
label : tstr, context : bstr,
context : bstr, length : uint,
length : uint,
) )
where where
* edhoc_aead_id is an int or tstr containing the algorithm
identifier of the EDHOC AEAD algorithm in the selected cipher
suite encoded as defined in [I-D.ietf-cose-rfc8152bis-algs]. Note
that a single fixed edhoc_aead_id is used in all invocations of
EDHOC-KDF, including the derivation of KEYSTREAM_2 and invocations
of the EDHOC-Exporter (see Section 4.3).
* transcript_hash is a bstr set to one of the transcript hashes * transcript_hash is a bstr set to one of the transcript hashes
TH_2, TH_3, or TH_4 as defined in Sections 5.3.1, 5.4.1, and 4.3. TH_2, TH_3, or TH_4 as defined in Sections 5.3.1, 5.4.1, and 4.3.
* label is a tstr set to the name of the derived key, IV or MAC; * label is a tstr set to the name of the derived key, IV or MAC;
i.e., "KEYSTREAM_2", "MAC_2", "K_3ae", "IV_3ae", or "MAC_3". i.e., "KEYSTREAM_2", "MAC_2", "K_3", "IV_3", or "MAC_3".
* context is a bstr * context is a bstr
* length is the length of output keying material (OKM) in bytes * length is the length of output keying material (OKM) in bytes
The definition of Expand depends on the EDHOC hash algorithm of the The definition of Expand depends on the EDHOC hash algorithm of the
selected cipher suite: selected cipher suite:
* if the EDHOC hash algorithm is SHA-2, then Expand( PRK, info, * if the EDHOC hash algorithm is SHA-2, then Expand( PRK, info,
length ) = HKDF-Expand( PRK, info, length ) [RFC5869] length ) = HKDF-Expand( PRK, info, length ) [RFC5869]
skipping to change at page 26, line 11 skipping to change at page 26, line 5
where L = 8*length, the output length in bits. where L = 8*length, the output length in bits.
The keys, IVs and MACs are derived as follows: The keys, IVs and MACs are derived as follows:
* KEYSTREAM_2 is derived using the transcript hash TH_2 and the * KEYSTREAM_2 is derived using the transcript hash TH_2 and the
pseudorandom key PRK_2e. pseudorandom key PRK_2e.
* MAC_2 is derived using the transcript hash TH_2 and the * MAC_2 is derived using the transcript hash TH_2 and the
pseudorandom key PRK_3e2m. pseudorandom key PRK_3e2m.
* K_3ae and IV_3ae are derived using the transcript hash TH_3 and * K_3 and IV_3 are derived using the transcript hash TH_3 and the
the pseudorandom key PRK_3e2m. IVs are only used if the EDHOC pseudorandom key PRK_3e2m. IVs are only used if the EDHOC AEAD
AEAD algorithm uses IVs. algorithm uses IVs.
* MAC_3 is derived using the transcript hash TH_3 and the * MAC_3 is derived using the transcript hash TH_3 and the
pseudorandom key PRK_4x3m. pseudorandom key PRK_4x3m.
KEYSTREAM_2, K_3ae, and IV_3ae do not use a context. MAC_2 and MAC_3 KEYSTREAM_2, K_3, and IV_3 use an empty CBOR byte string h'' as
use context as defined in Section 5.3.2 and Section 5.4.2, context. MAC_2 and MAC_3 use context as defined in Section 5.3.2 and
respectively. Section 5.4.2, respectively.
4.3. EDHOC-Exporter 4.3. EDHOC-Exporter
Application keys and other application specific data can be derived Application keys and other application specific data can be derived
using the EDHOC-Exporter interface defined as: using the EDHOC-Exporter interface defined as:
EDHOC-Exporter(label, context, length) EDHOC-Exporter(label, context, length)
= EDHOC-KDF(PRK_4x3m, TH_4, label, context, length) = EDHOC-KDF(PRK_4x3m, TH_4, label, context, length)
where label is a registered tstr from the EDHOC Exporter Label where label is a registered tstr from the EDHOC Exporter Label
registry (Section 8.1), context is a bstr defined by the application, registry (Section 9.1), context is a bstr defined by the application,
and length is a uint defined by the application. The (label, and length is a uint defined by the application. The (label,
context) pair must be unique, i.e., a (label, context) MUST NOT be context) pair must be unique, i.e., a (label, context) MUST NOT be
used for two different purposes. However an application can re- used for two different purposes. However an application can re-
derive the same key several times as long as it is done in a secure derive the same key several times as long as it is done in a secure
way. For example, in most encryption algorithms the same (key, way. For example, in most encryption algorithms the same key kan be
nonce) pair must not be reused. The context can for example be the reused with different nonces. The context can for example be the
empty (zero-length) sequence or a single CBOR byte string. empty (zero-length) sequence or a single CBOR byte string.
The transcript hash TH_4 is a CBOR encoded bstr and the input to the The transcript hash TH_4 is a CBOR encoded bstr and the input to the
hash function is a CBOR Sequence. hash function is a CBOR Sequence.
TH_4 = H( TH_3, CIPHERTEXT_3 ) TH_4 = H( TH_3, CIPHERTEXT_3 )
where H() is the hash function in the selected cipher suite. where H() is the hash function in the selected cipher suite.
Examples of use of the EDHOC-Exporter are given in Section 5.5.2 and Examples of use of the EDHOC-Exporter are given in Section 5.5.2 and
Appendix A. Appendix A.
* K_4 and IV_4 are derived with the EDHOC-Exporter using the empty
CBOR byte string h'' as context, and labels "EDHOC_K_4" and
"EDHOC_IV_4", respectively. IVs are only used if the EDHOC AEAD
algorithm uses IVs.
4.4. EDHOC-KeyUpdate 4.4. EDHOC-KeyUpdate
To provide forward secrecy in an even more efficient way than re- To provide forward secrecy in an even more efficient way than re-
running EDHOC, EDHOC provides the function EDHOC-KeyUpdate. When running EDHOC, EDHOC provides the function EDHOC-KeyUpdate. When
EDHOC-KeyUpdate is called the old PRK_4x3m is deleted and the new EDHOC-KeyUpdate is called the old PRK_4x3m is deleted and the new
PRK_4x3m is calculated as a "hash" of the old key using the Extract PRK_4x3m is calculated as a "hash" of the old key using the Extract
function as illustrated by the following pseudocode: function as illustrated by the following pseudocode:
EDHOC-KeyUpdate( nonce ): EDHOC-KeyUpdate( nonce ):
PRK_4x3m = Extract( nonce, PRK_4x3m ) PRK_4x3m = Extract( nonce, PRK_4x3m )
The EDHOC-KeyUpdate takes a nonce as input to guarantee that there The EDHOC-KeyUpdate takes a nonce as input to guarantee that there
are no short cycles. The Initiator and the Responder need to agree are no short cycles. The Initiator and the Responder need to agree
on the nonce, which can e.g., be a counter or a random number. While on the nonce, which can e.g., be a counter or a random number. While
the KeyUpdate method provides forward secrecy it does not give as the KeyUpdate method provides forward secrecy it does not give as
strong security properties as re-running EDHOC, see Section 7. strong security properties as re-running EDHOC, see Section 8.
5. Message Formatting and Processing 5. Message Formatting and Processing
This section specifies formatting of the messages and processing This section specifies formatting of the messages and processing
steps. Error messages are specified in Section 6. steps. Error messages are specified in Section 6.
An EDHOC message is encoded as a sequence of CBOR data (CBOR An EDHOC message is encoded as a sequence of CBOR data items (CBOR
Sequence, [RFC8742]). Additional optimizations are made to reduce Sequence, [RFC8742]). Additional optimizations are made to reduce
message overhead. message overhead.
While EDHOC uses the COSE_Key, COSE_Sign1, and COSE_Encrypt0 While EDHOC uses the COSE_Key, COSE_Sign1, and COSE_Encrypt0
structures, only a subset of the parameters is included in the EDHOC structures, only a subset of the parameters is included in the EDHOC
messages, see Appendix C.3. The unprotected COSE header in messages, see Appendix C.3. The unprotected COSE header in
COSE_Sign1, and COSE_Encrypt0 (not included in the EDHOC message) MAY COSE_Sign1, and COSE_Encrypt0 (not included in the EDHOC message) MAY
contain parameters (e.g., 'alg'). contain parameters (e.g., 'alg').
5.1. Message Processing Outline 5.1. Message Processing Outline
skipping to change at page 28, line 12 skipping to change at page 28, line 12
state. The following steps are expected to be performed at reception state. The following steps are expected to be performed at reception
of an EDHOC message: of an EDHOC message:
1. Detect that an EDHOC message has been received, for example by 1. Detect that an EDHOC message has been received, for example by
means of port number, URI, or media type (Section 3.9). means of port number, URI, or media type (Section 3.9).
2. Retrieve the protocol state according to the message correlation 2. Retrieve the protocol state according to the message correlation
provided by the transport, see Section 3.4. If there is no provided by the transport, see Section 3.4. If there is no
protocol state, in the case of message_1, a new protocol state is protocol state, in the case of message_1, a new protocol state is
created. The Responder endpoint needs to make use of available created. The Responder endpoint needs to make use of available
Denial-of-Service mitigation (Section 7.5). Denial-of-Service mitigation (Section 8.5).
3. If the message received is an error message, then process 3. If the message received is an error message, then process
according to Section 6, else process as the expected next message according to Section 6, else process as the expected next message
according to the protocol state. according to the protocol state.
If the processing fails for some reason then, typically, an error If the processing fails for some reason then, typically, an error
message is sent, the protocol is discontinued, and the protocol state message is sent, the protocol is discontinued, and the protocol state
erased. Further details are provided in the following subsections erased. Further details are provided in the following subsections
and in Section 6. and in Section 6.
Different instances of the same message MUST NOT be processed in one Different instances of the same message MUST NOT be processed in one
session. Note that processing will fail if the same message appears session. Note that processing will fail if the same message appears
a second time for EDHOC processing because the state of the protocol a second time for EDHOC processing because the state of the protocol
has moved on and now expects something else. This assumes that has moved on and now expects something else. This assumes that
message duplication due to re-transmissions is handled by the message duplication due to re-transmissions is handled by the
transport protocol, see Section 3.4. The case when the transport transport protocol, see Section 3.4. The case when the transport
does not support message deduplication is addressed in Appendix F. does not support message deduplication is addressed in Appendix E.
5.2. EDHOC Message 1 5.2. EDHOC Message 1
5.2.1. Formatting of Message 1 5.2.1. Formatting of Message 1
message_1 SHALL be a CBOR Sequence (see Appendix C.1) as defined message_1 SHALL be a CBOR Sequence (see Appendix C.1) as defined
below below
message_1 = ( message_1 = (
METHOD : int, METHOD : int,
SUITES_I : suites, SUITES_I : suites,
G_X : bstr, G_X : bstr,
C_I : bstr / int, C_I : bstr / int,
? EAD_1 : ead, ? EAD_1 : ead,
) )
suite = int suites = [ 2* int ] / int
suites = [ 2* suite ] / suite
where: where:
* METHOD = 0, 1, 2, or 3 (see Figure 4). * METHOD = 0, 1, 2, or 3 (see Figure 4).
* SUITES_I - array of cipher suites which the Initiator supports in * SUITES_I - array of cipher suites which the Initiator supports in
order of preference, starting with the most preferred and ending order of preference, starting with the most preferred and ending
with the cipher suite selected for this session. If the most with the cipher suite selected for this session. If the most
preferred cipher suite is selected then SUITES_I is encoded as preferred cipher suite is selected then SUITES_I is encoded as
that cipher suite, i.e. as an int. The processing steps are that cipher suite, i.e., as an int. The processing steps are
detailed below and in Section 6.3. detailed below and in Section 6.3.
* G_X - the ephemeral public key of the Initiator * G_X - the ephemeral public key of the Initiator
* C_I - variable length connection identifier * C_I - variable length connection identifier
* EAD_1 - unprotected external authorization data, see Section 3.8. * EAD_1 - unprotected external authorization data, see Section 3.8.
5.2.2. Initiator Processing of Message 1 5.2.2. Initiator Processing of Message 1
skipping to change at page 30, line 20 skipping to change at page 30, line 20
* Verify that the selected cipher suite is supported and that no * Verify that the selected cipher suite is supported and that no
prior cipher suite in SUITES_I is supported. prior cipher suite in SUITES_I is supported.
* Pass EAD_1 to the security application. * Pass EAD_1 to the security application.
If any processing step fails, the Responder SHOULD send an EDHOC If any processing step fails, the Responder SHOULD send an EDHOC
error message back, formatted as defined in Section 6, and the error message back, formatted as defined in Section 6, and the
session MUST be discontinued. Sending error messages is essential session MUST be discontinued. Sending error messages is essential
for debugging but MAY e.g., be skipped due to denial-of-service for debugging but MAY e.g., be skipped due to denial-of-service
reasons, see Section 7. reasons, see Section 8.
5.3. EDHOC Message 2 5.3. EDHOC Message 2
5.3.1. Formatting of Message 2 5.3.1. Formatting of Message 2
message_2 SHALL be a CBOR Sequence (see Appendix C.1) as defined message_2 SHALL be a CBOR Sequence (see Appendix C.1) as defined
below below
message_2 = ( message_2 = (
G_Y_CIPHERTEXT_2 : bstr, G_Y_CIPHERTEXT_2 : bstr,
skipping to change at page 32, line 46 skipping to change at page 32, line 46
for this connection, see Section 3.5. for this connection, see Section 3.5.
* Verify Signature_or_MAC_2 using the algorithm in the selected * Verify Signature_or_MAC_2 using the algorithm in the selected
cipher suite. The verification process depends on the method, see cipher suite. The verification process depends on the method, see
Section 5.3.2. Section 5.3.2.
If any processing step fails, the Initiator SHOULD send an EDHOC If any processing step fails, the Initiator SHOULD send an EDHOC
error message back, formatted as defined in Section 6. Sending error error message back, formatted as defined in Section 6. Sending error
messages is essential for debugging but MAY e.g., be skipped if a messages is essential for debugging but MAY e.g., be skipped if a
session cannot be found or due to denial-of-service reasons, see session cannot be found or due to denial-of-service reasons, see
Section 7. If an error message is sent, the session MUST be Section 8. If an error message is sent, the session MUST be
discontinued. discontinued.
5.4. EDHOC Message 3 5.4. EDHOC Message 3
5.4.1. Formatting of Message 3 5.4.1. Formatting of Message 3
message_3 SHALL be a CBOR Sequence (see Appendix C.1) as defined message_3 SHALL be a CBOR Sequence (see Appendix C.1) as defined
below below
message_3 = ( message_3 = (
CIPHERTEXT_3 : bstr, CIPHERTEXT_3 : bstr,
skipping to change at page 34, line 17 skipping to change at page 34, line 17
- The key is the private authentication key of the Initiator. - The key is the private authentication key of the Initiator.
- The message M to be signed = - The message M to be signed =
[ "Signature1", << ID_CRED_I >>, << TH_3, CRED_I, ? EAD_3 >>, [ "Signature1", << ID_CRED_I >>, << TH_3, CRED_I, ? EAD_3 >>,
MAC_3 ] MAC_3 ]
* Compute an outer COSE_Encrypt0 as defined in Section 5.3 of * Compute an outer COSE_Encrypt0 as defined in Section 5.3 of
[I-D.ietf-cose-rfc8152bis-struct], with the EDHOC AEAD algorithm [I-D.ietf-cose-rfc8152bis-struct], with the EDHOC AEAD algorithm
in the selected cipher suite, K_3ae, IV_3ae, and the following in the selected cipher suite, K_3, IV_3, and the following
parameters. The protected header SHALL be empty. parameters. The protected header SHALL be the empty CBOR byte
string.
- protected = h''
- external_aad = TH_3 - external_aad = TH_3
- plaintext = ( ID_CRED_I / bstr / int, Signature_or_MAC_3, ? - plaintext = ( ID_CRED_I / bstr / int, Signature_or_MAC_3, ?
EAD_3 ) EAD_3 )
o Note that if ID_CRED_I contains a single 'kid' parameter, o Note that if ID_CRED_I contains a single 'kid' parameter,
i.e., ID_CRED_I = { 4 : kid_I }, only the byte string or i.e., ID_CRED_I = { 4 : kid_I }, only the byte string or
integer kid_I is conveyed in the plaintext encoded as a bstr integer kid_I is conveyed in the plaintext encoded as a bstr
or int. or int.
COSE constructs the input to the AEAD [RFC5116] as follows: COSE constructs the input to the AEAD [RFC5116] as follows:
- Key K = EDHOC-KDF( PRK_3e2m, TH_3, "K_3ae", h'', length ) - Key K = EDHOC-KDF( PRK_3e2m, TH_3, "K_3", h'', length )
- Nonce N = EDHOC-KDF( PRK_3e2m, TH_3, "IV_3ae", h'', length ) - Nonce N = EDHOC-KDF( PRK_3e2m, TH_3, "IV_3", h'', length )
- Plaintext P = ( ID_CRED_I / bstr / int, Signature_or_MAC_3, ? - Plaintext P = ( ID_CRED_I / bstr / int, Signature_or_MAC_3, ?
EAD_3 ) EAD_3 )
- Associated data A = [ "Encrypt0", h'', TH_3 ] - Associated data A = [ "Encrypt0", h'', TH_3 ]
CIPHERTEXT_3 is the 'ciphertext' of the outer COSE_Encrypt0. CIPHERTEXT_3 is the 'ciphertext' of the outer COSE_Encrypt0.
* Encode message_3 as a sequence of CBOR encoded data items as * Encode message_3 as a sequence of CBOR encoded data items as
specified in Section 5.4.1. specified in Section 5.4.1.
skipping to change at page 35, line 30 skipping to change at page 35, line 35
The Responder SHALL process message_3 as follows: The Responder SHALL process message_3 as follows:
* Decode message_3 (see Appendix C.1). * Decode message_3 (see Appendix C.1).
* Retrieve the protocol state using the message correlation provided * Retrieve the protocol state using the message correlation provided
by the transport (e.g., the CoAP Token and the 5-tuple as a by the transport (e.g., the CoAP Token and the 5-tuple as a
client, or the prepended C_R as a server). client, or the prepended C_R as a server).
* Decrypt and verify the outer COSE_Encrypt0 as defined in * Decrypt and verify the outer COSE_Encrypt0 as defined in
Section 5.3 of [I-D.ietf-cose-rfc8152bis-struct], with the EDHOC Section 5.3 of [I-D.ietf-cose-rfc8152bis-struct], with the EDHOC
AEAD algorithm in the selected cipher suite, K_3ae, and IV_3ae. AEAD algorithm in the selected cipher suite, K_3, and IV_3.
* Pass EAD_3 to the security application. * Pass EAD_3 to the security application.
* Verify that the identity of the Initiator is an allowed identity * Verify that the identity of the Initiator is an allowed identity
for this connection, see Section 3.5. for this connection, see Section 3.5.
* Verify Signature_or_MAC_3 using the algorithm in the selected * Verify Signature_or_MAC_3 using the algorithm in the selected
cipher suite. The verification process depends on the method, see cipher suite. The verification process depends on the method, see
Section 5.4.2. Section 5.4.2.
* Pass the connection identifiers (C_I, C_R), and the application * Pass the connection identifiers (C_I, C_R), and the application
algorithms in the selected cipher suite to the security algorithms in the selected cipher suite to the security
application. The application can now derive application keys application. The application can now derive application keys
using the EDHOC-Exporter interface. using the EDHOC-Exporter interface.
If any processing step fails, the Responder SHOULD send an EDHOC If any processing step fails, the Responder SHOULD send an EDHOC
error message back, formatted as defined in Section 6. Sending error error message back, formatted as defined in Section 6. Sending error
messages is essential for debugging but MAY e.g., be skipped if a messages is essential for debugging but MAY e.g., be skipped if a
session cannot be found or due to denial-of-service reasons, see session cannot be found or due to denial-of-service reasons, see
Section 7. If an error message is sent, the session MUST be Section 8. If an error message is sent, the session MUST be
discontinued. discontinued.
After verifying message_3, the Responder is assured that the After verifying message_3, the Responder is assured that the
Initiator has calculated the key PRK_4x3m (explicit key confirmation) Initiator has calculated the key PRK_4x3m (explicit key confirmation)
and that no other party than the Responder can compute the key. The and that no other party than the Responder can compute the key. The
Responder can securely send protected application data and store the Responder can securely send protected application data and store the
keying material PRK_4x3m and TH_4. keying material PRK_4x3m and TH_4.
5.5. EDHOC Message 4 5.5. EDHOC Message 4
skipping to change at page 36, line 45 skipping to change at page 36, line 52
CIPHERTEXT_4 : bstr, CIPHERTEXT_4 : bstr,
) )
5.5.2. Responder Processing of Message 4 5.5.2. Responder Processing of Message 4
The Responder SHALL compose message_4 as follows: The Responder SHALL compose message_4 as follows:
* Compute a COSE_Encrypt0 as defined in Section 5.3 of * Compute a COSE_Encrypt0 as defined in Section 5.3 of
[I-D.ietf-cose-rfc8152bis-struct], with the EDHOC AEAD algorithm [I-D.ietf-cose-rfc8152bis-struct], with the EDHOC AEAD algorithm
in the selected cipher suite, and the following parameters. The in the selected cipher suite, and the following parameters. The
protected header SHALL be empty. protected header SHALL be the empty CBOR byte string.
- protected = h'' - protected = h''
- external_aad = TH_4 - external_aad = TH_4
- plaintext = ( ? EAD_4 ) - plaintext = ( ? EAD_4 ), where EAD_4 is protected external
where EAD_4 is protected external authorization data, see authorization data, see Section 3.8
Section 3.8. COSE constructs the input to the AEAD [RFC5116] as
follows:
- Key K = EDHOC-Exporter( "EDHOC_message_4_Key", h'', length ) - Key K_4 = EDHOC-Exporter( "EDHOC_K_4", h'', length )
- Nonce N = EDHOC-Exporter( "EDHOC_message_4_Nonce", h'', length - IV IV_4 = EDHOC-Exporter( "EDHOC_IV_4", h'', length )
)
COSE constructs the input to the AEAD [RFC5116] as follows:
- Key K = K_4
- Nonce N = IV_4
- Plaintext P = ( ? EAD_4 ) - Plaintext P = ( ? EAD_4 )
- Associated data A = [ "Encrypt0", h'', TH_4 ] - Associated data A = [ "Encrypt0", h'', TH_4 ]
CIPHERTEXT_4 is the ciphertext of the COSE_Encrypt0. CIPHERTEXT_4 is the ciphertext of the COSE_Encrypt0.
* Encode message_4 as a sequence of CBOR encoded data items as * Encode message_4 as a sequence of CBOR encoded data items as
specified in Section 5.5.1. specified in Section 5.5.1.
skipping to change at page 37, line 43 skipping to change at page 38, line 9
Section 5.3 of [I-D.ietf-cose-rfc8152bis-struct], with the EDHOC Section 5.3 of [I-D.ietf-cose-rfc8152bis-struct], with the EDHOC
AEAD algorithm in the selected cipher suite, and the parameters AEAD algorithm in the selected cipher suite, and the parameters
defined in Section 5.5.2. defined in Section 5.5.2.
* Pass EAD_4 to the security application. * Pass EAD_4 to the security application.
If any processing step fails, the Responder SHOULD send an EDHOC If any processing step fails, the Responder SHOULD send an EDHOC
error message back, formatted as defined in Section 6. Sending error error message back, formatted as defined in Section 6. Sending error
messages is essential for debugging but MAY e.g., be skipped if a messages is essential for debugging but MAY e.g., be skipped if a
session cannot be found or due to denial-of-service reasons, see session cannot be found or due to denial-of-service reasons, see
Section 7. If an error message is sent, the session MUST be Section 8. If an error message is sent, the session MUST be
discontinued. discontinued.
6. Error Handling 6. Error Handling
This section defines the format for error messages. This section defines the format for error messages.
An EDHOC error message can be sent by either endpoint as a reply to An EDHOC error message can be sent by either endpoint as a reply to
any non-error EDHOC message. How errors at the EDHOC layer are any non-error EDHOC message. How errors at the EDHOC layer are
transported depends on lower layers, which need to enable error transported depends on lower layers, which need to enable error
messages to be sent and processed as intended. messages to be sent and processed as intended.
skipping to change at page 38, line 25 skipping to change at page 38, line 36
an attacker and the receiver MAY therefore try to continue the an attacker and the receiver MAY therefore try to continue the
protocol. protocol.
error SHALL be a CBOR Sequence (see Appendix C.1) as defined below error SHALL be a CBOR Sequence (see Appendix C.1) as defined below
error = ( error = (
ERR_CODE : int, ERR_CODE : int,
ERR_INFO : any, ERR_INFO : any,
) )
Figure 5: EDHOC Error Message Figure 6: EDHOC Error Message
where: where:
* ERR_CODE - error code encoded as an integer. The value 0 is used * ERR_CODE - error code encoded as an integer. The value 0 is used
for success, all other values (negative or positive) indicate for success, all other values (negative or positive) indicate
errors. errors.
* ERR_INFO - error information. Content and encoding depend on * ERR_INFO - error information. Content and encoding depend on
error code. error code.
The remainder of this section specifies the currently defined error The remainder of this section specifies the currently defined error
codes, see Figure 6. Error codes 1 and 2 MUST be supported. codes, see Figure 7. Additional error codes and corresponding error
Additional error codes and corresponding error information may be information may be specified.
specified.
+----------+---------------+----------------------------------------+ +----------+---------------+----------------------------------------+
| ERR_CODE | ERR_INFO Type | Description | | ERR_CODE | ERR_INFO Type | Description |
+==========+===============+========================================+ +==========+===============+========================================+
| 0 | any | Success | | 0 | any | Success |
+----------+---------------+----------------------------------------+ +----------+---------------+----------------------------------------+
| 1 | tstr | Unspecified | | 1 | tstr | Unspecified |
+----------+---------------+----------------------------------------+ +----------+---------------+----------------------------------------+
| 2 | suites | Wrong selected cipher suite | | 2 | suites | Wrong selected cipher suite |
+----------+---------------+----------------------------------------+ +----------+---------------+----------------------------------------+
Figure 6: Error Codes and Error Information Figure 7: Error Codes and Error Information
6.1. Success 6.1. Success
Error code 0 MAY be used internally in an application to indicate Error code 0 MAY be used internally in an application to indicate
success, e.g., in log files. ERR_INFO can contain any type of CBOR success, e.g., in log files. ERR_INFO can contain any type of CBOR
item. Error code 0 MUST NOT be used as part of the EDHOC message item. Error code 0 MUST NOT be used as part of the EDHOC message
exchange flow. exchange flow.
6.2. Unspecified 6.2. Unspecified
skipping to change at page 39, line 29 skipping to change at page 39, line 41
specification. The diagnostic message SHOULD be provided to the specification. The diagnostic message SHOULD be provided to the
calling application where it SHOULD be logged. calling application where it SHOULD be logged.
6.3. Wrong Selected Cipher Suite 6.3. Wrong Selected Cipher Suite
Error code 2 MUST only be used in a response to message_1 in case the Error code 2 MUST only be used in a response to message_1 in case the
cipher suite selected by the Initiator is not supported by the cipher suite selected by the Initiator is not supported by the
Responder, or if the Responder supports a cipher suite more preferred Responder, or if the Responder supports a cipher suite more preferred
by the Initiator than the selected cipher suite, see Section 5.2.3. by the Initiator than the selected cipher suite, see Section 5.2.3.
ERR_INFO is in this case denoted SUITES_R and is of type suites, see ERR_INFO is in this case denoted SUITES_R and is of type suites, see
Section 5.2.1). If the Responder does not support the selected Section 5.2.1. If the Responder does not support the selected cipher
cipher suite, then SUITES_R MUST include one or more supported cipher suite, then SUITES_R MUST include one or more supported cipher
suites. If the Responder supports a cipher suite in SUITES_I other suites. If the Responder supports a cipher suite in SUITES_I other
than the selected cipher suite (independently of if the selected than the selected cipher suite (independently of if the selected
cipher suite is supported or not) then SUITES_R MUST include the cipher suite is supported or not) then SUITES_R MUST include the
supported cipher suite in SUITES_I which is most preferred by the supported cipher suite in SUITES_I which is most preferred by the
Initiator. SUITES_R MAY include a single cipher suite, i.e. be Initiator. SUITES_R MAY include a single cipher suite, i.e., be
encoded as an int. If the Responder does not support any cipher encoded as an int. If the Responder does not support any cipher
suite in SUITES_I, then it SHOULD include all its supported cipher suite in SUITES_I, then it SHOULD include all its supported cipher
suites in SUITES_R in any order. suites in SUITES_R in any order.
6.3.1. Cipher Suite Negotiation 6.3.1. Cipher Suite Negotiation
After receiving SUITES_R, the Initiator can determine which cipher After receiving SUITES_R, the Initiator can determine which cipher
suite to select (if any) for the next EDHOC run with the Responder. suite to select (if any) for the next EDHOC run with the Responder.
If the Initiator intends to contact the Responder in the future, the If the Initiator intends to contact the Responder in the future, the
skipping to change at page 40, line 19 skipping to change at page 40, line 24
selects its most preferred and the Responder sends an error with selects its most preferred and the Responder sends an error with
supported cipher suites. After a successful run of EDHOC, the supported cipher suites. After a successful run of EDHOC, the
Initiator MAY remember the selected cipher suite to use in future Initiator MAY remember the selected cipher suite to use in future
EDHOC sessions. Note that if the Initiator or Responder is updated EDHOC sessions. Note that if the Initiator or Responder is updated
with new cipher suite policies, any cached information may be with new cipher suite policies, any cached information may be
outdated. outdated.
6.3.2. Examples 6.3.2. Examples
Assume that the Initiator supports the five cipher suites 5, 6, 7, 8, Assume that the Initiator supports the five cipher suites 5, 6, 7, 8,
and 9 in decreasing order of preference. Figures 7 and 8 show and 9 in decreasing order of preference. Figures 8 and 9 show
examples of how the Initiator can format SUITES_I and how SUITES_R is examples of how the Initiator can format SUITES_I and how SUITES_R is
used by Responders to give the Initiator information about the cipher used by Responders to give the Initiator information about the cipher
suites that the Responder supports. suites that the Responder supports.
In the first example (Figure 7), the Responder supports cipher suite In the first example (Figure 8), the Responder supports cipher suite
6 but not the initially selected cipher suite 5. 6 but not the initially selected cipher suite 5.
Initiator Responder Initiator Responder
| METHOD, SUITES_I = 5, G_X, C_I, EAD_1 | | METHOD, SUITES_I = 5, G_X, C_I, EAD_1 |
+------------------------------------------------------------------>| +------------------------------------------------------------------>|
| message_1 | | message_1 |
| | | |
| ERR_CODE = 2, SUITES_R = 6 | | ERR_CODE = 2, SUITES_R = 6 |
|<------------------------------------------------------------------+ |<------------------------------------------------------------------+
| error | | error |
| | | |
| METHOD, SUITES_I = [5, 6], G_X, C_I, EAD_1 | | METHOD, SUITES_I = [5, 6], G_X, C_I, EAD_1 |
+------------------------------------------------------------------>| +------------------------------------------------------------------>|
| message_1 | | message_1 |
Figure 7: Example of Responder supporting suite 6 but not suite 5. Figure 8: Example of Responder supporting suite 6 but not suite 5.
In the second example (Figure 8), the Responder supports cipher In the second example (Figure 9), the Responder supports cipher
suites 8 and 9 but not the more preferred (by the Initiator) cipher suites 8 and 9 but not the more preferred (by the Initiator) cipher
suites 5, 6 or 7. To illustrate the negotiation mechanics we let the suites 5, 6 or 7. To illustrate the negotiation mechanics we let the
Initiator first make a guess that the Responder supports suite 6 but Initiator first make a guess that the Responder supports suite 6 but
not suite 5. Since the Responder supports neither 5 nor 6, it not suite 5. Since the Responder supports neither 5 nor 6, it
responds with SUITES_R containing the supported suites, after which responds with SUITES_R containing the supported suites, after which
the Initiator selects its most preferred supported suite. The order the Initiator selects its most preferred supported suite. The order
of cipher suites in SUITES_R does not matter. (If the Responder had of cipher suites in SUITES_R does not matter. (If the Responder had
supported suite 5, it would have included it in SUITES_R of the supported suite 5, it would have included it in SUITES_R of the
response, and it would in that case have become the selected suite in response, and it would in that case have become the selected suite in
the second message_1.) the second message_1.)
skipping to change at page 41, line 17 skipping to change at page 41, line 23
| message_1 | | message_1 |
| | | |
| ERR_CODE = 2, SUITES_R = [9, 8] | | ERR_CODE = 2, SUITES_R = [9, 8] |
|<------------------------------------------------------------------+ |<------------------------------------------------------------------+
| error | | error |
| | | |
| METHOD, SUITES_I = [5, 6, 7, 8], G_X, C_I, EAD_1 | | METHOD, SUITES_I = [5, 6, 7, 8], G_X, C_I, EAD_1 |
+------------------------------------------------------------------>| +------------------------------------------------------------------>|
| message_1 | | message_1 |
Figure 8: Example of Responder supporting suites 8 and 9 but not Figure 9: Example of Responder supporting suites 8 and 9 but not
5, 6 or 7. 5, 6 or 7.
Note that the Initiator's list of supported cipher suites and order Note that the Initiator's list of supported cipher suites and order
of preference is fixed (see Section 5.2.1 and Section 5.2.2). of preference is fixed (see Section 5.2.1 and Section 5.2.2).
Furthermore, the Responder shall only accept message_1 if the Furthermore, the Responder shall only accept message_1 if the
selected cipher suite is the first cipher suite in SUITES_I that the selected cipher suite is the first cipher suite in SUITES_I that the
Responder supports (see Section 5.2.3). Following this procedure Responder supports (see Section 5.2.3). Following this procedure
ensures that the selected cipher suite is the most preferred (by the ensures that the selected cipher suite is the most preferred (by the
Initiator) cipher suite supported by both parties. Initiator) cipher suite supported by both parties.
If the selected cipher suite is not the first cipher suite which the If the selected cipher suite is not the first cipher suite which the
Responder supports in SUITES_I received in message_1, then Responder Responder supports in SUITES_I received in message_1, then Responder
MUST discontinue the protocol, see Section 5.2.3. If SUITES_I in MUST discontinue the protocol, see Section 5.2.3. If SUITES_I in
message_1 is manipulated, then the integrity verification of message_1 is manipulated, then the integrity verification of
message_2 containing the transcript hash TH_2 will fail and the message_2 containing the transcript hash TH_2 will fail and the
Initiator will discontinue the protocol. Initiator will discontinue the protocol.
7. Security Considerations 7. Mandatory-to-Implement Compliance Requirements
7.1. Security Properties An implementation may support only Initiator or only Responder.
An implementation may support only a single method. None of the
methods are mandatory-to-implement.
Implementations MUST support the EDHOC-Exporter. Implementations
SHOULD support EDHOC-KeyUpdate.
Implementaions MAY support message_4. Error codes 1 and 2 MUST be
supported.
Implementations MUST support 'kid' parameters of type int.
Editor's note: Is any COSE header parameters (kid, kcwt, kccs, x5t,
c5c, etc. ) MTI?
Editor's note: Is any credential type (CCS, CWT, X.509, C509) MTI?
Editor's note: Is support of EAD MTI?
For many constrained IoT devices it is problematic to support more
than one cipher suite. Existing devices can be expected to support
either ECDSA or EdDSA. To enable as much interoperability as we can
reasonably achieve, less constrained devices SHOULD implement both
cipher suite 0 (AES-CCM-16-64-128, SHA-256, 8, X25519, EdDSA, AES-
CCM-16-64-128, SHA-256) and cipher suite 2 (AES-CCM-16-64-128, SHA-
256, 8, P-256, ES256, AES-CCM-16-64-128, SHA-256). Constrained
endpoints SHOULD implement cipher suite 0 or cipher suite 2.
Implementations only need to implement the algorithms needed for
their supported methods.
8. Security Considerations
8.1. Security Properties
EDHOC inherits its security properties from the theoretical SIGMA-I EDHOC inherits its security properties from the theoretical SIGMA-I
protocol [SIGMA]. Using the terminology from [SIGMA], EDHOC provides protocol [SIGMA]. Using the terminology from [SIGMA], EDHOC provides
forward secrecy, mutual authentication with aliveness, consistency, forward secrecy, mutual authentication with aliveness, consistency,
and peer awareness. As described in [SIGMA], peer awareness is and peer awareness. As described in [SIGMA], peer awareness is
provided to the Responder, but not to the Initiator. provided to the Responder, but not to the Initiator.
EDHOC protects the credential identifier of the Initiator against EDHOC protects the credential identifier of the Initiator against
active attacks and the credential identifier of the Responder against active attacks and the credential identifier of the Responder against
passive attacks. The roles should be assigned to protect the most passive attacks. The roles should be assigned to protect the most
skipping to change at page 44, line 17 skipping to change at page 45, line 5
run of the protocol by presenting the private ephemeral key, and vice run of the protocol by presenting the private ephemeral key, and vice
versa. Note that storing the private ephemeral keys violates the versa. Note that storing the private ephemeral keys violates the
protocol requirements. With static Diffie-Hellman key protocol requirements. With static Diffie-Hellman key
authentication, both parties can always deny having participated in authentication, both parties can always deny having participated in
the protocol. the protocol.
Two earlier versions of EDHOC have been formally analyzed [Norrman20] Two earlier versions of EDHOC have been formally analyzed [Norrman20]
[Bruni18] and the specification has been updated based on the [Bruni18] and the specification has been updated based on the
analysis. analysis.
7.2. Cryptographic Considerations 8.2. Cryptographic Considerations
The SIGMA protocol requires that the encryption of message_3 provides The SIGMA protocol requires that the encryption of message_3 provides
confidentiality against active attackers and EDHOC message_4 relies confidentiality against active attackers and EDHOC message_4 relies
on the use of authenticated encryption. Hence the message on the use of authenticated encryption. Hence the message
authenticating functionality of the authenticated encryption in EDHOC authenticating functionality of the authenticated encryption in EDHOC
is critical: authenticated encryption MUST NOT be replaced by plain is critical: authenticated encryption MUST NOT be replaced by plain
encryption only, even if authentication is provided at another level encryption only, even if authentication is provided at another level
or through a different mechanism. or through a different mechanism.
To reduce message overhead EDHOC does not use explicit nonces and To reduce message overhead EDHOC does not use explicit nonces and
instead rely on the ephemeral public keys to provide randomness to instead rely on the ephemeral public keys to provide randomness to
each session. A good amount of randomness is important for the key each session. A good amount of randomness is important for the key
generation, to provide liveness, and to protect against interleaving generation, to provide liveness, and to protect against interleaving
attacks. For this reason, the ephemeral keys MUST NOT be reused, and attacks. For this reason, the ephemeral keys MUST NOT be used in
both parties SHALL generate fresh random ephemeral key pairs. more than one EDHOC message, and both parties SHALL generate fresh
random ephemeral key pairs. Note that an ephemeral key may be used
to calculate several ECDH shared secrets. When static Diffie-Hellman
authentication is used the same ephemeral key is used in both
ephemeral-ephemeral and ephemeral-static ECDH.
As discussed, the [SIGMA], the encryption of message_2 does only need As discussed in [SIGMA], the encryption of message_2 does only need
to protect against passive attacker as active attackers can always to protect against passive attacker as active attackers can always
get the Responders identity by sending their own message_1. EDHOC get the Responders identity by sending their own message_1. EDHOC
uses the Expand function (typically HKDF-Expand) as a binary additive uses the Expand function (typically HKDF-Expand) as a binary additive
stream cipher. HKDF-Expand provides better confidentiality than AES- stream cipher. HKDF-Expand provides better confidentiality than AES-
CTR but is not often used as it is slow on long messages, and most CTR but is not often used as it is slow on long messages, and most
applications require both IND-CCA confidentiality as well as applications require both IND-CCA confidentiality as well as
integrity protection. For the encryption of message_2, any speed integrity protection. For the encryption of message_2, any speed
difference is negligible, IND-CCA does not increase security, and difference is negligible, IND-CCA does not increase security, and
integrity is provided by the inner MAC (and signature depending on integrity is provided by the inner MAC (and signature depending on
method). method).
Requirement for how to securely generate, validate, and process the Requirement for how to securely generate, validate, and process the
ephemeral public keys depend on the elliptic curve. For X25519 and ephemeral public keys depend on the elliptic curve. For X25519 and
X448, the requirements are defined in [RFC7748]. For secp256r1, X448, the requirements are defined in [RFC7748]. For secp256r1,
secp384r1, and secp521r1, the requirements are defined in Section 5 secp384r1, and secp521r1, the requirements are defined in Section 5
of [SP-800-56A]. For secp256r1, secp384r1, and secp521r1, at least of [SP-800-56A]. For secp256r1, secp384r1, and secp521r1, at least
partial public-key validation MUST be done. partial public-key validation MUST be done.
7.3. Cipher Suites and Cryptographic Algorithms 8.3. Cipher Suites and Cryptographic Algorithms
For many constrained IoT devices it is problematic to support more
than one cipher suite. Existing devices can be expected to support
either ECDSA or EdDSA. To enable as much interoperability as we can
reasonably achieve, less constrained devices SHOULD implement both
cipher suite 0 (AES-CCM-16-64-128, SHA-256, X25519, EdDSA, AES-CCM-
16-64-128, SHA-256) and cipher suite 2 (AES-CCM-16-64-128, SHA-256,
P-256, ES256, AES-CCM-16-64-128, SHA-256). Constrained endpoints
SHOULD implement cipher suite 0 or cipher suite 2. Implementations
only need to implement the algorithms needed for their supported
methods.
When using private cipher suite or registering new cipher suites, the When using private cipher suite or registering new cipher suites, the
choice of key length used in the different algorithms needs to be choice of key length used in the different algorithms needs to be
harmonized, so that a sufficient security level is maintained for harmonized, so that a sufficient security level is maintained for
certificates, EDHOC, and the protection of application data. The certificates, EDHOC, and the protection of application data. The
Initiator and the Responder should enforce a minimum security level. Initiator and the Responder should enforce a minimum security level.
The hash algorithms SHA-1 and SHA-256/64 (256-bit Hash truncated to The hash algorithms SHA-1 and SHA-256/64 (SHA-256 truncated to
64-bits) SHALL NOT be supported for use in EDHOC except for 64-bits) SHALL NOT be supported for use in EDHOC except for
certificate identification with x5u and c5u. Note that secp256k1 is certificate identification with x5t and c5t. Note that secp256k1 is
only defined for use with ECDSA and not for ECDH. only defined for use with ECDSA and not for ECDH. Note that some
COSE algorithms are marked as not recommended in the COSE IANA
registry.
7.4. Unprotected Data 8.4. Unprotected Data
The Initiator and the Responder must make sure that unprotected data The Initiator and the Responder must make sure that unprotected data
and metadata do not reveal any sensitive information. This also and metadata do not reveal any sensitive information. This also
applies for encrypted data sent to an unauthenticated party. In applies for encrypted data sent to an unauthenticated party. In
particular, it applies to EAD_1, ID_CRED_R, EAD_2, and error particular, it applies to EAD_1, ID_CRED_R, EAD_2, and error
messages. Using the same EAD_1 in several EDHOC sessions allows messages. Using the same EAD_1 in several EDHOC sessions allows
passive eavesdroppers to correlate the different sessions. Another passive eavesdroppers to correlate the different sessions. Another
consideration is that the list of supported cipher suites may consideration is that the list of supported cipher suites may
potentially be used to identify the application. potentially be used to identify the application.
The Initiator and the Responder must also make sure that The Initiator and the Responder must also make sure that
unauthenticated data does not trigger any harmful actions. In unauthenticated data does not trigger any harmful actions. In
particular, this applies to EAD_1 and error messages. particular, this applies to EAD_1 and error messages.
7.5. Denial-of-Service 8.5. Denial-of-Service
EDHOC itself does not provide countermeasures against Denial-of- EDHOC itself does not provide countermeasures against Denial-of-
Service attacks. By sending a number of new or replayed message_1 an Service attacks. By sending a number of new or replayed message_1 an
attacker may cause the Responder to allocate state, perform attacker may cause the Responder to allocate state, perform
cryptographic operations, and amplify messages. To mitigate such cryptographic operations, and amplify messages. To mitigate such
attacks, an implementation SHOULD rely on lower layer mechanisms such attacks, an implementation SHOULD rely on lower layer mechanisms such
as the Echo option in CoAP [I-D.ietf-core-echo-request-tag] that as the Echo option in CoAP [I-D.ietf-core-echo-request-tag] that
forces the initiator to demonstrate reachability at its apparent forces the initiator to demonstrate reachability at its apparent
network address. network address.
An attacker can also send faked message_2, message_3, message_4, or An attacker can also send faked message_2, message_3, message_4, or
error in an attempt to trick the receiving party to send an error error in an attempt to trick the receiving party to send an error
message and discontinue the session. EDHOC implementations MAY message and discontinue the session. EDHOC implementations MAY
evaluate if a received message is likely to have been forged by and evaluate if a received message is likely to have been forged by an
attacker and ignore it without sending an error message or attacker and ignore it without sending an error message or
discontinuing the session. discontinuing the session.
7.6. Implementation Considerations 8.6. Implementation Considerations
The availability of a secure random number generator is essential for The availability of a secure random number generator is essential for
the security of EDHOC. If no true random number generator is the security of EDHOC. If no true random number generator is
available, a truly random seed MUST be provided from an external available, a truly random seed MUST be provided from an external
source and used with a cryptographically secure pseudorandom number source and used with a cryptographically secure pseudorandom number
generator. As each pseudorandom number must only be used once, an generator. As each pseudorandom number must only be used once, an
implementation needs to get a new truly random seed after reboot, or implementation needs to get a new truly random seed after reboot, or
continuously store state in nonvolatile memory, see ([RFC8613], continuously store state in nonvolatile memory, see ([RFC8613],
Appendix B.1.1) for issues and solution approaches for writing to Appendix B.1.1) for issues and solution approaches for writing to
nonvolatile memory. Intentionally or unintentionally weak or nonvolatile memory. Intentionally or unintentionally weak or
skipping to change at page 47, line 18 skipping to change at page 47, line 39
All private keys, symmetric keys, and IVs MUST be secret. All private keys, symmetric keys, and IVs MUST be secret.
Implementations should provide countermeasures to side-channel Implementations should provide countermeasures to side-channel
attacks such as timing attacks. Intermediate computed values such as attacks such as timing attacks. Intermediate computed values such as
ephemeral ECDH keys and ECDH shared secrets MUST be deleted after key ephemeral ECDH keys and ECDH shared secrets MUST be deleted after key
derivation is completed. derivation is completed.
The Initiator and the Responder are responsible for verifying the The Initiator and the Responder are responsible for verifying the
integrity of certificates. The selection of trusted CAs should be integrity of certificates. The selection of trusted CAs should be
done very carefully and certificate revocation should be supported. done very carefully and certificate revocation should be supported.
The private authentication keys MUST be kept secret. The private authentication keys MUST be kept secret, only the
Responder SHALL have access to the Responder's private authentication
key and only the Initiator SHALL have access to the Initiator's
private authentication key.
The Initiator and the Responder are allowed to select the connection The Initiator and the Responder are allowed to select the connection
identifiers C_I and C_R, respectively, for the other party to use in identifiers C_I and C_R, respectively, for the other party to use in
the ongoing EDHOC protocol as well as in a subsequent application the ongoing EDHOC protocol as well as in a subsequent application
protocol (e.g., OSCORE [RFC8613]). The choice of connection protocol (e.g., OSCORE [RFC8613]). The choice of connection
identifier is not security critical in EDHOC but intended to simplify identifier is not security critical in EDHOC but intended to simplify
the retrieval of the right security context in combination with using the retrieval of the right security context in combination with using
short identifiers. If the wrong connection identifier of the other short identifiers. If the wrong connection identifier of the other
party is used in a protocol message it will result in the receiving party is used in a protocol message it will result in the receiving
party not being able to retrieve a security context (which will party not being able to retrieve a security context (which will
skipping to change at page 47, line 45 skipping to change at page 48, line 21
lexicographically smallest G_X. If the two G_X values are equal, the lexicographically smallest G_X. If the two G_X values are equal, the
received message_1 MUST be discarded to mitigate reflection attacks. received message_1 MUST be discarded to mitigate reflection attacks.
Note that in the case of two simultaneous EDHOC exchanges where the Note that in the case of two simultaneous EDHOC exchanges where the
nodes only complete one and where the nodes have different preferred nodes only complete one and where the nodes have different preferred
cipher suites, an attacker can affect which of the two nodes' cipher suites, an attacker can affect which of the two nodes'
preferred cipher suites will be used by blocking the other exchange. preferred cipher suites will be used by blocking the other exchange.
If supported by the device, it is RECOMMENDED that at least the long- If supported by the device, it is RECOMMENDED that at least the long-
term private keys are stored in a Trusted Execution Environment (TEE) term private keys are stored in a Trusted Execution Environment (TEE)
and that sensitive operations using these keys are performed inside and that sensitive operations using these keys are performed inside
the TEE. To achieve even higher security, it is RECOMMENDED that in the TEE. To achieve even higher security it is RECOMMENDED that
additional operations such as ephemeral key generation, all additional operations such as ephemeral key generation, all
computations of shared secrets, and storage of the pseudorandom keys computations of shared secrets, and storage of the PRK keys can be
(PRK) can be done inside the TEE. The use of a TEE enforces that done inside the TEE. The use of a TEE enforces that code within that
code within that environment cannot be tampered with, and that any environment cannot be tampered with, and that any data used by such
data used by such code cannot be read or tampered with by code code cannot be read or tampered with by code outside that
outside that environment. Note that non-EDHOC code inside the TEE environment.
might still be able to read EDHOC data and tamper with EDHOC code, to
protect against such attacks EDHOC needs to be in its own zone. To
provide better protection against some forms of physical attacks,
sensitive EDHOC data should be stored inside the SoC or encrypted and
integrity protected when sent on a data bus (e.g., between the CPU
and RAM or Flash). Secure boot can be used to increase the security
of code and data in the Rich Execution Environment (REE) by
validating the REE image.
8. IANA Considerations 9. IANA Considerations
8.1. EDHOC Exporter Label Registry 9.1. EDHOC Exporter Label Registry
IANA has created a new registry titled "EDHOC Exporter Label" under IANA has created a new registry titled "EDHOC Exporter Label" under
the new heading "EDHOC". The registration procedure is "Expert the new group name "Ephemeral Diffie-Hellman Over COSE (EDHOC)". The
Review". The columns of the registry are Label, Description, and registration procedure is "Expert Review". The columns of the
Reference. All columns are text strings. The initial contents of registry are Label, Description, and Reference. All columns are text
the registry are: strings where Label consists only of the printable ASCII characters
0x21 - 0x7e. Labels beginning with "PRIVATE" MAY be used for private
use without registration. All other label values MUST be registered.
The initial contents of the registry are:
Label: EDHOC_message_4_Key Label: EDHOC_K_4
Description: Key used to protect EDHOC message_4 Description: Key used to protect EDHOC message_4
Reference: [[this document]] Reference: [[this document]]
Label: EDHOC_message_4_Nonce Label: EDHOC_IV_4
Description: Nonce used to protect EDHOC message_4 Description: IV used to protect EDHOC message_4
Reference: [[this document]] Reference: [[this document]]
Label: OSCORE_Master_Secret
Label: OSCORE Master Secret
Description: Derived OSCORE Master Secret Description: Derived OSCORE Master Secret
Reference: [[this document]] Reference: [[this document]]
Label: OSCORE Master Salt Label: OSCORE_Master_Salt
Description: Derived OSCORE Master Salt Description: Derived OSCORE Master Salt
Reference: [[this document]] Reference: [[this document]]
8.2. EDHOC Cipher Suites Registry 9.2. EDHOC Cipher Suites Registry
IANA has created a new registry titled "EDHOC Cipher Suites" under IANA has created a new registry titled "EDHOC Cipher Suites" under
the new heading "EDHOC". The registration procedure is "Expert the new group name "Ephemeral Diffie-Hellman Over COSE (EDHOC)". The
Review". The columns of the registry are Value, Array, Description, registration procedure is "Expert Review". The columns of the
and Reference, where Value is an integer and the other columns are registry are Value, Array, Description, and Reference, where Value is
text strings. The initial contents of the registry are: an integer and the other columns are text strings. The initial
contents of the registry are:
Value: -24 Value: -24
Algorithms: N/A Algorithms: N/A
Desc: Reserved for Private Use Desc: Reserved for Private Use
Reference: [[this document]] Reference: [[this document]]
Value: -23 Value: -23
Algorithms: N/A Algorithms: N/A
Desc: Reserved for Private Use Desc: Reserved for Private Use
Reference: [[this document]] Reference: [[this document]]
Value: -22 Value: -22
Algorithms: N/A Algorithms: N/A
Desc: Reserved for Private Use Desc: Reserved for Private Use
Reference: [[this document]] Reference: [[this document]]
skipping to change at page 49, line 20 skipping to change at page 49, line 42
Algorithms: N/A Algorithms: N/A
Desc: Reserved for Private Use Desc: Reserved for Private Use
Reference: [[this document]] Reference: [[this document]]
Value: -21 Value: -21
Algorithms: N/A Algorithms: N/A
Desc: Reserved for Private Use Desc: Reserved for Private Use
Reference: [[this document]] Reference: [[this document]]
Value: 0 Value: 0
Array: 10, -16, 4, -8, 10, -16 Array: 10, -16, 8, 4, -8, 10, -16
Desc: AES-CCM-16-64-128, SHA-256, X25519, EdDSA, Desc: AES-CCM-16-64-128, SHA-256, 8, X25519, EdDSA,
AES-CCM-16-64-128, SHA-256 AES-CCM-16-64-128, SHA-256
Reference: [[this document]] Reference: [[this document]]
Value: 1 Value: 1
Array: 30, -16, 4, -8, 10, -16 Array: 30, -16, 16, 4, -8, 10, -16
Desc: AES-CCM-16-128-128, SHA-256, X25519, EdDSA, Desc: AES-CCM-16-128-128, SHA-256, 16, X25519, EdDSA,
AES-CCM-16-64-128, SHA-256 AES-CCM-16-64-128, SHA-256
Reference: [[this document]] Reference: [[this document]]
Value: 2 Value: 2
Array: 10, -16, 1, -7, 10, -16 Array: 10, -16, 8, 1, -7, 10, -16
Desc: AES-CCM-16-64-128, SHA-256, P-256, ES256, Desc: AES-CCM-16-64-128, SHA-256, 8, P-256, ES256,
AES-CCM-16-64-128, SHA-256 AES-CCM-16-64-128, SHA-256
Reference: [[this document]] Reference: [[this document]]
Value: 3 Value: 3
Array: 30, -16, 1, -7, 10, -16 Array: 30, -16, 16, 1, -7, 10, -16
Desc: AES-CCM-16-128-128, SHA-256, P-256, ES256, Desc: AES-CCM-16-128-128, SHA-256, 16, P-256, ES256,
AES-CCM-16-64-128, SHA-256 AES-CCM-16-64-128, SHA-256
Reference: [[this document]] Reference: [[this document]]
Value: 4 Value: 4
Array: 24, -16, 4, -8, 24, -16 Array: 24, -16, 16, 4, -8, 24, -16
Desc: ChaCha20/Poly1305, SHA-256, X25519, EdDSA, Desc: ChaCha20/Poly1305, SHA-256, 16, X25519, EdDSA,
ChaCha20/Poly1305, SHA-256 ChaCha20/Poly1305, SHA-256
Reference: [[this document]] Reference: [[this document]]
Value: 5 Value: 5
Array: 24, -16, 1, -7, 24, -16 Array: 24, -16, 16, 1, -7, 24, -16
Desc: ChaCha20/Poly1305, SHA-256, P-256, ES256, Desc: ChaCha20/Poly1305, SHA-256, 16, P-256, ES256,
ChaCha20/Poly1305, SHA-256 ChaCha20/Poly1305, SHA-256
Reference: [[this document]] Reference: [[this document]]
Value: 6 Value: 6
Array: 1, -16, 4, -7, 1, -16 Array: 1, -16, 16, 4, -7, 1, -16
Desc: A128GCM, SHA-256, X25519, ES256, Desc: A128GCM, SHA-256, 16, X25519, ES256,
A128GCM, SHA-256 A128GCM, SHA-256
Reference: [[this document]] Reference: [[this document]]
Value: 24 Value: 24
Array: 3, -43, 2, -35, 3, -43 Array: 3, -43, 16, 2, -35, 3, -43
Desc: A256GCM, SHA-384, P-384, ES384, Desc: A256GCM, SHA-384, 16, P-384, ES384,
A256GCM, SHA-384 A256GCM, SHA-384
Reference: [[this document]] Reference: [[this document]]
Value: 25 Value: 25
Array: 24, -45, 5, -8, 24, -45 Array: 24, -45, 16, 5, -8, 24, -45
Desc: ChaCha20/Poly1305, SHAKE256, X448, EdDSA, Desc: ChaCha20/Poly1305, SHAKE256, 16, X448, EdDSA,
ChaCha20/Poly1305, SHAKE256 ChaCha20/Poly1305, SHAKE256
Reference: [[this document]] Reference: [[this document]]
8.3. EDHOC Method Type Registry 9.3. EDHOC Method Type Registry
IANA has created a new registry entitled "EDHOC Method Type" under IANA has created a new registry entitled "EDHOC Method Type" under
the new heading "EDHOC". The registration procedure is "Expert the new group name "Ephemeral Diffie-Hellman Over COSE (EDHOC)". The
Review". The columns of the registry are Value, Description, and registration procedure is "Expert Review". The columns of the
Reference, where Value is an integer and the other columns are text registry are Value, Description, and Reference, where Value is an
strings. The initial contents of the registry are shown in Figure 4. integer and the other columns are text strings. The initial contents
of the registry are shown in Figure 4.
8.4. EDHOC Error Codes Registry 9.4. EDHOC Error Codes Registry
IANA has created a new registry entitled "EDHOC Error Codes" under IANA has created a new registry entitled "EDHOC Error Codes" under
the new heading "EDHOC". The registration procedure is the new group name "Ephemeral Diffie-Hellman Over COSE (EDHOC)". The
"Specification Required". The columns of the registry are ERR_CODE, registration procedure is "Expert Review". The columns of the
ERR_INFO Type and Description, where ERR_CODE is an integer, ERR_INFO registry are ERR_CODE, ERR_INFO Type and Description, where ERR_CODE
is a CDDL defined type, and Description is a text string. The is an integer, ERR_INFO is a CDDL defined type, and Description is a
initial contents of the registry are shown in Figure 6. text string. The initial contents of the registry are shown in
Figure 7.
8.5. EDHOC External Authorization Data Registry 9.5. EDHOC External Authorization Data Registry
IANA has created a new registry entitled "EDHOC External IANA has created a new registry entitled "EDHOC External
Authorization Data" under the new heading "EDHOC". The registration Authorization Data" under the new group name "Ephemeral Diffie-
procedure is "Expert Review". The columns of the registry are Value, Hellman Over COSE (EDHOC)". The registration procedure is "Expert
Description, and Reference, where Value is an integer and the other Review". The columns of the registry are Label, Description, Value
columns are text strings. Type, and Reference, where Label is an integer and the other columns
are text strings.
8.6. COSE Header Parameters Registry 9.6. COSE Header Parameters Registry
This document registers the following entries in the "COSE Header IANA has registered the following entries in the "COSE Header
Parameters" registry under the "CBOR Object Signing and Encryption Parameters" registry under the group name "CBOR Object Signing and
(COSE)" heading. The value of the 'cwt' header parameter is a COSE Encryption (COSE)". The value of the 'kcwt' header parameter is a
Web Token (CWT) [RFC8392] and the value of the 'uccs' header COSE Web Token (CWT) [RFC8392], and the value of the 'kccs' header
parameter is an Unprotected CWT Claims Set (UCCS), see Section 1.5. parameter is an CWT Claims Set (CCS), see Section 1.5. The CWT/CCS
must contain a COSE_Key in a 'cnf' claim [RFC8747]. The Value
Registry for this item is empty and omitted from the table below.
+-----------+-------+----------------+---------------------------+ +-----------+-------+----------------+---------------------------+
| Name | Label | Value Type | Description | | Name | Label | Value Type | Description |
+===========+=======+================+===========================+ +===========+=======+================+===========================+
| cwt | TBD1 | COSE_Messages | A CBOR Web Token (CWT) | | kcwt | TBD1 | COSE_Messages | A CBOR Web Token (CWT) |
| | | | containing a COSE_Key in |
| | | | a 'cnf' claim |
+-----------+-------+----------------+---------------------------+ +-----------+-------+----------------+---------------------------+
| uccs | TBD2 | map | An Unprotected CWT Claims | | kccs | TBD2 | map / #6(map) | A CWT Claims Set (CCS) |
| | | | Set (UCCS) | | | | | containing a COSE_Key in |
| | | | a 'cnf' claim |
+-----------+-------+----------------+---------------------------+ +-----------+-------+----------------+---------------------------+
8.7. COSE Header Parameters Registry 9.7. COSE Header Parameters Registry
IANA has extended the Value Type of the COSE Header Parameter 'kid' IANA has extended the Value Type of 'kid' in the "COSE Header
to also allow the Value Type int. The resulting Value Type is bstr / Parameters" registry under the group name "CBOR Object Signing and
int. The 'kid' parameter can be used to identify a key stored in a Encryption (COSE)" to also allow the Value Type int. The resulting
UCCS, in a CWT, or in a public key certificate. (The Value Registry Value Type is bstr / int. The Value Registry for this item is empty
for this item is empty and omitted from the table below.) and omitted from the table below.
+------+-------+------------+----------------+-------------------+ +------+-------+------------+----------------+-------------------+
| Name | Label | Value Type | Description | Reference | | Name | Label | Value Type | Description | Reference |
+------+-------+------------+----------------+-------------------+ +------+-------+------------+----------------+-------------------+
| kid | 4 | bstr / int | Key identifier | [RFC9052] | | kid | 4 | bstr / int | Key identifier | [RFC9052] |
| | | | | [[This document]] | | | | | | [[This document]] |
+------+-------+------------+----------------+-------------------+ +------+-------+------------+----------------+-------------------+
8.8. COSE Key Common Parameters Registry 9.8. COSE Key Common Parameters Registry
IANA has extended the Value Type of the COSE Key Common Parameter IANA has extended the Value Type of 'kid' in the "COSE Key Common
'kid' to the COSE Key Value Type int. The resulting Value Type is Parameters" registry under the group name "CBOR Object Signing and
bstr / int. (The Value Registry for this item is empty and omitted Encryption (COSE)" to also allow the Value Type int. The resulting
from the table below.) Value Type is bstr / int. The Value Registry for this item is empty
and omitted from the table below.
+------+-------+------------+----------------+-------------------+ +------+-------+------------+----------------+-------------------+
| Name | Label | Value Type | Description | Reference | | Name | Label | Value Type | Description | Reference |
+------+-------+------------+----------------+-------------------+ +------+-------+------------+----------------+-------------------+
| kid | 2 | bstr / int | Key identifi- | [RFC9052] | | kid | 2 | bstr / int | Key identifi- | [RFC9052] |
| | | | cation value - | [[This document]] | | | | | cation value - | [[This document]] |
| | | | match to kid | | | | | | match to kid | |
| | | | in message | | | | | | in message | |
+------+-------+------------+----------------+-------------------+ +------+-------+------------+----------------+-------------------+
8.9. CWT Confirmation Methods Registry 9.9. CWT Confirmation Methods Registry
IANA has extended the Value Type of the WT Confirmation Methods 'kid' IANA has extended the Value Type of 'kid' in the "CWT Confirmation
to the COSE Key Value Type int. The incorrect term binary string has Methods" registry under the group name "CBOR Web Token (CWT) Claims"
been corrected to bstr. The resulting Value Type is bstr / int. The to also allow the Value Type int. The incorrect term binary string
new updated content for the 'kid' method is shown in the list below. has been corrected to bstr. The resulting Value Type is bstr / int.
The new updated content for the 'kid' method is shown in the list
below.
* Confirmation Method Name: kid * Confirmation Method Name: kid
* Confirmation Method Description: Key Identifier * Confirmation Method Description: Key Identifier
* JWT Confirmation Method Name: kid * JWT Confirmation Method Name: kid
* Confirmation Key: 3 * Confirmation Key: 3
* Confirmation Value Type(s): bstr / int * Confirmation Value Type(s): bstr / int
* Change Controller: IESG * Change Controller: IESG
* Specification Document(s): Section 3.4 of RFC 8747 [[This * Specification Document(s): Section 3.4 of RFC 8747 [[This
document]] document]]
8.10. The Well-Known URI Registry 9.10. The Well-Known URI Registry
IANA has added the well-known URI "edhoc" to the Well-Known URIs IANA has added the well-known URI "edhoc" to the "Well-Known URIs"
registry. registry under the group name "Well-Known URIs".
* URI suffix: edhoc * URI suffix: edhoc
* Change controller: IETF * Change controller: IETF
* Specification document(s): [[this document]] * Specification document(s): [[this document]]
* Related information: None * Related information: None
8.11. Media Types Registry 9.11. Media Types Registry
IANA has added the media type "application/edhoc" to the Media Types IANA has added the media type "application/edhoc" to the "Media
registry. Types" registry.
* Type name: application * Type name: application
* Subtype name: edhoc * Subtype name: edhoc
* Required parameters: N/A * Required parameters: N/A
* Optional parameters: N/A * Optional parameters: N/A
* Encoding considerations: binary * Encoding considerations: binary
* Security considerations: See Section 7 of this document. * Security considerations: See Section 7 of this document.
* Interoperability considerations: N/A * Interoperability considerations: N/A
* Published specification: [[this document]] (this document) * Published specification: [[this document]] (this document)
* Applications that use this media type: To be identified * Applications that use this media type: To be identified
skipping to change at page 53, line 35 skipping to change at page 54, line 37
"Authors' Addresses" section. "Authors' Addresses" section.
* Intended usage: COMMON * Intended usage: COMMON
* Restrictions on usage: N/A * Restrictions on usage: N/A
* Author: See "Authors' Addresses" section. * Author: See "Authors' Addresses" section.
* Change Controller: IESG * Change Controller: IESG
8.12. CoAP Content-Formats Registry 9.12. CoAP Content-Formats Registry
IANA has added the media type "application/edhoc" to the CoAP IANA has added the media type "application/edhoc" to the "CoAP
Content-Formats registry. Content-Formats" registry under the group name "Constrained RESTful
Environments (CoRE) Parameters".
* Media Type: application/edhoc * Media Type: application/edhoc
* Encoding: * Encoding:
* ID: TBD42 * ID: TBD42
* Reference: [[this document]] * Reference: [[this document]]
8.13. Expert Review Instructions 9.13. Resource Type (rt=) Link Target Attribute Values Registry
IANA has added the resource type "core.edhoc" to the "Resource Type
(rt=) Link Target Attribute Values" registry under the group name
"Constrained RESTful Environments (CoRE) Parameters".
* Value: "core.edhoc"
* Description: EDHOC resource.
* Reference: [[this document]]
Client applications can use this resource type to discover a server's
resource for EDHOC, where to send a request for executing the EDHOC
protocol.
9.14. Expert Review Instructions
The IANA Registries established in this document is defined as The IANA Registries established in this document is defined as
"Expert Review". This section gives some general guidelines for what "Expert Review". This section gives some general guidelines for what
the experts should be looking for, but they are being designated as the experts should be looking for, but they are being designated as
experts for a reason so they should be given substantial latitude. experts for a reason so they should be given substantial latitude.
Expert reviewers should take into consideration the following points: Expert reviewers should take into consideration the following points:
* Clarity and correctness of registrations. Experts are expected to * Clarity and correctness of registrations. Experts are expected to
check the clarity of purpose and use of the requested entries. check the clarity of purpose and use of the requested entries.
skipping to change at page 54, line 33 skipping to change at page 55, line 49
* Experts should take into account the expected usage of fields when * Experts should take into account the expected usage of fields when
approving point assignment. The length of the encoded value approving point assignment. The length of the encoded value
should be weighed against how many code points of that length are should be weighed against how many code points of that length are
left, the size of device it will be used on, and the number of left, the size of device it will be used on, and the number of
code points left that encode to that size. code points left that encode to that size.
* Specifications are recommended. When specifications are not * Specifications are recommended. When specifications are not
provided, the description provided needs to have sufficient provided, the description provided needs to have sufficient
information to verify the points above. information to verify the points above.
9. References 10. References
9.1. Normative References 10.1. Normative References
[I-D.ietf-core-echo-request-tag] [I-D.ietf-core-echo-request-tag]
Amsüss, C., Mattsson, J. P., and G. Selander, "CoAP: Echo, Amsüss, C., Mattsson, J. P., and G. Selander, "CoAP: Echo,
Request-Tag, and Token Processing", Work in Progress, Request-Tag, and Token Processing", Work in Progress,
Internet-Draft, draft-ietf-core-echo-request-tag-13, 12 Internet-Draft, draft-ietf-core-echo-request-tag-13, 12
July 2021, <https://www.ietf.org/archive/id/draft-ietf- July 2021, <https://www.ietf.org/archive/id/draft-ietf-
core-echo-request-tag-13.txt>. core-echo-request-tag-13.txt>.
[I-D.ietf-cose-rfc8152bis-algs] [I-D.ietf-cose-rfc8152bis-algs]
Schaad, J., "CBOR Object Signing and Encryption (COSE): Schaad, J., "CBOR Object Signing and Encryption (COSE):
skipping to change at page 57, line 25 skipping to change at page 58, line 30
[RFC8747] Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. [RFC8747] Jones, M., Seitz, L., Selander, G., Erdtman, S., and H.
Tschofenig, "Proof-of-Possession Key Semantics for CBOR Tschofenig, "Proof-of-Possession Key Semantics for CBOR
Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March
2020, <https://www.rfc-editor.org/info/rfc8747>. 2020, <https://www.rfc-editor.org/info/rfc8747>.
[RFC8949] Bormann, C. and P. Hoffman, "Concise Binary Object [RFC8949] Bormann, C. and P. Hoffman, "Concise Binary Object
Representation (CBOR)", STD 94, RFC 8949, Representation (CBOR)", STD 94, RFC 8949,
DOI 10.17487/RFC8949, December 2020, DOI 10.17487/RFC8949, December 2020,
<https://www.rfc-editor.org/info/rfc8949>. <https://www.rfc-editor.org/info/rfc8949>.
9.2. Informative References 10.2. Informative References
[Bruni18] Bruni, A., Sahl Jørgensen, T., Grønbech Petersen, T., and [Bruni18] Bruni, A., Sahl Jørgensen, T., Grønbech Petersen, T., and
C. Schürmann, "Formal Verification of Ephemeral Diffie- C. Schürmann, "Formal Verification of Ephemeral Diffie-
Hellman Over COSE (EDHOC)", November 2018, Hellman Over COSE (EDHOC)", November 2018,
<https://www.springerprofessional.de/en/formal- <https://www.springerprofessional.de/en/formal-
verification-of-ephemeral-diffie-hellman-over-cose- verification-of-ephemeral-diffie-hellman-over-cose-
edhoc/16284348>. edhoc/16284348>.
[CborMe] Bormann, C., "CBOR Playground", May 2018, [CborMe] Bormann, C., "CBOR Playground", May 2018,
<http://cbor.me/>. <http://cbor.me/>.
skipping to change at page 58, line 35 skipping to change at page 59, line 35
lake-reqs-04.txt>. lake-reqs-04.txt>.
[I-D.ietf-lwig-security-protocol-comparison] [I-D.ietf-lwig-security-protocol-comparison]
Mattsson, J. P., Palombini, F., and M. Vucinic, Mattsson, J. P., Palombini, F., and M. Vucinic,
"Comparison of CoAP Security Protocols", Work in Progress, "Comparison of CoAP Security Protocols", Work in Progress,
Internet-Draft, draft-ietf-lwig-security-protocol- Internet-Draft, draft-ietf-lwig-security-protocol-
comparison-05, 2 November 2020, comparison-05, 2 November 2020,
<https://www.ietf.org/archive/id/draft-ietf-lwig-security- <https://www.ietf.org/archive/id/draft-ietf-lwig-security-
protocol-comparison-05.txt>. protocol-comparison-05.txt>.
[I-D.ietf-rats-uccs]
Birkholz, H., O'Donoghue, J., Cam-Winget, N., and C.
Bormann, "A CBOR Tag for Unprotected CWT Claims Sets",
Work in Progress, Internet-Draft, draft-ietf-rats-uccs-01,
12 July 2021, <https://www.ietf.org/archive/id/draft-ietf-
rats-uccs-01.txt>.
[I-D.ietf-tls-dtls13] [I-D.ietf-tls-dtls13]
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Rescorla, E., Tschofenig, H., and N. Modadugu, "The
Datagram Transport Layer Security (DTLS) Protocol Version Datagram Transport Layer Security (DTLS) Protocol Version
1.3", Work in Progress, Internet-Draft, draft-ietf-tls- 1.3", Work in Progress, Internet-Draft, draft-ietf-tls-
dtls13-43, 30 April 2021, <https://www.ietf.org/internet- dtls13-43, 30 April 2021, <https://www.ietf.org/internet-
drafts/draft-ietf-tls-dtls13-43.txt>. drafts/draft-ietf-tls-dtls13-43.txt>.
[I-D.mattsson-cfrg-det-sigs-with-noise] [I-D.mattsson-cfrg-det-sigs-with-noise]
Mattsson, J. P., Thormarker, E., and S. Ruohomaa, Mattsson, J. P., Thormarker, E., and S. Ruohomaa,
"Deterministic ECDSA and EdDSA Signatures with Additional "Deterministic ECDSA and EdDSA Signatures with Additional
skipping to change at page 59, line 16 skipping to change at page 60, line 9
sigs-with-noise-02.txt>. sigs-with-noise-02.txt>.
[I-D.selander-ace-ake-authz] [I-D.selander-ace-ake-authz]
Selander, G., Mattsson, J. P., Vucinic, M., Richardson, Selander, G., Mattsson, J. P., Vucinic, M., Richardson,
M., and A. Schellenbaum, "Lightweight Authorization for M., and A. Schellenbaum, "Lightweight Authorization for
Authenticated Key Exchange.", Work in Progress, Internet- Authenticated Key Exchange.", Work in Progress, Internet-
Draft, draft-selander-ace-ake-authz-03, 4 May 2021, Draft, draft-selander-ace-ake-authz-03, 4 May 2021,
<https://www.ietf.org/archive/id/draft-selander-ace-ake- <https://www.ietf.org/archive/id/draft-selander-ace-ake-
authz-03.txt>. authz-03.txt>.
[I-D.selander-lake-traces]
Selander, G. and J. P. Mattsson, "Traces of EDHOC", Work
in Progress, Internet-Draft, draft-selander-lake-traces-
00, 10 September 2021, <https://www.ietf.org/archive/id/
draft-selander-lake-traces-00.txt>.
[Norrman20] [Norrman20]
Norrman, K., Sundararajan, V., and A. Bruni, "Formal Norrman, K., Sundararajan, V., and A. Bruni, "Formal
Analysis of EDHOC Key Establishment for Constrained IoT Analysis of EDHOC Key Establishment for Constrained IoT
Devices", September 2020, Devices", September 2020,
<https://arxiv.org/abs/2007.11427>. <https://arxiv.org/abs/2007.11427>.
[RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for
Constrained-Node Networks", RFC 7228, Constrained-Node Networks", RFC 7228,
DOI 10.17487/RFC7228, May 2014, DOI 10.17487/RFC7228, May 2014,
<https://www.rfc-editor.org/info/rfc7228>. <https://www.rfc-editor.org/info/rfc7228>.
skipping to change at page 61, line 22 skipping to change at page 62, line 22
security context. security context.
After successful processing of EDHOC message_3, Client and Server After successful processing of EDHOC message_3, Client and Server
derive Security Context parameters for OSCORE as follows (see derive Security Context parameters for OSCORE as follows (see
Section 3.2 of [RFC8613]): Section 3.2 of [RFC8613]):
* The Master Secret and Master Salt are derived by using the EDHOC- * The Master Secret and Master Salt are derived by using the EDHOC-
Exporter interface, see Section 4.3. Exporter interface, see Section 4.3.
The EDHOC Exporter Labels for deriving the OSCORE Master Secret and The EDHOC Exporter Labels for deriving the OSCORE Master Secret and
the OSCORE Master Salt, are "OSCORE Master Secret" and "OSCORE Master the OSCORE Master Salt, are "OSCORE_Master_Secret" and
Salt", respectively. "OSCORE_Master_Salt", respectively.
The context parameter is h'' (0x40), the empty CBOR byte string. The context parameter is h'' (0x40), the empty CBOR byte string.
By default, key_length is the key length (in bytes) of the By default, key_length is the key length (in bytes) of the
application AEAD Algorithm of the selected cipher suite for the EDHOC application AEAD Algorithm of the selected cipher suite for the EDHOC
session. Also by default, salt_length has value 8. The Initiator session. Also by default, salt_length has value 8. The Initiator
and Responder MAY agree out-of-band on a longer key_length than the and Responder MAY agree out-of-band on a longer key_length than the
default and on a different salt_length. default and on a different salt_length.
Master Secret = EDHOC-Exporter("OSCORE Master Secret", h'', key_length) Master Secret = EDHOC-Exporter("OSCORE_Master_Secret", h'', key_length)
Master Salt = EDHOC-Exporter("OSCORE Master Salt", h'', salt_length) Master Salt = EDHOC-Exporter("OSCORE_Master_Salt", h'', salt_length)
* The AEAD Algorithm is the application AEAD algorithm of the * The AEAD Algorithm is the application AEAD algorithm of the
selected cipher suite for the EDHOC session. selected cipher suite for the EDHOC session.
* The HKDF Algorithm is the one based on the application hash * The HKDF Algorithm is the one based on the application hash
algorithm of the selected cipher suite for the EDHOC session. For algorithm of the selected cipher suite for the EDHOC session. For
example, if SHA-256 is the application hash algorithm of the example, if SHA-256 is the application hash algorithm of the
selected cipher suite, HKDF SHA-256 is used as HKDF Algorithm in selected cipher suite, HKDF SHA-256 is used as HKDF Algorithm in
the OSCORE Security Context. the OSCORE Security Context.
skipping to change at page 62, line 15 skipping to change at page 63, line 15
Client and Server use the parameters above to establish an OSCORE Client and Server use the parameters above to establish an OSCORE
Security Context, as per Section 3.2.1 of [RFC8613]. Security Context, as per Section 3.2.1 of [RFC8613].
From then on, Client and Server retrieve the OSCORE protocol state From then on, Client and Server retrieve the OSCORE protocol state
using the Recipient ID, and optionally other transport information using the Recipient ID, and optionally other transport information
such as the 5-tuple. such as the 5-tuple.
A.3. Transferring EDHOC over CoAP A.3. Transferring EDHOC over CoAP
This section specifies one instance for how EDHOC can be transferred This section specifies one instance for how EDHOC can be transferred
as an exchange of CoAP [RFC7252] messages. CoAP is a reliable as an exchange of CoAP [RFC7252] messages. CoAP provides a reliable
transport that can preserve packet ordering and handle message transport that can preserve packet ordering and handle message
duplication. CoAP can also perform fragmentation and protect against duplication. CoAP can also perform fragmentation and protect against
denial-of-service attacks. According to this specification, EDHOC denial-of-service attacks. The underlying CoAP transport should be
messages are carried in Confirmable messages, which is beneficial used in reliable mode, in particular when fragmentation is used, to
especially if fragmentation is used. avoid, e.g., situations with hanging endpoints waiting for each
other.
By default, the CoAP client is the Initiator and the CoAP server is By default, the CoAP client is the Initiator and the CoAP server is
the Responder, but the roles SHOULD be chosen to protect the most the Responder, but the roles SHOULD be chosen to protect the most
sensitive identity, see Section 7. According to this specification, sensitive identity, see Section 8. According to this specification,
EDHOC is transferred in POST requests and 2.04 (Changed) responses to EDHOC is transferred in POST requests and 2.04 (Changed) responses to
the Uri-Path: "/.well-known/edhoc". An application may define its the Uri-Path: "/.well-known/edhoc". An application may define its
own path that can be discovered, e.g., using resource directory own path that can be discovered, e.g., using resource directory
[I-D.ietf-core-resource-directory]. [I-D.ietf-core-resource-directory].
By default, the message flow is as follows: EDHOC message_1 is sent By default, the message flow is as follows: EDHOC message_1 is sent
in the payload of a POST request from the client to the server's in the payload of a POST request from the client to the server's
resource for EDHOC. EDHOC message_2 or the EDHOC error message is resource for EDHOC. EDHOC message_2 or the EDHOC error message is
sent from the server to the client in the payload of a 2.04 (Changed) sent from the server to the client in the payload of a 2.04 (Changed)
response. EDHOC message_3 or the EDHOC error message is sent from response. EDHOC message_3 or the EDHOC error message is sent from
skipping to change at page 63, line 13 skipping to change at page 64, line 13
the server has not selected C_R yet). the server has not selected C_R yet).
These identifiers are encoded in CBOR and thus self-delimiting. They These identifiers are encoded in CBOR and thus self-delimiting. They
are sent in front of the actual EDHOC message, and only the part of are sent in front of the actual EDHOC message, and only the part of
the body following the identifier is used for EDHOC processing. the body following the identifier is used for EDHOC processing.
Consequently, the application/edhoc media type does not apply to Consequently, the application/edhoc media type does not apply to
these messages; their media type is unnamed. these messages; their media type is unnamed.
An example of a successful EDHOC exchange using CoAP is shown in An example of a successful EDHOC exchange using CoAP is shown in
Figure 9. In this case the CoAP Token enables correlation on the Figure 10. In this case the CoAP Token enables correlation on the
Initiator side, and the prepended C_R enables correlation on the Initiator side, and the prepended C_R enables correlation on the
Responder (server) side. Responder (server) side.
Client Server Client Server
| | | |
+--------->| Header: POST (Code=0.02) +--------->| Header: POST (Code=0.02)
| POST | Uri-Path: "/.well-known/edhoc" | POST | Uri-Path: "/.well-known/edhoc"
| | Payload: true, EDHOC message_1 | | Payload: true, EDHOC message_1
| | | |
|<---------+ Header: 2.04 Changed |<---------+ Header: 2.04 Changed
skipping to change at page 63, line 35 skipping to change at page 64, line 35
| | Payload: EDHOC message_2 | | Payload: EDHOC message_2
| | | |
+--------->| Header: POST (Code=0.02) +--------->| Header: POST (Code=0.02)
| POST | Uri-Path: "/.well-known/edhoc" | POST | Uri-Path: "/.well-known/edhoc"
| | Payload: C_R, EDHOC message_3 | | Payload: C_R, EDHOC message_3
| | | |
|<---------+ Header: 2.04 Changed |<---------+ Header: 2.04 Changed
| 2.04 | | 2.04 |
| | | |
Figure 9: Transferring EDHOC in CoAP when the Initiator is CoAP Figure 10: Transferring EDHOC in CoAP when the Initiator is CoAP
Client Client
The exchange in Figure 9 protects the client identity against active The exchange in Figure 10 protects the client identity against active
attackers and the server identity against passive attackers. attackers and the server identity against passive attackers.
An alternative exchange that protects the server identity against An alternative exchange that protects the server identity against
active attackers and the client identity against passive attackers is active attackers and the client identity against passive attackers is
shown in Figure 10. In this case the CoAP Token enables the shown in Figure 11. In this case the CoAP Token enables the
Responder to correlate message_2 and message_3, and the prepended C_I Responder to correlate message_2 and message_3, and the prepended C_I
enables correlation on the Initiator (server) side. If EDHOC enables correlation on the Initiator (server) side. If EDHOC
message_4 is used, C_I is prepended, and it is transported with CoAP message_4 is used, C_I is prepended, and it is transported with CoAP
in the payload of a POST request with a 2.04 (Changed) response. in the payload of a POST request with a 2.04 (Changed) response.
Client Server Client Server
| | | |
+--------->| Header: POST (Code=0.02) +--------->| Header: POST (Code=0.02)
| POST | Uri-Path: "/.well-known/edhoc" | POST | Uri-Path: "/.well-known/edhoc"
| | | |
skipping to change at page 64, line 23 skipping to change at page 65, line 23
| | | |
+--------->| Header: POST (Code=0.02) +--------->| Header: POST (Code=0.02)
| POST | Uri-Path: "/.well-known/edhoc" | POST | Uri-Path: "/.well-known/edhoc"
| | Payload: C_I, EDHOC message_2 | | Payload: C_I, EDHOC message_2
| | | |
|<---------+ Header: 2.04 Changed |<---------+ Header: 2.04 Changed
| 2.04 | Content-Format: application/edhoc | 2.04 | Content-Format: application/edhoc
| | Payload: EDHOC message_3 | | Payload: EDHOC message_3
| | | |
Figure 10: Transferring EDHOC in CoAP when the Initiator is CoAP Figure 11: Transferring EDHOC in CoAP when the Initiator is CoAP
Server Server
To protect against denial-of-service attacks, the CoAP server MAY To protect against denial-of-service attacks, the CoAP server MAY
respond to the first POST request with a 4.01 (Unauthorized) respond to the first POST request with a 4.01 (Unauthorized)
containing an Echo option [I-D.ietf-core-echo-request-tag]. This containing an Echo option [I-D.ietf-core-echo-request-tag]. This
forces the initiator to demonstrate its reachability at its apparent forces the initiator to demonstrate its reachability at its apparent
network address. If message fragmentation is needed, the EDHOC network address. If message fragmentation is needed, the EDHOC
messages may be fragmented using the CoAP Block-Wise Transfer messages may be fragmented using the CoAP Block-Wise Transfer
mechanism [RFC7959]. mechanism [RFC7959].
skipping to change at page 66, line 26 skipping to change at page 67, line 26
CBOR data items are encoded to or decoded from byte strings using a CBOR data items are encoded to or decoded from byte strings using a
type-length-value encoding scheme, where the three highest order bits type-length-value encoding scheme, where the three highest order bits
of the initial byte contain information about the major type. CBOR of the initial byte contain information about the major type. CBOR
supports several different types of data items, in addition to supports several different types of data items, in addition to
integers (int, uint), simple values, byte strings (bstr), and text integers (int, uint), simple values, byte strings (bstr), and text
strings (tstr), CBOR also supports arrays [] of data items, maps {} strings (tstr), CBOR also supports arrays [] of data items, maps {}
of pairs of data items, and sequences [RFC8742] of data items. Some of pairs of data items, and sequences [RFC8742] of data items. Some
examples are given below. examples are given below.
The EDHOC specification sometimes use CDDL names in CBOR dignostic
notation as in e.g., << ID_CRED_R, ? EAD_2 >>. This means that EAD_2
is optional and that ID_CRED_R and EAD_2 should be substituted with
their values before evaluation. I.e., if ID_CRED_R = { 4 : h'' } and
EAD_2 is omitted then << ID_CRED_R, ? EAD_2 >> = << { 4 : h'' } >>,
which encodes to 0x43a10440.
For a complete specification and more examples, see [RFC8949] and For a complete specification and more examples, see [RFC8949] and
[RFC8610]. We recommend implementors to get used to CBOR by using [RFC8610]. We recommend implementors to get used to CBOR by using
the CBOR playground [CborMe]. the CBOR playground [CborMe].
Diagnostic Encoded Type Diagnostic Encoded Type
------------------------------------------------------------------ ------------------------------------------------------------------
1 0x01 unsigned integer 1 0x01 unsigned integer
24 0x1818 unsigned integer 24 0x1818 unsigned integer
-24 0x37 negative integer -24 0x37 negative integer
-25 0x3818 negative integer -25 0x3818 negative integer
true 0xf5 simple value true 0xf5 simple value
h'' 0x40 byte string
h'12cd' 0x4212cd byte string h'12cd' 0x4212cd byte string
'12cd' 0x4431326364 byte string '12cd' 0x4431326364 byte string
"12cd" 0x6431326364 text string "12cd" 0x6431326364 text string
{ 4 : h'cd' } 0xa10441cd map { 4 : h'cd' } 0xa10441cd map
<< 1, 2, true >> 0x430102f5 byte string << 1, 2, true >> 0x430102f5 byte string
[ 1, 2, true ] 0x830102f5 array [ 1, 2, true ] 0x830102f5 array
( 1, 2, true ) 0x0102f5 sequence ( 1, 2, true ) 0x0102f5 sequence
1, 2, true 0x0102f5 sequence 1, 2, true 0x0102f5 sequence
------------------------------------------------------------------ ------------------------------------------------------------------
C.2. CDDL Definitions C.2. CDDL Definitions
This sections compiles the CDDL definitions for ease of reference. This sections compiles the CDDL definitions for ease of reference.
suite = int suites = [ 2* int ] / int
suites = [ 2* suite ] / suite
ead = 1* ( ead = 1* (
type : int, ead_label : int,
ext_authz_data : any, ead_value : any,
) )
message_1 = ( message_1 = (
METHOD : int, METHOD : int,
SUITES_I : suites, SUITES_I : suites,
G_X : bstr, G_X : bstr,
C_I : bstr / int, C_I : bstr / int,
? EAD_1 : ead, ? EAD_1 : ead,
) )
skipping to change at page 67, line 41 skipping to change at page 69, line 39
message_4 = ( message_4 = (
CIPHERTEXT_4 : bstr, CIPHERTEXT_4 : bstr,
) )
error = ( error = (
ERR_CODE : int, ERR_CODE : int,
ERR_INFO : any, ERR_INFO : any,
) )
info = ( info = (
edhoc_aead_id : int / tstr, transcript_hash : bstr,
transcript_hash : bstr, label : tstr,
label : tstr, context : bstr,
context : bstr, length : uint,
length : uint,
) )
C.3. COSE C.3. COSE
CBOR Object Signing and Encryption (COSE) CBOR Object Signing and Encryption (COSE)
[I-D.ietf-cose-rfc8152bis-struct] describes how to create and process [I-D.ietf-cose-rfc8152bis-struct] describes how to create and process
signatures, message authentication codes, and encryption using CBOR. signatures, message authentication codes, and encryption using CBOR.
COSE builds on JOSE, but is adapted to allow more efficient COSE builds on JOSE, but is adapted to allow more efficient
processing in constrained devices. EDHOC makes use of COSE_Key, processing in constrained devices. EDHOC makes use of COSE_Key,
COSE_Encrypt0, and COSE_Sign1 objects in the message processing: COSE_Encrypt0, and COSE_Sign1 objects in the message processing:
skipping to change at page 68, line 34 skipping to change at page 70, line 25
of protected headers and externally supplied data (external_aad). of protected headers and externally supplied data (external_aad).
* Signatures in message_2 of method 0 and 2, and in message_3 of * Signatures in message_2 of method 0 and 2, and in message_3 of
method 0 and 1, consist of a subset of the single signer data method 0 and 1, consist of a subset of the single signer data
object COSE_Sign1, which is described in Sections 4.2-4.4 of object COSE_Sign1, which is described in Sections 4.2-4.4 of
[I-D.ietf-cose-rfc8152bis-struct]. The signature is computed over [I-D.ietf-cose-rfc8152bis-struct]. The signature is computed over
a Sig_structure containing payload, protected headers and a Sig_structure containing payload, protected headers and
externally supplied data (external_aad) using a private signature externally supplied data (external_aad) using a private signature
key and verified using the corresponding public signature key. key and verified using the corresponding public signature key.
Appendix D. Test Vectors Different header parameters to identify X.509 or C509 certificates by
reference are defined in [I-D.ietf-cose-x509] and
[I-D.ietf-cose-cbor-encoded-cert]:
TBD * by a hash value with the 'x5t' or 'c5t' parameters, respectively:
Appendix E. Applicability Template - ID_CRED_x = { 34 : COSE_CertHash }, for x = I or R,
- ID_CRED_x = { TBD3 : COSE_CertHash }, for x = I or R;
* or by a URI with the 'x5u' or 'c5u' parameters, respectively:
- ID_CRED_x = { 35 : uri }, for x = I or R,
- ID_CRED_x = { TBD4 : uri }, for x = I or R.
When ID_CRED_x does not contain the actual credential, it may be very
short, e.g., if the endpoints have agreed to use a key identifier
parameter 'kid':
* ID_CRED_x = { 4 : key_id_x }, where key_id_x : kid, for x = I or
R.
Note that a COSE header map can contain several header parameters,
for example { x5u, x5t } or { kid, kid_context }.
ID_CRED_x MAY also identify the authentication credential by value.
For example, a certificate chain can be transported in ID_CRED_x with
COSE header parameter c5c or x5chain, defined in
[I-D.ietf-cose-cbor-encoded-cert] and [I-D.ietf-cose-x509] and
credentials of type CWT and CCS can be transported with the COSE
header parameters registered in Section 9.6.
Appendix D. Applicability Template
This appendix contains a rudimentary example of an applicability This appendix contains a rudimentary example of an applicability
statement, see Section 3.9. statement, see Section 3.9.
For use of EDHOC in the XX protocol, the following assumptions are For use of EDHOC in the XX protocol, the following assumptions are
made: made:
1. Transfer in CoAP as specified in Appendix A.3 with requests 1. Transfer in CoAP as specified in Appendix A.3 with requests
expected by the CoAP server (= Responder) at /app1-edh, no expected by the CoAP server (= Responder) at /app1-edh, no
Content-Format needed. Content-Format needed.
skipping to change at page 69, line 4 skipping to change at page 71, line 25
statement, see Section 3.9. statement, see Section 3.9.
For use of EDHOC in the XX protocol, the following assumptions are For use of EDHOC in the XX protocol, the following assumptions are
made: made:
1. Transfer in CoAP as specified in Appendix A.3 with requests 1. Transfer in CoAP as specified in Appendix A.3 with requests
expected by the CoAP server (= Responder) at /app1-edh, no expected by the CoAP server (= Responder) at /app1-edh, no
Content-Format needed. Content-Format needed.
2. METHOD = 1 (I uses signature key, R uses static DH key.) 2. METHOD = 1 (I uses signature key, R uses static DH key.)
3. CRED_I is an IEEE 802.1AR IDevID encoded as a C509 certificate of 3. CRED_I is an IEEE 802.1AR IDevID encoded as a C509 certificate of
type 0 [I-D.ietf-cose-cbor-encoded-cert]. type 0 [I-D.ietf-cose-cbor-encoded-cert].
* R acquires CRED_I out-of-band, indicated in EAD_1. * R acquires CRED_I out-of-band, indicated in EAD_1.
* ID_CRED_I = {4: h''} is a 'kid' with value empty byte string. * ID_CRED_I = {4: h''} is a 'kid' with value empty CBOR byte
string.
4. CRED_R is a UCCS of type OKP as specified in Section 3.5.2. 4. CRED_R is a CCS of type OKP as specified in Section 3.5.3.
* The CBOR map has parameters 1 (kty), -1 (crv), and -2 * The CBOR map has parameters 1 (kty), -1 (crv), and -2
(x-coordinate). (x-coordinate).
* ID_CRED_R = CRED_R * ID_CRED_R is {TBD2 : CCS}. Editor's note: TBD2 is the COSE
header parameter value of 'kccs', see Section 9.6
5. External authorization data is defined and processed as specified 5. External authorization data is defined and processed as specified
in [I-D.selander-ace-ake-authz]. in [I-D.selander-ace-ake-authz].
6. EUI-64 used as identity of endpoint. 6. EUI-64 used as identity of endpoint.
7. No use of message_4: the application sends protected messages 7. No use of message_4: the application sends protected messages
from R to I. from R to I.
Appendix F. EDHOC Message Deduplication Appendix E. EDHOC Message Deduplication
EDHOC by default assumes that message duplication is handled by the EDHOC by default assumes that message duplication is handled by the
transport, in this section exemplified with CoAP. transport, in this section exemplified with CoAP.
Deduplication of CoAP messages is described in Section 4.5 of Deduplication of CoAP messages is described in Section 4.5 of
[RFC7252]. This handles the case when the same Confirmable (CON) [RFC7252]. This handles the case when the same Confirmable (CON)
message is received multiple times due to missing acknowledgement on message is received multiple times due to missing acknowledgement on
CoAP messaging layer. The recommended processing in [RFC7252] is CoAP messaging layer. The recommended processing in [RFC7252] is
that the duplicate message is acknowledged (ACK), but the received that the duplicate message is acknowledged (ACK), but the received
message is only processed once by the CoAP stack. message is only processed once by the CoAP stack.
skipping to change at page 70, line 31 skipping to change at page 73, line 5
Note that the requirements in Section 5.1 still apply because Note that the requirements in Section 5.1 still apply because
duplicate messages are not processed by the EDHOC state machine: duplicate messages are not processed by the EDHOC state machine:
* EDHOC messages SHALL be processed according to the current * EDHOC messages SHALL be processed according to the current
protocol state. protocol state.
* Different instances of the same message MUST NOT be processed in * Different instances of the same message MUST NOT be processed in
one session. one session.
Appendix G. Transports Not Natively Providing Correlation Appendix F. Transports Not Natively Providing Correlation
Protocols that do not natively provide full correlation between a Protocols that do not natively provide full correlation between a
series of messages can send the C_I and C_R identifiers along as series of messages can send the C_I and C_R identifiers along as
needed. needed.
The transport over CoAP (Appendix A.3) can serve as a blueprint for The transport over CoAP (Appendix A.3) can serve as a blueprint for
other server-client protocols: The client prepends the C_x which the other server-client protocols: The client prepends the C_x which the
server selected (or, for message 1, the CBOR simple value 'true' server selected (or, for message 1, the CBOR simple value 'true'
which is not a valid C_x) to any request message it sends. The which is not a valid C_x) to any request message it sends. The
server does not send any such indicator, as responses are matched to server does not send any such indicator, as responses are matched to
request by the client-server protocol design. request by the client-server protocol design.
Protocols that do not provide any correlation at all can prescribe Protocols that do not provide any correlation at all can prescribe
prepending of the peer's chosen C_x to all messages. prepending of the peer's chosen C_x to all messages.
Appendix H. Change Log Appendix G. Change Log
RFC Editor: Please remove this appendix. RFC Editor: Please remove this appendix.
* From -10 to -11:
- Restructured section on authentication parameters
- Changed UCCS to CCS
- Changed names and description of COSE header parameters for
CWT/CCS
- Changed several of the KDF and Exporter labels
- Removed edhoc_aead_id from info (already in transcript_hash)
- Added MTI section
- EAD: changed CDDL names and added value type to registry
- Updated Figures 1, 2, and 3
- Some correction and clarifications
- Added core.edhoc to CoRE Resource Type registry
* From -09 to -10: * From -09 to -10:
- SUITES_I simplified to only contain the selected and more - SUITES_I simplified to only contain the selected and more
preferred suites preferred suites
- Info is a CBOR sequence and context is a bstr - Info is a CBOR sequence and context is a bstr
- Added kid to UCCS example - Added kid to UCCS example
- Separate header parameters for CWT and UCCS - Separate header parameters for CWT and UCCS
skipping to change at page 73, line 4 skipping to change at page 75, line 50
- Changed normative language for failure from MUST to SHOULD send - Changed normative language for failure from MUST to SHOULD send
error error
- Made error codes non-negative and 0 for success - Made error codes non-negative and 0 for success
- Added detail on success error code - Added detail on success error code
- Aligned terminology "protocol instance" -> "session" - Aligned terminology "protocol instance" -> "session"
- New appendix on compact EC point representation - New appendix on compact EC point representation
- Added detail on use of ephemeral public keys
- Added detail on use of ephemeral public keys
- Moved key derivation for OSCORE to draft-ietf-core-oscore-edhoc - Moved key derivation for OSCORE to draft-ietf-core-oscore-edhoc
- Additional security considerations - Additional security considerations
- Renamed "Auxililary Data" as "External Authorization Data" - Renamed "Auxililary Data" as "External Authorization Data"
- Added encrypted EAD_4 to message_4 - Added encrypted EAD_4 to message_4
* From -05 to -06: * From -05 to -06:
skipping to change at page 75, line 4 skipping to change at page 77, line 50
* From -01 to -02: * From -01 to -02:
- New section 1.2 Use of EDHOC - New section 1.2 Use of EDHOC
- Clarification of identities - Clarification of identities
- New section 4.3 clarifying bstr_identifier - New section 4.3 clarifying bstr_identifier
- Updated security considerations - Updated security considerations
- Updated text on cipher suite negotiation and key confirmation
- Test vector for static DH - Updated text on cipher suite negotiation and key confirmation
- Test vector for static DH o
* From -00 to -01: * From -00 to -01:
- Removed PSK method - Removed PSK method
- Removed references to certificate by value - Removed references to certificate by value
Acknowledgments Acknowledgments
The authors want to thank Christian Amsuess, Alessandro Bruni, The authors want to thank Christian Amsuess, Alessandro Bruni,
Karthikeyan Bhargavan, Timothy Claeys, Martin Disch, Theis Groenbech Karthikeyan Bhargavan, Timothy Claeys, Martin Disch, Loic Ferreira,
Petersen, Dan Harkins, Klaus Hartke, Russ Housley, Stefan Hristozov, Theis Groenbech Petersen, Dan Harkins, Klaus Hartke, Russ Housley,
Alexandros Krontiris, Ilari Liusvaara, Karl Norrman, Salvador Perez, Stefan Hristozov, Alexandros Krontiris, Ilari Liusvaara, Karl
Eric Rescorla, Michael Richardson, Thorvald Sahl Joergensen, Jim Norrman, Salvador Perez, Eric Rescorla, Michael Richardson, Thorvald
Schaad, Carsten Schuermann, Ludwig Seitz, Stanislav Smyshlyaev, Sahl Joergensen, Jim Schaad, Carsten Schuermann, Ludwig Seitz,
Valery Smyslov, Peter van der Stok, Rene Struik, Vaishnavi Stanislav Smyshlyaev, Valery Smyslov, Peter van der Stok, Rene
Sundararajan, Erik Thormarker, Marco Tiloca, Michel Veillette, and Struik, Vaishnavi Sundararajan, Erik Thormarker, Marco Tiloca, Michel
Malisa Vucinic for reviewing and commenting on intermediate versions Veillette, and Malisa Vucinic for reviewing and commenting on
of the draft. We are especially indebted to Jim Schaad for his intermediate versions of the draft. We are especially indebted to
continuous reviewing and implementation of different versions of the Jim Schaad for his continuous reviewing and implementation of
draft. different versions of the draft.
Work on this document has in part been supported by the H2020 project Work on this document has in part been supported by the H2020 project
SIFIS-Home (grant agreement 952652). SIFIS-Home (grant agreement 952652).
Authors' Addresses Authors' Addresses
Göran Selander Göran Selander
Ericsson AB Ericsson AB
SE-164 80 Stockholm SE-164 80 Stockholm
Sweden Sweden
 End of changes. 225 change blocks. 
630 lines changed or deleted 743 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/