idnits 2.17.1 draft-ietf-tls-extractor-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) 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 : ---------------------------------------------------------------------------- No issues found here. 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, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, 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 (September 07, 2009) is 5338 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 4347 (Obsoleted by RFC 6347) Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group E. Rescorla 3 Internet-Draft Network Resonance 4 Intended status: Standards Track September 07, 2009 5 Expires: March 11, 2010 7 Keying Material Exporters for Transport Layer Security (TLS) 8 draft-ietf-tls-extractor-07.txt 10 Status of this Memo 12 This Internet-Draft is submitted to IETF in full conformance with the 13 provisions of BCP 78 and BCP 79. This document may contain material 14 from IETF Documents or IETF Contributions published or made publicly 15 available before November 10, 2008. The person(s) controlling the 16 copyright in some of this material may not have granted the IETF 17 Trust the right to allow modifications of such material outside the 18 IETF Standards Process. Without obtaining an adequate license from 19 the person(s) controlling the copyright in such materials, this 20 document may not be modified outside the IETF Standards Process, and 21 derivative works of it may not be created outside the IETF Standards 22 Process, except to format it for publication as an RFC or to 23 translate it into languages other than English. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF), its areas, and its working groups. Note that 27 other groups may also distribute working documents as Internet- 28 Drafts. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 The list of current Internet-Drafts can be accessed at 36 http://www.ietf.org/ietf/1id-abstracts.txt. 38 The list of Internet-Draft Shadow Directories can be accessed at 39 http://www.ietf.org/shadow.html. 41 This Internet-Draft will expire on March 11, 2010. 43 Copyright Notice 45 Copyright (c) 2009 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents in effect on the date of 50 publication of this document (http://trustee.ietf.org/license-info). 51 Please review these documents carefully, as they describe your rights 52 and restrictions with respect to this document. 54 Abstract 56 A number of protocols wish to leverage Transport Layer Security (TLS) 57 to perform key establishment but then use some of the keying material 58 for their own purposes. This document describes a general mechanism 59 for allowing that. 61 Table of Contents 63 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 2. Conventions Used In This Document . . . . . . . . . . . . . . . 3 65 3. Binding to Application Contexts . . . . . . . . . . . . . . . . 3 66 4. Exporter Definition . . . . . . . . . . . . . . . . . . . . . . 4 67 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 5 68 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6 69 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 7 70 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 71 8.1. Normative References . . . . . . . . . . . . . . . . . . . 7 72 8.2. Informative References . . . . . . . . . . . . . . . . . . 7 73 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 8 75 1. Introduction 77 Note: The mechanism described in this document was previously known 78 as "TLS Extractors" but was changed to avoid a name conflict with 79 the use of the term "Extractor" in the cryptographic community. 81 A number of protocols wish to leverage Transport Layer Security (TLS) 82 [RFC5246] or Datagram TLS (DTLS) [RFC4347] to perform key 83 establishment but then use some of the keying material for their own 84 purposes. A typical example is DTLS-SRTP [I-D.ietf-avt-dtls-srtp], a 85 key management scheme for SRTP which uses DTLS to perform a key 86 exchange and negotiate the SRTP [RFC3711] protection suite and then 87 uses the DTLS master_secret to generate the SRTP keys. 89 These applications imply a need to be able to export keying material 90 (later called Exported Keying Material or EKM) from TLS/DTLS to an 91 application or protocol residing at an upper-layer, and securely 92 agree on the upper-layer context where the keying material will be 93 used. The mechanism for exporting the keying material has the 94 following requirements: 96 o Both client and server need to be able to export the same EKM 97 value. 98 o EKM values should be indistinguishable from random data by 99 attackers who don't know the master_secret. 100 o It should be possible to export multiple EKM values from the same 101 TLS/DTLS association. 102 o Knowing one EKM value should not reveal any information about the 103 master_secret or about other EKM values. 105 The mechanism described in this document is intended to fulfill these 106 requirements. This mechanism is compatible with all versions of TLS. 108 2. Conventions Used In This Document 110 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 111 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 112 document are to be interpreted as described in [RFC2119]. 114 3. Binding to Application Contexts 116 In addition to using an exporter to obtain keying material, an 117 application using the keying material has to securely establish the 118 upper-layer context where the keying material will be used. The 119 details of this context depend on the application, but it could 120 include things such as algorithms and parameters that will be used 121 with the keys, identifier(s) for the endpoint(s) who will use the 122 keys, identifier(s) for the session(s) where the keys will be used, 123 and the lifetime(s) for the context and/or keys. At a minimum, there 124 should be some mechanism for signalling that an exporter will be 125 used. 127 This specification does not mandate a single mechanism for agreeing 128 on such context; instead, there are several possibilities that can be 129 used (and can complement each other). For example: 131 o One important part of the context -- which application will use 132 the exported keys -- is given by the disambiguating label string 133 (see Section 4). 134 o Information about the upper-layer context can be included in the 135 optional data after the exporter label (see Section 4). 136 o Information about the upper-layer context can be exchanged in TLS 137 extensions included in the ClientHello and ServerHello messages. 138 This approach is used in [I-D.ietf-avt-dtls-srtp]. The handshake 139 messages are protected by the Finished messages, so once the 140 handshake completes, the peers will have the same view of the 141 information. Extensions also allow a limited form of negotiation: 142 for example, the TLS client could propose several alternatives for 143 some context parameters, and the TLS server could select one of 144 them. 145 o The upper-layer protocol can include its own handshake which can 146 be protected using the keys exported by TLS. 148 It is important to note that just embedding TLS messages in the 149 upper-layer protocol may not automatically secure all the important 150 context information, since the upper-layer messages are not covered 151 by TLS Finished messages. 153 4. Exporter Definition 155 The output of the exporter is intended to be used in a single scope, 156 which is associated with the TLS session, the label, and the context 157 value. 159 The exporter takes three input values 161 o a disambiguating label string, 162 o a per-association context value provided by the application using 163 the exporter, and 164 o a length value. 166 It then computes: 168 PRF(SecurityParameters.master_secret, label, 169 SecurityParameters.client_random + 170 SecurityParameters.server_random + 171 context_value_length + context_value 172 )[length] 174 Where PRF is the TLS PRF in use for the session. The output is a 175 pseudorandom bit string of length bytes generated from the 176 master_secret. 178 Labels here have the same definition as in TLS, i.e., an ASCII string 179 with no terminating NULL. Label values beginning with "EXPERIMENTAL" 180 MAY be used for private use without registration. All other label 181 values MUST be registered via Specification Required as described by 182 RFC 5226 [RFC5226]. Note that exporter labels have the potential to 183 collide with existing PRF labels. In order to prevent this, labels 184 SHOULD begin with "EXPORTER". This is not a MUST because there are 185 existing uses which have labels which do not begin with this prefix. 187 The context value allows the application using the exporter to mix 188 its own data with the TLS PRF for the exporter output. One example 189 of where this might be useful is an authentication setting where the 190 client credentials are valid for more than one identity; the context 191 value could then be used to mix the expected identity into the keying 192 material, thus preventing substitution attacks. The context value 193 length is encoded as an unsigned 16-bit quantity (uint16) 194 representing the length of the context value. The context MAY be 195 zero length. Because the context value is mixed with the 196 master_secret via the PRF, it is safe to mix confidential information 197 into the extractor provided that the master_secret will not be known 198 to the attacker. 200 5. Security Considerations 202 The prime security requirement for exporter outputs is that they be 203 independent. More formally, after a particular TLS session, if an 204 adversary is allowed to choose multiple (label, context value) pairs 205 and is given the output of the PRF for those values, the attacker is 206 still unable to distinguish between the output of the PRF for a 207 (label, context value) pair (different from the ones that it 208 submitted) and a random value of the same length. In particular, 209 there may be settings, such as the one described in Section 4, where 210 the attacker can control the context value; such an attacker MUST NOT 211 be able to predict the output of the exporter. Similarly, an 212 attacker who does not know the master secret should not be able to 213 distinguish valid exporter outputs from random values. The current 214 set of TLS PRFs is believed to meet this objective, provided the 215 master secret is randomly generated. 217 Because an exporter produces the same value if applied twice with the 218 same label to the same master_secret, it is critical that two EKM 219 values generated with the same label not be used for two different 220 purposes--hence the requirement for IANA registration. However, 221 because exporters depend on the TLS PRF, it is not a threat to the 222 use of an EKM value generated from one label to reveal an EKM value 223 generated from another label. 225 With certain TLS cipher suites, the TLS master secret is not 226 necessarily unique to a single TLS session. In particular, with RSA 227 key exchange, a malicious party acting as TLS server in one session 228 and TLS client in another session can cause those two sessions to 229 have the same TLS master secret (though the sessions must be 230 established simultaneously to get adequate control of the Random 231 values). Applications using the EKM need to consider this in how 232 they use the EKM; in some cases, requiring the use of other cipher 233 suites (such as those using Diffie-Hellman key exchange) may be 234 advisable. 236 Designing a secure mechanism that uses extractors is not necessarily 237 straightforward. This document only provides the extractor 238 mechanism, but the problem of agreeing on the surrounding context and 239 the meaning of the information passed to and from the extractor 240 remains. Any new uses of the extractor mechanism should be subject 241 to careful review. 243 6. IANA Considerations 245 IANA is requested to create (has created) a TLS Exporter Label 246 registry for this purpose. The initial contents of the registry are 247 given below: 249 Value Reference Note 250 ----------------------------- --------- ---- 251 client finished [RFC5246] (1) 252 server finished [RFC5246] (1) 253 master secret [RFC5246] (1) 254 key expansion [RFC5246] (1) 255 client EAP encryption [RFC5216] 256 ttls keying material [RFC5281] 257 ttls challenge [RFC5281] 259 Note(1): These entries are reserved and MUST NOT be used for the 260 purpose described in RFC XXXX, in order to avoid confusion with 261 similar, but distinct use in RFC 5246. 263 [ RFC Editor: Please replace 'XXXX' above by the RFC number assigned 264 to this document and delete this remark. ] 266 Future values are allocated via RFC 5226 Specification Required 267 policy. The label is a string consisting of printable ASCII 268 characters. IANA MUST also verify that one label is not a prefix of 269 any other label. For example, labels "key" or "master secretary" are 270 forbidden. 272 7. Acknowledgments 274 Thanks to Pasi Eronen for valuable comments and the contents of the 275 IANA section and Section 3. Thanks to David McGrew for helpful 276 discussion of the security considerations and to Vijay Gurbani and 277 Alfred Hoenes for editorial comments. 279 8. References 281 8.1. Normative References 283 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 284 Requirement Levels", BCP 14, RFC 2119, March 1997. 286 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 287 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 288 May 2008. 290 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 291 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 293 8.2. Informative References 295 [RFC5216] Simon, D., Aboba, B., and R. Hurst, "The EAP-TLS 296 Authentication Protocol", RFC 5216, March 2008. 298 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 299 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 300 RFC 3711, March 2004. 302 [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 303 Security", RFC 4347, April 2006. 305 [I-D.ietf-avt-dtls-srtp] 306 McGrew, D. and E. Rescorla, "Datagram Transport Layer 307 Security (DTLS) Extension to Establish Keys for Secure 308 Real-time Transport Protocol (SRTP)", 309 draft-ietf-avt-dtls-srtp-07 (work in progress), 310 February 2009. 312 [RFC5281] Funk, P. and S. Blake-Wilson, "Extensible Authentication 313 Protocol Tunneled Transport Layer Security Authenticated 314 Protocol Version 0 (EAP-TTLSv0)", RFC 5281, August 2008. 316 Author's Address 318 Eric Rescorla 319 Network Resonance 320 2064 Edgewood Drive 321 Palo Alto, CA 94303 322 USA 324 Email: ekr@networkresonance.com