idnits 2.17.1 draft-sheffer-tls-bcp-02.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 : ---------------------------------------------------------------------------- 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 date (February 13, 2014) is 3724 days in the past. Is this intentional? Checking references for intended status: Best Current Practice ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 4492 (Obsoleted by RFC 8422) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Downref: Normative reference to an Informational RFC: RFC 7027 == Outdated reference: A later version (-02) exists of draft-popov-tls-prohibiting-rc4-01 -- Obsolete informational reference (is this intentional?): RFC 2246 (Obsoleted by RFC 4346) -- Obsolete informational reference (is this intentional?): RFC 4346 (Obsoleted by RFC 5246) -- Obsolete informational reference (is this intentional?): RFC 5077 (Obsoleted by RFC 8446) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 UTA Y. Sheffer 3 Internet-Draft Porticor 4 Intended status: Best Current Practice R. Holz 5 Expires: August 17, 2014 TUM 6 P. Saint-Andre 7 &yet 8 February 13, 2014 10 Recommendations for Secure Use of TLS and DTLS 11 draft-sheffer-tls-bcp-02 13 Abstract 15 Transport Layer Security (TLS) and Datagram Transport Security Layer 16 (DTLS) are widely used to protect data exchanged over application 17 protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP. Over the 18 last few years, several serious attacks on TLS have emerged, 19 including attacks on its most commonly used cipher suites and modes 20 of operation. This document provides recommendations for improving 21 the security of both software implementations and deployed services 22 that use TLS and DTLS. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on August 17, 2014. 41 Copyright Notice 43 Copyright (c) 2014 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 59 2. Conventions used in this document . . . . . . . . . . . . . . 3 60 3. Recommendations . . . . . . . . . . . . . . . . . . . . . . . 3 61 3.1. Protocol Versions . . . . . . . . . . . . . . . . . . . . 3 62 3.2. Fallback to SSL . . . . . . . . . . . . . . . . . . . . . 4 63 3.3. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . 4 64 3.4. Public Key Length . . . . . . . . . . . . . . . . . . . . 6 65 3.5. Compression . . . . . . . . . . . . . . . . . . . . . . . 6 66 3.6. Session Resumption . . . . . . . . . . . . . . . . . . . 6 67 4. Detailed Guidelines . . . . . . . . . . . . . . . . . . . . . 6 68 4.1. Cipher Suite Negotiation Details . . . . . . . . . . . . 7 69 4.2. Alternative Cipher Suites . . . . . . . . . . . . . . . . 7 70 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 71 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 72 6.1. AES-GCM . . . . . . . . . . . . . . . . . . . . . . . . . 8 73 6.2. Forward Secrecy . . . . . . . . . . . . . . . . . . . . . 8 74 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 75 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 76 8.1. Normative References . . . . . . . . . . . . . . . . . . 9 77 8.2. Informative References . . . . . . . . . . . . . . . . . 10 78 Appendix A. Appendix: Change Log . . . . . . . . . . . . . . . . 11 79 A.1. -02 . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 80 A.2. -01 . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 81 A.3. -00 . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 82 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 84 1. Introduction 86 Transport Layer Security (TLS) and Datagram Transport Security Layer 87 (DTLS) are widely used to protect data exchanged over application 88 protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP. Over the 89 last few years, several serious attacks on TLS have emerged, 90 including attacks on its most commonly used cipher suites and modes 91 of operation. For instance, both AES-CBC and RC4, which together 92 comprise most current usage, have been attacked in the context of 93 TLS. A companion document [I-D.sheffer-uta-tls-attacks] provides 94 detailed information about these attacks. 96 Because of these attacks, those who implement and deploy TLS and DTLS 97 need updated guidance on how TLS can be used securely. Note that 98 this document provides guidance for deployed services, as well as 99 software implementations. In fact, this document calls for the 100 deployment of algorithms that are widely implemented but not yet 101 widely deployed. 103 The recommendations herein take into consideration the security of 104 various mechanisms, their technical maturity and interoperability, 105 and their prevalence in implementatios at the time of writing. These 106 recommendations apply to both TLS and DTLS. TLS 1.3, when it is 107 standardized and deployed in the field, should resolve the current 108 vulnerabilities while providing significantly better functionality, 109 and will very likely obsolete the current document. 111 Community knowledge about the strength of various algorithms and 112 feasible attacks can change quickly, and experience shows that a 113 security BCP is a point-in-time statement. Readers are advised to 114 seek out any errata or updates that apply to this document. 116 2. Conventions used in this document 118 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 119 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 120 document are to be interpreted as described in [RFC2119]. 122 3. Recommendations 124 3.1. Protocol Versions 126 It is important both to stop using old, less secure versions of SSL/ 127 TLS and to start using modern, more secure versions. Therefore: 129 o Implementations MUST NOT negotiate SSL version 2. 131 Rationale: SSLv2 has serious security vulnerabilities [RFC6176]. 133 o Implementations SHOULD NOT negotiate SSL version 3. 135 Rationale: SSLv3 [RFC6101] was an improvement over SSLv2 and 136 plugged some significant security holes, but did not support 137 strong cipher suites. 139 o Implementations MAY negotiate TLS version 1.0 [RFC2246]. 141 Rationale: TLS 1.0 (published in 1999) includes a way to downgrade 142 the connection to SSLv3 and does not support more modern, strong 143 cipher suites. 145 o Implementations MAY negotiate TLS version 1.1 [RFC4346]. 147 Rationale: TLS 1.1 (published in 2006) prevents downgrade attacks 148 to SSL, but does not support certain stronger cipher suites. 150 o Implementations MUST support, and prefer to negotiate, TLS version 151 1.2 [RFC5246]. 153 Rationale: Several stronger cipher suites are available only with 154 TLS 1.2 (published in 2008). 156 As of the date of this writing, the latest version of TLS is 1.2. 157 When TLS is updated to a newer version, this document will be updated 158 to recommend support for the latest version. If this document is not 159 updated in a timely manner, it can be assumed that support for the 160 latest version of TLS is recommended. 162 3.2. Fallback to SSL 164 Some client implementations revert to SSLv3 if the server rejected 165 higher versions of SSL/TLS. This fallback can be forced by a MITM 166 attacker. Moreover, IP scans [[reference?]] show that SSLv3-only 167 servers amount to only about 3% of the current web server population. 168 Therefore, by default clients SHOULD NOT fall back from TLS to SSLv3. 170 3.3. Cipher Suites 172 It is important both to stop using old, insecure cipher suites and to 173 start using modern, more secure cipher suites. Therefore: 175 o Implementations MUST NOT negotiate the NULL cipher suites. 177 Rationale: The NULL cipher suites offer no encryption whatsoever 178 and thus are completely insecure. 180 o Implementations MUST NOT negotiate RC4 cipher suites 182 Rationale: The RC4 stream cipher has a variety of cryptographic 183 weaknesses, as documented in [I-D.popov-tls-prohibiting-rc4]. 185 o Implementations MUST NOT negotiate cipher suites offering only so- 186 called "export-level" encryption (including algorithms with 40 187 bits or 56 bits of security). 189 Rationale: These cipher suites are deliberately "dumbed down" and 190 are very easy to break. 192 o Implementations SHOULD NOT negotiate cipher suites that use 193 algorithms offering less than 128 bits of security (even if they 194 advertise more bits, such as the 168-bit 3DES cipher suites). 196 Rationale: Although these cipher suites are not actively subject 197 to breakage, their useful life is short enough that stronger 198 cipher suites are desirable. 200 o Implementations SHOULD prefer cipher suites that use algorithms 201 with at least 128 (and, if possible, 256) bits of security. 203 Rationale: Although the useful life of such cipher suites is 204 unknown, it is probably at least several years for the 128-bit 205 ciphers and "until the next fundamental technology breakthrough" 206 for 256-bit ciphers. 208 o Implementations MUST support, and SHOULD prefer to negotiate, 209 cipher suites offering forward secrecy, such as those in the 210 "EDH", "DHE", and "ECDHE" families. 212 Rationale: Forward secrecy (sometimes called "perfect forward 213 secrecy") prevents the recovery of information that was encrypted 214 with older session keys, thus limiting the amount of time during 215 which attacks can be successful. 217 Given the foregoing considerations, implementation of the following 218 cipher suites is RECOMMENDED (see [RFC5289] for details): 220 o TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 222 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 224 o TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 226 o TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 228 We suggest that TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 be preferred in 229 general. 231 Unfortunately, those cipher suites are supported only in TLS 1.2 232 since they are authenticated encryption (AEAD) algorithms [RFC5116]. 233 A future version of this document might recommend cipher suites for 234 earlier versions of TLS. 236 [RFC4492] allows clients and servers to negotiate ECDH parameters 237 (curves). Clients and servers SHOULD prefer verifiably random curves 238 (specifically Brainpool P-256, brainpoolp256r1 [RFC7027]), and fall 239 back to the commonly used NIST P-256 (secp256r1) curve [RFC4492]. In 240 addition, clients SHOULD send an ec_point_formats extension with a 241 single element, "uncompressed". 243 3.4. Public Key Length 245 Because Diffie-Hellman keys of 1024 bits are estimated to be roughly 246 equivalent to 80-bit symmetric keys, it is better to use longer keys 247 for the "DH" family of cipher suites. Unfortunately, some existing 248 software cannot handle (or cannot easily handle) key lengths greater 249 than 1024 bits. The most common workaround for these systems is to 250 prefer the "ECDHE" family of cipher suites instead of the "DH" 251 family, then use longer keys. Key lengths of at least 2048 bits are 252 RECOMMENDED, since they are estimated to be roughly equivalent to 253 112-bit symmetric keys and might be sufficient for at least the next 254 10 years. In addition to 2048-bit server certificates, the use of 255 SHA-256 fingerprints is RECOMMENDED (see [CAB-Baseline] for more 256 details). 258 Note: The foregoing recommendations are preliminary and will likely 259 be corrected and enhanced in a future version of this document. 261 3.5. Compression 263 Implementations and deployments SHOULD disable TLS-level compression 264 ([RFC5246], Sec. 6.2.2). 266 3.6. Session Resumption 268 If TLS session resumption is used, care ought to be taken to do so 269 safely. In particular, the resumption information (either session 270 IDs [RFC5246] or session tickets [RFC5077]) needs to be authenticated 271 and encrypted to prevent modification or eavesdropping by an 272 attacker. For session tickets, a strong cipher suite SHOULD be used 273 when encrypting the ticket (as least as strong as the main TLS cipher 274 suite); ticket keys MUST be changed regularly, e.g. once every week, 275 so as not to negate the effect of forward secrecy. Session ticket 276 validity SHOULD be limited to a reasonable duration (e.g. 1 day), so 277 as not to negate the benefits of forward secrecy. 279 4. Detailed Guidelines 281 The following sections provide more detailed information about the 282 recommendations listed above. 284 4.1. Cipher Suite Negotiation Details 286 Clients SHOULD include TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 as the 287 first proposal to any server, unless they have prior knowledge that 288 the server cannot respond to a TLS 1.2 client_hello message. 290 Servers SHOULD prefer this cipher suite (or a similar but stronger 291 one) whenever it is proposed, even if it is not the first proposal. 293 Both clients and servers SHOULD include the "Supported Elliptic 294 Curves" extension [RFC4492]. 296 Clients are of course free to offer stronger cipher suites, e.g. 297 using AES-256; when they do, the server SHOULD prefer the stronger 298 cipher suite unless there are compelling reasons (e.g., seriously 299 degraded performance) to choose otherwise. 301 Note that other profiles of TLS 1.2 exist that use different cipher 302 suites. For example, [RFC6460] defines a profile that uses the 303 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and 304 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 cipher suites. 306 This document is not an application profile standard, in the sense of 307 Sec. 9 of [RFC5246]. As a result, clients and servers are still 308 required to support the TLS mandatory cipher suite, 309 TLS_RSA_WITH_AES_128_CBC_SHA. 311 4.2. Alternative Cipher Suites 313 Elliptic Curves Cryptography is not universally deployed for several 314 reasons, including its complexity compared to modular arithmetic and 315 longstanding IPR concerns. On the other hand, there are two related 316 issues hindering effective use of modular Diffie-Hellman cipher 317 suites in TLS: 319 o There are no protocol mechanisms to negotiate the DH groups or 320 parameter lengths supported by client and server. 322 o There are widely deployed client implementations that reject 323 received DH parameters, if they are longer than 1024 bits. 325 We note that with DHE and ECDHE cipher suites, the TLS master key 326 only depends on the Diffie Hellman parameters and not on the strength 327 the the RSA certificate; moreover, 1024 bits DH parameters are 328 generally considered insufficient at this time. 330 Because of the above, we recommend using (in priority order): 332 1. Elliptic Curve DHE with negotiated parameters [RFC5289] 334 2. TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 [RFC5288], with 2048-bit 335 Diffie-Hellman parameters 337 3. The same cipher suite, with 1024-bit parameters. 339 With modular ephemeral DH, deployers SHOULD carefully evaluate 340 interoperability vs. security considerations when configuring their 341 TLS endpoints. 343 5. IANA Considerations 345 This document requests no actions of IANA. 347 6. Security Considerations 349 6.1. AES-GCM 351 Please refer to [RFC5246], Sec. 11 for general security 352 considerations when using TLS 1.2, and to [RFC5288], Sec. 6 for 353 security considerations that apply specifically to AES-GCM when used 354 with TLS. 356 6.2. Forward Secrecy 358 Forward secrecy (also often called Perfect Forward Secrecy or "PFS") 359 is a defense against an attacker who records encrypted conversations 360 where the session keys are only encrypted with the communicating 361 parties' long-term keys. Should the attacker be able to obtain these 362 long-term keys at some point later in the future, he will be able to 363 decrypt the session keys and thus the entire conversation. In the 364 context of TLS and DTLS, such compromise of long-term keys is not 365 entirely implausible. It can happen, for example, due to: 367 o A client or server being attacked by some other attack vector, and 368 the private key retrieved. 370 o A long-term key retrieved from a device that has been sold or 371 otherwise decommissioned without prior wiping. 373 o A long-term key used on a device as a default key [Heninger2012]. 375 o A key generated by a Trusted Third Party like a CA, and later 376 retrieved from it either by extortion or compromise 377 [Soghoian2011]. 379 o A cryptographic break-through, or the use of asymmetric keys with 380 insufficient length [Kleinjung2010]. 382 PFS ensures in such cases that the session keys cannot be determined 383 even by an attacker who obtains the long-term keys some time after 384 the conversation. It also protects against an attacker who is in 385 possession of the long-term keys, but remains passive during the 386 conversation. 388 PFS is generally achieved by using the Diffie-Hellman scheme to 389 derive session keys. The Diffie-Hellman scheme has both parties 390 maintain private secrets and send parameters over the network as 391 modular powers over certain cyclic groups. The properties of the so- 392 called Discrete Logarithm Problem (DLP) allow to derive the session 393 keys without an eavesdropper being able to do so. There is currently 394 no known attack against DLP if sufficiently large parameters are 395 chosen. 397 Unfortunately, many TLS/DTLS cipher suites were defined that do not 398 enable PFS, e.g. TLS_RSA_WITH_AES_256_CBC_SHA256. We thus advocate 399 strict use of PFS-only ciphers. 401 7. Acknowledgements 403 We would like to thank Stephen Farrell, Simon Josefsson, Yoav Nir, 404 Kenny Paterson, Patrick Pelletier, and Rich Salz for their review. 405 Thanks to Brian Smith whose "browser cipher suites" page is a great 406 resource. Finally, thanks to all others who commented on the TLS and 407 other lists and are not mentioned here by name. 409 8. References 411 8.1. Normative References 413 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 414 Requirement Levels", BCP 14, RFC 2119, March 1997. 416 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 417 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 418 for Transport Layer Security (TLS)", RFC 4492, May 2006. 420 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 421 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 423 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 424 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 425 August 2008. 427 [RFC5289] Rescorla, E., "TLS Elliptic Curve Cipher Suites with 428 SHA-256/384 and AES Galois Counter Mode (GCM)", RFC 5289, 429 August 2008. 431 [RFC6176] Turner, S. and T. Polk, "Prohibiting Secure Sockets Layer 432 (SSL) Version 2.0", RFC 6176, March 2011. 434 [RFC7027] Merkle, J. and M. Lochter, "Elliptic Curve Cryptography 435 (ECC) Brainpool Curves for Transport Layer Security 436 (TLS)", RFC 7027, October 2013. 438 8.2. Informative References 440 [CAB-Baseline] 441 "Baseline Requirements for the Issuance and Management of 442 Publicly-Trusted Certificates Version 1.1.6", 2013, 443 . 445 [Heninger2012] 446 Heninger, N., Durumeric, Z., Wustrow, E., and J. 447 Halderman, "Mining Your Ps and Qs: Detection of Widespread 448 Weak Keys in Network Devices", Usenix Security Symposium 449 2012, 2012. 451 [I-D.popov-tls-prohibiting-rc4] 452 Popov, A., "Prohibiting RC4 Cipher Suites", draft-popov- 453 tls-prohibiting-rc4-01 (work in progress), October 2013. 455 [I-D.sheffer-uta-tls-attacks] 456 Sheffer, Y., Holz, R., and P. Saint-Andre, "Summarizing 457 Current Attacks on TLS and DTLS", draft-sheffer-uta-tls- 458 attacks-00 (work in progress), February 2014. 460 [Kleinjung2010] 461 Kleinjung, T., "Factorization of a 768-Bit RSA Modulus", 462 CRYPTO 10, 2010. 464 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 465 RFC 2246, January 1999. 467 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 468 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 470 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 471 "Transport Layer Security (TLS) Session Resumption without 472 Server-Side State", RFC 5077, January 2008. 474 [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated 475 Encryption", RFC 5116, January 2008. 477 [RFC6101] Freier, A., Karlton, P., and P. Kocher, "The Secure 478 Sockets Layer (SSL) Protocol Version 3.0", RFC 6101, 479 August 2011. 481 [RFC6460] Salter, M. and R. Housley, "Suite B Profile for Transport 482 Layer Security (TLS)", RFC 6460, January 2012. 484 [Soghoian2011] 485 Soghoian, C. and S. Stamm, "Certified lies: Detecting and 486 defeating government interception attacks against SSL.", 487 Proc. 15th Int. Conf. Financial Cryptography and Data 488 Security , 2011. 490 Appendix A. Appendix: Change Log 492 Note to RFC Editor: please remove this section before publication. 494 A.1. -02 496 o Reorganized the content to focus on recommendations. 498 o Moved description of attacks to a separate document (draft- 499 sheffer-uta-tls-attacks). 501 o Strengthened recommendations regarding session resumption. 503 A.2. -01 505 o Clarified our motivation in the introduction. 507 o Added a section justifying the need for PFS. 509 o Added recommendations for RSA and DH parameter lengths. Moved 510 from DHE to ECDHE, with a discussion on whether/when DHE is 511 appropriate. 513 o Recommendation to avoid fallback to SSLv3. 515 o Initial information about browser support - more still needed! 517 o More clarity on compression. 519 o Client can offer stronger cipher suites. 521 o Discussion of the regular TLS mandatory cipher suite. 523 A.3. -00 525 o Initial version. 527 Authors' Addresses 529 Yaron Sheffer 530 Porticor 531 29 HaHarash St. 532 Hod HaSharon 4501303 533 Israel 535 Email: yaronf.ietf@gmail.com 537 Ralph Holz 538 Technische Universitaet Muenchen 539 Boltzmannstr. 3 540 Garching 85748 541 Germany 543 Email: holz@net.in.tum.de 545 Peter Saint-Andre 546 &yet 548 Email: ietf@stpeter.im