idnits 2.17.1 draft-rescorla-tls-dtls-connection-id-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack a Security Considerations section. -- The draft header indicates that this document obsoletes RFC6347, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 12, 2017) is 2389 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 392 == Outdated reference: A later version (-43) exists of draft-ietf-tls-dtls13-01 ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) Summary: 3 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TLS E. Rescorla, Ed. 3 Internet-Draft RTFM, Inc. 4 Obsoletes: 6347 (if approved) H. Tschofenig, Ed. 5 Intended status: Standards Track ARM Limited 6 Expires: April 15, 2018 October 12, 2017 8 The Datagram Transport Layer Security (DTLS) Connection Identifier 9 draft-rescorla-tls-dtls-connection-id-00 11 Abstract 13 This document specifies the "Connection ID" concept for the Datagram 14 Transport Layer Security (DTLS) protocol, version 1.2 and version 15 1.3. 17 A Connection ID is an identifier carried in the record layer header 18 that gives the recipient additional information for selecting the 19 appropriate security association. In "classical" DTLS, selecting a 20 security association of an incoming DTLS record is accomplished with 21 the help of the 5-tuple. If the source IP address and/or source port 22 changes during the lifetime of an ongoing DTLS session then the 23 receiver will be unable to locate the correct security context. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on April 15, 2018. 42 Copyright Notice 44 Copyright (c) 2017 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 This document may contain material from IETF Documents or IETF 58 Contributions published or made publicly available before November 59 10, 2008. The person(s) controlling the copyright in some of this 60 material may not have granted the IETF Trust the right to allow 61 modifications of such material outside the IETF Standards Process. 62 Without obtaining an adequate license from the person(s) controlling 63 the copyright in such materials, this document may not be modified 64 outside the IETF Standards Process, and derivative works of it may 65 not be created outside the IETF Standards Process, except to format 66 it for publication as an RFC or to translate it into languages other 67 than English. 69 Table of Contents 71 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 72 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 73 3. The "connection_id" Extension . . . . . . . . . . . . . . . . 3 74 4. Post-Handshake Messages . . . . . . . . . . . . . . . . . . . 4 75 5. Record Layer Extensions . . . . . . . . . . . . . . . . . . . 5 76 6. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 77 7. Security and Privacy Considerations . . . . . . . . . . . . . 7 78 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 79 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 80 9.1. Normative References . . . . . . . . . . . . . . . . . . 8 81 9.2. Informative References . . . . . . . . . . . . . . . . . 9 82 Appendix A. History . . . . . . . . . . . . . . . . . . . . . . 10 83 Appendix B. Working Group Information . . . . . . . . . . . . . 10 84 Appendix C. Contributors . . . . . . . . . . . . . . . . . . . . 10 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 87 1. Introduction 89 The Datagram Transport Layer Security (DTLS) protocol was designed 90 for securing connection-less transports, like UDP. DTLS, like TLS, 91 starts with a handshake, which can be computationally demanding 92 (particularly when public key cryptography is used). After a 93 successful handshake, symmetric key cryptography is used to apply 94 data origin authentication, integrity and confidentiality protection. 95 This two-step approach allows to amortize the cost of the initial 96 handshake to subsequent application data protection. Ideally, the 97 second phase where application data is protected lasts over a longer 98 period of time since the established keys will only need to be 99 updated once the key lifetime expires. 101 In the current version of DTLS, the IP address and port of the peer 102 is used to identify the DTLS association. Unfortunately, in some 103 cases, such as NAT rebinding, these values are insufficient. This is 104 a particular issue in the Internet of Things when the device needs to 105 enter extended sleep periods to increase the battery lifetime and is 106 therefore subject to rebinding. This leads to connection failure, 107 with the resulting cost of a new handshake. 109 This document defines an extension to DTLS to add a connection ID to 110 each DTLS record. The presence of the connection ID is negotiated 111 via a DTLS extension. It also defines a DTLS 1.3 post-handshake 112 message to change connection ids. 114 2. Conventions and Terminology 116 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 117 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 118 "OPTIONAL" in this document are to be interpreted as described in RFC 119 2119 [RFC2119]. 121 The reader is assumed to be familiar with the DTLS specifications 122 since this document defines an extension to DTLS 1.2 and DTLS 1.3. 124 3. The "connection_id" Extension 126 This document defines a new extension type (connection_id(TBD)), 127 which is used in ClientHello and ServerHello messages. 129 The extension type is specified as follows. 131 enum { 132 connection_id(TBD), (65535) 133 } ExtensionType; 135 The extension_data field of this extension, when included in the 136 ClientHello, MUST contain the CID structure, which contains the CID 137 which the client wishes the server to use when sending messages 138 towards it. A zero-length value indicates that the client is 139 prepared to send with a connection ID but does not wish the server to 140 use one when sending (alternately, this can be interpreted as the 141 client wishes the server to use a zero-length CID; the result is the 142 same). 144 struct { 145 opaque cid<0..2^8-1>; 146 } ConnectionId; 148 A server which is willing to use CIDs will respond with its own 149 "connection_id" extension, containing the CID which it wishes the 150 client to use when sending messages towards it. A zero-length value 151 indicates that the server will send with the client's CID but does 152 not wish the client to use a CID (or again, alternately, to use a 153 zero-length CID). 155 When a session is resumed, the "connection_id" extension is 156 negotiated afresh, not retained from previous connections in the 157 session. 159 This is effectively the simplest possible design that will work. 160 Previous design ideas for using cryptographically generated session 161 ids, either using hash chains or public key encryption, were 162 dismissed due to their inefficient designs. Note that a client 163 always has the chance to fall-back to a full handshake or more 164 precisely to a handshake that uses session resumption (DTLS 1.2 165 language) or to a PSK-based handshake using the ticket-based 166 approach. 168 In DTLS 1.2, connection ids are exchanged at the beginning of the 169 DTLS session only. There is no dedicated "connection id update" 170 message that allows new connection ids to be established mid-session, 171 because DTLS 1.2 in general does not allow post-handshake messages 172 that do not themselves begin other handshakes. In DTLS 1.3, which 173 does allow such messages, we use post-handshake message to update the 174 connection ID Section 4 and to request new IDs. 176 DTLS 1.2 peers switch to the new record layer format when encryption 177 is enabled. The same is true for DTLS 1.3 but since the DTLS 1.3 178 enables encryption early in the handshake phase the connection ID 179 will be enabled earlier. For this reason, the connection ID needs to 180 go in the DTLS 1.3 ServerHello. 182 4. Post-Handshake Messages 184 In DTLS 1.3, if the client and server have negotiated the 185 "connection_id" extension, either side can send a new connection ID 186 which it wishes the other side to use in a NewConnectionId message: 188 enum { 189 cid_immediate(0), cid_spare(1), (255) 190 } ConnectionIdUsage; 192 struct { 193 opaque cid<0..2^8-1>; 194 ConnectionIdUsage usage; 195 } NewConnectionId; 197 cid Indicates the CID which the sender wishes the peer to use. 199 usage Indicates whether the new CID should be used immediately or is 200 a spare. If usage is set to "cid_immediate", then the new CID 201 MUST be used immediately for all future records. If it is set to 202 "cid_spare", then either CID MAY be used, as described in 203 Section 7. 205 If the client and server have negotiated the "connection_id" 206 extension, either side can request a new CID using the 207 RequestConnectionId message. 209 struct { 210 } RequestConnectionId; 212 Endpoints SHOULD respond to RequestConnectionId by sending a 213 NewConnectionId with usage "cid_spare" as soon as possible. Note 214 that an endpoint MAY ignore requests which it considers excessive 215 (though they MUST be ACKed as usual). 217 5. Record Layer Extensions 219 This extension is applicable for use with DTLS 1.2 and DTLS 1.3. 220 This extension can be used with the optimized DTLS 1.3 record layer 221 format. 223 Figure 1 and Figure 2 illustrate the record formats of DTLS 1.2 and 224 DTLS 1.3, respectively. 226 struct { 227 ContentType type; 228 ProtocolVersion version; 229 uint16 epoch; 230 uint48 sequence_number; 231 opaque cid[cid_length]; // New field 232 uint16 length; 233 select (CipherSpec.cipher_type) { 234 case block: GenericBlockCipher; 235 case aead: GenericAEADCipher; 236 } fragment; 237 } DTLSCiphertext; 239 Figure 1: DTLS 1.2 Record Format with Connection ID 241 struct { 242 opaque content[DTLSPlaintext.length]; 243 ContentType type; 244 uint8 zeros[length_of_padding]; 245 } DTLSInnerPlaintext; 247 struct { 248 ContentType opaque_type = 23; /* application_data */ 249 ProtocolVersion legacy_record_version = {254,253); // DTLSv1.2 250 uint16 epoch; // DTLS-related field 251 uint48 sequence_number; // DTLS-related field 252 opaque cid[cid_length]; // New field 253 uint16 length; 254 opaque encrypted_record[length]; 255 } DTLSCiphertext; 257 Figure 2: DTLS 1.3 Record Format with Connection ID 259 Besides the "cid" field, all other fields are defined in the DTLS 1.2 260 and DTLS 1.3 specifications. 262 Note that for both record formats, it is not possible to parse the 263 records without knowing if the connection ID is in use and how long 264 it is. 266 6. Example 268 Below is an example exchange for DTLS 1.3 using a single connection 269 id in each direction. 271 Client Server 272 ------ ------ 274 ClientHello 275 (connection_id=5) 276 --------> 278 <-------- HelloRetryRequest 279 (cookie) 281 ClientHello --------> 282 (connection_id=5) 283 +cookie 285 <-------- ServerHello 286 EncryptedExtensions 287 (connection_id=100) 288 Certificate 289 CertificateVerify 290 Finished 292 Certificate --------> 293 CertificateVerify 294 Finished 296 <-------- Ack 298 Application Data ========> 299 (cid=100) 301 <======== Application Data 302 (cid=5) 304 Figure 3: Example DTLS Exchange with Connection IDs 306 7. Security and Privacy Considerations 308 The connection id replaces the previously used 5-tuple and, as such, 309 introduces an identifier that remains persistent during the lifetime 310 of a DTLS connection. Every identifier introduces the risk of 311 linkability, as explained in [RFC6973]. 313 An on-path adversary, who is able to observe the DTLS 1.2 protocol 314 exchanges between the DTLS client and the DTLS server, is able to 315 link the initial handshake to all subsequent payloads carrying the 316 same connection id pair (for bi-directional communication). In DTLS 317 1.3, it is possible to provide new encrypted connection IDs, though 318 of course those IDs are immediately used on the wire. Without multi- 319 homing and mobility the use of the connection id is not different to 320 the use of the 5-tuple. 322 With multi-homing an adversary is able to correlate the communication 323 interaction over the two paths, which adds further privacy concerns. 324 In order to prevent this, implementations SHOULD attempt to use fresh 325 connection IDs whenever they change local addresses or ports (though 326 this is not always possible to detect). In DTLS 1.3, The 327 RequestConnectionId message can be used to ask for new IDs in order 328 to ensure that you have a pool of suitable IDs. 330 This document does not change the security properties of DTLS 1.2 331 [RFC6347] and DTLS 1.3 [I-D.ietf-tls-dtls13]. It merely provides a 332 more robust mechanism for associating an incoming packet with a 333 stored security context. 335 8. IANA Considerations 337 IANA is requested to allocate an entry to the existing TLS 338 "ExtensionType Values" registry, defined in [RFC5246], for 339 connection_id(TBD) defined in this document. 341 IANA is requested to allocate two values in the "TLS Handshake Type" 342 registry, defined in [RFC5246], for request_connection_id (TBD), and 343 new_connection_id (TBD), as defined in this document. 345 9. References 347 9.1. Normative References 349 [I-D.ietf-tls-dtls13] 350 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 351 Datagram Transport Layer Security (DTLS) Protocol Version 352 1.3", draft-ietf-tls-dtls13-01 (work in progress), July 353 2017. 355 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 356 Requirement Levels", BCP 14, RFC 2119, 357 DOI 10.17487/RFC2119, March 1997, . 360 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 361 (TLS) Protocol Version 1.2", RFC 5246, 362 DOI 10.17487/RFC5246, August 2008, . 365 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 366 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 367 January 2012, . 369 9.2. Informative References 371 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 372 Morris, J., Hansen, M., and R. Smith, "Privacy 373 Considerations for Internet Protocols", RFC 6973, 374 DOI 10.17487/RFC6973, July 2013, . 377 9.3. URIs 379 [1] mailto:tls@ietf.org 381 Appendix A. History 383 RFC EDITOR: PLEASE REMOVE THE THIS SECTION 385 draft-rescorla-tls-dtls-connection-id-00 387 - Initial version 389 Appendix B. Working Group Information 391 The discussion list for the IETF TLS working group is located at the 392 e-mail address tls@ietf.org [1]. Information on the group and 393 information on how to subscribe to the list is at 394 https://www1.ietf.org/mailman/listinfo/tls 396 Archives of the list can be found at: https://www.ietf.org/mail- 397 archive/web/tls/current/index.html 399 Appendix C. Contributors 401 Many people have contributed to this specification since the 402 functionality has been highly desired by the IoT community. We would 403 like to thank the following individuals for their contributions in 404 earlier specifications: 406 * Thomas Fossati 407 Nokia 408 thomas.fossati@nokia.com 410 * Nikos Mavrogiannopoulos 411 RedHat 412 nmav@redhat.com 414 Additionally, we would like to thank Yin Xinxing (Huawei), Tobias 415 Gondrom (Huawei), and the Connection ID task force team members: 417 - Martin Thomson (Mozilla) 419 - Christian Huitema (Private Octopus Inc.) 421 - Jana Iyengar (Google) 423 - Daniel Kahn Gillmor (ACLU) 425 - Patrick McManus (Sole Proprietor) 427 - Ian Swett (Google) 428 - Mark Nottingham (Fastly) 430 Finally, we want to thank the IETF TLS working group chairs, Joseph 431 Salowey and Sean Turner, for their patience, support and feedback. 433 Authors' Addresses 435 Eric Rescorla (editor) 436 RTFM, Inc. 438 EMail: ekr@rtfm.com 440 Hannes Tschofenig (editor) 441 ARM Limited 443 EMail: hannes.tschofenig@arm.com