idnits 2.17.00 (12 Aug 2021) /tmp/idnits25651/draft-ietf-tls-rfc4492bis-09.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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC4492, 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 == Line 687 has weird spacing: '...rveType cur...' == Line 703 has weird spacing: '...ameters cur...' == Line 723 has weird spacing: '...HParams par...' == Line 818 has weird spacing: '...ionForm form;...' -- The document date (October 29, 2016) is 2029 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'ChangeCipherSpec' is mentioned on line 211, but not defined == Outdated reference: draft-irtf-cfrg-eddsa has been published as RFC 8032 ** Downref: Normative reference to an Informational draft: draft-irtf-cfrg-eddsa (ref. 'CFRG-EdDSA') -- Possible downref: Non-RFC (?) normative reference: ref. 'PKCS1' -- Possible downref: Non-RFC (?) normative reference: ref. 'PKIX-EdDSA' ** Obsolete normative reference: RFC 2246 (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 4346 (Obsoleted by RFC 5246) ** Obsolete normative reference: RFC 4366 (Obsoleted by RFC 5246, RFC 6066) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Downref: Normative reference to an Informational RFC: RFC 7748 -- Possible downref: Non-RFC (?) normative reference: ref. 'SECG-SEC2' == Outdated reference: draft-ietf-tls-tls13 has been published as RFC 8446 -- Obsolete informational reference (is this intentional?): RFC 4492 (Obsoleted by RFC 8422) Summary: 6 errors (**), 0 flaws (~~), 8 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TLS Working Group Y. Nir 3 Internet-Draft Check Point 4 Obsoletes: 4492 (if approved) S. Josefsson 5 Intended status: Standards Track SJD AB 6 Expires: May 2, 2017 M. Pegourie-Gonnard 7 Independent / PolarSSL 8 October 29, 2016 10 Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer 11 Security (TLS) Versions 1.2 and Earlier 12 draft-ietf-tls-rfc4492bis-09 14 Abstract 16 This document describes key exchange algorithms based on Elliptic 17 Curve Cryptography (ECC) for the Transport Layer Security (TLS) 18 protocol. In particular, it specifies the use of Ephemeral Elliptic 19 Curve Diffie-Hellman (ECDHE) key agreement in a TLS handshake and the 20 use of Elliptic Curve Digital Signature Algorithm (ECDSA) and Edwards 21 Digital Signature Algorithm (EdDSA) as new authentication mechanisms. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on May 2, 2017. 40 Copyright Notice 42 Copyright (c) 2016 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 58 1.1. Conventions Used in This Document . . . . . . . . . . . . 4 59 2. Key Exchange Algorithm . . . . . . . . . . . . . . . . . . . 4 60 2.1. ECDHE_ECDSA . . . . . . . . . . . . . . . . . . . . . . . 6 61 2.2. ECDHE_RSA . . . . . . . . . . . . . . . . . . . . . . . . 6 62 2.3. ECDH_anon . . . . . . . . . . . . . . . . . . . . . . . . 6 63 3. Client Authentication . . . . . . . . . . . . . . . . . . . . 7 64 3.1. ECDSA_sign . . . . . . . . . . . . . . . . . . . . . . . 7 65 4. TLS Extensions for ECC . . . . . . . . . . . . . . . . . . . 8 66 5. Data Structures and Computations . . . . . . . . . . . . . . 8 67 5.1. Client Hello Extensions . . . . . . . . . . . . . . . . . 9 68 5.1.1. Supported Elliptic Curves Extension . . . . . . . . . 10 69 5.1.2. Supported Point Formats Extension . . . . . . . . . . 11 70 5.2. Server Hello Extension . . . . . . . . . . . . . . . . . 12 71 5.3. Server Certificate . . . . . . . . . . . . . . . . . . . 13 72 5.4. Server Key Exchange . . . . . . . . . . . . . . . . . . . 14 73 5.4.1. Uncompressed Point Format for NIST curves . . . . . . 17 74 5.5. Certificate Request . . . . . . . . . . . . . . . . . . . 18 75 5.6. Client Certificate . . . . . . . . . . . . . . . . . . . 19 76 5.7. Client Key Exchange . . . . . . . . . . . . . . . . . . . 20 77 5.8. Certificate Verify . . . . . . . . . . . . . . . . . . . 21 78 5.9. Elliptic Curve Certificates . . . . . . . . . . . . . . . 23 79 5.10. ECDH, ECDSA, and RSA Computations . . . . . . . . . . . . 23 80 5.11. Public Key Validation . . . . . . . . . . . . . . . . . . 24 81 6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . 25 82 7. Security Considerations . . . . . . . . . . . . . . . . . . . 26 83 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 84 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 27 85 10. Version History for This Draft . . . . . . . . . . . . . . . 28 86 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 28 87 11.1. Normative References . . . . . . . . . . . . . . . . . . 28 88 11.2. Informative References . . . . . . . . . . . . . . . . . 30 89 Appendix A. Equivalent Curves (Informative) . . . . . . . . . . 30 90 Appendix B. Differences from RFC 4492 . . . . . . . . . . . . . 31 91 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 93 1. Introduction 95 Elliptic Curve Cryptography (ECC) has emerged as an attractive 96 public-key cryptosystem, in particular for mobile (i.e., wireless) 97 environments. Compared to currently prevalent cryptosystems such as 98 RSA, ECC offers equivalent security with smaller key sizes. This is 99 illustrated in the following table, based on [Lenstra_Verheul], which 100 gives approximate comparable key sizes for symmetric- and asymmetric- 101 key cryptosystems based on the best-known algorithms for attacking 102 them. 104 +-----------+-------+------------+ 105 | Symmetric | ECC | DH/DSA/RSA | 106 +-----------+-------+------------+ 107 | 80 | >=158 | 1024 | 108 | 112 | >=221 | 2048 | 109 | 128 | >=252 | 3072 | 110 | 192 | >=379 | 7680 | 111 | 256 | >=506 | 15360 | 112 +-----------+-------+------------+ 114 Table 1: Comparable Key Sizes (in bits) 116 Smaller key sizes result in savings for power, memory, bandwidth, and 117 computational cost that make ECC especially attractive for 118 constrained environments. 120 This document describes additions to TLS to support ECC, applicable 121 to TLS versions 1.0 [RFC2246], 1.1 [RFC4346], and 1.2 [RFC5246]. The 122 use of ECC in TLS 1.3 is defined in [I-D.ietf-tls-tls13], and is 123 explicitly out of scope for this document. In particular, this 124 document defines: 126 o the use of the Elliptic Curve Diffie-Hellman key agreement scheme 127 with ephemeral keys to establish the TLS premaster secret, and 128 o the use of ECDSA certificates for authentication of TLS peers. 130 The remainder of this document is organized as follows. Section 2 131 provides an overview of ECC-based key exchange algorithms for TLS. 132 Section 3 describes the use of ECC certificates for client 133 authentication. TLS extensions that allow a client to negotiate the 134 use of specific curves and point formats are presented in Section 4. 135 Section 5 specifies various data structures needed for an ECC-based 136 handshake, their encoding in TLS messages, and the processing of 137 those messages. Section 6 defines ECC-based cipher suites and 138 identifies a small subset of these as recommended for all 139 implementations of this specification. Section 7 discusses security 140 considerations. Section 8 describes IANA considerations for the name 141 spaces created by this document's predecessor. Section 9 gives 142 acknowledgements. Appendix B provides differences from [RFC4492], 143 the document that this one replaces. 145 Implementation of this specification requires familiarity with TLS, 146 TLS extensions [RFC4366], and ECC. 148 1.1. Conventions Used in This Document 150 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 151 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 152 document are to be interpreted as described in [RFC2119]. 154 2. Key Exchange Algorithm 156 This document defines three new ECC-based key exchange algorithms for 157 TLS. All of them use Ephemeral ECDH (ECDHE) to compute the TLS 158 premaster secret, and they differ only in the mechanism (if any) used 159 to authenticate them. The derivation of the TLS master secret from 160 the premaster secret and the subsequent generation of bulk 161 encryption/MAC keys and initialization vectors is independent of the 162 key exchange algorithm and not impacted by the introduction of ECC. 164 Table 2 summarizes the new key exchange algorithms. All of these key 165 exchange algorithms provide forward secrecy. 167 +-------------+------------------------------------------------+ 168 | Algorithm | Description | 169 +-------------+------------------------------------------------+ 170 | ECDHE_ECDSA | Ephemeral ECDH with ECDSA or EdDSA signatures. | 171 | ECDHE_RSA | Ephemeral ECDH with RSA signatures. | 172 | ECDH_anon | Anonymous ephemeral ECDH, no signatures. | 173 +-------------+------------------------------------------------+ 175 Table 2: ECC Key Exchange Algorithms 177 These key exchanges are analogous to DHE_DSS, DHE_RSA, and DH_anon, 178 respectively. 180 With ECDHE_RSA, a server can reuse its existing RSA certificate and 181 easily comply with a constrained client's elliptic curve preferences 182 (see Section 4). However, the computational cost incurred by a 183 server is higher for ECDHE_RSA than for the traditional RSA key 184 exchange, which does not provide forward secrecy. 186 The anonymous key exchange algorithm does not provide authentication 187 of the server or the client. Like other anonymous TLS key exchanges, 188 it is subject to man-in-the-middle attacks. Implementations of this 189 algorithm SHOULD provide authentication by other means. 191 Note that there is no structural difference between ECDH and ECDSA 192 keys. A certificate issuer may use X.509 v3 keyUsage and 193 extendedKeyUsage extensions to restrict the use of an ECC public key 194 to certain computations. This document refers to an ECC key as ECDH- 195 capable if its use in ECDH is permitted. ECDSA-capable and EdDSA- 196 capable are defined similarly. 198 Client Server 199 ------ ------ 200 ClientHello --------> 201 ServerHello 202 Certificate* 203 ServerKeyExchange* 204 CertificateRequest*+ 205 <-------- ServerHelloDone 206 Certificate*+ 207 ClientKeyExchange 208 CertificateVerify*+ 209 [ChangeCipherSpec] 210 Finished --------> 211 [ChangeCipherSpec] 212 <-------- Finished 213 Application Data <-------> Application Data 214 * message is not sent under some conditions 215 + message is not sent unless client authentication 216 is desired 218 Figure 1: Message flow in a full TLS 1.2 handshake 220 Figure 1 shows all messages involved in the TLS key establishment 221 protocol (aka full handshake). The addition of ECC has direct impact 222 only on the ClientHello, the ServerHello, the server's Certificate 223 message, the ServerKeyExchange, the ClientKeyExchange, the 224 CertificateRequest, the client's Certificate message, and the 225 CertificateVerify. Next, we describe the ECC key exchange algorithm 226 in greater detail in terms of the content and processing of these 227 messages. For ease of exposition, we defer discussion of client 228 authentication and associated messages (identified with a + in 229 Figure 1) until Section 3 and of the optional ECC-specific extensions 230 (which impact the Hello messages) until Section 4. 232 2.1. ECDHE_ECDSA 234 In ECDHE_ECDSA, the server's certificate MUST contain an ECDSA- or 235 EdDSA-capable public key. 237 The server sends its ephemeral ECDH public key and a specification of 238 the corresponding curve in the ServerKeyExchange message. These 239 parameters MUST be signed with ECDSA or EdDSA using the private key 240 corresponding to the public key in the server's Certificate. 242 The client generates an ECDH key pair on the same curve as the 243 server's ephemeral ECDH key and sends its public key in the 244 ClientKeyExchange message. 246 Both client and server perform an ECDH operation Section 5.10 and use 247 the resultant shared secret as the premaster secret. 249 2.2. ECDHE_RSA 251 This key exchange algorithm is the same as ECDHE_ECDSA except that 252 the server's certificate MUST contain an RSA public key authorized 253 for signing, and that the signature in the ServerKeyExchange message 254 must be computed with the corresponding RSA private key. 256 2.3. ECDH_anon 258 NOTE: Despite the name beginning with "ECDH_" (no E), the key used in 259 ECDH_anon is ephemeral just like the key in ECDHE_RSA and 260 ECDHE_ECDSA. The naming follows the example of DH_anon, where the 261 key is also ephemeral but the name does not reflect it. 263 In ECDH_anon, the server's Certificate, the CertificateRequest, the 264 client's Certificate, and the CertificateVerify messages MUST NOT be 265 sent. 267 The server MUST send an ephemeral ECDH public key and a specification 268 of the corresponding curve in the ServerKeyExchange message. These 269 parameters MUST NOT be signed. 271 The client generates an ECDH key pair on the same curve as the 272 server's ephemeral ECDH key and sends its public key in the 273 ClientKeyExchange message. 275 Both client and server perform an ECDH operation and use the 276 resultant shared secret as the premaster secret. All ECDH 277 calculations are performed as specified in Section 5.10. 279 This specification does not impose restrictions on signature schemes 280 used anywhere in the certificate chain. The previous version of this 281 document required the signatures to match, but this restriction, 282 originating in previous TLS versions is lifted here as it had been in 283 RFC 5246. 285 3. Client Authentication 287 This document defines a client authentication mechanism, named after 288 the type of client certificate involved: ECDSA_sign. The ECDSA_sign 289 mechanism is usable with any of the non-anonymous ECC key exchange 290 algorithms described in Section 2 as well as other non-anonymous 291 (non-ECC) key exchange algorithms defined in TLS. 293 The server can request ECC-based client authentication by including 294 this certificate type in its CertificateRequest message. The client 295 must check if it possesses a certificate appropriate for the method 296 suggested by the server and is willing to use it for authentication. 298 If these conditions are not met, the client should send a client 299 Certificate message containing no certificates. In this case, the 300 ClientKeyExchange should be sent as described in Section 2, and the 301 CertificateVerify should not be sent. If the server requires client 302 authentication, it may respond with a fatal handshake failure alert. 304 If the client has an appropriate certificate and is willing to use it 305 for authentication, it must send that certificate in the client's 306 Certificate message (as per Section 5.6) and prove possession of the 307 private key corresponding to the certified key. The process of 308 determining an appropriate certificate and proving possession is 309 different for each authentication mechanism and described below. 311 NOTE: It is permissible for a server to request (and the client to 312 send) a client certificate of a different type than the server 313 certificate. 315 3.1. ECDSA_sign 317 To use this authentication mechanism, the client MUST possess a 318 certificate containing an ECDSA- or EdDSA-capable public key. 320 The client proves possession of the private key corresponding to the 321 certified key by including a signature in the CertificateVerify 322 message as described in Section 5.8. 324 4. TLS Extensions for ECC 326 Two new TLS extensions are defined in this specification: (i) the 327 Supported Elliptic Curves Extension, and (ii) the Supported Point 328 Formats Extension. These allow negotiating the use of specific 329 curves and point formats (e.g., compressed vs. uncompressed, 330 respectively) during a handshake starting a new session. These 331 extensions are especially relevant for constrained clients that may 332 only support a limited number of curves or point formats. They 333 follow the general approach outlined in [RFC4366]; message details 334 are specified in Section 5. The client enumerates the curves it 335 supports and the point formats it can parse by including the 336 appropriate extensions in its ClientHello message. The server 337 similarly enumerates the point formats it can parse by including an 338 extension in its ServerHello message. 340 A TLS client that proposes ECC cipher suites in its ClientHello 341 message SHOULD include these extensions. Servers implementing ECC 342 cipher suites MUST support these extensions, and when a client uses 343 these extensions, servers MUST NOT negotiate the use of an ECC cipher 344 suite unless they can complete the handshake while respecting the 345 choice of curves and compression techniques specified by the client. 346 This eliminates the possibility that a negotiated ECC handshake will 347 be subsequently aborted due to a client's inability to deal with the 348 server's EC key. 350 The client MUST NOT include these extensions in the ClientHello 351 message if it does not propose any ECC cipher suites. A client that 352 proposes ECC cipher suites may choose not to include these 353 extensions. In this case, the server is free to choose any one of 354 the elliptic curves or point formats listed in Section 5. That 355 section also describes the structure and processing of these 356 extensions in greater detail. 358 In the case of session resumption, the server simply ignores the 359 Supported Elliptic Curves Extension and the Supported Point Formats 360 Extension appearing in the current ClientHello message. These 361 extensions only play a role during handshakes negotiating a new 362 session. 364 5. Data Structures and Computations 366 This section specifies the data structures and computations used by 367 ECC-based key mechanisms specified in the previous three sections. 368 The presentation language used here is the same as that used in TLS. 369 Since this specification extends TLS, these descriptions should be 370 merged with those in the TLS specification and any others that extend 371 TLS. This means that enum types may not specify all possible values, 372 and structures with multiple formats chosen with a select() clause 373 may not indicate all possible cases. 375 5.1. Client Hello Extensions 377 This section specifies two TLS extensions that can be included with 378 the ClientHello message as described in [RFC4366], the Supported 379 Elliptic Curves Extension and the Supported Point Formats Extension. 381 When these extensions are sent: 383 The extensions SHOULD be sent along with any ClientHello message that 384 proposes ECC cipher suites. 386 Meaning of these extensions: 388 These extensions allow a client to enumerate the elliptic curves it 389 supports and/or the point formats it can parse. 391 Structure of these extensions: 393 The general structure of TLS extensions is described in [RFC4366], 394 and this specification adds two new types to ExtensionType. 396 enum { 397 elliptic_curves(10), 398 ec_point_formats(11) 399 } ExtensionType; 401 elliptic_curves (Supported Elliptic Curves Extension): Indicates the 402 set of elliptic curves supported by the client. For this 403 extension, the opaque extension_data field contains 404 EllipticCurveList. See Section 5.1.1 for details. 405 ec_point_formats (Supported Point Formats Extension): Indicates the 406 set of point formats that the client can parse. For this 407 extension, the opaque extension_data field contains 408 ECPointFormatList. See Section 5.1.2 for details. 410 Actions of the sender: 412 A client that proposes ECC cipher suites in its ClientHello message 413 appends these extensions (along with any others), enumerating the 414 curves it supports and the point formats it can parse. Clients 415 SHOULD send both the Supported Elliptic Curves Extension and the 416 Supported Point Formats Extension. If the Supported Point Formats 417 Extension is indeed sent, it MUST contain the value 0 (uncompressed) 418 as one of the items in the list of point formats. 420 Actions of the receiver: 422 A server that receives a ClientHello containing one or both of these 423 extensions MUST use the client's enumerated capabilities to guide its 424 selection of an appropriate cipher suite. One of the proposed ECC 425 cipher suites must be negotiated only if the server can successfully 426 complete the handshake while using the curves and point formats 427 supported by the client (cf. Section 5.3 and Section 5.4). 429 NOTE: A server participating in an ECDHE_ECDSA key exchange may use 430 different curves for the ECDSA or EdDSA key in its certificate, and 431 for the ephemeral ECDH key in the ServerKeyExchange message. The 432 server MUST consider the extensions in both cases. 434 If a server does not understand the Supported Elliptic Curves 435 Extension, does not understand the Supported Point Formats Extension, 436 or is unable to complete the ECC handshake while restricting itself 437 to the enumerated curves and point formats, it MUST NOT negotiate the 438 use of an ECC cipher suite. Depending on what other cipher suites 439 are proposed by the client and supported by the server, this may 440 result in a fatal handshake failure alert due to the lack of common 441 cipher suites. 443 5.1.1. Supported Elliptic Curves Extension 445 RFC 4492 defined 25 different curves in the NamedCurve registry (now 446 renamed the "Supported Groups" registry, although the enumeration 447 below is still named NamedCurve) for use in TLS. Only three have 448 seen much use. This specification is deprecating the rest (with 449 numbers 1-22). This specification also deprecates the explicit 450 curves with identifiers 0xFF01 and 0xFF02. It also adds the new 451 curves defined in [RFC7748] and [CFRG-EdDSA]. The end result is as 452 follows: 454 enum { 455 deprecated(1..22), 456 secp256r1 (23), secp384r1 (24), secp521r1 (25), 457 ecdh_x25519(29), ecdh_x448(30), 458 eddsa_ed25519(TBD3), eddsa_ed448(TBD4), 459 reserved (0xFE00..0xFEFF), 460 deprecated(0xFF01..0xFF02), 461 (0xFFFF) 462 } NamedCurve; 464 Note that other specification have since added other values to this 465 enumeration. 467 secp256r1, etc: Indicates support of the corresponding named curve or 468 class of explicitly defined curves. The named curves secp256r1, 469 secp384r1, and secp521r1 are specified in SEC 2 [SECG-SEC2]. These 470 curves are also recommended in ANSI X9.62 [ANSI.X9-62.2005] and FIPS 471 186-4 [FIPS.186-4]. The rest of this document refers to these three 472 curves as the "NIST curves" because they were originally standardized 473 by the National Institute of Standards and Technology. The curves 474 ecdh_x25519 and ecdh_x448 are defined in [RFC7748]. eddsa_ed25519 and 475 eddsa_ed448 are signature-only curves defined in [CFRG-EdDSA]. 476 Values 0xFE00 through 0xFEFF are reserved for private use. 478 The NamedCurve name space is maintained by IANA. See Section 8 for 479 information on how new value assignments are added. 481 struct { 482 NamedCurve elliptic_curve_list<2..2^16-1> 483 } EllipticCurveList; 485 Items in elliptic_curve_list are ordered according to the client's 486 preferences (favorite choice first). 488 As an example, a client that only supports secp256r1 (aka NIST P-256; 489 value 23 = 0x0017) and secp384r1 (aka NIST P-384; value 24 = 0x0018) 490 and prefers to use secp256r1 would include a TLS extension consisting 491 of the following octets. Note that the first two octets indicate the 492 extension type (Supported Elliptic Curves Extension): 494 00 0A 00 06 00 04 00 17 00 18 496 5.1.2. Supported Point Formats Extension 498 enum { 499 uncompressed (0), 500 deprecated (1..2), 501 reserved (248..255) 502 } ECPointFormat; 503 struct { 504 ECPointFormat ec_point_format_list<1..2^8-1> 505 } ECPointFormatList; 507 Three point formats were included in the definition of ECPointFormat 508 above. This specification deprecates all but the uncompressed point 509 format. Implementations of this document MUST support the 510 uncompressed format for all of their supported curves, and MUST NOT 511 support other formats for curves defined in this specification. For 512 backwards compatibility purposes, the point format list extension 513 MUST still be included, and contain exactly one value: the 514 uncompressed point format (0). 516 The ECPointFormat name space is maintained by IANA. See Section 8 517 for information on how new value assignments are added. 519 Items in ec_point_format_list are ordered according to the client's 520 preferences (favorite choice first). 522 A client compliant with this specification that supports no other 523 curves MUST send the following octets; note that the first two octets 524 indicate the extension type (Supported Point Formats Extension): 526 00 0B 00 02 01 00 528 5.2. Server Hello Extension 530 This section specifies a TLS extension that can be included with the 531 ServerHello message as described in [RFC4366], the Supported Point 532 Formats Extension. 534 When this extension is sent: 536 The Supported Point Formats Extension is included in a ServerHello 537 message in response to a ClientHello message containing the Supported 538 Point Formats Extension when negotiating an ECC cipher suite. 540 Meaning of this extension: 542 This extension allows a server to enumerate the point formats it can 543 parse (for the curve that will appear in its ServerKeyExchange 544 message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key 545 exchange algorithm. 547 Structure of this extension: 549 The server's Supported Point Formats Extension has the same structure 550 as the client's Supported Point Formats Extension (see 551 Section 5.1.2). Items in ec_point_format_list here are ordered 552 according to the server's preference (favorite choice first). Note 553 that the server may include items that were not found in the client's 554 list (e.g., the server may prefer to receive points in compressed 555 format even when a client cannot parse this format: the same client 556 may nevertheless be capable of outputting points in compressed 557 format). 559 Actions of the sender: 561 A server that selects an ECC cipher suite in response to a 562 ClientHello message including a Supported Point Formats Extension 563 appends this extension (along with others) to its ServerHello 564 message, enumerating the point formats it can parse. The Supported 565 Point Formats Extension, when used, MUST contain the value 0 566 (uncompressed) as one of the items in the list of point formats. 568 Actions of the receiver: 570 A client that receives a ServerHello message containing a Supported 571 Point Formats Extension MUST respect the server's choice of point 572 formats during the handshake (cf. Section 5.6 and Section 5.7). If 573 no Supported Point Formats Extension is received with the 574 ServerHello, this is equivalent to an extension allowing only the 575 uncompressed point format. 577 5.3. Server Certificate 579 When this message is sent: 581 This message is sent in all non-anonymous ECC-based key exchange 582 algorithms. 584 Meaning of this message: 586 This message is used to authentically convey the server's static 587 public key to the client. The following table shows the server 588 certificate type appropriate for each key exchange algorithm. ECC 589 public keys MUST be encoded in certificates as described in 590 Section 5.9. 592 NOTE: The server's Certificate message is capable of carrying a chain 593 of certificates. The restrictions mentioned in Table 3 apply only to 594 the server's certificate (first in the chain). 596 +-------------+-----------------------------------------------------+ 597 | Algorithm | Server Certificate Type | 598 +-------------+-----------------------------------------------------+ 599 | ECDHE_ECDSA | Certificate MUST contain an ECDSA- or EdDSA-capable | 600 | | public key. | 601 | ECDHE_RSA | Certificate MUST contain an RSA public key | 602 | | authorized for use in digital signatures. | 603 +-------------+-----------------------------------------------------+ 605 Table 3: Server Certificate Types 607 Structure of this message: 609 Identical to the TLS Certificate format. 611 Actions of the sender: 613 The server constructs an appropriate certificate chain and conveys it 614 to the client in the Certificate message. If the client has used a 615 Supported Elliptic Curves Extension, the public key in the server's 616 certificate MUST respect the client's choice of elliptic curves; in 617 particular, the public key MUST employ a named curve (not the same 618 curve as an explicit curve) unless the client has indicated support 619 for explicit curves of the appropriate type. If the client has used 620 a Supported Point Formats Extension, both the server's public key 621 point and (in the case of an explicit curve) the curve's base point 622 MUST respect the client's choice of point formats. (A server that 623 cannot satisfy these requirements MUST NOT choose an ECC cipher suite 624 in its ServerHello message.) 626 Actions of the receiver: 628 The client validates the certificate chain, extracts the server's 629 public key, and checks that the key type is appropriate for the 630 negotiated key exchange algorithm. (A possible reason for a fatal 631 handshake failure is that the client's capabilities for handling 632 elliptic curves and point formats are exceeded; cf. Section 5.1.) 634 5.4. Server Key Exchange 636 When this message is sent: 638 This message is sent when using the ECDHE_ECDSA, ECDHE_RSA, and 639 ECDH_anon key exchange algorithms. 641 Meaning of this message: 643 This message is used to convey the server's ephemeral ECDH public key 644 (and the corresponding elliptic curve domain parameters) to the 645 client. 647 The ECCCurveType enum used to have values for explicit prime and for 648 explicit char2 curves. Those values are now deprecated, so only one 649 value remains: 651 Structure of this message: 653 enum { 654 deprecated (1..2), 655 named_curve (3), 656 reserved(248..255) 657 } ECCurveType; 659 The value named_curve indicates that a named curve is used. This 660 option SHOULD be used when applicable. 662 Values 248 through 255 are reserved for private use. 664 The ECCurveType name space is maintained by IANA. See Section 8 for 665 information on how new value assignments are added. 667 RFC 4492 had a specification for an ECCurve structure and an 668 ECBasisType structure. Both of these are omitted now because they 669 were only used with the now deprecated explicit curves. 671 struct { 672 opaque point <1..2^8-1>; 673 } ECPoint; 675 This is the byte string representation of an elliptic curve point 676 following the conversion routine in Section 4.3.6 of 677 [ANSI.X9-62.2005]. This byte string may represent an elliptic curve 678 point in uncompressed, compressed, or hybrid format, but this 679 specification deprecates all but the uncompressed format. For the 680 NIST curves, the format is repeated in Section 5.4.1 for convenience. 681 For the X25519 and X448 curves, the only valid representation is the 682 one specified in [RFC7748] - a 32- or 56-octet representation of the 683 u value of the point. This structure MUST NOT be used with Ed25519 684 and Ed448 public keys. 686 struct { 687 ECCurveType curve_type; 688 select (curve_type) { 689 case named_curve: 690 NamedCurve namedcurve; 691 }; 692 } ECParameters; 694 This identifies the type of the elliptic curve domain parameters. 696 Specifies a recommended set of elliptic curve domain parameters. All 697 those values of NamedCurve are allowed that refer to a curve capable 698 of Diffie-Hellman. With the deprecation of the explicit curves, this 699 now includes all values of NamedCurve except eddsa_ed25519(TBD3) and 700 eddsa_ed448(TBD4). 702 struct { 703 ECParameters curve_params; 704 ECPoint public; 705 } ServerECDHParams; 707 Specifies the elliptic curve domain parameters associated with the 708 ECDH public key. 710 The ephemeral ECDH public key. 712 The ServerKeyExchange message is extended as follows. 714 enum { 715 ec_diffie_hellman 716 } KeyExchangeAlgorithm; 718 ec_diffie_hellman: Indicates the ServerKeyExchange message contains 719 an ECDH public key. 721 select (KeyExchangeAlgorithm) { 722 case ec_diffie_hellman: 723 ServerECDHParams params; 724 Signature signed_params; 725 } ServerKeyExchange; 727 params: Specifies the ECDH public key and associated domain 728 parameters. 729 signed_params: A hash of the params, with the signature appropriate 730 to that hash applied. The private key corresponding to the 731 certified public key in the server's Certificate message is used 732 for signing. 734 enum { 735 ecdsa(3), 736 eddsa(TBD5) 737 } SignatureAlgorithm; 738 select (SignatureAlgorithm) { 739 case ecdsa: 740 digitally-signed struct { 741 opaque sha_hash[sha_size]; 742 }; 743 case eddsa: 744 digitally-signed struct { 745 opaque rawdata[rawdata_size]; 746 }; 747 } Signature; 748 ServerKeyExchange.signed_params.sha_hash 749 SHA(ClientHello.random + ServerHello.random + 750 ServerKeyExchange.params); 751 ServerKeyExchange.signed_params.rawdata 752 ClientHello.random + ServerHello.random + 753 ServerKeyExchange.params; 755 NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange 756 algorithm and "anonymous" for ECDH_anon. These cases are defined in 757 TLS. SignatureAlgorithm is "ecdsa" or "eddsa" for ECDHE_ECDSA. 759 ECDSA signatures are generated and verified as described in 760 Section 5.10, and SHA in the above template for sha_hash accordingly 761 may denote a hash algorithm other than SHA-1. As per ANSI X9.62, an 762 ECDSA signature consists of a pair of integers, r and s. The 763 digitally-signed element is encoded as an opaque vector <0..2^16-1>, 764 the contents of which are the DER encoding corresponding to the 765 following ASN.1 notation. 767 Ecdsa-Sig-Value ::= SEQUENCE { 768 r INTEGER, 769 s INTEGER 770 } 772 EdDSA signatures in both the protocol and in certificates that 773 conform to [PKIX-EdDSA] are generated and verified according to 774 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 775 vector<0..2^16-1>, the contents of which is the octet string output 776 of the EdDSA signing algorithm. 778 Actions of the sender: 780 The server selects elliptic curve domain parameters and an ephemeral 781 ECDH public key corresponding to these parameters according to the 782 ECKAS-DH1 scheme from IEEE 1363 [IEEE.P1363.1998]. It conveys this 783 information to the client in the ServerKeyExchange message using the 784 format defined above. 786 Actions of the receiver: 788 The client verifies the signature (when present) and retrieves the 789 server's elliptic curve domain parameters and ephemeral ECDH public 790 key from the ServerKeyExchange message. (A possible reason for a 791 fatal handshake failure is that the client's capabilities for 792 handling elliptic curves and point formats are exceeded; cf. 793 Section 5.1.) 795 5.4.1. Uncompressed Point Format for NIST curves 797 The following represents the wire format for representing ECPoint in 798 ServerKeyExchange records. The first octet of the representation 799 indicates the form, which may be compressed, uncompressed, or hybrid. 800 This specification supports only the uncompressed format for these 801 curves. This is followed by the binary representation of the X value 802 in "big-endian" or "network" format, followed by the binary 803 representation of the Y value in "big-endian" or "network" format. 804 There are no internal length markers, so each number representation 805 occupies as many octets as implied by the curve parameters. For 806 P-256 this means that each of X and Y use 32 octets, padded on the 807 left by zeros if necessary. For P-384 they take 48 octets each, and 808 for P-521 they take 66 octets each. 810 Here's a more formal representation: 812 enum { 813 uncompressed(4), 814 (255) 815 } PointConversionForm; 817 struct { 818 PointConversionForm form; 819 opaque X[coordinate_length]; 820 opaque Y[coordinate_length]; 821 } UncompressedPointRepresentation; 823 5.5. Certificate Request 825 When this message is sent: 827 This message is sent when requesting client authentication. 829 Meaning of this message: 831 The server uses this message to suggest acceptable client 832 authentication methods. 834 Structure of this message: 836 The TLS CertificateRequest message is extended as follows. 838 enum { 839 ecdsa_sign(64), 840 rsa_fixed_ecdh(65), 841 ecdsa_fixed_ecdh(66), 842 (255) 843 } ClientCertificateType; 845 ecdsa_sign, etc. Indicates that the server would like to use the 846 corresponding client authentication method specified in Section 3. 848 Actions of the sender: 850 The server decides which client authentication methods it would like 851 to use, and conveys this information to the client using the format 852 defined above. 854 Actions of the receiver: 856 The client determines whether it has a suitable certificate for use 857 with any of the requested methods and whether to proceed with client 858 authentication. 860 5.6. Client Certificate 862 When this message is sent: 864 This message is sent in response to a CertificateRequest when a 865 client has a suitable certificate and has decided to proceed with 866 client authentication. (Note that if the server has used a Supported 867 Point Formats Extension, a certificate can only be considered 868 suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and 869 ECDSA_fixed_ECDH authentication methods if the public key point 870 specified in it respects the server's choice of point formats. If no 871 Supported Point Formats Extension has been used, a certificate can 872 only be considered suitable for use with these authentication methods 873 if the point is represented in uncompressed point format.) 875 Meaning of this message: 877 This message is used to authentically convey the client's static 878 public key to the server. The following table summarizes what client 879 certificate types are appropriate for the ECC-based client 880 authentication mechanisms described in Section 3. ECC public keys 881 must be encoded in certificates as described in Section 5.9. 883 NOTE: The client's Certificate message is capable of carrying a chain 884 of certificates. The restrictions mentioned in Table 4 apply only to 885 the client's certificate (first in the chain). 887 +------------------+------------------------------------------------+ 888 | Client | Client Certificate Type | 889 | Authentication | | 890 | Method | | 891 +------------------+------------------------------------------------+ 892 | ECDSA_sign | Certificate MUST contain an ECDSA- or EdDSA- | 893 | | capable public key. | 894 | ECDSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 895 | | public key on the same elliptic curve as the | 896 | | server's long-term ECDH key. | 897 | RSA_fixed_ECDH | The same as ECDSA_fixed_ECDH. The codepoints | 898 | | meant different things, but due to changes in | 899 | | TLS 1.2, both mean the same thing now. | 900 +------------------+------------------------------------------------+ 902 Table 4: Client Certificate Types 904 Structure of this message: 906 Identical to the TLS client Certificate format. 908 Actions of the sender: 910 The client constructs an appropriate certificate chain, and conveys 911 it to the server in the Certificate message. 913 Actions of the receiver: 915 The TLS server validates the certificate chain, extracts the client's 916 public key, and checks that the key type is appropriate for the 917 client authentication method. 919 5.7. Client Key Exchange 921 When this message is sent: 923 This message is sent in all key exchange algorithms. If client 924 authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this 925 message is empty. Otherwise, it contains the client's ephemeral ECDH 926 public key. 928 Meaning of the message: 930 This message is used to convey ephemeral data relating to the key 931 exchange belonging to the client (such as its ephemeral ECDH public 932 key). 934 Structure of this message: 936 The TLS ClientKeyExchange message is extended as follows. 938 enum { 939 implicit, 940 explicit 941 } PublicValueEncoding; 943 implicit, explicit: For ECC cipher suites, this indicates whether 944 the client's ECDH public key is in the client's certificate 945 ("implicit") or is provided, as an ephemeral ECDH public key, in 946 the ClientKeyExchange message ("explicit"). (This is "explicit" 947 in ECC cipher suites except when the client uses the 948 ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication 949 mechanism.) 950 struct { 951 select (PublicValueEncoding) { 952 case implicit: struct { }; 953 case explicit: ECPoint ecdh_Yc; 954 } ecdh_public; 955 } ClientECDiffieHellmanPublic; 956 ecdh_Yc: Contains the client's ephemeral ECDH public key as a byte 957 string ECPoint.point, which may represent an elliptic curve point 958 in uncompressed or compressed format. Curves eddsa_ed25519 and 959 eddsa_ed448 MUST NOT be used here. Here, the format MUST conform 960 to what the server has requested through a Supported Point Formats 961 Extension if this extension was used, and MUST be uncompressed if 962 this extension was not used. 964 struct { 965 select (KeyExchangeAlgorithm) { 966 case ec_diffie_hellman: ClientECDiffieHellmanPublic; 967 } exchange_keys; 968 } ClientKeyExchange; 970 Actions of the sender: 972 The client selects an ephemeral ECDH public key corresponding to the 973 parameters it received from the server according to the ECKAS-DH1 974 scheme from IEEE 1363. It conveys this information to the client in 975 the ClientKeyExchange message using the format defined above. 977 Actions of the receiver: 979 The server retrieves the client's ephemeral ECDH public key from the 980 ClientKeyExchange message and checks that it is on the same elliptic 981 curve as the server's ECDH key. 983 5.8. Certificate Verify 985 When this message is sent: 987 This message is sent when the client sends a client certificate 988 containing a public key usable for digital signatures, e.g., when the 989 client is authenticated using the ECDSA_sign mechanism. 991 Meaning of the message: 993 This message contains a signature that proves possession of the 994 private key corresponding to the public key in the client's 995 Certificate message. 997 Structure of this message: 999 The TLS CertificateVerify message and the underlying Signature type 1000 are defined in the TLS base specifications, and the latter is 1001 extended here in Section 5.4. For the ecdsa and eddsa cases, the 1002 signature field in the CertificateVerify message contains an ECDSA or 1003 EdDSA (respectively) signature computed over handshake messages 1004 exchanged so far, exactly similar to CertificateVerify with other 1005 signing algorithms: 1007 CertificateVerify.signature.sha_hash 1008 SHA(handshake_messages); 1009 CertificateVerify.signature.rawdata 1010 handshake_messages; 1012 ECDSA signatures are computed as described in Section 5.10, and SHA 1013 in the above template for sha_hash accordingly may denote a hash 1014 algorithm other than SHA-1. As per ANSI X9.62, an ECDSA signature 1015 consists of a pair of integers, r and s. The digitally-signed 1016 element is encoded as an opaque vector <0..2^16-1>, the contents of 1017 which are the DER encoding [CCITT.X690] corresponding to the 1018 following ASN.1 notation [CCITT.X680]. 1020 Ecdsa-Sig-Value ::= SEQUENCE { 1021 r INTEGER, 1022 s INTEGER 1023 } 1025 EdDSA signatures are generated and verified according to 1026 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 1027 vector<0..2^16-1>, the contents of which is the octet string output 1028 of the EdDSA signing algorithm. 1030 Actions of the sender: 1032 The client computes its signature over all handshake messages sent or 1033 received starting at client hello and up to but not including this 1034 message. It uses the private key corresponding to its certified 1035 public key to compute the signature, which is conveyed in the format 1036 defined above. 1038 Actions of the receiver: 1040 The server extracts the client's signature from the CertificateVerify 1041 message, and verifies the signature using the public key it received 1042 in the client's Certificate message. 1044 5.9. Elliptic Curve Certificates 1046 X.509 certificates containing ECC public keys or signed using ECDSA 1047 MUST comply with [RFC3279] or another RFC that replaces or extends 1048 it. X.509 certificates containing ECC public keys or signed using 1049 EdDSA MUST comply with [PKIX-EdDSA]. Clients SHOULD use the elliptic 1050 curve domain parameters recommended in ANSI X9.62, FIPS 186-4, and 1051 SEC 2 [SECG-SEC2] or in [CFRG-EdDSA]. 1053 EdDSA keys using Ed25519 and Ed25519ph algorithms MUST use the 1054 eddsa_ed25519 curve, and Ed448 and Ed448ph keys MUST use the 1055 eddsa_ed448 curve. Curves ecdh_x25519, ecdh_x448, eddsa_ed25519 and 1056 eddsa_ed448 MUST NOT be used for ECDSA. 1058 5.10. ECDH, ECDSA, and RSA Computations 1060 All ECDH calculations for the NIST curves (including parameter and 1061 key generation as well as the shared secret calculation) are 1062 performed according to [IEEE.P1363.1998] using the ECKAS-DH1 scheme 1063 with the identity map as key derivation function (KDF), so that the 1064 premaster secret is the x-coordinate of the ECDH shared secret 1065 elliptic curve point represented as an octet string. Note that this 1066 octet string (Z in IEEE 1363 terminology) as output by FE2OSP, the 1067 Field Element to Octet String Conversion Primitive, has constant 1068 length for any given field; leading zeros found in this octet string 1069 MUST NOT be truncated. 1071 (Note that this use of the identity KDF is a technicality. The 1072 complete picture is that ECDH is employed with a non-trivial KDF 1073 because TLS does not directly use the premaster secret for anything 1074 other than for computing the master secret. In TLS 1.0 and 1.1, this 1075 means that the MD5- and SHA-1-based TLS PRF serves as a KDF; in TLS 1076 1.2 the KDF is determined by ciphersuite; it is conceivable that 1077 future TLS versions or new TLS extensions introduced in the future 1078 may vary this computation.) 1080 An ECDHE key exchange using X25519 (curve ecdh_x25519) goes as 1081 follows: Each party picks a secret key d uniformly at random and 1082 computes the corresponding public key x = X25519(d, G). Parties 1083 exchange their public keys, and compute a shared secret as x_S = 1084 X25519(d, x_peer). If either party obtains all-zeroes x_S, it MUST 1085 abort the handshake (as required by definition of X25519 and X448). 1086 ECDHE for X448 works similarily, replacing X25519 with X448, and 1087 ecdh_x25519 with ecdh_x448. The derived shared secret is used 1088 directly as the premaster secret, which is always exactly 32 bytes 1089 when ECDHE with X25519 is used and 56 bytes when ECDHE with X448 is 1090 used. 1092 All ECDSA computations MUST be performed according to ANSI X9.62 or 1093 its successors. Data to be signed/verified is hashed, and the result 1094 run directly through the ECDSA algorithm with no additional hashing. 1095 The default hash function is SHA-1 [FIPS.180-2], and sha_size (see 1096 Section 5.4 and Section 5.8) is 20. However, an alternative hash 1097 function, such as one of the new SHA hash functions specified in FIPS 1098 180-2 [FIPS.180-2], SHOULD be used instead. 1100 All EdDSA computations MUST be performed according to [CFRG-EdDSA] or 1101 its succesors. Data to be signed/verified is run through the EdDSA 1102 algorithm wih no hashing (EdDSA will internally run the data through 1103 the PH function). 1105 RFC 4492 anticipated the standardization of a mechanism for 1106 specifying the required hash function in the certificate, perhaps in 1107 the parameters field of the subjectPublicKeyInfo. Such 1108 standardization never took place, and as a result, SHA-1 is used in 1109 TLS 1.1 and earlier (except for EdDSA, which uses identity function). 1110 TLS 1.2 added a SignatureAndHashAlgorithm parameter to the 1111 DigitallySigned struct, thus allowing agility in choosing the 1112 signature hash. EdDSA signatures MUST have HashAlgorithm of 0 1113 (None). 1115 All RSA signatures must be generated and verified according to 1116 [PKCS1] block type 1. 1118 5.11. Public Key Validation 1120 With the NIST curves, each party must validate the public key sent by 1121 its peer. A receiving party MUST check that the x and y parameters 1122 from the peer's public value satisfy the curve equation, y^2 = x^3 + 1123 ax + b mod p. See section 2.3 of [Menezes] for details. Failing to 1124 do so allows attackers to gain information about the private key, to 1125 the point that they may recover the entire private key in a few 1126 requests, if that key is not really ephemeral. 1128 X25519 was designed in a way that the result of X25519(x, d) will 1129 never reveal information about d, provided it was chosen as 1130 prescribed, for any value of x (the same holds true for X448). 1132 All-zeroes output from X25519 or X448 MUST NOT be used for premaster 1133 secret (as required by definition of X25519 and X448). If the 1134 premaster secret would be all zeroes, the handshake MUST be aborted 1135 (most probably by sending a fatal alert). 1137 Let's define legitimate values of x as the values that can be 1138 obtained as x = X25519(G, d') for some d', and call the other values 1139 illegitimate. The definition of the X25519 function shows that 1140 legitimate values all share the following property: the high-order 1141 bit of the last byte is not set (for X448, any bit can be set). 1143 Since there are some implementation of the X25519 function that 1144 impose this restriction on their input and others that don't, 1145 implementations of X25519 in TLS SHOULD reject public keys when the 1146 high-order bit of the final byte is set (in other words, when the 1147 value of the rightmost byte is greater than 0x7F) in order to prevent 1148 implementation fingerprinting. Note that this deviates from RFC 7748 1149 which suggests that This value be masked. 1151 Ed25519 and Ed448 internally do public key validation as part of 1152 signature verification. 1154 Other than this recommended check, implementations do not need to 1155 ensure that the public keys they receive are legitimate: this is not 1156 necessary for security with X25519. 1158 6. Cipher Suites 1160 The table below defines new ECC cipher suites that use the key 1161 exchange algorithms specified in Section 2. 1163 +---------------------------------------+----------------+ 1164 | CipherSuite | Identifier | 1165 +---------------------------------------+----------------+ 1166 | TLS_ECDHE_ECDSA_WITH_NULL_SHA | { 0xC0, 0x06 } | 1167 | TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x08 } | 1168 | TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x09 } | 1169 | TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0A } | 1170 | | | 1171 | TLS_ECDHE_RSA_WITH_NULL_SHA | { 0xC0, 0x10 } | 1172 | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x12 } | 1173 | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x13 } | 1174 | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x14 } | 1175 | | | 1176 | TLS_ECDH_anon_WITH_NULL_SHA | { 0xC0, 0x15 } | 1177 | TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x17 } | 1178 | TLS_ECDH_anon_WITH_AES_128_CBC_SHA | { 0xC0, 0x18 } | 1179 | TLS_ECDH_anon_WITH_AES_256_CBC_SHA | { 0xC0, 0x19 } | 1180 +---------------------------------------+----------------+ 1182 Table 5: TLS ECC cipher suites 1184 The key exchange method, cipher, and hash algorithm for each of these 1185 cipher suites are easily determined by examining the name. Ciphers 1186 (other than AES ciphers) and hash algorithms are defined in [RFC2246] 1187 and [RFC4346]. AES ciphers are defined in [RFC5246]. 1189 Server implementations SHOULD support all of the following cipher 1190 suites, and client implementations SHOULD support at least one of 1191 them: 1193 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 1194 o TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 1195 o TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 1196 o TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 1198 7. Security Considerations 1200 Security issues are discussed throughout this memo. 1202 For TLS handshakes using ECC cipher suites, the security 1203 considerations in appendices D of all three TLS base documemts apply 1204 accordingly. 1206 Security discussions specific to ECC can be found in 1207 [IEEE.P1363.1998] and [ANSI.X9-62.2005]. One important issue that 1208 implementers and users must consider is elliptic curve selection. 1209 Guidance on selecting an appropriate elliptic curve size is given in 1210 Table 1. Security considerations specific to X25519 and X448 are 1211 discussed in section 7 of [RFC7748]. 1213 Beyond elliptic curve size, the main issue is elliptic curve 1214 structure. As a general principle, it is more conservative to use 1215 elliptic curves with as little algebraic structure as possible. 1216 Thus, random curves are more conservative than special curves such as 1217 Koblitz curves, and curves over F_p with p random are more 1218 conservative than curves over F_p with p of a special form, and 1219 curves over F_p with p random are considered more conservative than 1220 curves over F_2^m as there is no choice between multiple fields of 1221 similar size for characteristic 2. 1223 NEED TO ADD A PARAGRAPH HERE ABOUT WHY X25519/X448 ARE PREFERRABLE TO 1224 NIST CURVES. 1226 Another issue is the potential for catastrophic failures when a 1227 single elliptic curve is widely used. In this case, an attack on the 1228 elliptic curve might result in the compromise of a large number of 1229 keys. Again, this concern may need to be balanced against efficiency 1230 and interoperability improvements associated with widely-used curves. 1231 Substantial additional information on elliptic curve choice can be 1232 found in [IEEE.P1363.1998], [ANSI.X9-62.2005], and [FIPS.186-4]. 1234 All of the key exchange algorithms defined in this document provide 1235 forward secrecy. Some of the deprecated key exchange algorithms do 1236 not. 1238 8. IANA Considerations 1240 [RFC4492], the predecessor of this document has already defined the 1241 IANA registries for the following: 1243 o Supported Groups Section 5.1 1244 o ECPointFormat Section 5.1 1245 o ECCurveType Section 5.4 1247 For each name space, this document defines the initial value 1248 assignments and defines a range of 256 values (NamedCurve) or eight 1249 values (ECPointFormat and ECCurveType) reserved for Private Use. The 1250 policy for any additional assignments is "Specification Required". 1251 The previous version of this document required IETF review. 1253 NOTE: IANA, please update the registries to reflect the new policy. 1255 NOTE: RFC editor please delete these two notes prior to publication. 1257 IANA, please update these two registries to refer to this document. 1259 IANA is requested to assign two values from the NamedCurve registry 1260 with names eddsa_ed25519(TBD3) and eddsa_ed448(TBD4) with this 1261 document as reference. IANA has already assigned the value 29 to 1262 ecdh_x25519, and the value 30 to ecdh_x448. 1264 IANA is requested to assign one value from SignatureAlgorithm 1265 Registry with name eddsa(TBD5) with this document as reference. 1267 9. Acknowledgements 1269 Most of the text is this document is taken from [RFC4492], the 1270 predecessor of this document. The authors of that document were: 1272 o Simon Blake-Wilson 1273 o Nelson Bolyard 1274 o Vipul Gupta 1275 o Chris Hawk 1276 o Bodo Moeller 1278 In the predecessor document, the authors acknowledged the 1279 contributions of Bill Anderson and Tim Dierks. 1281 The author would like to thank Nikos Mavrogiannopoulos, Martin 1282 Thomson, and Tanja Lange for contributions to this document. 1284 10. Version History for This Draft 1286 NOTE TO RFC EDITOR: PLEASE REMOVE THIS SECTION 1288 Changes from draft-ietf-tls-rfc4492bis-03 to draft-nir-tls- 1289 rfc4492bis-05: 1291 o Add support for CFRG curves and signatures work. 1293 Changes from draft-ietf-tls-rfc4492bis-01 to draft-nir-tls- 1294 rfc4492bis-03: 1296 o Removed unused curves. 1297 o Removed unused point formats (all but uncompressed) 1299 Changes from draft-nir-tls-rfc4492bis-00 and draft-ietf-tls- 1300 rfc4492bis-00 to draft-nir-tls-rfc4492bis-01: 1302 o Merged errata 1303 o Removed ECDH_RSA and ECDH_ECDSA 1305 Changes from RFC 4492 to draft-nir-tls-rfc4492bis-00: 1307 o Added TLS 1.2 to references. 1308 o Moved RFC 4492 authors to acknowledgements. 1309 o Removed list of required reading for ECC. 1311 11. References 1313 11.1. Normative References 1315 [ANSI.X9-62.2005] 1316 American National Standards Institute, "Public Key 1317 Cryptography for the Financial Services Industry, The 1318 Elliptic Curve Digital Signature Algorithm (ECDSA)", 1319 ANSI X9.62, 2005. 1321 [CCITT.X680] 1322 International Telephone and Telegraph Consultative 1323 Committee, "Abstract Syntax Notation One (ASN.1): 1324 Specification of basic notation", CCITT Recommendation 1325 X.680, July 2002. 1327 [CCITT.X690] 1328 International Telephone and Telegraph Consultative 1329 Committee, "ASN.1 encoding rules: Specification of basic 1330 encoding Rules (BER), Canonical encoding rules (CER) and 1331 Distinguished encoding rules (DER)", CCITT Recommendation 1332 X.690, July 2002. 1334 [CFRG-EdDSA] 1335 Josefsson, S. and I. Liusvaara, "Edwards-curve Digital 1336 Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-08 1337 (work in progress), August 2016. 1339 [FIPS.186-4] 1340 National Institute of Standards and Technology, "Digital 1341 Signature Standard", FIPS PUB 186-4, 2013, 1342 . 1345 [PKCS1] RSA Laboratories, "RSA Encryption Standard, Version 1.5", 1346 PKCS 1, November 1993. 1348 [PKIX-EdDSA] 1349 Josefsson, S. and J. Schaad, "Algorithm Identifiers for 1350 Ed25519, Ed25519ph, Ed448, Ed448ph, X25519 and X448 for 1351 use in the Internet X.509 Public Key Infrastructure", 1352 August 2016, . 1355 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1356 Requirement Levels", BCP 14, RFC 2119, March 1997. 1358 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1359 RFC 2246, January 1999. 1361 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 1362 Identifiers for the Internet X.509 Public Key 1363 Infrastructure Certificate and Certificate Revocation List 1364 (CRL) Profile", RFC 3279, April 2002. 1366 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1367 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 1369 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 1370 and T. Wright, "Transport Layer Security (TLS) 1371 Extensions", RFC 4366, April 2006. 1373 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1374 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1376 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1377 for Security", RFC 7748, January 2016. 1379 [SECG-SEC2] 1380 CECG, "Recommended Elliptic Curve Domain Parameters", 1381 SEC 2, 2000. 1383 11.2. Informative References 1385 [FIPS.180-2] 1386 National Institute of Standards and Technology, "Secure 1387 Hash Standard", FIPS PUB 180-2, August 2002, 1388 . 1391 [I-D.ietf-tls-tls13] 1392 Rescorla, E., "The Transport Layer Security (TLS) Protocol 1393 Version 1.3", draft-ietf-tls-tls13-18 (work in progress), 1394 October 2016. 1396 [IEEE.P1363.1998] 1397 Institute of Electrical and Electronics Engineers, 1398 "Standard Specifications for Public Key Cryptography", 1399 IEEE Draft P1363, 1998. 1401 [Lenstra_Verheul] 1402 Lenstra, A. and E. Verheul, "Selecting Cryptographic Key 1403 Sizes", Journal of Cryptology 14 (2001) 255-293, 2001. 1405 [Menezes] Menezes, A. and B. Ustaoglu, "On Reusing Ephemeral Keys In 1406 Diffie-Hellman Key Agreement Protocols", IACR Menezes2008, 1407 December 2008. 1409 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 1410 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 1411 for Transport Layer Security (TLS)", RFC 4492, May 2006. 1413 Appendix A. Equivalent Curves (Informative) 1415 All of the NIST curves [FIPS.186-4] and several of the ANSI curves 1416 [ANSI.X9-62.2005] are equivalent to curves listed in Section 5.1.1. 1417 In the following table, multiple names in one row represent aliases 1418 for the same curve. 1420 Curve names chosen by different standards organizations 1422 +-----------+------------+------------+ 1423 | SECG | ANSI X9.62 | NIST | 1424 +-----------+------------+------------+ 1425 | sect163k1 | | NIST K-163 | 1426 | sect163r1 | | | 1427 | sect163r2 | | NIST B-163 | 1428 | sect193r1 | | | 1429 | sect193r2 | | | 1430 | sect233k1 | | NIST K-233 | 1431 | sect233r1 | | NIST B-233 | 1432 | sect239k1 | | | 1433 | sect283k1 | | NIST K-283 | 1434 | sect283r1 | | NIST B-283 | 1435 | sect409k1 | | NIST K-409 | 1436 | sect409r1 | | NIST B-409 | 1437 | sect571k1 | | NIST K-571 | 1438 | sect571r1 | | NIST B-571 | 1439 | secp160k1 | | | 1440 | secp160r1 | | | 1441 | secp160r2 | | | 1442 | secp192k1 | | | 1443 | secp192r1 | prime192v1 | NIST P-192 | 1444 | secp224k1 | | | 1445 | secp224r1 | | NIST P-224 | 1446 | secp256k1 | | | 1447 | secp256r1 | prime256v1 | NIST P-256 | 1448 | secp384r1 | | NIST P-384 | 1449 | secp521r1 | | NIST P-521 | 1450 +-----------+------------+------------+ 1452 Table 6: Equivalent curves defined by SECG, ANSI, and NIST 1454 Appendix B. Differences from RFC 4492 1456 o Added TLS 1.2 1457 o Merged Errata 1458 o Removed the ECDH key exchange algorithms: ECDH_RSA and ECDH_ECDSA 1459 o Deprecated a bunch of ciphersuites: 1461 TLS_ECDH_ECDSA_WITH_NULL_SHA 1462 TLS_ECDH_ECDSA_WITH_RC4_128_SHA 1463 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 1464 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 1465 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 1466 TLS_ECDH_RSA_WITH_NULL_SHA 1467 TLS_ECDH_RSA_WITH_RC4_128_SHA 1468 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 1469 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 1470 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 1471 All the other RC4 ciphersuites 1473 Removed unused curves and all but the uncompressed point format. 1475 Added X25519 and X448. 1477 Deprecated explicit curves. 1479 Removed restriction on signature algorithm in certificate. 1481 Authors' Addresses 1483 Yoav Nir 1484 Check Point Software Technologies Ltd. 1485 5 Hasolelim st. 1486 Tel Aviv 6789735 1487 Israel 1489 Email: ynir.ietf@gmail.com 1491 Simon Josefsson 1492 SJD AB 1494 Email: simon@josefsson.org 1496 Manuel Pegourie-Gonnard 1497 Independent / PolarSSL 1499 Email: mpg@elzevir.fr