--- 1/draft-ietf-tls-cached-info-16.txt 2014-11-13 12:14:48.258494387 -0800 +++ 2/draft-ietf-tls-cached-info-17.txt 2014-11-13 12:14:48.318495850 -0800 @@ -1,19 +1,19 @@ TLS S. Santesson Internet-Draft 3xA Security AB Intended status: Standards Track H. Tschofenig -Expires: August 18, 2014 ARM Ltd. - February 14, 2014 +Expires: May 17, 2015 ARM Ltd. + November 13, 2014 Transport Layer Security (TLS) Cached Information Extension - draft-ietf-tls-cached-info-16.txt + draft-ietf-tls-cached-info-17.txt Abstract Transport Layer Security (TLS) handshakes often include fairly static information, such as the server certificate and a list of trusted Certification Authorities (CAs). This information can be of considerable size, particularly if the server certificate is bundled with a complete certificate chain (i.e., the certificates of intermediate CAs up to the root CA). @@ -29,21 +29,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on August 18, 2014. + This Internet-Draft will expire on May 17, 2015. Copyright Notice Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -51,189 +51,207 @@ to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Cached Information Extension . . . . . . . . . . . . . . . . 3 - 4. Exchange Specification . . . . . . . . . . . . . . . . . . . 4 - 4.1. Omitting the Certificate Chain . . . . . . . . . . . . . 5 - 4.2. Omitting the Trusted CAs . . . . . . . . . . . . . . . . 5 + 3.1. Certificate_list Fingerprint . . . . . . . . . . . . . . 4 + 3.2. Certificate_authorities Fingerprint . . . . . . . . . . . 4 + 3.3. Fingerprint Hash Algorithm . . . . . . . . . . . . . . . 4 + 4. Exchange Specification . . . . . . . . . . . . . . . . . . . 5 + 4.1. Omitting the Certificate List . . . . . . . . . . . . . . 5 + 4.2. Omitting the Trusted Certificate Authorities . . . . . . 6 5. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7 - 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 - 7.1. New Entry to the TLS ExtensionType Registry . . . . . . . 8 - 7.2. New Registry for CachedInformationType . . . . . . . . . 8 - 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 8 - 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 9.1. Normative References . . . . . . . . . . . . . . . . . . 9 - 9.2. Informative References . . . . . . . . . . . . . . . . . 9 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9 + 6. Security Considerations . . . . . . . . . . . . . . . . . . . 9 + 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 + 7.1. New Entry to the TLS ExtensionType Registry . . . . . . . 9 + 7.2. New Registry for CachedInformationType . . . . . . . . . 9 + 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9 + 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 + 9.1. Normative References . . . . . . . . . . . . . . . . . . 10 + 9.2. Informative References . . . . . . . . . . . . . . . . . 10 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 1. Introduction - Transport Layer Security (TLS) handshakes often include fairly static - information, such as the server certificate and a list of trusted - Certification Authorities (CAs). This information can be of - considerable size, particularly if the server certificate is bundled - with a complete certificate chain (i.e., the certificates of - intermediate CAs up to the root CA). - - Optimizing the exchange of information to a minimum helps to improve - performance in environments where devices are connected to a network - with a low bandwidth, and lossy radio technology. These types of + Reducing the amount of information exchanged during a Transport Layer + Security handshake to a minimum helps to improve performance in + environments where devices are connected to a network with a low + bandwidth, and lossy radio technology. With Internet of Things such environments exist, for example, when smart objects are connected - using a low power IEEE 802.15.4 radio or via Bluetooth Low Energy. - For more information about the challenges with smart object - deployments please see [RFC6574]. + using a low power IEEE 802.15.4 radio or via Bluetooth Smart. For + more information about the challenges with smart object deployments + please see [RFC6574]. This specification defines a TLS extension that allows a client and a - server to exclude transmission of cached information from the TLS + server to exclude transmission information cached in an earlier TLS handshake. A typical example exchange may therefore look as follows. First, the client and the server executes the usual TLS handshake. The client may, for example, decide to cache the certificate provided by the server. When the TLS client connects to the TLS server some time in the future, without using session resumption, it then attaches the - cached_information extension defined in this document to the client - hello message to indicate that it had cached the certificate, and it - provides the fingerprint of it. If the server's certificate had not - changed then the TLS server does not need to send the complete - certificate chain to the client again. In case the information had - changed, the certificate payload is transmitted to the client to - allow the client to update its state information. + cached_info extension defined in this document to the client hello + message to indicate that it had cached the certificate, and it + provides the fingerprint of it. If the server's certificate has not + changed then the TLS server does not need to send its' certificate + and the corresponding certificate list again. In case information + has changed, which can be seen from the fingerprint provided by the + client, the certificate payload is transmitted to the client to allow + the client to update the cache. 2. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. + This document refers to the TLS protocol but the description is + equally applicable to DTLS as well. + 3. Cached Information Extension - This document defines a new extension type (cached_information(TBD)), - which is used in client hello and server hello messages. The - extension type is specified as follows. + This document defines a new extension type (cached_info(TBD)), which + is used in client hello and server hello messages. The extension + type is specified as follows. enum { - cached_information(TBD), (65535) + cached_info(TBD), (65535) } ExtensionType; The extension_data field of this extension, when included in the - client hello, MUST contain the CachedInformation structure. + client hello, MUST contain the CachedInformation structure. The + client MUST NOT send multiple CachedObjects with the same + CachedInformationType. enum { - certificate_chain(1), trusted_cas(2) (255) + certificate_list(1), certificate_authorities(2) (255) } CachedInformationType; struct { + select (type) { + case client: CachedInformationType type; HashAlgorithm hash; opaque hash_value<1..255>; + case server: + CachedInformationType type; + } body; } CachedObject; struct { CachedObject cached_info<1..2^16-1>; } CachedInformation; - When the CachedInformationType identifies a certificate_chain, then + This document establishes a registry for CachedInformationType types; + additional values can be added following the policy described in + Section 7. + +3.1. Certificate_list Fingerprint + + When the CachedInformationType identifies a certificate_list, then the hash_value field MUST include the hash calculated over the certificate_list element of the Certificate payload provided by the TLS server in an earlier exchange, excluding the three length bytes of the certificate_list vector. - When the CachedInformationType identifies a trusted_cas, then the - hash_value MUST include a hash calculated over the - certificate_authorities element of the CertificateRequest payload - provided by the TLS server in an earlier exchange, excluding the two - length bytes of the certificate_authorities vector. +3.2. Certificate_authorities Fingerprint + + When the CachedInformationType identifies a certificate_authorities, + then the hash_value MUST include a hash calculated over + CertificateRequest payload provided by the TLS server in an earlier + exchange, excluding the msg_type and length field. + +3.3. Fingerprint Hash Algorithm The hash algorithm used to calculate hash values is conveyed in the 'hash' field of the CachedObject element. The list of registered hash algorithms can be found in the TLS HashAlgorithm Registry, which - was created by RFC 5246 [RFC5246]. The value zero (0) for 'none' is - not an allowed choice for a hash algorithm and MUST NOT be used. - - This document establishes a registry for CachedInformationType types - and additional values can be added following the policy described in - Section 7. + was created by RFC 5246 [RFC5246]. The value zero (0) for 'none' and + one (1) for 'md5' is not an allowed choice for a hash algorithm and + MUST NOT be used. 4. Exchange Specification - Clients supporting this extension MAY include the - "cached_information" extension in the (extended) client hello, which - MAY contain zero or more CachedObject attributes. + Clients supporting this extension MAY include the "cached_info" + extension in the (extended) client hello. If the client includes the + extension then it MUST contain one or more CachedObject attributes. + Clients and servers MUST NOT include more than one CachedObject + attribute per info type. - A server supporting this extension MAY include the - "cached_information" extension in the (extended) server hello, which - MAY contain one or more CachedObject attributes it supports. By - returning the "cached_information" extension the server indicates - that it supports caching of each present CachedObject that matches - the specified hash value. The server MAY support other cached - objects that are not present in the extension. + A server supporting this extension MAY include the "cached_info" + extension in the (extended) server hello. By returning the + "cached_info" extension the server indicates that it supports the + cached info types. For each indicated cached info type the server + MUST alters the transmission of respective payloads, as specified for + each type. If the server includes the extension it MUST only include + CachedObjects of a type also supported by the client (as expressed in + the client hello). - Note: If clients make use of the Server Name Indication [RFC6066] - then clients may need to cache multiple data items for a single - server since servers may host multiple 'virtual' servers at a single - underlying network address. + Note that the client includes a fingerprint of the cached information + to give the server enough information to determine whether cached + information is stale. If the server supports this specification and + notices a mismatch between the data cached by the client and its own + information then the server MUST include the information in full and + MUST NOT list the respective item in the "cached_info" extension. - Following a successful exchange of the "cached_information" - extensions in the client and server hello, the server omits sending - the corresponding handshake message. How information is omitted from - the handshake message is defined per cached info type. Section 4.1 - and Section 4.2 defines the syntax of the fingerprinted information. + Note: Clients may cache multiple data items for a single server if + those servers are part of a hosting environment. To allow the client + to select the appropriate information from the cached it is + RECOMMENDED that the client uses information from the Server Name + Indication [RFC6066]. - The handshake protocol MUST proceed using the information as if it - was provided in the handshake protocol. The Finished message MUST be - calculated over the actual data exchanged in the handshake protocol. - That is, the Finished message will be calculated over the information - that was omitted from transmission by means of its present hash in - the client hello and not through its presence in the handshake - exchange. + Following a successful exchange of the "cached_info" extensions in + the client and server hello, the server alters sending the + corresponding handshake message. How information is altered from the + handshake messages is defined per cached info type. Section 4.1 and + Section 4.2 defines the syntax of the fingerprinted information. - The server MUST NOT include more than one fingerprint for a single - information element, i.e., at maximum only one CachedObject structure - per replaced information is provided. + The handshake protocol MUST proceed using the information as if it + was provided in the handshake protocol. Since the Finished message + is calculated over the exchanged data it will also include the hash + of the cached data. -4.1. Omitting the Certificate Chain +4.1. Omitting the Certificate List - When an object of type 'certificate_chain' is provided in the client - hello, the server MAY replace the sequence of certificates with an - empty sequence with an actual length field of zero (=empty vector). + When an object of type 'certificate_list' is provided in the client + hello, the server MAY replace the list of certificates with an empty + sequence with an actual length field of zero (=empty vector). The original handshake message syntax is defined in RFC 5246 [RFC5246] and has the following structure: opaque ASN.1Cert<1..2^24-1>; struct { ASN.1Cert certificate_list<0..2^24-1>; } Certificate; - Note that [I-D.ietf-tls-oob-pubkey] allows the certificate payload to - contain only the SubjectPublicKeyInfo instead of the full information - typically found in a certificate. Hence, when this specification is - used in combination with [I-D.ietf-tls-oob-pubkey] and the negotiated - certificate type is a raw public key then the TLS server omits - sending a Certificate payload that contains an ASN.1Cert structure of - the SubjectPublicKeyInfo. + Note that [RFC7250] allows the certificate payload to contain only + the SubjectPublicKeyInfo instead of the full information typically + found in a certificate. Hence, when this specification is used in + combination with [RFC7250] and the negotiated certificate type is a + raw public key then the TLS server omits sending a Certificate + payload that contains an ASN.1Cert structure of the + SubjectPublicKeyInfo. -4.2. Omitting the Trusted CAs +4.2. Omitting the Trusted Certificate Authorities - When a fingerprint for an object of type 'trusted_cas' is provided in - the client hello, the server MAY send a DistinguishedName in the - Certificate Request message with an actual length field of zero - (=empty vector). + When a fingerprint for an object of type 'certificate_authorities' is + provided in the client hello, the server MAY replace the + CertificateRequest message with an empty sequence with an actual + length field of zero. The original handshake message syntax is defined in RFC 5246 [RFC5246] and has the following structure: opaque DistinguishedName<1..2^16-1>; struct { ClientCertificateType certificate_types<1..2^8-1>; SignatureAndHashAlgorithm supported_signature_algorithms<2^16-1>; @@ -242,168 +260,169 @@ 5. Example Figure 1 illustrates an example exchange using the TLS cached info extension. In the normal TLS handshake exchange shown in flow (A) the TLS server provides its certificate in the Certificate payload to the client, see step [1]. This allows the client to store the certificate for future use. After some time the TLS client again interacts with the same TLS server and makes use of the TLS cached info extension, as shown in flow (B). The TLS client indicates - support for this specification via the cached_information extension, - see [2], and indicates that it has stored the certificate_chain from - the earlier exchange. With [3] the TLS server indicates that it also - supports this specification and informs the client that it also - supports caching of other objects beyond the 'certificate_chain', - namely 'trusted_cas' (also defined in this document), and the 'foo- - bar' extension (i.e., an imaginary extension that yet needs to be - defined). With [4] the TLS server omits sending the certificate - chain, as described in Section 4.1. + support for this specification via the "cached_info" extension, see + + [2], and indicates that it has stored the 'certificate_list' from the + earlier exchange. With [3] the TLS server acknowledges the supports + of this specification and informs the client that it alterned the + content of the certificate payload (see [4], as described in + Section 4.1). (A) Initial (full) Exchange - client_hello -> - <- server_hello, - certificate, // [1] - server_key_exchange, - server_hello_done + ClientHello -> + <- ServerHello + Certificate* // [1] + ServerKeyExchange* + CertificateRequest* + ServerHelloDone - client_key_exchange, - change_cipher_spec, - finished -> + Certificate* + ClientKeyExchange + CertificateVerify* + [ChangeCipherSpec] + Finished -> - <- change_cipher_spec, - finished + <- [ChangeCipherSpec] + Finished Application Data <-------> Application Data (B) TLS Cached Extension Usage - client_hello, - cached_information=(certificate_chain) -> // [2] - <- server_hello, - cached_information= // [3] - (certificate_chain, trusted_cas, foo-bar) - certificate, // [4] - server_key_exchange, - server_hello_done + ClientHello + cached_info=(certificate_list) -> // [2] + <- ServerHello + cached_info= + (certificate_list) // [3] + Certificate* // [4] + ServerKeyExchange* + CertificateRequest* + ServerHelloDone - client_key_exchange, - change_cipher_spec, - finished -> + Certificate* + ClientKeyExchange + CertificateVerify* + [ChangeCipherSpec] + Finished -> - <- change_cipher_spec, - finished + <- [ChangeCipherSpec] + Finished Application Data <-------> Application Data Figure 1: Example Message Exchange 6. Security Considerations This specification defines a mechanism to reference stored state using a fingerprint. Sending a fingerprint of cached information in an unencrypted handshake, as the client and server hello is, may allow an attacker or observer to correlate independent TLS exchanges. While some information elements used in this specification, such as server certificates, are public objects and usually not sensitive in this regard, others may be. Those who implement and deploy this specification should therefore make an informed decision whether the cached information is inline with their security and privacy goals. In case of concerns, it is advised to avoid sending the fingerprint of the data objects in clear. The hash algorithm used in this specification is required to have - reasonable random properties in order to provide reasonably unique - identifiers. There is no requirement that this hash algorithm must have strong collision resistance. 7. IANA Considerations 7.1. New Entry to the TLS ExtensionType Registry IANA is requested to add an entry to the existing TLS ExtensionType - registry, defined in RFC 5246 [RFC5246], for cached_information(TBD) - defined in this document. + registry, defined in RFC 5246 [RFC5246], for cached_info(TBD) defined + in this document. 7.2. New Registry for CachedInformationType IANA is requested to establish a registry for TLS CachedInformationType values. The first entries in the registry are - o certificate_chain(1) + o certificate_list(1) - o trusted_cas(2) + o certificate_authorities(2) The policy for adding new values to this registry, following the terminology defined in RFC 5226 [RFC5226], is as follows: o 0-63 (decimal): Standards Action o 64-223 (decimal): Specification Required o 224-255 (decimal): reserved for Private Use 8. Acknowledgments We would like to thank the following persons for your detailed document reviews: o Paul Wouters and Nikos Mavrogiannopoulos (December 2011) o Rob Stradling (February 2012) o Ondrej Mikle (in March 2012) + + o Ilari Liusvaara, Adam Langley, and Eric Rescorla (in July 2014) + Additionally, we would like to thank the TLS working group chairs, - Eric Rescorla and Joe Salowey, as well as the security area - directors, Sean Turner and Stephen Farrell, for their feedback and - support. + Sean Turner and Joe Salowey, as well as the responsible security area + director, Stephen Farrell, for his support. 9. References 9.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3874] Housley, R., "A 224-bit One-way Hash Function: SHA-224", RFC 3874, September 2004. [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008. [RFC6066] Eastlake, D., "Transport Layer Security (TLS) Extensions: Extension Definitions", RFC 6066, January 2011. 9.2. Informative References - [I-D.ietf-tls-oob-pubkey] - Wouters, P., Tschofenig, H., Gilmore, J., Weiler, S., and - T. Kivinen, "Using Raw Public Keys in Transport Layer - Security (TLS) and Datagram Transport Layer Security - (DTLS)", draft-ietf-tls-oob-pubkey-11 (work in progress), - January 2014. - [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, May 2008. [RFC6574] Tschofenig, H. and J. Arkko, "Report from the Smart Object Workshop", RFC 6574, April 2012. -Authors' Addresses + [RFC7250] Wouters, P., Tschofenig, H., Gilmore, J., Weiler, S., and + T. Kivinen, "Using Raw Public Keys in Transport Layer + Security (TLS) and Datagram Transport Layer Security + (DTLS)", RFC 7250, June 2014. +Authors' Addresses Stefan Santesson 3xA Security AB Scheelev. 17 Lund 223 70 Sweden Email: sts@aaa-sec.com + Hannes Tschofenig ARM Ltd. - 110 Fulbourn Rd - Cambridge CB1 9NJ - Great Britain + Hall in Tirol 6060 + Austria Email: Hannes.tschofenig@gmx.net URI: http://www.tschofenig.priv.at