idnits 2.17.1 draft-ietf-uta-rfc7525bis-01.txt: -(1247): Line appears to be too long, but this could be caused by non-ascii characters in UTF-8 encoding 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: ---------------------------------------------------------------------------- == There are 6 instances of lines with non-ascii characters in the document. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) -- The draft header indicates that this document obsoletes RFC7525, but the abstract doesn't seem to directly say this. It does mention RFC7525 though, so this could be OK. -- The draft header indicates that this document updates RFC6066, but the abstract doesn't seem to mention this, which it should. -- The draft header indicates that this document updates RFC5288, but the abstract doesn't seem to mention this, which it should. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC5288, updated by this document, for RFC5378 checks: 2007-06-19) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (7 July 2021) is 1023 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) == Unused Reference: 'I-D.irtf-cfrg-aead-limits' is defined on line 1246, but no explicit reference was found in the text == Outdated reference: A later version (-19) exists of draft-ietf-httpbis-semantics-16 -- Possible downref: Normative reference to a draft: ref. 'I-D.ietf-httpbis-semantics' ** Obsolete normative reference: RFC 4492 (Obsoleted by RFC 8422) ** Downref: Normative reference to an Informational RFC: RFC 4949 ** 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) ** Obsolete normative reference: RFC 7507 (Obsoleted by RFC 8996) ** Obsolete normative reference: RFC 8740 (Obsoleted by RFC 9113) == Outdated reference: A later version (-18) exists of draft-ietf-tls-esni-11 == Outdated reference: A later version (-08) exists of draft-irtf-cfrg-aead-limits-02 -- 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) -- Obsolete informational reference (is this intentional?): RFC 7525 (Obsoleted by RFC 9325) Summary: 8 errors (**), 0 flaws (~~), 6 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 UTA Working Group Y. Sheffer 3 Internet-Draft Intuit 4 Obsoletes: 7525 (if approved) R. Holz 5 Updates: 5288, 6066 (if approved) University of Twente 6 Intended status: Best Current Practice P. Saint-Andre 7 Expires: 8 January 2022 Mozilla 8 T. Fossati 9 arm 10 7 July 2021 12 Recommendations for Secure Use of Transport Layer Security (TLS) and 13 Datagram Transport Layer Security (DTLS) 14 draft-ietf-uta-rfc7525bis-01 16 Abstract 18 Transport Layer Security (TLS) and Datagram Transport Layer Security 19 (DTLS) are widely used to protect data exchanged over application 20 protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP. Over the 21 last few years, several serious attacks on TLS have emerged, 22 including attacks on its most commonly used cipher suites and their 23 modes of operation. This document provides recommendations for 24 improving the security of deployed services that use TLS and DTLS. 25 The recommendations are applicable to the majority of use cases. 27 This document was published as RFC 7525 when the industry was in the 28 midst of its transition to TLS 1.2. Years later this transition is 29 largely complete and TLS 1.3 is widely available. Given the new 30 environment, we believe new guidance is needed. 32 Status of This Memo 34 This Internet-Draft is submitted in full conformance with the 35 provisions of BCP 78 and BCP 79. 37 Internet-Drafts are working documents of the Internet Engineering 38 Task Force (IETF). Note that other groups may also distribute 39 working documents as Internet-Drafts. The list of current Internet- 40 Drafts is at https://datatracker.ietf.org/drafts/current/. 42 Internet-Drafts are draft documents valid for a maximum of six months 43 and may be updated, replaced, or obsoleted by other documents at any 44 time. It is inappropriate to use Internet-Drafts as reference 45 material or to cite them other than as "work in progress." 47 This Internet-Draft will expire on 8 January 2022. 49 Copyright Notice 51 Copyright (c) 2021 IETF Trust and the persons identified as the 52 document authors. All rights reserved. 54 This document is subject to BCP 78 and the IETF Trust's Legal 55 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 56 license-info) in effect on the date of publication of this document. 57 Please review these documents carefully, as they describe your rights 58 and restrictions with respect to this document. Code Components 59 extracted from this document must include Simplified BSD License text 60 as described in Section 4.e of the Trust Legal Provisions and are 61 provided without warranty as described in the Simplified BSD License. 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 66 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 67 3. General Recommendations . . . . . . . . . . . . . . . . . . . 5 68 3.1. Protocol Versions . . . . . . . . . . . . . . . . . . . . 5 69 3.1.1. SSL/TLS Protocol Versions . . . . . . . . . . . . . . 5 70 3.1.2. DTLS Protocol Versions . . . . . . . . . . . . . . . 6 71 3.1.3. Fallback to Lower Versions . . . . . . . . . . . . . 7 72 3.2. Strict TLS . . . . . . . . . . . . . . . . . . . . . . . 7 73 3.3. Compression . . . . . . . . . . . . . . . . . . . . . . . 8 74 3.4. TLS Session Resumption . . . . . . . . . . . . . . . . . 8 75 3.5. TLS Renegotiation . . . . . . . . . . . . . . . . . . . . 9 76 3.6. Post-Handshake Authentication . . . . . . . . . . . . . . 10 77 3.7. Server Name Indication . . . . . . . . . . . . . . . . . 10 78 3.8. Application-Layer Protocol Negotiation . . . . . . . . . 10 79 3.9. Zero Round Trip Time (0-RTT) Data in TLS 1.3 . . . . . . 11 80 4. Recommendations: Cipher Suites . . . . . . . . . . . . . . . 11 81 4.1. General Guidelines . . . . . . . . . . . . . . . . . . . 12 82 4.2. Recommended Cipher Suites . . . . . . . . . . . . . . . . 13 83 4.2.1. Implementation Details . . . . . . . . . . . . . . . 14 84 4.3. Cipher Suites for TLS 1.3 . . . . . . . . . . . . . . . . 14 85 4.4. Limits on Key Usage . . . . . . . . . . . . . . . . . . . 15 86 4.5. Public Key Length . . . . . . . . . . . . . . . . . . . . 15 87 4.6. Truncated HMAC . . . . . . . . . . . . . . . . . . . . . 16 88 5. Applicability Statement . . . . . . . . . . . . . . . . . . . 16 89 5.1. Security Services . . . . . . . . . . . . . . . . . . . . 17 90 5.2. Opportunistic Security . . . . . . . . . . . . . . . . . 18 91 6. Security Considerations . . . . . . . . . . . . . . . . . . . 18 92 6.1. Host Name Validation . . . . . . . . . . . . . . . . . . 18 93 6.2. AES-GCM . . . . . . . . . . . . . . . . . . . . . . . . . 19 94 6.2.1. Nonce Reuse in TLS 1.2 . . . . . . . . . . . . . . . 19 95 6.3. Forward Secrecy . . . . . . . . . . . . . . . . . . . . . 20 96 6.4. Diffie-Hellman Exponent Reuse . . . . . . . . . . . . . . 21 97 6.5. Certificate Revocation . . . . . . . . . . . . . . . . . 22 98 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23 99 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 100 8.1. Normative References . . . . . . . . . . . . . . . . . . 23 101 8.2. Informative References . . . . . . . . . . . . . . . . . 26 102 Appendix A. Differences from RFC 7525 . . . . . . . . . . . . . 32 103 Appendix B. Document History . . . . . . . . . . . . . . . . . . 33 104 B.1. draft-ietf-uta-rfc7525bis-01 . . . . . . . . . . . . . . 33 105 B.2. draft-ietf-uta-rfc7525bis-00 . . . . . . . . . . . . . . 33 106 B.3. draft-sheffer-uta-rfc7525bis-00 . . . . . . . . . . . . . 34 107 B.4. draft-sheffer-uta-bcp195bis-00 . . . . . . . . . . . . . 34 108 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 34 110 1. Introduction 112 Transport Layer Security (TLS) [RFC5246] and Datagram Transport 113 Security Layer (DTLS) [RFC6347] are widely used to protect data 114 exchanged over application protocols such as HTTP, SMTP, IMAP, POP, 115 SIP, and XMPP. Over the years leading to 2015, several serious 116 attacks on TLS have emerged, including attacks on its most commonly 117 used cipher suites and their modes of operation. For instance, both 118 the AES-CBC [RFC3602] and RC4 [RFC7465] encryption algorithms, which 119 together have been the most widely deployed ciphers, have been 120 attacked in the context of TLS. A companion document [RFC7457] 121 provides detailed information about these attacks and will help the 122 reader understand the rationale behind the recommendations provided 123 here. 125 The TLS community reacted to these attacks in two ways: 127 * Detailed guidance was published on the use of TLS 1.2 and earlier 128 protocol versions. This guidance is included in the original 129 [RFC7525] and mostly retained in this revised version. 131 * A new protocol version was released, TLS 1.3 [RFC8446], which 132 largely mitigates or resolves these attacks. 134 Those who implement and deploy TLS and DTLS, in particular versions 135 1.2 or earlier of these protocols, need guidance on how TLS can be 136 used securely. This document provides guidance for deployed services 137 as well as for software implementations, assuming the implementer 138 expects his or her code to be deployed in environments defined in 139 Section 5. Concerning deployment, this document targets a wide 140 audience - namely, all deployers who wish to add authentication (be 141 it one-way only or mutual), confidentiality, and data integrity 142 protection to their communications. 144 The recommendations herein take into consideration the security of 145 various mechanisms, their technical maturity and interoperability, 146 and their prevalence in implementations at the time of writing. 147 Unless it is explicitly called out that a recommendation applies to 148 TLS alone or to DTLS alone, each recommendation applies to both TLS 149 and DTLS. 151 This document attempts to minimize new guidance to TLS 1.2 152 implementations, and the overall approach is to encourage systems to 153 move to TLS 1.3. However this is not always practical. Newly 154 discovered attacks, as well as ecosystem changes, necessitated some 155 new requirements that apply to TLS 1.2 environments. Those are 156 summarized in Appendix A. 158 As noted, the TLS 1.3 specification resolves many of the 159 vulnerabilities listed in this document. A system that deploys TLS 160 1.3 should have fewer vulnerabilities than TLS 1.2 or below. This 161 document is being republished with this in mind, and with an explicit 162 goal to migrate most uses of TLS 1.2 into TLS 1.3. 164 These are minimum recommendations for the use of TLS in the vast 165 majority of implementation and deployment scenarios, with the 166 exception of unauthenticated TLS (see Section 5). Other 167 specifications that reference this document can have stricter 168 requirements related to one or more aspects of the protocol, based on 169 their particular circumstances (e.g., for use with a particular 170 application protocol); when that is the case, implementers are 171 advised to adhere to those stricter requirements. Furthermore, this 172 document provides a floor, not a ceiling, so stronger options are 173 always allowed (e.g., depending on differing evaluations of the 174 importance of cryptographic strength vs. computational load). 176 Community knowledge about the strength of various algorithms and 177 feasible attacks can change quickly, and experience shows that a Best 178 Current Practice (BCP) document about security is a point-in-time 179 statement. Readers are advised to seek out any errata or updates 180 that apply to this document. 182 2. Terminology 184 A number of security-related terms in this document are used in the 185 sense defined in [RFC4949]. 187 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 188 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 189 "OPTIONAL" in this document are to be interpreted as described in 190 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 191 capitals, as shown here. 193 3. General Recommendations 195 This section provides general recommendations on the secure use of 196 TLS. Recommendations related to cipher suites are discussed in the 197 following section. 199 3.1. Protocol Versions 201 3.1.1. SSL/TLS Protocol Versions 203 It is important both to stop using old, less secure versions of SSL/ 204 TLS and to start using modern, more secure versions; therefore, the 205 following are the recommendations concerning TLS/SSL protocol 206 versions: 208 * Implementations MUST NOT negotiate SSL version 2. 210 Rationale: Today, SSLv2 is considered insecure [RFC6176]. 212 * Implementations MUST NOT negotiate SSL version 3. 214 Rationale: SSLv3 [RFC6101] was an improvement over SSLv2 and 215 plugged some significant security holes but did not support strong 216 cipher suites. SSLv3 does not support TLS extensions, some of 217 which (e.g., renegotiation_info [RFC5746]) are security-critical. 218 In addition, with the emergence of the POODLE attack [POODLE], 219 SSLv3 is now widely recognized as fundamentally insecure. See 220 [DEP-SSLv3] for further details. 222 * Implementations MUST NOT negotiate TLS version 1.0 [RFC2246]. 224 Rationale: TLS 1.0 (published in 1999) does not support many 225 modern, strong cipher suites. In addition, TLS 1.0 lacks a per- 226 record Initialization Vector (IV) for CBC-based cipher suites and 227 does not warn against common padding errors. This and other 228 recommendations in this section are in line with [RFC8996]. 230 * Implementations MUST NOT negotiate TLS version 1.1 [RFC4346]. 232 Rationale: TLS 1.1 (published in 2006) is a security improvement 233 over TLS 1.0 but still does not support certain stronger cipher 234 suites. 236 NOTE: This recommendation has been changed from SHOULD NOT to MUST 237 NOT on the assumption that [I-D.ietf-tls-oldversions-deprecate] 238 will be published as an RFC before this document. 240 * Implementations MUST support TLS 1.2 [RFC5246] and MUST prefer to 241 negotiate TLS version 1.2 over earlier versions of TLS. 243 Rationale: Several stronger cipher suites are available only with 244 TLS 1.2 (published in 2008). In fact, the cipher suites 245 recommended by this document for TLS 1.2 (Section 4.2 below) are 246 only available in this version. 248 * Implementations SHOULD support TLS 1.3 [RFC8446] and if 249 implemented, MUST prefer to negotiate TLS 1.3 over earlier 250 versions of TLS. 252 Rationale: TLS 1.3 is a major overhaul to the protocol and 253 resolves many of the security issues with TLS 1.2. We note that 254 as long as TLS 1.2 is still allowed by a particular 255 implementation, even if it defaults to TLS 1.3, implementers MUST 256 still follow all the recommendations in this document. 258 * Implementations of "greenfield" protocols or deployments, where 259 there is no need to support legacy endpoints, SHOULD support TLS 260 1.3, with no negotiation of earlier versions. Similarly, we 261 RECOMMEND that new protocol designs that embed the TLS mechanisms 262 (such as QUIC has done [RFC9001]) include TLS 1.3. 264 Rationale: secure deployment of TLS 1.3 is significantly easier 265 and less error prone than the secure deployment of TLS 1.2. 267 This BCP applies to TLS 1.2, 1.3 and to earlier versions. It is not 268 safe for readers to assume that the recommendations in this BCP apply 269 to any future version of TLS. 271 3.1.2. DTLS Protocol Versions 273 DTLS, an adaptation of TLS for UDP datagrams, was introduced when TLS 274 1.1 was published. The following are the recommendations with 275 respect to DTLS: 277 * Implementations MUST NOT negotiate DTLS version 1.0 [RFC4347]. 279 Version 1.0 of DTLS correlates to version 1.1 of TLS (see above). 281 * Implementations MUST support and (unless a higher version is 282 available) MUST prefer to negotiate DTLS version 1.2 [RFC6347] 284 Version 1.2 of DTLS correlates to version 1.2 of TLS (see above). 285 (There is no version 1.1 of DTLS.) 287 * Implementations SHOULD support and, if available, MUST prefer to 288 negotiate DTLS version 1.3 as specified in [I-D.ietf-tls-dtls13]. 290 Version 1.3 of DTLS correlates to version 1.3 of TLS (see above). 292 3.1.3. Fallback to Lower Versions 294 Clients that "fall back" to lower versions of the protocol after the 295 server rejects higher versions of the protocol MUST NOT fall back to 296 SSLv3 or earlier. Implementations of TLS/DTLS 1.2 or earlier MUST 297 implement the Fallback SCSV mechanism [RFC7507] to prevent such 298 fallback being forced by an attacker. 300 Rationale: Some client implementations revert to lower versions of 301 TLS or even to SSLv3 if the server rejected higher versions of the 302 protocol. This fallback can be forced by a man-in-the-middle (MITM) 303 attacker. TLS 1.0 and SSLv3 are significantly less secure than TLS 304 1.2 but at least TLS 1.0 is still allowed by many web servers. As of 305 this writing, the Fallback SCSV solution is widely deployed and 306 proven as a robust solution to this problem. 308 3.2. Strict TLS 310 The following recommendations are provided to help prevent SSL 311 Stripping (an attack that is summarized in Section 2.1 of [RFC7457]): 313 * In cases where an application protocol allows implementations or 314 deployments a choice between strict TLS configuration and dynamic 315 upgrade from unencrypted to TLS-protected traffic (such as 316 STARTTLS), clients and servers SHOULD prefer strict TLS 317 configuration. 319 * Application protocols typically provide a way for the server to 320 offer TLS during an initial protocol exchange, and sometimes also 321 provide a way for the server to advertise support for TLS (e.g., 322 through a flag indicating that TLS is required); unfortunately, 323 these indications are sent before the communication channel is 324 encrypted. A client SHOULD attempt to negotiate TLS even if these 325 indications are not communicated by the server. 327 * HTTP client and server implementations MUST support the HTTP 328 Strict Transport Security (HSTS) header [RFC6797], in order to 329 allow Web servers to advertise that they are willing to accept 330 TLS-only clients. 332 * Web servers SHOULD use HSTS to indicate that they are willing to 333 accept TLS-only clients, unless they are deployed in such a way 334 that using HSTS would in fact weaken overall security (e.g., it 335 can be problematic to use HSTS with self-signed certificates, as 336 described in Section 11.3 of [RFC6797]). 338 Rationale: Combining unprotected and TLS-protected communication 339 opens the way to SSL Stripping and similar attacks, since an initial 340 part of the communication is not integrity protected and therefore 341 can be manipulated by an attacker whose goal is to keep the 342 communication in the clear. 344 3.3. Compression 346 In order to help prevent compression-related attacks (summarized in 347 Section 2.6 of [RFC7457]), when using TLS 1.2 implementations and 348 deployments SHOULD disable TLS-level compression (Section 6.2.2 of 349 [RFC5246]), unless the application protocol in question has been 350 shown not to be open to such attacks. Note: this recommendation 351 applies to TLS 1.2 only, because compression has been removed from 352 TLS 1.3. 354 Rationale: TLS compression has been subject to security attacks, such 355 as the CRIME attack. 357 Implementers should note that compression at higher protocol levels 358 can allow an active attacker to extract cleartext information from 359 the connection. The BREACH attack is one such case. These issues 360 can only be mitigated outside of TLS and are thus outside the scope 361 of this document. See Section 2.6 of [RFC7457] for further details. 363 3.4. TLS Session Resumption 365 Session resumption drastically reduces the number of TLS handshakes 366 and thus is an essential performance feature for most deployments. 368 Stateless session resumption with session tickets is a popular 369 strategy. For TLS 1.2, it is specified in [RFC5077]. For TLS 1.3, 370 an equivalent PSK-based mechanism is described in Section 4.6.1 of 371 [RFC8446]. When it is used, the resumption information MUST be 372 authenticated and encrypted to prevent modification or eavesdropping 373 by an attacker. Further recommendations apply to session tickets: 375 * A strong cipher suite MUST be used when encrypting the ticket (as 376 least as strong as the main TLS cipher suite). 378 * Ticket keys MUST be changed regularly, e.g., once every week, so 379 as not to negate the benefits of forward secrecy (see Section 6.3 380 for details on forward secrecy). 382 * For similar reasons, session ticket validity SHOULD be limited to 383 a reasonable duration (e.g., half as long as ticket key validity). 385 Rationale: session resumption is another kind of TLS handshake, and 386 therefore must be as secure as the initial handshake. This document 387 (Section 4) recommends the use of cipher suites that provide forward 388 secrecy, i.e. that prevent an attacker who gains momentary access to 389 the TLS endpoint (either client or server) and its secrets from 390 reading either past or future communication. The tickets must be 391 managed so as not to negate this security property. 393 TLS 1.3 provides the powerful option of forward secrecy even within a 394 long-lived connection that is periodically resumed. Section 2.2 of 395 [RFC8446] recommends that clients SHOULD send a "key_share" when 396 initiating session resumption. In order to gain forward secrecy, 397 this document recommends that server implementations SHOULD respond 398 with a "key_share", to complete an ECDHE exchange on each session 399 resumption. 401 TLS session resumption introduces potential privacy issues where the 402 server is able to track the client, in some cases indefinitely. See 403 [Sy2018] for more details. 405 3.5. TLS Renegotiation 407 Where handshake renegotiation is implemented, both clients and 408 servers MUST implement the renegotiation_info extension, as defined 409 in [RFC5746]. Note: this recommendation applies to TLS 1.2 only, 410 because renegotiation has been removed from TLS 1.3. 412 The most secure option for countering the Triple Handshake attack is 413 to refuse any change of certificates during renegotiation. In 414 addition, TLS clients SHOULD apply the same validation policy for all 415 certificates received over a connection. The [triple-handshake] 416 document suggests several other possible countermeasures, such as 417 binding the master secret to the full handshake (see [SESSION-HASH]) 418 and binding the abbreviated session resumption handshake to the 419 original full handshake. Although the latter two techniques are 420 still under development and thus do not qualify as current practices, 421 those who implement and deploy TLS are advised to watch for further 422 development of appropriate countermeasures. 424 3.6. Post-Handshake Authentication 426 Renegotiation in TLS 1.2 was replaced in TLS 1.3 by separate post- 427 handshake authentication and key update mechanisms. In the context 428 of protocols that multiplex requests over a single connection (such 429 as HTTP/2), post-handshake authentication has the same problems as 430 TLS 1.2 renegotiation. Multiplexed protocols SHOULD follow the 431 advice provided for HTTP/2 in [RFC8740]. 433 3.7. Server Name Indication 435 TLS implementations MUST support the Server Name Indication (SNI) 436 extension defined in Section 3 of [RFC6066] for those higher-level 437 protocols that would benefit from it, including HTTPS. However, the 438 actual use of SNI in particular circumstances is a matter of local 439 policy. Implementers are strongly encouraged to support TLS 440 Encrypted Client Hello (formerly called Encrypted SNI) once 441 [I-D.ietf-tls-esni] has been standardized. 443 Rationale: SNI supports deployment of multiple TLS-protected virtual 444 servers on a single address, and therefore enables fine-grained 445 security for these virtual servers, by allowing each one to have its 446 own certificate. However, SNI also leaks the target domain for a 447 given connection; this information leak will be plugged by use of TLS 448 Encrypted Client Hello. 450 In order to prevent the attacks described in [ALPACA], a server that 451 does not recognize the presented server name SHOULD NOT continue the 452 handshake and instead fail with a fatal-level 453 "unrecognized_name(112)" alert. Note that this recommendation 454 updates Section 3 of [RFC6066]: "If the server understood the 455 ClientHello extension but does not recognize the server name, the 456 server SHOULD take one of two actions: either abort the handshake by 457 sending a fatal-level "unrecognized_name(112)" alert or continue the 458 handshake." It is also RECOMMENDED that clients abort the handshake 459 if the server acknowledges the SNI hostname with a different hostname 460 than the one sent by the client. 462 3.8. Application-Layer Protocol Negotiation 464 TLS implementations (both client- and server-side) MUST support the 465 Application-Layer Protocol Negotiation (ALPN) extension [RFC7301]. 467 In order to prevent "cross-protocol" attacks resulting from failure 468 to ensure that a message intended for use in one protocol cannot be 469 mistaken for a message for use in another protocol, servers should 470 strictly enforce the behavior prescribed in Section 3.2 of [RFC7301]: 471 "In the event that the server supports no protocols that the client 472 advertises, then the server SHALL respond with a fatal 473 "no_application_protocol" alert." It is also RECOMMENDED that 474 clients abort the handshake if the server acknowledges the ALPN 475 extension, but does not select a protocol from the client list. 476 Failure to do so can result in attacks such those described in 477 [ALPACA]. 479 3.9. Zero Round Trip Time (0-RTT) Data in TLS 1.3 481 The 0-RTT early data feature is new in TLS 1.3. It provides improved 482 latency when TLS connections are resumed, at the potential cost of 483 security. As a result, it requires special attention from 484 implementers on both the server and the client side. Typically this 485 extends to both the TLS library as well as protocol layers above it. 487 For use in HTTP-over-TLS, readers are referred to [RFC8470] for 488 guidance. 490 For QUIC-on-TLS, refer to Sec. 9.2 of [RFC9001]. 492 For other protocols, generic guidance is given in Sec. 8 and 493 Appendix E.5 of [RFC8446]. Given the complexity, we RECOMMEND to 494 avoid this feature altogether unless an explicit specification exists 495 for the application protocol in question to clarify when 0-RTT is 496 appropriate and secure. This can take the form of an IETF RFC, a 497 non-IETF standard, or even documentation associated with a non- 498 standard protocol. 500 4. Recommendations: Cipher Suites 502 TLS and its implementations provide considerable flexibility in the 503 selection of cipher suites. Unfortunately, some available cipher 504 suites are insecure, some do not provide the targeted security 505 services, and some no longer provide enough security. Incorrectly 506 configuring a server leads to no or reduced security. This section 507 includes recommendations on the selection and negotiation of cipher 508 suites. 510 4.1. General Guidelines 512 Cryptographic algorithms weaken over time as cryptanalysis improves: 513 algorithms that were once considered strong become weak. Such 514 algorithms need to be phased out over time and replaced with more 515 secure cipher suites. This helps to ensure that the desired security 516 properties still hold. SSL/TLS has been in existence for almost 20 517 years and many of the cipher suites that have been recommended in 518 various versions of SSL/TLS are now considered weak or at least not 519 as strong as desired. Therefore, this section modernizes the 520 recommendations concerning cipher suite selection. 522 * Implementations MUST NOT negotiate the cipher suites with NULL 523 encryption. 525 Rationale: The NULL cipher suites do not encrypt traffic and so 526 provide no confidentiality services. Any entity in the network 527 with access to the connection can view the plaintext of contents 528 being exchanged by the client and server. 530 Nevertheless, this document does not discourage software from 531 implementing NULL cipher suites, since they can be useful for 532 testing and debugging. 534 * Implementations MUST NOT negotiate RC4 cipher suites. 536 Rationale: The RC4 stream cipher has a variety of cryptographic 537 weaknesses, as documented in [RFC7465]. Note that DTLS 538 specifically forbids the use of RC4 already. 540 * Implementations MUST NOT negotiate cipher suites offering less 541 than 112 bits of security, including so-called "export-level" 542 encryption (which provide 40 or 56 bits of security). 544 Rationale: Based on [RFC3766], at least 112 bits of security is 545 needed. 40-bit and 56-bit security are considered insecure today. 546 TLS 1.1 and 1.2 never negotiate 40-bit or 56-bit export ciphers. 548 * Implementations SHOULD NOT negotiate cipher suites that use 549 algorithms offering less than 128 bits of security. 551 Rationale: Cipher suites that offer between 112-bits and 128-bits 552 of security are not considered weak at this time; however, it is 553 expected that their useful lifespan is short enough to justify 554 supporting stronger cipher suites at this time. 128-bit ciphers 555 are expected to remain secure for at least several years, and 556 256-bit ciphers until the next fundamental technology 557 breakthrough. Note that, because of so-called "meet-in-the- 558 middle" attacks [Multiple-Encryption], some legacy cipher suites 559 (e.g., 168-bit 3DES) have an effective key length that is smaller 560 than their nominal key length (112 bits in the case of 3DES). 561 Such cipher suites should be evaluated according to their 562 effective key length. 564 * Implementations SHOULD NOT negotiate cipher suites based on RSA 565 key transport, a.k.a. "static RSA". 567 Rationale: These cipher suites, which have assigned values 568 starting with the string "TLS_RSA_WITH_*", have several drawbacks, 569 especially the fact that they do not support forward secrecy. 571 * Implementations MUST support and prefer to negotiate cipher suites 572 offering forward secrecy, such as those in the Ephemeral Diffie- 573 Hellman and Elliptic Curve Ephemeral Diffie-Hellman ("DHE" and 574 "ECDHE") families. 576 Rationale: Forward secrecy (sometimes called "perfect forward 577 secrecy") prevents the recovery of information that was encrypted 578 with older session keys, thus limiting the amount of time during 579 which attacks can be successful. See Section 6.3 for a detailed 580 discussion. 582 4.2. Recommended Cipher Suites 584 Given the foregoing considerations, implementation and deployment of 585 the following cipher suites is RECOMMENDED: 587 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 589 * TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 591 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 593 * TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 595 These cipher suites are supported only in TLS 1.2 and not in earlier 596 protocol versions, because they are authenticated encryption (AEAD) 597 algorithms [RFC5116]. 599 Typically, in order to prefer these suites, the order of suites needs 600 to be explicitly configured in server software. (See [BETTERCRYPTO] 601 for helpful deployment guidelines, but note that its recommendations 602 differ from the current document in some details.) It would be ideal 603 if server software implementations were to prefer these suites by 604 default. 606 Some devices have hardware support for AES-CCM but not AES-GCM, so 607 they are unable to follow the foregoing recommendations regarding 608 cipher suites. There are even devices that do not support public key 609 cryptography at all, but they are out of scope entirely. 611 4.2.1. Implementation Details 613 Clients SHOULD include TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 as the 614 first proposal to any server, unless they have prior knowledge that 615 the server cannot respond to a TLS 1.2 client_hello message. 617 Servers MUST prefer this cipher suite over weaker cipher suites 618 whenever it is proposed, even if it is not the first proposal. 620 Clients are of course free to offer stronger cipher suites, e.g., 621 using AES-256; when they do, the server SHOULD prefer the stronger 622 cipher suite unless there are compelling reasons (e.g., seriously 623 degraded performance) to choose otherwise. 625 This document does not change the mandatory-to-implement TLS cipher 626 suite(s) prescribed by TLS. To maximize interoperability, RFC 5246 627 mandates implementation of the TLS_RSA_WITH_AES_128_CBC_SHA cipher 628 suite, which is significantly weaker than the cipher suites 629 recommended here. (The GCM mode does not suffer from the same 630 weakness, caused by the order of MAC-then-Encrypt in TLS 631 [Krawczyk2001], since it uses an AEAD mode of operation.) 632 Implementers should consider the interoperability gain against the 633 loss in security when deploying the TLS_RSA_WITH_AES_128_CBC_SHA 634 cipher suite. Other application protocols specify other cipher 635 suites as mandatory to implement (MTI). 637 Note that some profiles of TLS 1.2 use different cipher suites. For 638 example, [RFC6460] defines a profile that uses the 639 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 and 640 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 cipher suites. 642 [RFC4492] allows clients and servers to negotiate ECDH parameters 643 (curves). Both clients and servers SHOULD include the "Supported 644 Elliptic Curves" extension [RFC4492]. For interoperability, clients 645 and servers SHOULD support the NIST P-256 (secp256r1) curve 646 [RFC4492]. In addition, clients SHOULD send an ec_point_formats 647 extension with a single element, "uncompressed". 649 4.3. Cipher Suites for TLS 1.3 651 This document does not specify any cipher suites for TLS 1.3. 652 Readers are referred to Sec. 9.1 of [RFC8446] for cipher suite 653 recommendations. 655 4.4. Limits on Key Usage 657 All ciphers have an upper limit on the amount of traffic that can be 658 securely encrypted with any given key. In the case of AEAD cipher 659 suites, the limit is typically determined by the cipher's integrity 660 guarantees. When the amount of traffic for a particular connection 661 has reached the limit, an implementation SHOULD perform a new 662 handshake (or in TLS 1.3, a Key Update) to rotate the session key. 664 For all AES-GCM cipher suites recommended for TLS 1.2 in this 665 document, the limit for one connection is 2^(24.5) full-size records 666 (about 24 million). This is the same number as for TLS 1.3 with the 667 equivalent cipher suites. 669 // TODO: refer to {{I-D.irtf-cfrg-aead-limits}} once it has added the 670 // derivation for TLS 1.2, which is different from TLS 1.3. 671 // Different derivation, same numbers. 673 For all TLS 1.3 cipher suites, readers are referred to Section 5.5 of 674 [RFC8446]. 676 4.5. Public Key Length 678 When using the cipher suites recommended in this document, two public 679 keys are normally used in the TLS handshake: one for the Diffie- 680 Hellman key agreement and one for server authentication. Where a 681 client certificate is used, a third public key is added. 683 With a key exchange based on modular exponential (MODP) Diffie- 684 Hellman groups ("DHE" cipher suites), DH key lengths of at least 2048 685 bits are REQUIRED. 687 Rationale: For various reasons, in practice, DH keys are typically 688 generated in lengths that are powers of two (e.g., 2^(10) = 1024 689 bits, 2^(11) = 2048 bits, 2^(12) = 4096 bits). Because a DH key of 690 1228 bits would be roughly equivalent to only an 80-bit symmetric key 691 [RFC3766], it is better to use keys longer than that for the "DHE" 692 family of cipher suites. A DH key of 1926 bits would be roughly 693 equivalent to a 100-bit symmetric key [RFC3766]. A DH key of 2048 694 bits (equivalent to a 112-bit symmetric key) is the minimum allowed 695 by the latest revision of [NIST.SP.800-56A], as of this writing (see 696 in particular Appendix D). 698 As noted in [RFC3766], correcting for the emergence of a TWIRL 699 machine would imply that 1024-bit DH keys yield about 65 bits of 700 equivalent strength and that a 2048-bit DH key would yield about 92 701 bits of equivalent strength. The Logjam attack [Logjam] further 702 demonstrates that 1024-bit Diffie Hellman parameters should be 703 avoided. 705 With regard to ECDH keys, implementers are referred to the IANA 706 "Supported Groups Registry" (former "EC Named Curve Registry"), 707 within the "Transport Layer Security (TLS) Parameters" registry 708 [IANA_TLS], and in particular to the "recommended" groups. Curves of 709 less than 224 bits MUST NOT be used. This recommendation is in-line 710 with the latest revision of [NIST.SP.800-56A]. 712 When using RSA, servers SHOULD authenticate using certificates with 713 at least a 2048-bit modulus for the public key. In addition, the use 714 of the SHA-256 hash algorithm is RECOMMENDED (see [CAB-Baseline] for 715 more details). Clients SHOULD indicate to servers that they request 716 SHA-256, by using the "Signature Algorithms" extension defined in TLS 717 1.2. 719 4.6. Truncated HMAC 721 Implementations MUST NOT use the Truncated HMAC extension, defined in 722 Section 7 of [RFC6066]. 724 Rationale: the extension does not apply to the AEAD cipher suites 725 recommended above. However it does apply to most other TLS cipher 726 suites. Its use has been shown to be insecure in [PatersonRS11]. 728 5. Applicability Statement 730 The recommendations of this document primarily apply to the 731 implementation and deployment of application protocols that are most 732 commonly used with TLS and DTLS on the Internet today. Examples 733 include, but are not limited to: 735 * Web software and services that wish to protect HTTP traffic with 736 TLS. 738 * Email software and services that wish to protect IMAP, POP3, or 739 SMTP traffic with TLS. 741 * Instant-messaging software and services that wish to protect 742 Extensible Messaging and Presence Protocol (XMPP) or Internet 743 Relay Chat (IRC) traffic with TLS. 745 * Realtime media software and services that wish to protect Secure 746 Realtime Transport Protocol (SRTP) traffic with DTLS. 748 This document does not modify the implementation and deployment 749 recommendations (e.g., mandatory-to-implement cipher suites) 750 prescribed by existing application protocols that employ TLS or DTLS. 751 If the community that uses such an application protocol wishes to 752 modernize its usage of TLS or DTLS to be consistent with the best 753 practices recommended here, it needs to explicitly update the 754 existing application protocol definition (one example is [TLS-XMPP], 755 which updates [RFC6120]). 757 Designers of new application protocols developed through the Internet 758 Standards Process [RFC2026] are expected at minimum to conform to the 759 best practices recommended here, unless they provide documentation of 760 compelling reasons that would prevent such conformance (e.g., 761 widespread deployment on constrained devices that lack support for 762 the necessary algorithms). 764 5.1. Security Services 766 This document provides recommendations for an audience that wishes to 767 secure their communication with TLS to achieve the following: 769 * Confidentiality: all application-layer communication is encrypted 770 with the goal that no party should be able to decrypt it except 771 the intended receiver. 773 * Data integrity: any changes made to the communication in transit 774 are detectable by the receiver. 776 * Authentication: an endpoint of the TLS communication is 777 authenticated as the intended entity to communicate with. 779 With regard to authentication, TLS enables authentication of one or 780 both endpoints in the communication. In the context of opportunistic 781 security [RFC7435], TLS is sometimes used without authentication. As 782 discussed in Section 5.2, considerations for opportunistic security 783 are not in scope for this document. 785 If deployers deviate from the recommendations given in this document, 786 they need to be aware that they might lose access to one of the 787 foregoing security services. 789 This document applies only to environments where confidentiality is 790 required. It recommends algorithms and configuration options that 791 enforce secrecy of the data in transit. 793 This document also assumes that data integrity protection is always 794 one of the goals of a deployment. In cases where integrity is not 795 required, it does not make sense to employ TLS in the first place. 796 There are attacks against confidentiality-only protection that 797 utilize the lack of integrity to also break confidentiality (see, for 798 instance, [DegabrieleP07] in the context of IPsec). 800 This document addresses itself to application protocols that are most 801 commonly used on the Internet with TLS and DTLS. Typically, all 802 communication between TLS clients and TLS servers requires all three 803 of the above security services. This is particularly true where TLS 804 clients are user agents like Web browsers or email software. 806 This document does not address the rarer deployment scenarios where 807 one of the above three properties is not desired, such as the use 808 case described in Section 5.2 below. As another scenario where 809 confidentiality is not needed, consider a monitored network where the 810 authorities in charge of the respective traffic domain require full 811 access to unencrypted (plaintext) traffic, and where users 812 collaborate and send their traffic in the clear. 814 5.2. Opportunistic Security 816 There are several important scenarios in which the use of TLS is 817 optional, i.e., the client decides dynamically ("opportunistically") 818 whether to use TLS with a particular server or to connect in the 819 clear. This practice, often called "opportunistic security", is 820 described at length in [RFC7435] and is often motivated by a desire 821 for backward compatibility with legacy deployments. 823 In these scenarios, some of the recommendations in this document 824 might be too strict, since adhering to them could cause fallback to 825 cleartext, a worse outcome than using TLS with an outdated protocol 826 version or cipher suite. 828 6. Security Considerations 830 This entire document discusses the security practices directly 831 affecting applications using the TLS protocol. This section contains 832 broader security considerations related to technologies used in 833 conjunction with or by TLS. 835 6.1. Host Name Validation 837 Application authors should take note that some TLS implementations do 838 not validate host names. If the TLS implementation they are using 839 does not validate host names, authors might need to write their own 840 validation code or consider using a different TLS implementation. 842 It is noted that the requirements regarding host name validation 843 (and, in general, binding between the TLS layer and the protocol that 844 runs above it) vary between different protocols. For HTTPS, these 845 requirements are defined by Sections 4.3.3, 4.3.4 and 4.3.5 of 846 [I-D.ietf-httpbis-semantics]. 848 Readers are referred to [RFC6125] for further details regarding 849 generic host name validation in the TLS context. In addition, that 850 RFC contains a long list of example protocols, some of which 851 implement a policy very different from HTTPS. 853 If the host name is discovered indirectly and in an insecure manner 854 (e.g., by an insecure DNS query for an MX or SRV record), it SHOULD 855 NOT be used as a reference identifier [RFC6125] even when it matches 856 the presented certificate. This proviso does not apply if the host 857 name is discovered securely (for further discussion, see [DANE-SRV] 858 and [DANE-SMTP]). 860 Host name validation typically applies only to the leaf "end entity" 861 certificate. Naturally, in order to ensure proper authentication in 862 the context of the PKI, application clients need to verify the entire 863 certification path in accordance with [RFC5280] (see also [RFC6125]). 865 6.2. AES-GCM 867 Section 4.2 above recommends the use of the AES-GCM authenticated 868 encryption algorithm. Please refer to Section 11 of [RFC5246] for 869 general security considerations when using TLS 1.2, and to Section 6 870 of [RFC5288] for security considerations that apply specifically to 871 AES-GCM when used with TLS. 873 6.2.1. Nonce Reuse in TLS 1.2 875 The existence of deployed TLS stacks that mistakenly reuse the AES- 876 GCM nonce is documented in [Boeck2016], showing there is an actual 877 risk of AES-GCM getting implemented in an insecure way and thus 878 making TLS sessions that use an AES-GCM cipher suite vulnerable to 879 attacks such as [Joux2006]. (See [CVE] records: CVE-2016-0270, CVE- 880 2016-10213, CVE-2016-10212, CVE-2017-5933.) 882 While this problem has been fixed in TLS 1.3, which enforces a 883 deterministic method to generate nonces from record sequence numbers 884 and shared secrets for all of its AEAD cipher suites (including AES- 885 GCM), TLS 1.2 implementations could still choose their own 886 (potentially insecure) nonce generation methods. 888 It is therefore RECOMMENDED that TLS 1.2 implementations use the 889 64-bit sequence number to populate the "nonce_explicit" part of the 890 GCM nonce, as described in the first two paragraphs of Section 5.3 of 891 [RFC8446]. Note that this recommendation updates Section 3 of 892 [RFC5288]: "The nonce_explicit MAY be the 64-bit sequence number." 894 We note that at the time of writing there are no cipher suites 895 defined for nonce reuse resistant algorithms such as AES-GCM-SIV 896 [RFC8452]. 898 6.3. Forward Secrecy 900 Forward secrecy (also called "perfect forward secrecy" or "PFS" and 901 defined in [RFC4949]) is a defense against an attacker who records 902 encrypted conversations where the session keys are only encrypted 903 with the communicating parties' long-term keys. 905 Should the attacker be able to obtain these long-term keys at some 906 point later in time, the session keys and thus the entire 907 conversation could be decrypted. 909 In the context of TLS and DTLS, such compromise of long-term keys is 910 not entirely implausible. It can happen, for example, due to: 912 * A client or server being attacked by some other attack vector, and 913 the private key retrieved. 915 * A long-term key retrieved from a device that has been sold or 916 otherwise decommissioned without prior wiping. 918 * A long-term key used on a device as a default key [Heninger2012]. 920 * A key generated by a trusted third party like a CA, and later 921 retrieved from it either by extortion or compromise 922 [Soghoian2011]. 924 * A cryptographic break-through, or the use of asymmetric keys with 925 insufficient length [Kleinjung2010]. 927 * Social engineering attacks against system administrators. 929 * Collection of private keys from inadequately protected backups. 931 Forward secrecy ensures in such cases that it is not feasible for an 932 attacker to determine the session keys even if the attacker has 933 obtained the long-term keys some time after the conversation. It 934 also protects against an attacker who is in possession of the long- 935 term keys but remains passive during the conversation. 937 Forward secrecy is generally achieved by using the Diffie-Hellman 938 scheme to derive session keys. The Diffie-Hellman scheme has both 939 parties maintain private secrets and send parameters over the network 940 as modular powers over certain cyclic groups. The properties of the 941 so-called Discrete Logarithm Problem (DLP) allow the parties to 942 derive the session keys without an eavesdropper being able to do so. 943 There is currently no known attack against DLP if sufficiently large 944 parameters are chosen. A variant of the Diffie-Hellman scheme uses 945 Elliptic Curves instead of the originally proposed modular 946 arithmetic. 948 Unfortunately, many TLS/DTLS cipher suites were defined that do not 949 feature forward secrecy, e.g., TLS_RSA_WITH_AES_256_CBC_SHA256. This 950 document therefore advocates strict use of forward-secrecy-only 951 ciphers. 953 6.4. Diffie-Hellman Exponent Reuse 955 For performance reasons, many TLS implementations reuse Diffie- 956 Hellman and Elliptic Curve Diffie-Hellman exponents across multiple 957 connections. Such reuse can result in major security issues: 959 * If exponents are reused for too long (e.g., even more than a few 960 hours), an attacker who gains access to the host can decrypt 961 previous connections. In other words, exponent reuse negates the 962 effects of forward secrecy. 964 * TLS implementations that reuse exponents should test the DH public 965 key they receive for group membership, in order to avoid some 966 known attacks. These tests are not standardized in TLS at the 967 time of writing. See [RFC6989] for recipient tests required of 968 IKEv2 implementations that reuse DH exponents. 970 * Under certain conditions, the use of static DH keys, or of 971 ephemeral DH keys that are reused across multiple connections, can 972 lead to timing attacks (such as those described in [RACCOON]) on 973 the shared secrets used in Diffie-Hellman key exchange. 975 To address these concerns, TLS implementations SHOULD NOT use static 976 DH keys and SHOULD NOT reuse ephemeral DH keys across multiple 977 connections. 979 // TODO: revisit when draft-bartle-tls-deprecate-ffdhe becomes a TLS 980 // WG item, since it specifies MUST NOT rather than SHOULD NOT. 982 6.5. Certificate Revocation 984 The following considerations and recommendations represent the 985 current state of the art regarding certificate revocation, even 986 though no complete and efficient solution exists for the problem of 987 checking the revocation status of common public key certificates 988 [RFC5280]: 990 * Although Certificate Revocation Lists (CRLs) are the most widely 991 supported mechanism for distributing revocation information, they 992 have known scaling challenges that limit their usefulness (despite 993 workarounds such as partitioned CRLs and delta CRLs). 995 * Proprietary mechanisms that embed revocation lists in the Web 996 browser's configuration database cannot scale beyond a small 997 number of the most heavily used Web servers. 999 * The On-Line Certification Status Protocol (OCSP) [RFC6960] 1000 presents both scaling and privacy issues. In addition, clients 1001 typically "soft-fail", meaning that they do not abort the TLS 1002 connection if the OCSP server does not respond. (However, this 1003 might be a workaround to avoid denial-of-service attacks if an 1004 OCSP responder is taken offline.) 1006 * The TLS Certificate Status Request extension (Section 8 of 1007 [RFC6066]), commonly called "OCSP stapling", resolves the 1008 operational issues with OCSP. However, it is still ineffective in 1009 the presence of a MITM attacker because the attacker can simply 1010 ignore the client's request for a stapled OCSP response. 1012 * OCSP stapling as defined in [RFC6066] does not extend to 1013 intermediate certificates used in a certificate chain. Although 1014 the Multiple Certificate Status extension [RFC6961] addresses this 1015 shortcoming, it is a recent addition without much deployment. 1017 * Both CRLs and OCSP depend on relatively reliable connectivity to 1018 the Internet, which might not be available to certain kinds of 1019 nodes (such as newly provisioned devices that need to establish a 1020 secure connection in order to boot up for the first time). 1022 With regard to common public key certificates, servers SHOULD support 1023 the following as a best practice given the current state of the art 1024 and as a foundation for a possible future solution: 1026 1. OCSP [RFC6960] 1027 2. Both the status_request extension defined in [RFC6066] and the 1028 status_request_v2 extension defined in [RFC6961] (This might 1029 enable interoperability with the widest range of clients.) 1031 3. The OCSP stapling extension defined in [RFC6961] 1033 The considerations in this section do not apply to scenarios where 1034 the DANE-TLSA resource record [RFC6698] is used to signal to a client 1035 which certificate a server considers valid and good to use for TLS 1036 connections. 1038 7. Acknowledgments 1040 The following acknowledgments are inherited from [RFC7525]. 1042 Thanks to RJ Atkinson, Uri Blumenthal, Viktor Dukhovni, Stephen 1043 Farrell, Daniel Kahn Gillmor, Paul Hoffman, Simon Josefsson, Watson 1044 Ladd, Orit Levin, Ilari Liusvaara, Johannes Merkle, Bodo Moeller, 1045 Yoav Nir, Massimiliano Pala, Kenny Paterson, Patrick Pelletier, Tom 1046 Ritter, Joe St. Sauver, Joe Salowey, Rich Salz, Brian Smith, Sean 1047 Turner, and Aaron Zauner for their feedback and suggested 1048 improvements. Thanks also to Brian Smith, who has provided a great 1049 resource in his "Proposal to Change the Default TLS Ciphersuites 1050 Offered by Browsers" [Smith2013]. Finally, thanks to all others who 1051 commented on the TLS, UTA, and other discussion lists but who are not 1052 mentioned here by name. 1054 Robert Sparks and Dave Waltermire provided helpful reviews on behalf 1055 of the General Area Review Team and the Security Directorate, 1056 respectively. 1058 During IESG review, Richard Barnes, Alissa Cooper, Spencer Dawkins, 1059 Stephen Farrell, Barry Leiba, Kathleen Moriarty, and Pete Resnick 1060 provided comments that led to further improvements. 1062 Ralph Holz gratefully acknowledges the support by Technische 1063 Universitaet Muenchen. 1065 The authors gratefully acknowledge the assistance of Leif Johansson 1066 and Orit Levin as the working group chairs and Pete Resnick as the 1067 sponsoring Area Director. 1069 8. References 1071 8.1. Normative References 1073 [I-D.ietf-httpbis-semantics] 1074 Fielding, R. T., Nottingham, M., and J. Reschke, "HTTP 1075 Semantics", Work in Progress, Internet-Draft, draft-ietf- 1076 httpbis-semantics-16, 27 May 2021, 1077 . 1080 [I-D.ietf-tls-dtls13] 1081 Rescorla, E., Tschofenig, H., and N. Modadugu, "The 1082 Datagram Transport Layer Security (DTLS) Protocol Version 1083 1.3", Work in Progress, Internet-Draft, draft-ietf-tls- 1084 dtls13-43, 30 April 2021, 1085 . 1088 [I-D.ietf-tls-oldversions-deprecate] 1089 Moriarty, K. and S. Farrell, "Deprecating TLS 1.0 and TLS 1090 1.1", Work in Progress, Internet-Draft, draft-ietf-tls- 1091 oldversions-deprecate-12, 21 January 2021, 1092 . 1095 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1096 Requirement Levels", BCP 14, RFC 2119, 1097 DOI 10.17487/RFC2119, March 1997, 1098 . 1100 [RFC3766] Orman, H. and P. Hoffman, "Determining Strengths For 1101 Public Keys Used For Exchanging Symmetric Keys", BCP 86, 1102 RFC 3766, DOI 10.17487/RFC3766, April 2004, 1103 . 1105 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 1106 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 1107 for Transport Layer Security (TLS)", RFC 4492, 1108 DOI 10.17487/RFC4492, May 2006, 1109 . 1111 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 1112 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 1113 . 1115 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1116 (TLS) Protocol Version 1.2", RFC 5246, 1117 DOI 10.17487/RFC5246, August 2008, 1118 . 1120 [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois 1121 Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, 1122 DOI 10.17487/RFC5288, August 2008, 1123 . 1125 [RFC5746] Rescorla, E., Ray, M., Dispensa, S., and N. Oskov, 1126 "Transport Layer Security (TLS) Renegotiation Indication 1127 Extension", RFC 5746, DOI 10.17487/RFC5746, February 2010, 1128 . 1130 [RFC6066] Eastlake 3rd, D., "Transport Layer Security (TLS) 1131 Extensions: Extension Definitions", RFC 6066, 1132 DOI 10.17487/RFC6066, January 2011, 1133 . 1135 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 1136 Verification of Domain-Based Application Service Identity 1137 within Internet Public Key Infrastructure Using X.509 1138 (PKIX) Certificates in the Context of Transport Layer 1139 Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 1140 2011, . 1142 [RFC6176] Turner, S. and T. Polk, "Prohibiting Secure Sockets Layer 1143 (SSL) Version 2.0", RFC 6176, DOI 10.17487/RFC6176, March 1144 2011, . 1146 [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1147 Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, 1148 January 2012, . 1150 [RFC7301] Friedl, S., Popov, A., Langley, A., and E. Stephan, 1151 "Transport Layer Security (TLS) Application-Layer Protocol 1152 Negotiation Extension", RFC 7301, DOI 10.17487/RFC7301, 1153 July 2014, . 1155 [RFC7465] Popov, A., "Prohibiting RC4 Cipher Suites", RFC 7465, 1156 DOI 10.17487/RFC7465, February 2015, 1157 . 1159 [RFC7507] Moeller, B. and A. Langley, "TLS Fallback Signaling Cipher 1160 Suite Value (SCSV) for Preventing Protocol Downgrade 1161 Attacks", RFC 7507, DOI 10.17487/RFC7507, April 2015, 1162 . 1164 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1165 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1166 May 2017, . 1168 [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol 1169 Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018, 1170 . 1172 [RFC8740] Benjamin, D., "Using TLS 1.3 with HTTP/2", RFC 8740, 1173 DOI 10.17487/RFC8740, February 2020, 1174 . 1176 [RFC8996] Moriarty, K. and S. Farrell, "Deprecating TLS 1.0 and TLS 1177 1.1", BCP 195, RFC 8996, DOI 10.17487/RFC8996, March 2021, 1178 . 1180 8.2. Informative References 1182 [ALPACA] Brinkmann, M., Dresen, C., Merget, R., Poddebniak, D., 1183 Müller, J., Somorovsky, J., Schwenk, J., and S. Schinzel, 1184 "ALPACA: Application Layer Protocol Confusion - Analyzing 1185 and Mitigating Cracks in TLS Authentication", 30th USENIX 1186 Security Symposium (USENIX Security 21) , 2021, 1187 . 1190 [BETTERCRYPTO] 1191 bettercrypto.org, "Applied Crypto Hardening", April 2015, 1192 . 1194 [Boeck2016] 1195 Böck, H., Zauner, A., Devlin, S., Somorovsky, J., and P. 1196 Jovanovic, "Nonce-Disrespecting Adversaries: Practical 1197 Forgery Attacks on GCM in TLS", May 2016, 1198 . 1200 [CAB-Baseline] 1201 CA/Browser Forum, "Baseline Requirements for the Issuance 1202 and Management of Publicly-Trusted Certificates Version 1203 1.1.6", 2013, . 1205 [CVE] MITRE, "Common Vulnerabilities and Exposures", 1206 . 1208 [DANE-SMTP] 1209 Dukhovni, V. and W. Hardaker, "SMTP Security via 1210 Opportunistic DNS-Based Authentication of Named Entities 1211 (DANE) Transport Layer Security (TLS)", RFC 7672, 1212 DOI 10.17487/RFC7672, October 2015, 1213 . 1215 [DANE-SRV] Finch, T., Miller, M., and P. Saint-Andre, "Using DNS- 1216 Based Authentication of Named Entities (DANE) TLSA Records 1217 with SRV Records", RFC 7673, DOI 10.17487/RFC7673, October 1218 2015, . 1220 [DegabrieleP07] 1221 Degabriele, J. and K. Paterson, "Attacking the IPsec 1222 Standards in Encryption-only Configurations", 2007 IEEE 1223 Symposium on Security and Privacy (SP '07), 1224 DOI 10.1109/sp.2007.8, May 2007, 1225 . 1227 [DEP-SSLv3] 1228 Barnes, R., Thomson, M., Pironti, A., and A. Langley, 1229 "Deprecating Secure Sockets Layer Version 3.0", RFC 7568, 1230 DOI 10.17487/RFC7568, June 2015, 1231 . 1233 [Heninger2012] 1234 Heninger, N., Durumeric, Z., Wustrow, E., and J.A. 1235 Halderman, "Mining Your Ps and Qs: Detection of Widespread 1236 Weak Keys in Network Devices", Usenix Security 1237 Symposium 2012, 2012. 1239 [I-D.ietf-tls-esni] 1240 Rescorla, E., Oku, K., Sullivan, N., and C. A. Wood, "TLS 1241 Encrypted Client Hello", Work in Progress, Internet-Draft, 1242 draft-ietf-tls-esni-11, 14 June 2021, 1243 . 1246 [I-D.irtf-cfrg-aead-limits] 1247 Günther, F., Thomson, M., and C. A. Wood, "Usage Limits on 1248 AEAD Algorithms", Work in Progress, Internet-Draft, draft- 1249 irtf-cfrg-aead-limits-02, 22 February 2021, 1250 . 1253 [IANA_TLS] IANA, "Transport Layer Security (TLS) Parameters", 1254 . 1256 [Joux2006] Joux, A., "Authentication Failures in NIST version of 1257 GCM", 2006, . 1261 [Kleinjung2010] 1262 Kleinjung, T., Aoki, K., Franke, J., Lenstra, A., Thomé, 1263 E., Bos, J., Gaudry, P., Kruppa, A., Montgomery, P., 1264 Osvik, D., te Riele, H., Timofeev, A., and P. Zimmermann, 1265 "Factorization of a 768-Bit RSA Modulus", Advances in 1266 Cryptology - CRYPTO 2010 pp. 333-350, 1267 DOI 10.1007/978-3-642-14623-7_18, 2010, 1268 . 1270 [Krawczyk2001] 1271 Krawczyk, H., "The Order of Encryption and Authentication 1272 for Protecting Communications (Or: How Secure is SSL?)", 1273 CRYPTO 01, 2001, 1274 . 1276 [Logjam] Adrian, D., Bhargavan, K., Durumeric, Z., Gaudry, P., 1277 Green, M., Halderman, J., Heninger, N., Springall, D., 1278 Thomé, E., Valenta, L., VanderSloot, B., Wustrow, E., 1279 Zanella-Béguelin, S., and P. Zimmermann, "Imperfect 1280 Forward Secrecy: How Diffie-Hellman Fails in Practice", 1281 Proceedings of the 22nd ACM SIGSAC Conference on Computer 1282 and Communications Security, DOI 10.1145/2810103.2813707, 1283 October 2015, . 1285 [Multiple-Encryption] 1286 Merkle, R. and M. Hellman, "On the security of multiple 1287 encryption", Communications of the ACM Vol. 24, pp. 1288 465-467, DOI 10.1145/358699.358718, July 1981, 1289 . 1291 [NIST.SP.800-56A] 1292 Barker, E., Chen, L., Roginsky, A., Vassilev, A., and R. 1293 Davis, "Recommendation for pair-wise key-establishment 1294 schemes using discrete logarithm cryptography", National 1295 Institute of Standards and Technology report, 1296 DOI 10.6028/nist.sp.800-56ar3, April 2018, 1297 . 1299 [PatersonRS11] 1300 Paterson, K., Ristenpart, T., and T. Shrimpton, "Tag Size 1301 Does Matter: Attacks and Proofs for the TLS Record 1302 Protocol", Lecture Notes in Computer Science pp. 372-389, 1303 DOI 10.1007/978-3-642-25385-0_20, 2011, 1304 . 1306 [POODLE] US-CERT, "SSL 3.0 Protocol Vulnerability and POODLE 1307 Attack", October 2014, 1308 . 1310 [RACCOON] Merget, R., Brinkmann, M., Aviram, N., Somorovsky, J., 1311 Mittmann, J., and J. Schwenk, "Raccoon Attack: Finding and 1312 Exploiting Most-Significant-Bit-Oracles in TLS-DH(E)", 1313 30th USENIX Security Symposium (USENIX Security 21) , 1314 2021, . 1317 [RFC2026] Bradner, S., "The Internet Standards Process -- Revision 1318 3", BCP 9, RFC 2026, DOI 10.17487/RFC2026, October 1996, 1319 . 1321 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1322 RFC 2246, DOI 10.17487/RFC2246, January 1999, 1323 . 1325 [RFC3602] Frankel, S., Glenn, R., and S. Kelly, "The AES-CBC Cipher 1326 Algorithm and Its Use with IPsec", RFC 3602, 1327 DOI 10.17487/RFC3602, September 2003, 1328 . 1330 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1331 (TLS) Protocol Version 1.1", RFC 4346, 1332 DOI 10.17487/RFC4346, April 2006, 1333 . 1335 [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 1336 Security", RFC 4347, DOI 10.17487/RFC4347, April 2006, 1337 . 1339 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 1340 "Transport Layer Security (TLS) Session Resumption without 1341 Server-Side State", RFC 5077, DOI 10.17487/RFC5077, 1342 January 2008, . 1344 [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated 1345 Encryption", RFC 5116, DOI 10.17487/RFC5116, January 2008, 1346 . 1348 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1349 Housley, R., and W. Polk, "Internet X.509 Public Key 1350 Infrastructure Certificate and Certificate Revocation List 1351 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1352 . 1354 [RFC6101] Freier, A., Karlton, P., and P. Kocher, "The Secure 1355 Sockets Layer (SSL) Protocol Version 3.0", RFC 6101, 1356 DOI 10.17487/RFC6101, August 2011, 1357 . 1359 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 1360 Protocol (XMPP): Core", RFC 6120, DOI 10.17487/RFC6120, 1361 March 2011, . 1363 [RFC6460] Salter, M. and R. Housley, "Suite B Profile for Transport 1364 Layer Security (TLS)", RFC 6460, DOI 10.17487/RFC6460, 1365 January 2012, . 1367 [RFC6698] Hoffman, P. and J. Schlyter, "The DNS-Based Authentication 1368 of Named Entities (DANE) Transport Layer Security (TLS) 1369 Protocol: TLSA", RFC 6698, DOI 10.17487/RFC6698, August 1370 2012, . 1372 [RFC6797] Hodges, J., Jackson, C., and A. Barth, "HTTP Strict 1373 Transport Security (HSTS)", RFC 6797, 1374 DOI 10.17487/RFC6797, November 2012, 1375 . 1377 [RFC6960] Santesson, S., Myers, M., Ankney, R., Malpani, A., 1378 Galperin, S., and C. Adams, "X.509 Internet Public Key 1379 Infrastructure Online Certificate Status Protocol - OCSP", 1380 RFC 6960, DOI 10.17487/RFC6960, June 2013, 1381 . 1383 [RFC6961] Pettersen, Y., "The Transport Layer Security (TLS) 1384 Multiple Certificate Status Request Extension", RFC 6961, 1385 DOI 10.17487/RFC6961, June 2013, 1386 . 1388 [RFC6989] Sheffer, Y. and S. Fluhrer, "Additional Diffie-Hellman 1389 Tests for the Internet Key Exchange Protocol Version 2 1390 (IKEv2)", RFC 6989, DOI 10.17487/RFC6989, July 2013, 1391 . 1393 [RFC7435] Dukhovni, V., "Opportunistic Security: Some Protection 1394 Most of the Time", RFC 7435, DOI 10.17487/RFC7435, 1395 December 2014, . 1397 [RFC7457] Sheffer, Y., Holz, R., and P. Saint-Andre, "Summarizing 1398 Known Attacks on Transport Layer Security (TLS) and 1399 Datagram TLS (DTLS)", RFC 7457, DOI 10.17487/RFC7457, 1400 February 2015, . 1402 [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre, 1403 "Recommendations for Secure Use of Transport Layer 1404 Security (TLS) and Datagram Transport Layer Security 1405 (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May 1406 2015, . 1408 [RFC8452] Gueron, S., Langley, A., and Y. Lindell, "AES-GCM-SIV: 1409 Nonce Misuse-Resistant Authenticated Encryption", 1410 RFC 8452, DOI 10.17487/RFC8452, April 2019, 1411 . 1413 [RFC8470] Thomson, M., Nottingham, M., and W. Tarreau, "Using Early 1414 Data in HTTP", RFC 8470, DOI 10.17487/RFC8470, September 1415 2018, . 1417 [RFC9001] Thomson, M., Ed. and S. Turner, Ed., "Using TLS to Secure 1418 QUIC", RFC 9001, DOI 10.17487/RFC9001, May 2021, 1419 . 1421 [SESSION-HASH] 1422 Bhargavan, K., Ed., Delignat-Lavaud, A., Pironti, A., 1423 Langley, A., and M. Ray, "Transport Layer Security (TLS) 1424 Session Hash and Extended Master Secret Extension", 1425 RFC 7627, DOI 10.17487/RFC7627, September 2015, 1426 . 1428 [Smith2013] 1429 Smith, B., "Proposal to Change the Default TLS 1430 Ciphersuites Offered by Browsers.", 2013, 1431 . 1433 [Soghoian2011] 1434 Soghoian, C. and S. Stamm, "Certified Lies: Detecting and 1435 Defeating Government Interception Attacks Against SSL", 1436 SSRN Electronic Journal, DOI 10.2139/ssrn.1591033, 2010, 1437 . 1439 [Sy2018] Sy, E., Burkert, C., Federrath, H., and M. Fischer, 1440 "Tracking Users across the Web via TLS Session 1441 Resumption", Proceedings of the 34th Annual Computer 1442 Security Applications Conference, 1443 DOI 10.1145/3274694.3274708, December 2018, 1444 . 1446 [TLS-XMPP] Saint-Andre, P. and T. Alkemade, "Use of Transport Layer 1447 Security (TLS) in the Extensible Messaging and Presence 1448 Protocol (XMPP)", RFC 7590, DOI 10.17487/RFC7590, June 1449 2015, . 1451 [triple-handshake] 1452 Bhargavan, K., Lavaud, A., Fournet, C., Pironti, A., and 1453 P. Strub, "Triple Handshakes and Cookie Cutters: Breaking 1454 and Fixing Authentication over TLS", 2014 IEEE Symposium 1455 on Security and Privacy, DOI 10.1109/sp.2014.14, May 2014, 1456 . 1458 Appendix A. Differences from RFC 7525 1460 This revision of the Best Current Practices contains numerous 1461 changes, and this section is focused on the normative changes. 1463 * High level differences: 1465 - Clarified items (e.g. renegotiation) that only apply to TLS 1466 1.2. 1468 - Changed status of TLS 1.0 and 1.1 from SHOULD NOT to MUST NOT. 1470 - Added TLS 1.3 at a SHOULD level. 1472 - Similar changes to DTLS, pending publication of DTLS 1.3. 1474 - Specific guidance for multiplexed protocols. 1476 - MUST-level implementation requirement for ALPN, and more 1477 specific SHOULD-level guidance for ALPN and SNI. 1479 - New attacks since [RFC7457]: ALPACA, Raccoon, Logjam, "Nonce- 1480 Disrespecting Adversaries" 1482 * Differences specific to TLS 1.2: 1484 - Fallback SCSV as a MUST for TLS 1.2. 1486 - SHOULD-level guidance on AES-GCM nonce generation in TLS 1.2. 1488 - SHOULD NOT use static DH keys or reuse ephemeral DH keys across 1489 multiple connections. 1491 - 2048-bit DH now a MUST, ECDH minimal curve size is 224, vs. 192 1492 previously. 1494 * Differences specific to TLS 1.3: 1496 - New TLS 1.3 capabilities: 0-RTT. 1498 - Removed capabilities: renegotiation, compression. 1500 - Added mention of TLS Encrypted Client Hello, but no 1501 recommendation to use until it is finalized. 1503 - SHOULD-level requirement for forward secrecy in TLS 1.3 session 1504 resumption. 1506 - Generic SHOULD-level guidance to avoid 0-RTT unless it is 1507 documented for the particular protocol. 1509 Appendix B. Document History 1511 // Note to RFC Editor: please remove before publication. 1513 B.1. draft-ietf-uta-rfc7525bis-01 1515 * Many more changes, including: 1517 - SHOULD-level requirement for forward secrecy in TLS 1.3 session 1518 resumption. 1520 - Removed TLS 1.2 capabilities: renegotiation, compression. 1522 - Specific guidance for multiplexed protocols. 1524 - MUST-level implementation requirement for ALPN, and more 1525 specific SHOULD-level guidance for ALPN and SNI. 1527 - Generic SHOULD-level guidance to avoid 0-RTT unless it is 1528 documented for the particular protocol. 1530 - SHOULD-level guidance on AES-GCM nonce generation in TLS 1.2. 1532 - SHOULD NOT use static DH keys or reuse ephemeral DH keys across 1533 multiple connections. 1535 - 2048-bit DH now a MUST, ECDH minimal curve size is 224, up from 1536 192. 1538 B.2. draft-ietf-uta-rfc7525bis-00 1540 * Renamed: WG document. 1542 * Started populating list of changes from RFC 7525. 1544 * General rewording of abstract and intro for revised version. 1546 * Protocol versions, fallback. 1548 * Reference to ECHO. 1550 B.3. draft-sheffer-uta-rfc7525bis-00 1552 * Renamed, since the BCP number does not change. 1554 * Added an empty "Differences from RFC 7525" section. 1556 B.4. draft-sheffer-uta-bcp195bis-00 1558 * Initial release, the RFC 7525 text as-is, with some minor 1559 editorial changes to the references. 1561 Authors' Addresses 1563 Yaron Sheffer 1564 Intuit 1566 Email: yaronf.ietf@gmail.com 1568 Ralph Holz 1569 University of Twente 1571 Email: ralph.ietf@gmail.com 1573 Peter Saint-Andre 1574 Mozilla 1576 Email: stpeter@mozilla.com 1578 Thomas Fossati 1579 arm 1581 Email: thomas.fossati@arm.com