idnits 2.17.1 draft-ietf-uta-tls-bcp-04.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 (September 30, 2014) is 3486 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 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 4492 (Obsoleted by RFC 8422) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) ** Obsolete normative reference: RFC 6347 (Obsoleted by RFC 9147) == Outdated reference: A later version (-14) exists of draft-ietf-dane-srv-07 == Outdated reference: A later version (-01) exists of draft-ietf-tls-prohibiting-rc4-00 == Outdated reference: A later version (-05) exists of draft-ietf-uta-tls-attacks-04 -- 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 4347 (Obsoleted by RFC 6347) -- Obsolete informational reference (is this intentional?): RFC 5077 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 6961 (Obsoleted by RFC 8446) Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 6 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: April 3, 2015 TUM 6 P. Saint-Andre 7 &yet 8 September 30, 2014 10 Recommendations for Secure Use of TLS and DTLS 11 draft-ietf-uta-tls-bcp-04 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 deployed services that use TLS and DTLS. The 22 recommendations are applicable to the majority of use cases. 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 April 3, 2015. 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 . . . . . . . . . . . . . . . . . . . . . . . . 3 59 2. Intended Audience and Applicability Statement . . . . . . . . 4 60 2.1. Security Services . . . . . . . . . . . . . . . . . . . . 4 61 2.2. Examples . . . . . . . . . . . . . . . . . . . . . . . . 4 62 3. Conventions used in this document . . . . . . . . . . . . . . 5 63 4. General Recommendations . . . . . . . . . . . . . . . . . . . 5 64 4.1. Protocol Versions . . . . . . . . . . . . . . . . . . . . 5 65 4.2. Applicability to DTLS . . . . . . . . . . . . . . . . . . 6 66 4.3. Fallback to SSL . . . . . . . . . . . . . . . . . . . . . 6 67 4.4. Strict TLS . . . . . . . . . . . . . . . . . . . . . . . 6 68 4.5. Compression . . . . . . . . . . . . . . . . . . . . . . . 7 69 4.6. TLS Session Resumption . . . . . . . . . . . . . . . . . 7 70 4.7. TLS Renegotiation . . . . . . . . . . . . . . . . . . . . 7 71 4.8. Server Name Indication . . . . . . . . . . . . . . . . . 8 72 5. Recommendations: Cipher Suites . . . . . . . . . . . . . . . 8 73 5.1. General Guidelines . . . . . . . . . . . . . . . . . . . 8 74 5.2. Recommended Cipher Suites . . . . . . . . . . . . . . . . 9 75 5.3. Cipher Suite Negotiation Details . . . . . . . . . . . . 10 76 5.4. Public Key Length . . . . . . . . . . . . . . . . . . . . 10 77 5.5. Modular vs. Elliptic Curve DH Cipher Suites . . . . . . . 11 78 5.6. Truncated HMAC . . . . . . . . . . . . . . . . . . . . . 11 79 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 80 7. Security Considerations . . . . . . . . . . . . . . . . . . . 12 81 7.1. Host Name Validation . . . . . . . . . . . . . . . . . . 12 82 7.2. AES-GCM . . . . . . . . . . . . . . . . . . . . . . . . . 12 83 7.3. Forward Secrecy . . . . . . . . . . . . . . . . . . . . . 12 84 7.4. Diffie Hellman Exponent Reuse . . . . . . . . . . . . . . 13 85 7.5. Certificate Revocation . . . . . . . . . . . . . . . . . 14 86 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 14 87 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 15 88 9.1. Normative References . . . . . . . . . . . . . . . . . . 15 89 9.2. Informative References . . . . . . . . . . . . . . . . . 15 90 Appendix A. Change Log . . . . . . . . . . . . . . . . . . . . . 18 91 A.1. draft-ietf-uta-tls-bcp-04 . . . . . . . . . . . . . . . . 18 92 A.2. draft-ietf-uta-tls-bcp-03 . . . . . . . . . . . . . . . . 18 93 A.3. draft-ietf-uta-tls-bcp-02 . . . . . . . . . . . . . . . . 18 94 A.4. draft-ietf-tls-bcp-01 . . . . . . . . . . . . . . . . . . 18 95 A.5. draft-ietf-tls-bcp-00 . . . . . . . . . . . . . . . . . . 19 96 A.6. draft-sheffer-tls-bcp-02 . . . . . . . . . . . . . . . . 19 97 A.7. draft-sheffer-tls-bcp-01 . . . . . . . . . . . . . . . . 19 98 A.8. draft-sheffer-tls-bcp-00 . . . . . . . . . . . . . . . . 20 99 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 101 1. Introduction 103 Transport Layer Security (TLS) and Datagram Transport Security Layer 104 (DTLS) are widely used to protect data exchanged over application 105 protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP. Over the 106 last few years, several serious attacks on TLS have emerged, 107 including attacks on its most commonly used cipher suites and modes 108 of operation. For instance, both AES-CBC and RC4, which together 109 comprise most current usage, have been attacked in the context of 110 TLS. A companion document [I-D.ietf-uta-tls-attacks] provides 111 detailed information about these attacks. 113 Because of these attacks, those who implement and deploy TLS and DTLS 114 need updated guidance on how TLS can be used securely. Note that 115 this document provides guidance for deployed services, as well as 116 software implementations, assuming the implementer expects his or her 117 code to be deployed in environments defined in the following section. 118 In fact, this document calls for the deployment of algorithms that 119 are widely implemented but not yet widely deployed. Concerning 120 deployment, this document targets a wide audience, namely all 121 deployers who wish to add confidentiality and data integrity 122 protection to their communications. In many (but not all) cases 123 authentication is also desired. This document does not address the 124 rare deployment scenarios where no confidentiality is desired. 126 The recommendations herein take into consideration the security of 127 various mechanisms, their technical maturity and interoperability, 128 and their prevalence in implementations at the time of writing. 129 Unless noted otherwise, these recommendations apply to both TLS and 130 DTLS. TLS 1.3, when it is standardized and deployed in the field, 131 should resolve the current vulnerabilities while providing 132 significantly better functionality, and will very likely obsolete 133 this document. 135 These are minimum recommendations for the use of TLS for the 136 specified audience. Individual specifications may have stricter 137 requirements related to one or more aspects of the protocol, based on 138 their particular circumstances. When that is the case, implementers 139 MUST adhere to those stricter requirements. 141 Community knowledge about the strength of various algorithms and 142 feasible attacks can change quickly, and experience shows that a 143 security BCP is a point-in-time statement. Readers are advised to 144 seek out any errata or updates that apply to this document. 146 2. Intended Audience and Applicability Statement 148 In the following, we specify which audience this document addresses 149 concerning deployment. This document applies only to environments 150 where confidentiality is required. It recommends algorithms and 151 configuration options that make secrecy of the data-in-transit 152 mandatory. While this includes the majority of the TLS use cases, 153 there are some notable exceptions. 155 This document assumes that data integrity protection is always one of 156 the goals of a deployment. In cases when integrity is not required, 157 it does not make sense to employ TLS in the first place. There are 158 attacks against confidentiality-only protection that utilize the lack 159 of integrity to also break confidentiality (see e.g. [DegabrieleP07] 160 in the context of IPsec). Thus, even when using opportunistic 161 encryption, it is essential to provide cryptographic data integrity 162 protection 164 2.1. Security Services 166 This document provides recommendations for an audience that wishes to 167 secure their communication with TLS to achieve the following: 169 o Confidentiality: all (payload) communication is encrypted with the 170 goal that no party should be able to decrypt it except the 171 intended receiver. 173 o Data integrity: any changes made to the communication are 174 detectable by the receiver. 176 o Optionally, authentication: this means that an end-point of the 177 TLS communication is authenticated as the intended entity to 178 communicate with. TLS allows to authenticate one or both end- 179 points in the communication. 181 Deployers MUST verify that they do not need one of the above security 182 services if they deviate from the recommendations given in this 183 document. 185 2.2. Examples 187 The intended audience covers those services that are most commonly 188 used on the Internet. Typically, all communication between clients 189 and servers requires all three of the above security services. 191 o Operators of WWW servers (HTTPS). 193 o Operators of email servers who wish to protect the application- 194 layer protocols with TLS (e.g., IMAP, POP3, or SMTP between client 195 and server). 197 o Operators of instant-messaging services who wish to protect their 198 application-layer protocols with TLS (e.g. XMPP or IRC between 199 client and server). 201 An example of an audience not needing confidentiality is the 202 following: a monitored network where the authorities in charge of 203 that traffic domain require full access to unencrypted (plaintext) 204 traffic, and where users collaborate and send their traffic in the 205 clear. 207 3. Conventions used in this document 209 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 210 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 211 document are to be interpreted as described in [RFC2119]. 213 4. General Recommendations 215 This section provides general recommendations on the secure use of 216 TLS. Recommendations related to cipher suites are discussed in the 217 following section. 219 4.1. Protocol Versions 221 It is important both to stop using old, less secure versions of SSL/ 222 TLS and to start using modern, more secure versions. Therefore: 224 o Implementations MUST NOT negotiate SSL version 2. 226 Rationale: SSLv2 is considered today as insecure [RFC6176]. 228 o Implementations MUST NOT negotiate SSL version 3. 230 Rationale: SSLv3 [RFC6101] was an improvement over SSLv2 and 231 plugged some significant security holes, but did not support 232 strong cipher suites. In addition, SSLv3 does not support TLS 233 extensions, some of which are considered security-critical today. 235 o Implementations SHOULD NOT negotiate TLS version 1.0 [RFC2246]. 237 Rationale: TLS 1.0 (published in 1999) does not support many 238 modern, strong cipher suites. 240 o Implementations MAY negotiate TLS version 1.1 [RFC4346]. 242 Rationale: TLS 1.1 (published in 2006) is a security improvement 243 over TLS 1.0, but still does not support certain stronger cipher 244 suites. 246 o Implementations MUST support, and prefer to negotiate, TLS version 247 1.2 [RFC5246]. 249 Rationale: Several stronger cipher suites are available only with 250 TLS 1.2 (published in 2008). 252 This BCP applies to TLS 1.2. It is not safe for readers to assume 253 that the recommendations in this BCP apply to any future version of 254 TLS. 256 4.2. Applicability to DTLS 258 DTLS [RFC4347] [RFC6347] is an adaptation of TLS for UDP datagrams. 260 With respect to the recommendations in the current document, DTLS 1.0 261 is equivalent to TLS 1.1. The only exception is RC4 which is 262 disallowed in DTLS. DTLS 1.2 is equivalent to TLS 1.2. 264 4.3. Fallback to SSL 266 Some client implementations revert to lower versions of TLS or even 267 to SSLv3 if the server rejected higher versions of the protocol. 268 This fall back can be forced by a man in the middle (MITM) attacker. 269 By default, such clients MUST NOT fall back to SSLv3. 271 Rationale: TLS 1.0 and SSLv3 are significantly less secure than TLS 272 1.2, the version recommended by this document. While TLS 1.0-only 273 servers are still quite common, IP scans show that SSLv3-only servers 274 amount to only about 3% of the current Web server population. 276 4.4. Strict TLS 278 Combining unprotected and TLS-protected communication opens the way 279 to SSL Stripping and similar attacks. Therefore: 281 o In cases where an application protocol allows implementations or 282 deployments a choice between strict TLS configuration and dynamic 283 upgrade from unencrypted to TLS-protected traffic (such as 284 STARTTLS), clients and servers SHOULD prefer strict TLS 285 configuration. 287 o HTTP client and server implementations MUST support the HTTP 288 Strict Transport Security (HSTS) header [RFC6797], in order to 289 allow Web servers to advertise that they are willing to accept 290 TLS-only clients. 292 o When applicable, Web servers SHOULD use HSTS to indicate that they 293 are willing to accept TLS-only clients. 295 4.5. Compression 297 Implementations and deployments SHOULD disable TLS-level compression 298 ([RFC5246], Sec. 6.2.2), because it has been subject to security 299 attacks. 301 Implementers should note that compression at higher protocol levels 302 can allow an active attacker to extract cleartext information from 303 the connection. The BREACH attack is one such case. These issues 304 can only be mitigated outside of TLS and are thus out of scope of the 305 current document. See Sec. 2.5 of [I-D.ietf-uta-tls-attacks] for 306 further details. 308 4.6. TLS Session Resumption 310 If TLS session resumption is used, care ought to be taken to do so 311 safely. In particular, when using session tickets [RFC5077], the 312 resumption information MUST be authenticated and encrypted to prevent 313 modification or eavesdropping by an attacker. Further 314 recommendations apply to session tickets: 316 o A strong cipher suite MUST be used when encrypting the ticket (as 317 least as strong as the main TLS cipher suite). 319 o Ticket keys MUST be changed regularly, e.g. once every week, so as 320 not to negate the benefits of forward secrecy (see Section 7.3 for 321 details on forward secrecy). 323 o Session ticket validity SHOULD be limited to a reasonable duration 324 (e.g. 1 day), for similar reasons. 326 4.7. TLS Renegotiation 328 Where handshake renegotiation is implemented, both clients and 329 servers MUST implement the renegotiation_info extension, as defined 330 in [RFC5746]. 332 To counter the Triple Handshake attack, we adopt the recommendation 333 from [triple-handshake]: TLS clients SHOULD ensure that all 334 certificates received over a connection are valid for the current 335 server endpoint, and abort the handshake if they are not. In some 336 usages, it may be simplest to refuse any change of certificates 337 during renegotiation. 339 4.8. Server Name Indication 341 TLS implementations MUST support the Server Name Indication (SNI) 342 extension for those higher level protocols which would benefit from 343 it, including HTTPS. However, unlike implementation, the use of SNI 344 in particular circumstances is a matter of local policy. 346 5. Recommendations: Cipher Suites 348 TLS and its implementations provide considerable flexibility in the 349 selection of cipher suites. Unfortunately many available cipher 350 suites are insecure, and so misconfiguration can easily result in 351 reduced security. This section includes recommendations on the 352 selection and negotiation of cipher suites. 354 5.1. General Guidelines 356 It is important both to stop using old, insecure cipher suites and to 357 start using modern, more secure cipher suites. Therefore: 359 o Implementations MUST NOT negotiate the NULL cipher suites. 361 Rationale: The NULL cipher suites offer no encryption whatsoever 362 and thus are completely insecure. 364 o Implementations MUST NOT negotiate RC4 cipher suites 366 Rationale: The RC4 stream cipher has a variety of cryptographic 367 weaknesses, as documented in [I-D.ietf-tls-prohibiting-rc4]. 369 o Implementations MUST NOT negotiate cipher suites offering only so- 370 called "export-level" encryption (including algorithms with 40 371 bits or 56 bits of security). 373 Rationale: These cipher suites are deliberately "dumbed down" and 374 are very easy to break. 376 o Applications MUST NOT negotiate cipher suites of less than 112 377 bits of security. 379 o Implementations SHOULD NOT negotiate cipher suites that use 380 algorithms offering less than 128 bits of security. Note that 381 some legacy cipher suites (e.g. 168-bit 3DES) have an effective 382 key length which is smaller than their nominal key length (112 383 bits in the case of 3DES). Such cipher suites should be evaluated 384 according to their effective key length. 386 Rationale: Although these cipher suites are not actively subject 387 to breakage, their useful lifespan is short enough that stronger 388 cipher suites are desirable. 128-bit ciphers are expected to 389 remain secure for at least several years, and 256-bit ciphers 390 "until the next fundamental technology breakthrough". 392 o Implementations MUST support, and SHOULD prefer to negotiate, 393 cipher suites offering forward secrecy, such as those in the 394 Ephemeral Diffie-Hellman and Elliptic Curve Ephemeral Diffie 395 Hellman ("DHE" and "ECDHE") families. 397 Rationale: Forward secrecy (sometimes called "perfect forward 398 secrecy") prevents the recovery of information that was encrypted 399 with older session keys, thus limiting the amount of time during 400 which attacks can be successful. 402 5.2. Recommended Cipher Suites 404 Given the foregoing considerations, implementation of the following 405 cipher suites is RECOMMENDED: 407 o TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 409 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 411 o TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 413 o TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 415 We suggest that TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 be preferred in 416 general. See [RFC5289] for additional implementation details. 418 It is noted that those cipher suites are supported only in TLS 1.2 419 since they are authenticated encryption (AEAD) algorithms [RFC5116]. 421 [RFC4492] allows clients and servers to negotiate ECDH parameters 422 (curves). Both clients and servers SHOULD include the "Supported 423 Elliptic Curves" extension [RFC4492]. For interoperability, clients 424 and servers SHOULD support the NIST P-256 (secp256r1) curve 425 [RFC4492]. In addition, clients SHOULD send an ec_point_formats 426 extension with a single element, "uncompressed". 428 5.3. Cipher Suite Negotiation Details 430 Clients SHOULD include TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 as the 431 first proposal to any server, unless they have prior knowledge that 432 the server cannot respond to a TLS 1.2 client_hello message. 434 Servers SHOULD prefer this cipher suite whenever it is proposed, even 435 if it is not the first proposal. 437 Clients are of course free to offer stronger cipher suites, e.g. 438 using AES-256; when they do, the server SHOULD prefer the stronger 439 cipher suite unless there are compelling reasons (e.g., seriously 440 degraded performance) to choose otherwise. 442 Note that other profiles of TLS 1.2 exist that use different cipher 443 suites. For example, [RFC6460] defines a profile that uses the 444 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and 445 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 cipher suites. 447 This document is not an application profile standard, in the sense of 448 Sec. 9 of [RFC5246]. As a result, clients and servers are still 449 REQUIRED to support the mandatory TLS cipher suite, 450 TLS_RSA_WITH_AES_128_CBC_SHA. 452 5.4. Public Key Length 454 With a key exchange based on modular Diffie-Hellman ("DHE" cipher 455 suites), key lengths of at least 2048 bits are RECOMMENDED. 457 Rationale: because Diffie-Hellman keys of 1024 bits are estimated to 458 be roughly equivalent to 80-bit symmetric keys, it is better to use 459 longer keys for the "DHE" family of cipher suites. Unfortunately, 460 some existing software cannot handle (or cannot easily handle) key 461 lengths greater than 1024 bits. The most common workaround for these 462 systems is to prefer the "ECDHE" family of cipher suites instead of 463 the "DHE" family. For modular groups, key lengths of at least 2048 464 bits are estimated to be roughly equivalent to 112-bit symmetric keys 465 and might be sufficient for at least the next 10 years. 467 Servers SHOULD authenticate using 2048-bit certificates. In 468 addition, the use of SHA-256 fingerprints is RECOMMENDED (see 469 [CAB-Baseline] for more details). Clients SHOULD indicate to servers 470 that they request SHA-256, by using the "Signature Algorithms" 471 extension defined in TLS 1.2. 473 5.5. Modular vs. Elliptic Curve DH Cipher Suites 475 Not all TLS implementations support both modular and EC Diffie- 476 Hellman groups, as required by Section 5.2. Some implementations are 477 severely limited in the length of DH values. When such 478 implementations need to be accommodated, we recommend using (in 479 priority order): 481 1. Elliptic Curve DHE with negotiated parameters [RFC5289] 483 2. TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 [RFC5288], with 2048-bit 484 Diffie-Hellman parameters 486 3. The same cipher suite, with 1024-bit parameters. 488 Rationale: Elliptic Curve Cryptography is not universally deployed 489 for several reasons, including its complexity compared to modular 490 arithmetic and longstanding IPR concerns. On the other hand, there 491 are two related issues hindering effective use of modular Diffie- 492 Hellman cipher suites in TLS: 494 o There are no protocol mechanisms to negotiate the DH groups or 495 parameter lengths supported by client and server. 497 o There are widely deployed client implementations that reject 498 received DH parameters if they are longer than 1024 bits. 500 We note that with DHE and ECDHE cipher suites, the TLS master key 501 only depends on the Diffie Hellman parameters and not on the strength 502 of the RSA certificate; moreover, 1024 bit modular DH parameters are 503 generally considered insufficient at this time. 505 With modular ephemeral DH, deployers SHOULD carefully evaluate 506 interoperability vs. security considerations when configuring their 507 TLS endpoints. 509 5.6. Truncated HMAC 511 The truncated HMAC extension, defined in Sec. 7 of [RFC6066] does not 512 apply to the AEAD cipher suites recommended above. However it does 513 apply to most other TLS cipher suites. Its use has been shown to be 514 insecure in [PatersonRS11], and implementations MUST NOT use it. 516 6. IANA Considerations 518 This document requests no actions of IANA. [Note to RFC Editor: 519 please remove this whole section before publication.] 521 7. Security Considerations 523 This entire document discusses the security practices directly 524 affecting applications using the TLS protocol. This section contains 525 broader security considerations related to technologies used in 526 conjunction with or by TLS. 528 7.1. Host Name Validation 530 Application authors should take note that TLS implementations 531 frequently do not validate host names, and must therefore determine 532 if the TLS implementation they are using does, and if not write their 533 own validation code or consider changing the TLS implementation. 535 It is noted that the requirements regarding host name validation (and 536 in general, binding between the TLS layer and the protocol that runs 537 above it) vary between different protocols. For HTTPS, these 538 requirements are defined by Sec. 3 of [RFC2818]. 540 Readers are referred to [RFC6125] for further details regarding 541 generic host name validation in the TLS context. In addition, the 542 RFC contains a long list of example protocols, some of which 543 implement a policy very different from HTTPS. 545 If the host name is discovered indirectly and in an insecure manner 546 (e.g., by an insecure DNS query for an MX or SRV record), it SHOULD 547 NOT be used as a reference identifier [RFC6125] even when it matches 548 the presented certificate. This proviso does not apply if the host 549 name is discovered securely (for further discussion, see for example 550 [I-D.ietf-dane-srv] and [I-D.ietf-dane-smtp]). 552 7.2. AES-GCM 554 Sec. Section 5.2 above recommends the use of the AES-GCM 555 authenticated encryption algorithm. Please refer to [RFC5246], Sec. 556 11 for general security considerations when using TLS 1.2, and to 557 [RFC5288], Sec. 6 for security considerations that apply specifically 558 to AES-GCM when used with TLS. 560 7.3. Forward Secrecy 562 Forward secrecy (also often called Perfect Forward Secrecy or "PFS", 563 and defined in [RFC4949]) is a defense against an attacker who 564 records encrypted conversations where the session keys are only 565 encrypted with the communicating parties' long-term keys. Should the 566 attacker be able to obtain these long-term keys at some point later 567 in time, he will be able to decrypt the session keys and thus the 568 entire conversation. In the context of TLS and DTLS, such compromise 569 of long-term keys is not entirely implausible. It can happen, for 570 example, due to: 572 o A client or server being attacked by some other attack vector, and 573 the private key retrieved. 575 o A long-term key retrieved from a device that has been sold or 576 otherwise decommissioned without prior wiping. 578 o A long-term key used on a device as a default key [Heninger2012]. 580 o A key generated by a Trusted Third Party like a CA, and later 581 retrieved from it either by extortion or compromise 582 [Soghoian2011]. 584 o A cryptographic break-through, or the use of asymmetric keys with 585 insufficient length [Kleinjung2010]. 587 PFS ensures in such cases that the session keys cannot be determined 588 even by an attacker who obtains the long-term keys some time after 589 the conversation. It also protects against an attacker who is in 590 possession of the long-term keys, but remains passive during the 591 conversation. 593 PFS is generally achieved by using the Diffie-Hellman scheme to 594 derive session keys. The Diffie-Hellman scheme has both parties 595 maintain private secrets and send parameters over the network as 596 modular powers over certain cyclic groups. The properties of the so- 597 called Discrete Logarithm Problem (DLP) allow to derive the session 598 keys without an eavesdropper being able to do so. There is currently 599 no known attack against DLP if sufficiently large parameters are 600 chosen. A variant of the Diffie-Hellman scheme uses Elliptic Curves 601 instead of the originally proposed modular arithmetics. 603 Unfortunately, many TLS/DTLS cipher suites were defined that do not 604 feature PFS, e.g. TLS_RSA_WITH_AES_256_CBC_SHA256. We thus advocate 605 strict use of PFS-only ciphers. 607 7.4. Diffie Hellman Exponent Reuse 609 For performance reasons, many TLS implementations reuse Diffie- 610 Hellman and Elliptic Curve Diffie-Hellman exponents across multiple 611 connections. Such reuse can result in major security issues: 613 o If exponents are reused for a long time (e.g., more than a few 614 hours), an attacker who gains access to the host can decrypt 615 previous connections. In other words, exponent reuse negates the 616 effects of forward secrecy. 618 o TLS implementations that reuse exponents should test the DH public 619 key they receive, in order to avoid some known attacks. These 620 tests are not standardized in TLS at the time of writing. See 621 [RFC6989] for recipient tests required of IKEv2 implementations 622 that reuse DH exponents. 624 7.5. Certificate Revocation 626 Unfortunately there is currently no effective, Internet-scale 627 mechanism to affect certificate revocation: 629 o Certificate Revocation Lists (CRLs) are non-scalable and therefore 630 rarely used. 632 o The On-Line Certification Status Protocol (OCSP) presents both 633 scaling and privacy issues when used for heavy traffic Web 634 servers. In addition, clients typically "soft-fail", meaning they 635 do not abort the TLS connection if the OCSP server does not 636 respond. 638 o OCSP stapling (Sec. 8 of [RFC6066]) resolves the operational 639 issues with OCSP, but is still ineffective in the presence of a 640 MITM attacker because they can simply ignore the client's request 641 for a stapled OCSP response. 643 o OCSP stapling as defined in [RFC6066] does not extend to 644 intermediate certificates used in a certificate chain. [RFC6961] 645 addresses this shortcoming, but is a recent addition without much 646 deployment. 648 o Proprietary mechanisms that embed revocation lists in the Web 649 browser's configuration database cannot scale beyond a small 650 number of the most heavily used Web servers. 652 The current consensus appears to be that OCSP stapling, combined with 653 a "must staple" mechanism similar to HSTS, would finally resolve this 654 problem; in particular when used together with the extension defined 655 in [RFC6961]. But such a mechanism has not been standardized yet. 657 8. Acknowledgments 659 We would like to thank Uri Blumenthal, Viktor Dukhovni, Stephen 660 Farrell, Simon Josefsson, Watson Ladd, Orit Levin, Johannes Merkle, 661 Bodo Moeller, Yoav Nir, Kenny Paterson, Patrick Pelletier, Tom 662 Ritter, Rich Salz, Aaron Zauner for their review and improvements. 663 Thanks to Brian Smith whose "browser cipher suites" page is a great 664 resource. Finally, thanks to all others who commented on the TLS, 665 UTA and other lists and are not mentioned here by name. 667 9. References 669 9.1. Normative References 671 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 672 Requirement Levels", BCP 14, RFC 2119, March 1997. 674 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 676 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 677 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 678 for Transport Layer Security (TLS)", RFC 4492, May 2006. 680 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 681 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 683 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 684 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 685 August 2008. 687 [RFC5289] Rescorla, E., "TLS Elliptic Curve Cipher Suites with SHA- 688 256/384 and AES Galois Counter Mode (GCM)", RFC 5289, 689 August 2008. 691 [RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov, 692 "Transport Layer Security (TLS) Renegotiation Indication 693 Extension", RFC 5746, February 2010. 695 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 696 Verification of Domain-Based Application Service Identity 697 within Internet Public Key Infrastructure Using X.509 698 (PKIX) Certificates in the Context of Transport Layer 699 Security (TLS)", RFC 6125, March 2011. 701 [RFC6176] Turner, S. and T. Polk, "Prohibiting Secure Sockets Layer 702 (SSL) Version 2.0", RFC 6176, March 2011. 704 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 705 Security Version 1.2", RFC 6347, January 2012. 707 9.2. Informative References 709 [CAB-Baseline] 710 CA/Browser Forum, , "Baseline Requirements for the 711 Issuance and Management of Publicly-Trusted Certificates 712 Version 1.1.6", 2013, . 715 [DegabrieleP07] 716 Degabriele, J. and K. Paterson, "Attacking the IPsec 717 standards in encryption-only configurations", 2007, 718 . 720 [Heninger2012] 721 Heninger, N., Durumeric, Z., Wustrow, E., and J. 722 Halderman, "Mining Your Ps and Qs: Detection of Widespread 723 Weak Keys in Network Devices", Usenix Security Symposium 724 2012, 2012. 726 [I-D.ietf-dane-smtp] 727 Finch, T., "Secure SMTP using DNS-Based Authentication of 728 Named Entities (DANE) TLSA records.", draft-ietf-dane- 729 smtp-01 (work in progress), February 2013. 731 [I-D.ietf-dane-srv] 732 Finch, T., Miller, M., and P. Saint-Andre, "Using DNS- 733 Based Authentication of Named Entities (DANE) TLSA Records 734 with SRV Records", draft-ietf-dane-srv-07 (work in 735 progress), July 2014. 737 [I-D.ietf-tls-prohibiting-rc4] 738 Popov, A., "Prohibiting RC4 Cipher Suites", draft-ietf- 739 tls-prohibiting-rc4-00 (work in progress), July 2014. 741 [I-D.ietf-uta-tls-attacks] 742 Sheffer, Y., Holz, R., and P. Saint-Andre, "Summarizing 743 Current Attacks on TLS and DTLS", draft-ietf-uta-tls- 744 attacks-04 (work in progress), September 2014. 746 [Kleinjung2010] 747 Kleinjung, T., "Factorization of a 768-Bit RSA Modulus", 748 CRYPTO 10, 2010, . 750 [PatersonRS11] 751 Paterson, K., Ristenpart, T., and T. Shrimpton, "Tag size 752 does matter: attacks and proofs for the TLS record 753 protocol", 2011, 754 . 756 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 757 RFC 2246, January 1999. 759 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 760 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 762 [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 763 Security", RFC 4347, April 2006. 765 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", RFC 766 4949, August 2007. 768 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 769 "Transport Layer Security (TLS) Session Resumption without 770 Server-Side State", RFC 5077, January 2008. 772 [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated 773 Encryption", RFC 5116, January 2008. 775 [RFC6066] Eastlake, D., "Transport Layer Security (TLS) Extensions: 776 Extension Definitions", RFC 6066, January 2011. 778 [RFC6101] Freier, A., Karlton, P., and P. Kocher, "The Secure 779 Sockets Layer (SSL) Protocol Version 3.0", RFC 6101, 780 August 2011. 782 [RFC6460] Salter, M. and R. Housley, "Suite B Profile for Transport 783 Layer Security (TLS)", RFC 6460, January 2012. 785 [RFC6797] Hodges, J., Jackson, C., and A. Barth, "HTTP Strict 786 Transport Security (HSTS)", RFC 6797, November 2012. 788 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 789 Multiple Certificate Status Request Extension", RFC 6961, 790 June 2013. 792 [RFC6989] Sheffer, Y. and S. Fluhrer, "Additional Diffie-Hellman 793 Tests for the Internet Key Exchange Protocol Version 2 794 (IKEv2)", RFC 6989, July 2013. 796 [Soghoian2011] 797 Soghoian, C. and S. Stamm, "Certified lies: Detecting and 798 defeating government interception attacks against SSL.", 799 Proc. 15th Int. Conf. Financial Cryptography and Data 800 Security , 2011. 802 [triple-handshake] 803 Delignat-Lavaud, A., Bhargavan, K., and A. Pironti, 804 "Triple Handshakes Considered Harmful: Breaking and Fixing 805 Authentication over TLS", 2014, . 808 Appendix A. Change Log 810 Note to RFC Editor: please remove this section before publication. 812 A.1. draft-ietf-uta-tls-bcp-04 814 o Some cleanup, and input from TLS WG discussion on applicability. 816 A.2. draft-ietf-uta-tls-bcp-03 818 o Disallow truncated HMAC. 820 o Applicability to DTLS. 822 o Some more text restructuring. 824 o Host name validation is sometimes irrelevant. 826 o HSTS: MUST implement, SHOULD deploy. 828 o Session identities are not protected, only tickets are. 830 o Clarified the target audience. 832 A.3. draft-ietf-uta-tls-bcp-02 834 o Rearranged some sections for clarity and re-styled the text so 835 that normative text is followed by rationale where possible. 837 o Removed the recommendation to use Brainpool curves. 839 o Triple Handshake mitigation. 841 o MUST NOT negotiate algorithms lower than 112 bits of security. 843 o MUST implement SNI, but use per local policy. 845 o Changed SHOULD NOT negotiate or fall back to SSLv3 to MUST NOT. 847 o Added hostname validation. 849 o Non-normative discussion of DH exponent reuse. 851 A.4. draft-ietf-tls-bcp-01 853 o Clarified that specific TLS-using protocols may have stricter 854 requirements. 856 o Changed TLS 1.0 from MAY to SHOULD NOT. 858 o Added discussion of "optional TLS" and HSTS. 860 o Recommended use of the Signature Algorithm and Renegotiation Info 861 extensions. 863 o Use of a strong cipher for a resumption ticket: changed SHOULD to 864 MUST. 866 o Added an informational discussion of certificate revocation, but 867 no recommendations. 869 A.5. draft-ietf-tls-bcp-00 871 o Initial WG version, with only updated references. 873 A.6. draft-sheffer-tls-bcp-02 875 o Reorganized the content to focus on recommendations. 877 o Moved description of attacks to a separate document (draft- 878 sheffer-uta-tls-attacks). 880 o Strengthened recommendations regarding session resumption. 882 A.7. draft-sheffer-tls-bcp-01 884 o Clarified our motivation in the introduction. 886 o Added a section justifying the need for PFS. 888 o Added recommendations for RSA and DH parameter lengths. Moved 889 from DHE to ECDHE, with a discussion on whether/when DHE is 890 appropriate. 892 o Recommendation to avoid fallback to SSLv3. 894 o Initial information about browser support - more still needed! 896 o More clarity on compression. 898 o Client can offer stronger cipher suites. 900 o Discussion of the regular TLS mandatory cipher suite. 902 A.8. draft-sheffer-tls-bcp-00 904 o Initial version. 906 Authors' Addresses 908 Yaron Sheffer 909 Porticor 910 29 HaHarash St. 911 Hod HaSharon 4501303 912 Israel 914 Email: yaronf.ietf@gmail.com 916 Ralph Holz 917 Technische Universitaet Muenchen 918 Boltzmannstr. 3 919 Garching 85748 920 Germany 922 Email: holz@net.in.tum.de 924 Peter Saint-Andre 925 &yet 926 P.O. Box 787 927 Parker, CO 80134 928 USA 930 Email: peter@andyet.com