idnits 2.17.1 draft-ietf-uta-tls-bcp-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 : ---------------------------------------------------------------------------- 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 (March 27, 2014) is 3682 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: September 28, 2014 TUM 6 P. Saint-Andre 7 &yet 8 March 27, 2014 10 Recommendations for Secure Use of TLS and DTLS 11 draft-ietf-uta-tls-bcp-00 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 September 28, 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. draft-ietf-tls-bcp-00 . . . . . . . . . . . . . . . . . . 11 80 A.2. draft-sheffer-tls-bcp-02 . . . . . . . . . . . . . . . . 11 81 A.3. draft-sheffer-tls-bcp-01 . . . . . . . . . . . . . . . . 11 82 A.4. draft-sheffer-tls-bcp-00 . . . . . . . . . . . . . . . . 12 83 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 85 1. Introduction 87 Transport Layer Security (TLS) and Datagram Transport Security Layer 88 (DTLS) are widely used to protect data exchanged over application 89 protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP. Over the 90 last few years, several serious attacks on TLS have emerged, 91 including attacks on its most commonly used cipher suites and modes 92 of operation. For instance, both AES-CBC and RC4, which together 93 comprise most current usage, have been attacked in the context of 94 TLS. A companion document [I-D.sheffer-uta-tls-attacks] provides 95 detailed information about these attacks. 97 Because of these attacks, those who implement and deploy TLS and DTLS 98 need updated guidance on how TLS can be used securely. Note that 99 this document provides guidance for deployed services, as well as 100 software implementations. In fact, this document calls for the 101 deployment of algorithms that are widely implemented but not yet 102 widely deployed. 104 The recommendations herein take into consideration the security of 105 various mechanisms, their technical maturity and interoperability, 106 and their prevalence in implementatios at the time of writing. These 107 recommendations apply to both TLS and DTLS. TLS 1.3, when it is 108 standardized and deployed in the field, should resolve the current 109 vulnerabilities while providing significantly better functionality, 110 and will very likely obsolete the current document. 112 Community knowledge about the strength of various algorithms and 113 feasible attacks can change quickly, and experience shows that a 114 security BCP is a point-in-time statement. Readers are advised to 115 seek out any errata or updates that apply to this document. 117 2. Conventions used in this document 119 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 120 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 121 document are to be interpreted as described in [RFC2119]. 123 3. Recommendations 125 3.1. Protocol Versions 127 It is important both to stop using old, less secure versions of SSL/ 128 TLS and to start using modern, more secure versions. Therefore: 130 o Implementations MUST NOT negotiate SSL version 2. 132 Rationale: SSLv2 has serious security vulnerabilities [RFC6176]. 134 o Implementations SHOULD NOT negotiate SSL version 3. 136 Rationale: SSLv3 [RFC6101] was an improvement over SSLv2 and 137 plugged some significant security holes, but did not support 138 strong cipher suites. 140 o Implementations MAY negotiate TLS version 1.0 [RFC2246]. 142 Rationale: TLS 1.0 (published in 1999) includes a way to downgrade 143 the connection to SSLv3 and does not support more modern, strong 144 cipher suites. 146 o Implementations MAY negotiate TLS version 1.1 [RFC4346]. 148 Rationale: TLS 1.1 (published in 2006) prevents downgrade attacks 149 to SSL, but does not support certain stronger cipher suites. 151 o Implementations MUST support, and prefer to negotiate, TLS version 152 1.2 [RFC5246]. 154 Rationale: Several stronger cipher suites are available only with 155 TLS 1.2 (published in 2008). 157 As of the date of this writing, the latest version of TLS is 1.2. 158 When TLS is updated to a newer version, this document will be updated 159 to recommend support for the latest version. If this document is not 160 updated in a timely manner, it can be assumed that support for the 161 latest version of TLS is recommended. 163 3.2. Fallback to SSL 165 Some client implementations revert to SSLv3 if the server rejected 166 higher versions of SSL/TLS. This fallback can be forced by a MITM 167 attacker. Moreover, IP scans [[reference?]] show that SSLv3-only 168 servers amount to only about 3% of the current web server population. 169 Therefore, by default clients SHOULD NOT fall back from TLS to SSLv3. 171 3.3. Cipher Suites 173 It is important both to stop using old, insecure cipher suites and to 174 start using modern, more secure cipher suites. Therefore: 176 o Implementations MUST NOT negotiate the NULL cipher suites. 178 Rationale: The NULL cipher suites offer no encryption whatsoever 179 and thus are completely insecure. 181 o Implementations MUST NOT negotiate RC4 cipher suites 183 Rationale: The RC4 stream cipher has a variety of cryptographic 184 weaknesses, as documented in [I-D.popov-tls-prohibiting-rc4]. 186 o Implementations MUST NOT negotiate cipher suites offering only so- 187 called "export-level" encryption (including algorithms with 40 188 bits or 56 bits of security). 190 Rationale: These cipher suites are deliberately "dumbed down" and 191 are very easy to break. 193 o Implementations SHOULD NOT negotiate cipher suites that use 194 algorithms offering less than 128 bits of security (even if they 195 advertise more bits, such as the 168-bit 3DES cipher suites). 197 Rationale: Although these cipher suites are not actively subject 198 to breakage, their useful life is short enough that stronger 199 cipher suites are desirable. 201 o Implementations SHOULD prefer cipher suites that use algorithms 202 with at least 128 (and, if possible, 256) bits of security. 204 Rationale: Although the useful life of such cipher suites is 205 unknown, it is probably at least several years for the 128-bit 206 ciphers and "until the next fundamental technology breakthrough" 207 for 256-bit ciphers. 209 o Implementations MUST support, and SHOULD prefer to negotiate, 210 cipher suites offering forward secrecy, such as those in the 211 "EDH", "DHE", and "ECDHE" families. 213 Rationale: Forward secrecy (sometimes called "perfect forward 214 secrecy") prevents the recovery of information that was encrypted 215 with older session keys, thus limiting the amount of time during 216 which attacks can be successful. 218 Given the foregoing considerations, implementation of the following 219 cipher suites is RECOMMENDED (see [RFC5289] for details): 221 o TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 223 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 225 o TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 227 o TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 229 We suggest that TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 be preferred in 230 general. 232 Unfortunately, those cipher suites are supported only in TLS 1.2 233 since they are authenticated encryption (AEAD) algorithms [RFC5116]. 234 A future version of this document might recommend cipher suites for 235 earlier versions of TLS. 237 [RFC4492] allows clients and servers to negotiate ECDH parameters 238 (curves). Clients and servers SHOULD prefer verifiably random curves 239 (specifically Brainpool P-256, brainpoolp256r1 [RFC7027]), and fall 240 back to the commonly used NIST P-256 (secp256r1) curve [RFC4492]. In 241 addition, clients SHOULD send an ec_point_formats extension with a 242 single element, "uncompressed". 244 3.4. Public Key Length 246 Because Diffie-Hellman keys of 1024 bits are estimated to be roughly 247 equivalent to 80-bit symmetric keys, it is better to use longer keys 248 for the "DH" family of cipher suites. Unfortunately, some existing 249 software cannot handle (or cannot easily handle) key lengths greater 250 than 1024 bits. The most common workaround for these systems is to 251 prefer the "ECDHE" family of cipher suites instead of the "DH" 252 family, then use longer keys. Key lengths of at least 2048 bits are 253 RECOMMENDED, since they are estimated to be roughly equivalent to 254 112-bit symmetric keys and might be sufficient for at least the next 255 10 years. In addition to 2048-bit server certificates, the use of 256 SHA-256 fingerprints is RECOMMENDED (see [CAB-Baseline] for more 257 details). 259 Note: The foregoing recommendations are preliminary and will likely 260 be corrected and enhanced in a future version of this document. 262 3.5. Compression 264 Implementations and deployments SHOULD disable TLS-level compression 265 ([RFC5246], Sec. 6.2.2). 267 3.6. Session Resumption 269 If TLS session resumption is used, care ought to be taken to do so 270 safely. In particular, the resumption information (either session 271 IDs [RFC5246] or session tickets [RFC5077]) needs to be authenticated 272 and encrypted to prevent modification or eavesdropping by an 273 attacker. For session tickets, a strong cipher suite SHOULD be used 274 when encrypting the ticket (as least as strong as the main TLS cipher 275 suite); ticket keys MUST be changed regularly, e.g. once every week, 276 so as not to negate the effect of forward secrecy. Session ticket 277 validity SHOULD be limited to a reasonable duration (e.g. 1 day), so 278 as not to negate the benefits of forward secrecy. 280 4. Detailed Guidelines 282 The following sections provide more detailed information about the 283 recommendations listed above. 285 4.1. Cipher Suite Negotiation Details 287 Clients SHOULD include TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 as the 288 first proposal to any server, unless they have prior knowledge that 289 the server cannot respond to a TLS 1.2 client_hello message. 291 Servers SHOULD prefer this cipher suite (or a similar but stronger 292 one) whenever it is proposed, even if it is not the first proposal. 294 Both clients and servers SHOULD include the "Supported Elliptic 295 Curves" extension [RFC4492]. 297 Clients are of course free to offer stronger cipher suites, e.g. 298 using AES-256; when they do, the server SHOULD prefer the stronger 299 cipher suite unless there are compelling reasons (e.g., seriously 300 degraded performance) to choose otherwise. 302 Note that other profiles of TLS 1.2 exist that use different cipher 303 suites. For example, [RFC6460] defines a profile that uses the 304 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and 305 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 cipher suites. 307 This document is not an application profile standard, in the sense of 308 Sec. 9 of [RFC5246]. As a result, clients and servers are still 309 required to support the TLS mandatory cipher suite, 310 TLS_RSA_WITH_AES_128_CBC_SHA. 312 4.2. Alternative Cipher Suites 314 Elliptic Curves Cryptography is not universally deployed for several 315 reasons, including its complexity compared to modular arithmetic and 316 longstanding IPR concerns. On the other hand, there are two related 317 issues hindering effective use of modular Diffie-Hellman cipher 318 suites in TLS: 320 o There are no protocol mechanisms to negotiate the DH groups or 321 parameter lengths supported by client and server. 323 o There are widely deployed client implementations that reject 324 received DH parameters, if they are longer than 1024 bits. 326 We note that with DHE and ECDHE cipher suites, the TLS master key 327 only depends on the Diffie Hellman parameters and not on the strength 328 the the RSA certificate; moreover, 1024 bits DH parameters are 329 generally considered insufficient at this time. 331 Because of the above, we recommend using (in priority order): 333 1. Elliptic Curve DHE with negotiated parameters [RFC5289] 335 2. TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 [RFC5288], with 2048-bit 336 Diffie-Hellman parameters 338 3. The same cipher suite, with 1024-bit parameters. 340 With modular ephemeral DH, deployers SHOULD carefully evaluate 341 interoperability vs. security considerations when configuring their 342 TLS endpoints. 344 5. IANA Considerations 346 This document requests no actions of IANA. 348 6. Security Considerations 350 6.1. AES-GCM 352 Please refer to [RFC5246], Sec. 11 for general security 353 considerations when using TLS 1.2, and to [RFC5288], Sec. 6 for 354 security considerations that apply specifically to AES-GCM when used 355 with TLS. 357 6.2. Forward Secrecy 359 Forward secrecy (also often called Perfect Forward Secrecy or "PFS") 360 is a defense against an attacker who records encrypted conversations 361 where the session keys are only encrypted with the communicating 362 parties' long-term keys. Should the attacker be able to obtain these 363 long-term keys at some point later in the future, he will be able to 364 decrypt the session keys and thus the entire conversation. In the 365 context of TLS and DTLS, such compromise of long-term keys is not 366 entirely implausible. It can happen, for example, due to: 368 o A client or server being attacked by some other attack vector, and 369 the private key retrieved. 371 o A long-term key retrieved from a device that has been sold or 372 otherwise decommissioned without prior wiping. 374 o A long-term key used on a device as a default key [Heninger2012]. 376 o A key generated by a Trusted Third Party like a CA, and later 377 retrieved from it either by extortion or compromise 378 [Soghoian2011]. 380 o A cryptographic break-through, or the use of asymmetric keys with 381 insufficient length [Kleinjung2010]. 383 PFS ensures in such cases that the session keys cannot be determined 384 even by an attacker who obtains the long-term keys some time after 385 the conversation. It also protects against an attacker who is in 386 possession of the long-term keys, but remains passive during the 387 conversation. 389 PFS is generally achieved by using the Diffie-Hellman scheme to 390 derive session keys. The Diffie-Hellman scheme has both parties 391 maintain private secrets and send parameters over the network as 392 modular powers over certain cyclic groups. The properties of the so- 393 called Discrete Logarithm Problem (DLP) allow to derive the session 394 keys without an eavesdropper being able to do so. There is currently 395 no known attack against DLP if sufficiently large parameters are 396 chosen. 398 Unfortunately, many TLS/DTLS cipher suites were defined that do not 399 enable PFS, e.g. TLS_RSA_WITH_AES_256_CBC_SHA256. We thus advocate 400 strict use of PFS-only ciphers. 402 7. Acknowledgements 404 We would like to thank Stephen Farrell, Simon Josefsson, Yoav Nir, 405 Kenny Paterson, Patrick Pelletier, and Rich Salz for their review. 406 Thanks to Brian Smith whose "browser cipher suites" page is a great 407 resource. Finally, thanks to all others who commented on the TLS and 408 other lists and are not mentioned here by name. 410 8. References 412 8.1. Normative References 414 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 415 Requirement Levels", BCP 14, RFC 2119, March 1997. 417 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 418 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 419 for Transport Layer Security (TLS)", RFC 4492, May 2006. 421 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 422 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 424 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 425 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 426 August 2008. 428 [RFC5289] Rescorla, E., "TLS Elliptic Curve Cipher Suites with 429 SHA-256/384 and AES Galois Counter Mode (GCM)", RFC 5289, 430 August 2008. 432 [RFC6176] Turner, S. and T. Polk, "Prohibiting Secure Sockets Layer 433 (SSL) Version 2.0", RFC 6176, March 2011. 435 [RFC7027] Merkle, J. and M. Lochter, "Elliptic Curve Cryptography 436 (ECC) Brainpool Curves for Transport Layer Security 437 (TLS)", RFC 7027, October 2013. 439 8.2. Informative References 441 [CAB-Baseline] 442 "Baseline Requirements for the Issuance and Management of 443 Publicly-Trusted Certificates Version 1.1.6", 2013, 444 . 446 [Heninger2012] 447 Heninger, N., Durumeric, Z., Wustrow, E., and J. 448 Halderman, "Mining Your Ps and Qs: Detection of Widespread 449 Weak Keys in Network Devices", Usenix Security Symposium 450 2012, 2012. 452 [I-D.popov-tls-prohibiting-rc4] 453 Popov, A., "Prohibiting RC4 Cipher Suites", draft-popov- 454 tls-prohibiting-rc4-01 (work in progress), October 2013. 456 [I-D.sheffer-uta-tls-attacks] 457 Sheffer, Y., Holz, R., and P. Saint-Andre, "Summarizing 458 Current Attacks on TLS and DTLS", draft-sheffer-uta-tls- 459 attacks-00 (work in progress), February 2014. 461 [Kleinjung2010] 462 Kleinjung, T., "Factorization of a 768-Bit RSA Modulus", 463 CRYPTO 10, 2010. 465 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 466 RFC 2246, January 1999. 468 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 469 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 471 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 472 "Transport Layer Security (TLS) Session Resumption without 473 Server-Side State", RFC 5077, January 2008. 475 [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated 476 Encryption", RFC 5116, January 2008. 478 [RFC6101] Freier, A., Karlton, P., and P. Kocher, "The Secure 479 Sockets Layer (SSL) Protocol Version 3.0", RFC 6101, 480 August 2011. 482 [RFC6460] Salter, M. and R. Housley, "Suite B Profile for Transport 483 Layer Security (TLS)", RFC 6460, January 2012. 485 [Soghoian2011] 486 Soghoian, C. and S. Stamm, "Certified lies: Detecting and 487 defeating government interception attacks against SSL.", 488 Proc. 15th Int. Conf. Financial Cryptography and Data 489 Security , 2011. 491 Appendix A. Appendix: Change Log 493 Note to RFC Editor: please remove this section before publication. 495 A.1. draft-ietf-tls-bcp-00 497 o Initial WG version, with only updated references. 499 A.2. draft-sheffer-tls-bcp-02 501 o Reorganized the content to focus on recommendations. 503 o Moved description of attacks to a separate document (draft- 504 sheffer-uta-tls-attacks). 506 o Strengthened recommendations regarding session resumption. 508 A.3. draft-sheffer-tls-bcp-01 510 o Clarified our motivation in the introduction. 512 o Added a section justifying the need for PFS. 514 o Added recommendations for RSA and DH parameter lengths. Moved 515 from DHE to ECDHE, with a discussion on whether/when DHE is 516 appropriate. 518 o Recommendation to avoid fallback to SSLv3. 520 o Initial information about browser support - more still needed! 522 o More clarity on compression. 524 o Client can offer stronger cipher suites. 526 o Discussion of the regular TLS mandatory cipher suite. 528 A.4. draft-sheffer-tls-bcp-00 530 o Initial version. 532 Authors' Addresses 534 Yaron Sheffer 535 Porticor 536 29 HaHarash St. 537 Hod HaSharon 4501303 538 Israel 540 Email: yaronf.ietf@gmail.com 542 Ralph Holz 543 Technische Universitaet Muenchen 544 Boltzmannstr. 3 545 Garching 85748 546 Germany 548 Email: holz@net.in.tum.de 550 Peter Saint-Andre 551 &yet 553 Email: ietf@stpeter.im