draft-ietf-tls-dtls-connection-id-01.txt   draft-ietf-tls-dtls-connection-id-02.txt 
TLS E. Rescorla, Ed. TLS E. Rescorla, Ed.
Internet-Draft RTFM, Inc. Internet-Draft RTFM, Inc.
Updates: 6347 (if approved) H. Tschofenig, Ed. Updates: 6347 (if approved) H. Tschofenig, Ed.
Intended status: Standards Track Arm Limited Intended status: Standards Track Arm Limited
Expires: January 3, 2019 T. Fossati Expires: April 25, 2019 T. Fossati
Nokia Nokia
T. Gondrom T. Gondrom
Huawei Huawei
July 02, 2018 October 22, 2018
The Datagram Transport Layer Security (DTLS) Connection Identifier Connection Identifiers for DTLS 1.2
draft-ietf-tls-dtls-connection-id-01 draft-ietf-tls-dtls-connection-id-02
Abstract Abstract
This document specifies the Connection ID construct for the Datagram This document specifies the Connection ID construct for the Datagram
Transport Layer Security (DTLS) protocol. Transport Layer Security (DTLS) protocol version 1.2.
A Connection ID is an identifier carried in the record layer header A Connection ID is an identifier carried in the record layer header
that gives the recipient additional information for selecting the that gives the recipient additional information for selecting the
appropriate security association. In "classical" DTLS, selecting a appropriate security association. In "classical" DTLS, selecting a
security association of an incoming DTLS record is accomplished with security association of an incoming DTLS record is accomplished with
the help of the 5-tuple. If the source IP address and/or source port the help of the 5-tuple. If the source IP address and/or source port
changes during the lifetime of an ongoing DTLS session then the changes during the lifetime of an ongoing DTLS session then the
receiver will be unable to locate the correct security context. receiver will be unable to locate the correct security context.
Status of This Memo Status of This Memo
skipping to change at page 1, line 44 skipping to change at page 1, line 44
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 January 3, 2019. This Internet-Draft will expire on April 25, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 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 Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 43 skipping to change at page 2, line 43
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3
3. The "connection_id" Extension . . . . . . . . . . . . . . . . 3 3. The "connection_id" Extension . . . . . . . . . . . . . . . . 3
4. Record Layer Extensions . . . . . . . . . . . . . . . . . . . 5 4. Record Layer Extensions . . . . . . . . . . . . . . . . . . . 5
5. Record Payload Protection . . . . . . . . . . . . . . . . . . 5 5. Record Payload Protection . . . . . . . . . . . . . . . . . . 5
6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 6 6. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 6
7. Security and Privacy Considerations . . . . . . . . . . . . . 7 7. Security and Privacy Considerations . . . . . . . . . . . . . 7
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8
9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8
9.1. Normative References . . . . . . . . . . . . . . . . . . 9 9.1. Normative References . . . . . . . . . . . . . . . . . . 8
9.2. Informative References . . . . . . . . . . . . . . . . . 9 9.2. Informative References . . . . . . . . . . . . . . . . . 9
Appendix A. History . . . . . . . . . . . . . . . . . . . . . . 10 Appendix A. History . . . . . . . . . . . . . . . . . . . . . . 10
Appendix B. Working Group Information . . . . . . . . . . . . . 10 Appendix B. Working Group Information . . . . . . . . . . . . . 10
Appendix C. Contributors . . . . . . . . . . . . . . . . . . . . 10 Appendix C. Contributors . . . . . . . . . . . . . . . . . . . . 10
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 11
1. Introduction 1. Introduction
The Datagram Transport Layer Security (DTLS) protocol was designed The Datagram Transport Layer Security (DTLS) protocol was designed
for securing connection-less transports, like UDP. DTLS, like TLS, for securing connection-less transports, like UDP. DTLS, like TLS,
skipping to change at page 3, line 27 skipping to change at page 3, line 27
need to be updated once the key lifetime expires. need to be updated once the key lifetime expires.
In the current version of DTLS, the IP address and port of the peer In the current version of DTLS, the IP address and port of the peer
are used to identify the DTLS association. Unfortunately, in some are used to identify the DTLS association. Unfortunately, in some
cases, such as NAT rebinding, these values are insufficient. This is cases, such as NAT rebinding, these values are insufficient. This is
a particular issue in the Internet of Things when devices enter a particular issue in the Internet of Things when devices enter
extended sleep periods to increase their battery lifetime. The NAT extended sleep periods to increase their battery lifetime. The NAT
rebinding leads to connection failure, with the resulting cost of a rebinding leads to connection failure, with the resulting cost of a
new handshake. new handshake.
This document defines an extension to DTLS to add a connection ID to This document defines an extension to DTLS to add a connection ID
the DTLS record layer. The presence of the connection ID is (CID) to the DTLS record layer. The presence of the connection ID is
negotiated via a DTLS extension. negotiated via a DTLS extension.
2. Conventions and Terminology 2. Conventions and Terminology
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 RFC "OPTIONAL" in this document are to be interpreted as described in RFC
2119 [RFC2119]. 2119 [RFC2119].
The reader is assumed to be familiar with DTLS [RFC6347]. The reader is assumed to be familiar with DTLS [RFC6347].
skipping to change at page 3, line 52 skipping to change at page 3, line 52
This document defines a new extension type (connection_id(TBD)), This document defines a new extension type (connection_id(TBD)),
which is used in ClientHello and ServerHello messages. which is used in ClientHello and ServerHello messages.
The extension type is specified as follows. The extension type is specified as follows.
enum { enum {
connection_id(TBD), (65535) connection_id(TBD), (65535)
} ExtensionType; } ExtensionType;
The extension_data field of this extension, when included in the The extension_data field of this extension, when included in the
ClientHello, MUST contain the CID structure, which carries the CID ClientHello, MUST contain the ConnectionId structure, which carries
which the client wishes the server to use when sending messages the CID which the client wishes the server to use when sending
towards it. A zero-length value indicates that the client is messages towards it. A zero-length value indicates that the client
prepared to send with a connection ID but does not wish the server to is prepared to send with a connection ID but does not wish the server
use one when sending (alternately, this can be interpreted as the to use one when sending (alternately, this can be interpreted as the
client wishes the server to use a zero-length CID; the result is the client wishes the server to use a zero-length CID; the result is the
same). same).
struct { struct {
opaque cid<0..2^8-1>; opaque cid<0..2^8-1>;
} ConnectionId; } ConnectionId;
A server which is willing to use CIDs will respond with its own A server which is willing to use CIDs will respond with its own
"connection_id" extension, containing the CID it wishes the client to "connection_id" extension, containing the CID it wishes the client to
use when sending messages towards it. A zero-length value indicates use when sending messages towards it. A zero-length value indicates
skipping to change at page 5, line 30 skipping to change at page 5, line 30
case aead: GenericAEADCipher; case aead: GenericAEADCipher;
} fragment; } fragment;
} DTLSCiphertext; } DTLSCiphertext;
Figure 1: DTLS 1.2 Record Format with Connection ID Figure 1: DTLS 1.2 Record Format with Connection ID
Note that for both record formats, it is not possible to parse the Note that for both record formats, it is not possible to parse the
records without knowing how long the Connection ID is. records without knowing how long the Connection ID is.
In order to allow a receiver to determine whether a record has CID or In order to allow a receiver to determine whether a record has CID or
not, connections which have negotiated this extension use new record not, connections which have negotiated this extension use a
types for all protected records. Table 1 shows the record types to distinguished record type tls12_cid(25). Use of this content type
use: has the following two implications:
+---------------------------+-------+ - The CID field is present
| New ContentType | Value |
+---------------------------+-------+
| alert_with_cid | 25 |
| | |
| handshake_with_cid | 26 |
| | |
| application_data_with_cid | 27 |
| | |
| heartbeat_with_cid | 28 |
+---------------------------+-------+
Table 1 - The true content type is inside the encryption envelope, as
described below.
5. Record Payload Protection 5. Record Payload Protection
The CID value, when present, is included in the MAC calculation for When CID is being used, the DTLSCompressed value is first wrapped
the DTLS record. The MAC algorithm described in Section 4.1.2.1 of along with the true content type and padding into a
[RFC6347] and Section 6.2.3.1 of [RFC5246] is extended as follows: DTLSWrappedCompressed value prior to encryption. The
DTLSWrappedCompressed value is then encrypted.
struct {
opaque compressed[TLSCompressed.length];
ContentType type;
uint8 zeros[length_of_padding];
} DTLSWrappedCompressed;
compressed The value of DTLSCompressed.fragment
type The true content type.
zeroes Padding, as defined in [RFC8446].
In addition, the CID value is included in the MAC calculation for the
DTLS record as shown below. The MAC algorithm described in
Section 4.1.2.1 of [RFC6347] and Section 6.2.3.1 of [RFC5246] is
extended as follows:
MAC(MAC_write_key, DTLSCompressed.epoch + MAC(MAC_write_key, DTLSCompressed.epoch +
DTLSCompressed.sequence_number + DTLSCompressed.sequence_number +
DTLSCompressed.type + tls12_cid +
DTLSCompressed.version + DTLSCompressed.version +
connection_id + // New field
cid_length + // New input cid_length + // New input
cid + // New input cid + // New input
DTLSCompressed.length + DTLSWrappedCompressed.length +
DTLSCompressed.fragment); DTLSWrappedCompressed.fragment);
where "+" denotes concatenation. where "+" denotes concatenation.
6. Examples 6. Examples
Figure 2 shows an example exchange where a connection id is used uni- Figure 2 shows an example exchange where a connection id is used uni-
directionally from the client to the server. directionally from the client to the server.
Client Server Client Server
------ ------ ------ ------
skipping to change at page 8, line 16 skipping to change at page 8, line 16
An on-path adversary, who is able to observe the DTLS protocol An on-path adversary, who is able to observe the DTLS protocol
exchanges between the DTLS client and the DTLS server, is able to exchanges between the DTLS client and the DTLS server, is able to
link the observed payloads to all subsequent payloads carrying the link the observed payloads to all subsequent payloads carrying the
same connection id pair (for bi-directional communication). Without same connection id pair (for bi-directional communication). Without
multi-homing or mobility, the use of the connection id is not multi-homing or mobility, the use of the connection id is not
different to the use of the 5-tuple. different to the use of the 5-tuple.
With multi-homing, an adversary is able to correlate the With multi-homing, an adversary is able to correlate the
communication interaction over the two paths, which adds further communication interaction over the two paths, which adds further
privacy concerns. In order to prevent this, implementations SHOULD privacy concerns.
attempt to use fresh connection IDs whenever they change local
addresses or ports (though this is not always possible to detect).
Importantly, the sequence number makes it possible for a passive Importantly, the sequence number makes it possible for a passive
attacker to correlate packets across CID changes. Thus, even if a attacker to correlate packets across CID changes. Thus, even if a
client/server pair do a rehandshake to change CID, that does not client/server pair do a rehandshake to change CID, that does not
provide much privacy benefit. provide much privacy benefit.
This document does not change the security properties of DTLS This document does not change the security properties of DTLS
[RFC6347]. It merely provides a more robust mechanism for [RFC6347]. It merely provides a more robust mechanism for
associating an incoming packet with a stored security context. associating an incoming packet with a stored security context.
skipping to change at page 9, line 20 skipping to change at page 9, line 14
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008,
<https://www.rfc-editor.org/info/rfc5246>. <https://www.rfc-editor.org/info/rfc5246>.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
January 2012, <https://www.rfc-editor.org/info/rfc6347>. January 2012, <https://www.rfc-editor.org/info/rfc6347>.
[RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
<https://www.rfc-editor.org/info/rfc8446>.
9.2. Informative References 9.2. Informative References
[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", draft-ietf-tls-dtls13-26 (work in progress), March 1.3", draft-ietf-tls-dtls13-28 (work in progress), July
2018. 2018.
[RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J.,
Morris, J., Hansen, M., and R. Smith, "Privacy Morris, J., Hansen, M., and R. Smith, "Privacy
Considerations for Internet Protocols", RFC 6973, Considerations for Internet Protocols", RFC 6973,
DOI 10.17487/RFC6973, July 2013, DOI 10.17487/RFC6973, July 2013,
<https://www.rfc-editor.org/info/rfc6973>. <https://www.rfc-editor.org/info/rfc6973>.
9.3. URIs 9.3. URIs
[1] mailto:tls@ietf.org [1] mailto:tls@ietf.org
[2] https://www1.ietf.org/mailman/listinfo/tls [2] https://www1.ietf.org/mailman/listinfo/tls
[3] https://www.ietf.org/mail-archive/web/tls/current/index.html [3] https://www.ietf.org/mail-archive/web/tls/current/index.html
Appendix A. History Appendix A. History
RFC EDITOR: PLEASE REMOVE THE THIS SECTION RFC EDITOR: PLEASE REMOVE THE THIS SECTION
draft-ietf-tls-dtls-connection-id-02
- Move to internal content types a la DTLS 1.3.
draft-ietf-tls-dtls-connection-id-01 draft-ietf-tls-dtls-connection-id-01
- Remove 1.3 based on the WG consensus at IETF 101 - Remove 1.3 based on the WG consensus at IETF 101
draft-ietf-tls-dtls-connection-id-00 draft-ietf-tls-dtls-connection-id-00
- Initial working group version (containing a solution for DTLS 1.2 - Initial working group version (containing a solution for DTLS 1.2
and 1.3) and 1.3)
draft-rescorla-tls-dtls-connection-id-00 draft-rescorla-tls-dtls-connection-id-00
 End of changes. 19 change blocks. 
40 lines changed or deleted 53 lines changed or added

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