idnits 2.17.1 draft-ietf-tls-rfc4492bis-08.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 688 has weird spacing: '...rveType cur...' == Line 704 has weird spacing: '...ameters cur...' == Line 724 has weird spacing: '...HParams par...' == Line 819 has weird spacing: '...ionForm form;...' -- The document date (July 8, 2016) is 2846 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: A later version (-08) exists of draft-irtf-cfrg-eddsa-05 ** Downref: Normative reference to an Informational draft: draft-irtf-cfrg-eddsa (ref. 'CFRG-EdDSA') -- Possible downref: Non-RFC (?) normative reference: ref. 'PKCS1' ** Downref: Normative reference to an Informational draft: draft-ietf-curdle-pkix-eddsa (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: A later version (-28) exists of draft-ietf-tls-tls13-02 -- Obsolete informational reference (is this intentional?): RFC 4492 (Obsoleted by RFC 8422) Summary: 7 errors (**), 0 flaws (~~), 8 warnings (==), 5 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: January 9, 2017 M. Pegourie-Gonnard 7 Independent / PolarSSL 8 July 8, 2016 10 Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer 11 Security (TLS) Versions 1.2 and Earlier 12 draft-ietf-tls-rfc4492bis-08 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 January 9, 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 (TBD: reference Wikipedia here?). 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. TBD: Do we 262 want to rename this so that it makes sense? 264 In ECDH_anon, the server's Certificate, the CertificateRequest, the 265 client's Certificate, and the CertificateVerify messages MUST NOT be 266 sent. 268 The server MUST send an ephemeral ECDH public key and a specification 269 of the corresponding curve in the ServerKeyExchange message. These 270 parameters MUST NOT be signed. 272 The client generates an ECDH key pair on the same curve as the 273 server's ephemeral ECDH key and sends its public key in the 274 ClientKeyExchange message. 276 Both client and server perform an ECDH operation and use the 277 resultant shared secret as the premaster secret. All ECDH 278 calculations are performed as specified in Section 5.10. 280 This specification does not impose restrictions on signature schemes 281 used anywhere in the certificate chain. The previous version of this 282 document required the signatures to match, but this restriction, 283 originating in previous TLS versions is lifted here as it had been in 284 RFC 5246. 286 3. Client Authentication 288 This document defines a client authentication mechanism, named after 289 the type of client certificate involved: ECDSA_sign. The ECDSA_sign 290 mechanism is usable with any of the non-anonymous ECC key exchange 291 algorithms described in Section 2 as well as other non-anonymous 292 (non-ECC) key exchange algorithms defined in TLS. 294 The server can request ECC-based client authentication by including 295 this certificate type in its CertificateRequest message. The client 296 must check if it possesses a certificate appropriate for the method 297 suggested by the server and is willing to use it for authentication. 299 If these conditions are not met, the client should send a client 300 Certificate message containing no certificates. In this case, the 301 ClientKeyExchange should be sent as described in Section 2, and the 302 CertificateVerify should not be sent. If the server requires client 303 authentication, it may respond with a fatal handshake failure alert. 305 If the client has an appropriate certificate and is willing to use it 306 for authentication, it must send that certificate in the client's 307 Certificate message (as per Section 5.6) and prove possession of the 308 private key corresponding to the certified key. The process of 309 determining an appropriate certificate and proving possession is 310 different for each authentication mechanism and described below. 312 NOTE: It is permissible for a server to request (and the client to 313 send) a client certificate of a different type than the server 314 certificate. 316 3.1. ECDSA_sign 318 To use this authentication mechanism, the client MUST possess a 319 certificate containing an ECDSA- or EdDSA-capable public key. 321 The client proves possession of the private key corresponding to the 322 certified key by including a signature in the CertificateVerify 323 message as described in Section 5.8. 325 4. TLS Extensions for ECC 327 Two new TLS extensions are defined in this specification: (i) the 328 Supported Elliptic Curves Extension, and (ii) the Supported Point 329 Formats Extension. These allow negotiating the use of specific 330 curves and point formats (e.g., compressed vs. uncompressed, 331 respectively) during a handshake starting a new session. These 332 extensions are especially relevant for constrained clients that may 333 only support a limited number of curves or point formats. They 334 follow the general approach outlined in [RFC4366]; message details 335 are specified in Section 5. The client enumerates the curves it 336 supports and the point formats it can parse by including the 337 appropriate extensions in its ClientHello message. The server 338 similarly enumerates the point formats it can parse by including an 339 extension in its ServerHello message. 341 A TLS client that proposes ECC cipher suites in its ClientHello 342 message SHOULD include these extensions. Servers implementing ECC 343 cipher suites MUST support these extensions, and when a client uses 344 these extensions, servers MUST NOT negotiate the use of an ECC cipher 345 suite unless they can complete the handshake while respecting the 346 choice of curves and compression techniques specified by the client. 347 This eliminates the possibility that a negotiated ECC handshake will 348 be subsequently aborted due to a client's inability to deal with the 349 server's EC key. 351 The client MUST NOT include these extensions in the ClientHello 352 message if it does not propose any ECC cipher suites. A client that 353 proposes ECC cipher suites may choose not to include these 354 extensions. In this case, the server is free to choose any one of 355 the elliptic curves or point formats listed in Section 5. That 356 section also describes the structure and processing of these 357 extensions in greater detail. 359 In the case of session resumption, the server simply ignores the 360 Supported Elliptic Curves Extension and the Supported Point Formats 361 Extension appearing in the current ClientHello message. These 362 extensions only play a role during handshakes negotiating a new 363 session. 365 5. Data Structures and Computations 367 This section specifies the data structures and computations used by 368 ECC-based key mechanisms specified in the previous three sections. 369 The presentation language used here is the same as that used in TLS. 370 Since this specification extends TLS, these descriptions should be 371 merged with those in the TLS specification and any others that extend 372 TLS. This means that enum types may not specify all possible values, 373 and structures with multiple formats chosen with a select() clause 374 may not indicate all possible cases. 376 5.1. Client Hello Extensions 378 This section specifies two TLS extensions that can be included with 379 the ClientHello message as described in [RFC4366], the Supported 380 Elliptic Curves Extension and the Supported Point Formats Extension. 382 When these extensions are sent: 384 The extensions SHOULD be sent along with any ClientHello message that 385 proposes ECC cipher suites. 387 Meaning of these extensions: 389 These extensions allow a client to enumerate the elliptic curves it 390 supports and/or the point formats it can parse. 392 Structure of these extensions: 394 The general structure of TLS extensions is described in [RFC4366], 395 and this specification adds two new types to ExtensionType. 397 enum { 398 elliptic_curves(10), 399 ec_point_formats(11) 400 } ExtensionType; 402 elliptic_curves (Supported Elliptic Curves Extension): Indicates the 403 set of elliptic curves supported by the client. For this 404 extension, the opaque extension_data field contains 405 EllipticCurveList. See Section 5.1.1 for details. 406 ec_point_formats (Supported Point Formats Extension): Indicates the 407 set of point formats that the client can parse. For this 408 extension, the opaque extension_data field contains 409 ECPointFormatList. See Section 5.1.2 for details. 411 Actions of the sender: 413 A client that proposes ECC cipher suites in its ClientHello message 414 appends these extensions (along with any others), enumerating the 415 curves it supports and the point formats it can parse. Clients 416 SHOULD send both the Supported Elliptic Curves Extension and the 417 Supported Point Formats Extension. If the Supported Point Formats 418 Extension is indeed sent, it MUST contain the value 0 (uncompressed) 419 as one of the items in the list of point formats. 421 Actions of the receiver: 423 A server that receives a ClientHello containing one or both of these 424 extensions MUST use the client's enumerated capabilities to guide its 425 selection of an appropriate cipher suite. One of the proposed ECC 426 cipher suites must be negotiated only if the server can successfully 427 complete the handshake while using the curves and point formats 428 supported by the client (cf. Section 5.3 and Section 5.4). 430 NOTE: A server participating in an ECDHE_ECDSA key exchange may use 431 different curves for the ECDSA or EdDSA key in its certificate, and 432 for the ephemeral ECDH key in the ServerKeyExchange message. The 433 server MUST consider the extensions in both cases. 435 If a server does not understand the Supported Elliptic Curves 436 Extension, does not understand the Supported Point Formats Extension, 437 or is unable to complete the ECC handshake while restricting itself 438 to the enumerated curves and point formats, it MUST NOT negotiate the 439 use of an ECC cipher suite. Depending on what other cipher suites 440 are proposed by the client and supported by the server, this may 441 result in a fatal handshake failure alert due to the lack of common 442 cipher suites. 444 5.1.1. Supported Elliptic Curves Extension 446 RFC 4492 defined 25 different curves in the NamedCurve registry (now 447 renamed the "Supported Groups" registry, although the enumeration 448 below is still named NamedCurve) for use in TLS. Only three have 449 seen much use. This specification is deprecating the rest (with 450 numbers 1-22). This specification also deprecates the explicit 451 curves with identifiers 0xFF01 and 0xFF02. It also adds the new 452 curves defined in [RFC7748] and [CFRG-EdDSA]. The end result is as 453 follows: 455 enum { 456 deprecated(1..22), 457 secp256r1 (23), secp384r1 (24), secp521r1 (25), 458 ecdh_x25519(29), ecdh_x448(30), 459 eddsa_ed25519(TBD3), eddsa_ed448(TBD4), 460 reserved (0xFE00..0xFEFF), 461 deprecated(0xFF01..0xFF02), 462 (0xFFFF) 463 } NamedCurve; 465 Note that other specification have since added other values to this 466 enumeration. 468 secp256r1, etc: Indicates support of the corresponding named curve or 469 class of explicitly defined curves. The named curves secp256r1, 470 secp384r1, and secp521r1 are specified in SEC 2 [SECG-SEC2]. These 471 curves are also recommended in ANSI X9.62 [ANSI.X9-62.2005] and FIPS 472 186-4 [FIPS.186-4]. The rest of this document refers to these three 473 curves as the "NIST curves" because they were originally standardized 474 by the National Institute of Standards and Technology. The curves 475 ecdh_x25519 and ecdh_x448 are defined in [RFC7748]. eddsa_ed25519 and 476 eddsa_ed448 are signature-only curves defined in [CFRG-EdDSA]. 477 Values 0xFE00 through 0xFEFF are reserved for private use. 479 The NamedCurve name space is maintained by IANA. See Section 8 for 480 information on how new value assignments are added. 482 struct { 483 NamedCurve elliptic_curve_list<2..2^16-1> 484 } EllipticCurveList; 486 Items in elliptic_curve_list are ordered according to the client's 487 preferences (favorite choice first). 489 As an example, a client that only supports secp256r1 (aka NIST P-256; 490 value 23 = 0x0017) and secp384r1 (aka NIST P-384; value 24 = 0x0018) 491 and prefers to use secp256r1 would include a TLS extension consisting 492 of the following octets. Note that the first two octets indicate the 493 extension type (Supported Elliptic Curves Extension): 495 00 0A 00 06 00 04 00 17 00 18 497 5.1.2. Supported Point Formats Extension 499 enum { 500 uncompressed (0), 501 deprecated (1..2), 502 reserved (248..255) 503 } ECPointFormat; 504 struct { 505 ECPointFormat ec_point_format_list<1..2^8-1> 506 } ECPointFormatList; 508 Three point formats were included in the definition of ECPointFormat 509 above. This specification deprecates all but the uncompressed point 510 format. Implementations of this document MUST support the 511 uncompressed format for all of their supported curves, and MUST NOT 512 support other formats for curves defined in this specification. For 513 backwards compatibility purposes, the point format list extension 514 MUST still be included, and contain exactly one value: the 515 uncompressed point format (0). 517 The ECPointFormat name space is maintained by IANA. See Section 8 518 for information on how new value assignments are added. 520 Items in ec_point_format_list are ordered according to the client's 521 preferences (favorite choice first). 523 A client compliant with this specification that supports no other 524 curves MUST send the following octets; note that the first two octets 525 indicate the extension type (Supported Point Formats Extension): 527 00 0B 00 02 01 00 529 5.2. Server Hello Extension 531 This section specifies a TLS extension that can be included with the 532 ServerHello message as described in [RFC4366], the Supported Point 533 Formats Extension. 535 When this extension is sent: 537 The Supported Point Formats Extension is included in a ServerHello 538 message in response to a ClientHello message containing the Supported 539 Point Formats Extension when negotiating an ECC cipher suite. 541 Meaning of this extension: 543 This extension allows a server to enumerate the point formats it can 544 parse (for the curve that will appear in its ServerKeyExchange 545 message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key 546 exchange algorithm. 548 Structure of this extension: 550 The server's Supported Point Formats Extension has the same structure 551 as the client's Supported Point Formats Extension (see 552 Section 5.1.2). Items in ec_point_format_list here are ordered 553 according to the server's preference (favorite choice first). Note 554 that the server may include items that were not found in the client's 555 list (e.g., the server may prefer to receive points in compressed 556 format even when a client cannot parse this format: the same client 557 may nevertheless be capable of outputting points in compressed 558 format). 560 Actions of the sender: 562 A server that selects an ECC cipher suite in response to a 563 ClientHello message including a Supported Point Formats Extension 564 appends this extension (along with others) to its ServerHello 565 message, enumerating the point formats it can parse. The Supported 566 Point Formats Extension, when used, MUST contain the value 0 567 (uncompressed) as one of the items in the list of point formats. 569 Actions of the receiver: 571 A client that receives a ServerHello message containing a Supported 572 Point Formats Extension MUST respect the server's choice of point 573 formats during the handshake (cf. Section 5.6 and Section 5.7). If 574 no Supported Point Formats Extension is received with the 575 ServerHello, this is equivalent to an extension allowing only the 576 uncompressed point format. 578 5.3. Server Certificate 580 When this message is sent: 582 This message is sent in all non-anonymous ECC-based key exchange 583 algorithms. 585 Meaning of this message: 587 This message is used to authentically convey the server's static 588 public key to the client. The following table shows the server 589 certificate type appropriate for each key exchange algorithm. ECC 590 public keys MUST be encoded in certificates as described in 591 Section 5.9. 593 NOTE: The server's Certificate message is capable of carrying a chain 594 of certificates. The restrictions mentioned in Table 3 apply only to 595 the server's certificate (first in the chain). 597 +-------------+-----------------------------------------------------+ 598 | Algorithm | Server Certificate Type | 599 +-------------+-----------------------------------------------------+ 600 | ECDHE_ECDSA | Certificate MUST contain an ECDSA- or EdDSA-capable | 601 | | public key. | 602 | ECDHE_RSA | Certificate MUST contain an RSA public key | 603 | | authorized for use in digital signatures. | 604 +-------------+-----------------------------------------------------+ 606 Table 3: Server Certificate Types 608 Structure of this message: 610 Identical to the TLS Certificate format. 612 Actions of the sender: 614 The server constructs an appropriate certificate chain and conveys it 615 to the client in the Certificate message. If the client has used a 616 Supported Elliptic Curves Extension, the public key in the server's 617 certificate MUST respect the client's choice of elliptic curves; in 618 particular, the public key MUST employ a named curve (not the same 619 curve as an explicit curve) unless the client has indicated support 620 for explicit curves of the appropriate type. If the client has used 621 a Supported Point Formats Extension, both the server's public key 622 point and (in the case of an explicit curve) the curve's base point 623 MUST respect the client's choice of point formats. (A server that 624 cannot satisfy these requirements MUST NOT choose an ECC cipher suite 625 in its ServerHello message.) 627 Actions of the receiver: 629 The client validates the certificate chain, extracts the server's 630 public key, and checks that the key type is appropriate for the 631 negotiated key exchange algorithm. (A possible reason for a fatal 632 handshake failure is that the client's capabilities for handling 633 elliptic curves and point formats are exceeded; cf. Section 5.1.) 635 5.4. Server Key Exchange 637 When this message is sent: 639 This message is sent when using the ECDHE_ECDSA, ECDHE_RSA, and 640 ECDH_anon key exchange algorithms. 642 Meaning of this message: 644 This message is used to convey the server's ephemeral ECDH public key 645 (and the corresponding elliptic curve domain parameters) to the 646 client. 648 The ECCCurveType enum used to have values for explicit prime and for 649 explicit char2 curves. Those values are now deprecated, so only one 650 value remains: 652 Structure of this message: 654 enum { 655 deprecated (1..2), 656 named_curve (3), 657 reserved(248..255) 658 } ECCurveType; 660 The value named_curve indicates that a named curve is used. This 661 option SHOULD be used when applicable. 663 Values 248 through 255 are reserved for private use. 665 The ECCurveType name space is maintained by IANA. See Section 8 for 666 information on how new value assignments are added. 668 RFC 4492 had a specification for an ECCurve structure and an 669 ECBasisType structure. Both of these are omitted now because they 670 were only used with the now deprecated explicit curves. 672 struct { 673 opaque point <1..2^8-1>; 674 } ECPoint; 676 This is the byte string representation of an elliptic curve point 677 following the conversion routine in Section 4.3.6 of 678 [ANSI.X9-62.2005]. This byte string may represent an elliptic curve 679 point in uncompressed, compressed, or hybrid format, but this 680 specification deprecates all but the uncompressed format. For the 681 NIST curves, the format is repeated in Section 5.4.1 for convenience. 682 For the X25519 and X448 curves, the only valid representation is the 683 one specified in [RFC7748] - a 32- or 56-octet representation of the 684 u value of the point. This structure MUST NOT be used with Ed25519 685 and Ed448 public keys. 687 struct { 688 ECCurveType curve_type; 689 select (curve_type) { 690 case named_curve: 691 NamedCurve namedcurve; 692 }; 693 } ECParameters; 695 This identifies the type of the elliptic curve domain parameters. 697 Specifies a recommended set of elliptic curve domain parameters. All 698 those values of NamedCurve are allowed that refer to a curve capable 699 of Diffie-Hellman. With the deprecation of the explicit curves, this 700 now includes all values of NamedCurve except eddsa_ed25519(TBD3) and 701 eddsa_ed448(TBD4). 703 struct { 704 ECParameters curve_params; 705 ECPoint public; 706 } ServerECDHParams; 708 Specifies the elliptic curve domain parameters associated with the 709 ECDH public key. 711 The ephemeral ECDH public key. 713 The ServerKeyExchange message is extended as follows. 715 enum { 716 ec_diffie_hellman 717 } KeyExchangeAlgorithm; 719 ec_diffie_hellman: Indicates the ServerKeyExchange message contains 720 an ECDH public key. 722 select (KeyExchangeAlgorithm) { 723 case ec_diffie_hellman: 724 ServerECDHParams params; 725 Signature signed_params; 726 } ServerKeyExchange; 728 params: Specifies the ECDH public key and associated domain 729 parameters. 730 signed_params: A hash of the params, with the signature appropriate 731 to that hash applied. The private key corresponding to the 732 certified public key in the server's Certificate message is used 733 for signing. 735 enum { 736 ecdsa(3), 737 eddsa(TBD5) 738 } SignatureAlgorithm; 739 select (SignatureAlgorithm) { 740 case ecdsa: 741 digitally-signed struct { 742 opaque sha_hash[sha_size]; 743 }; 744 case eddsa: 745 digitally-signed struct { 746 opaque rawdata[rawdata_size]; 747 }; 748 } Signature; 749 ServerKeyExchange.signed_params.sha_hash 750 SHA(ClientHello.random + ServerHello.random + 751 ServerKeyExchange.params); 752 ServerKeyExchange.signed_params.rawdata 753 ClientHello.random + ServerHello.random + 754 ServerKeyExchange.params; 756 NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange 757 algorithm and "anonymous" for ECDH_anon. These cases are defined in 758 TLS. SignatureAlgorithm is "ecdsa" or "eddsa" for ECDHE_ECDSA. 760 ECDSA signatures are generated and verified as described in 761 Section 5.10, and SHA in the above template for sha_hash accordingly 762 may denote a hash algorithm other than SHA-1. As per ANSI X9.62, an 763 ECDSA signature consists of a pair of integers, r and s. The 764 digitally-signed element is encoded as an opaque vector <0..2^16-1>, 765 the contents of which are the DER encoding corresponding to the 766 following ASN.1 notation. 768 Ecdsa-Sig-Value ::= SEQUENCE { 769 r INTEGER, 770 s INTEGER 771 } 773 EdDSA signatures in both the protocol and in certificates that 774 conform to [PKIX-EdDSA] are generated and verified according to 775 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 776 vector<0..2^16-1>, the contents of which is the octet string output 777 of the EdDSA signing algorithm. 779 Actions of the sender: 781 The server selects elliptic curve domain parameters and an ephemeral 782 ECDH public key corresponding to these parameters according to the 783 ECKAS-DH1 scheme from IEEE 1363 [IEEE.P1363.1998]. It conveys this 784 information to the client in the ServerKeyExchange message using the 785 format defined above. 787 Actions of the receiver: 789 The client verifies the signature (when present) and retrieves the 790 server's elliptic curve domain parameters and ephemeral ECDH public 791 key from the ServerKeyExchange message. (A possible reason for a 792 fatal handshake failure is that the client's capabilities for 793 handling elliptic curves and point formats are exceeded; cf. 794 Section 5.1.) 796 5.4.1. Uncompressed Point Format for NIST curves 798 The following represents the wire format for representing ECPoint in 799 ServerKeyExchange records. The first octet of the representation 800 indicates the form, which may be compressed, uncompressed, or hybrid. 801 This specification supports only the uncompressed format for these 802 curves. This is followed by the binary representation of the X value 803 in "big-endian" or "network" format, followed by the binary 804 representation of the Y value in "big-endian" or "network" format. 805 There are no internal length markers, so each number representation 806 occupies as many octets as implied by the curve parameters. For 807 P-256 this means that each of X and Y use 32 octets, padded on the 808 left by zeros if necessary. For P-384 they take 48 octets each, and 809 for P-521 they take 66 octets each. 811 Here's a more formal representation: 813 enum { 814 uncompressed(4), 815 (255) 816 } PointConversionForm; 818 struct { 819 PointConversionForm form; 820 opaque X[coordinate_length]; 821 opaque Y[coordinate_length]; 822 } UncompressedPointRepresentation; 824 5.5. Certificate Request 826 When this message is sent: 828 This message is sent when requesting client authentication. 830 Meaning of this message: 832 The server uses this message to suggest acceptable client 833 authentication methods. 835 Structure of this message: 837 The TLS CertificateRequest message is extended as follows. 839 enum { 840 ecdsa_sign(64), 841 rsa_fixed_ecdh(65), 842 ecdsa_fixed_ecdh(66), 843 (255) 844 } ClientCertificateType; 846 ecdsa_sign, etc. Indicates that the server would like to use the 847 corresponding client authentication method specified in Section 3. 849 Actions of the sender: 851 The server decides which client authentication methods it would like 852 to use, and conveys this information to the client using the format 853 defined above. 855 Actions of the receiver: 857 The client determines whether it has a suitable certificate for use 858 with any of the requested methods and whether to proceed with client 859 authentication. 861 5.6. Client Certificate 863 When this message is sent: 865 This message is sent in response to a CertificateRequest when a 866 client has a suitable certificate and has decided to proceed with 867 client authentication. (Note that if the server has used a Supported 868 Point Formats Extension, a certificate can only be considered 869 suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and 870 ECDSA_fixed_ECDH authentication methods if the public key point 871 specified in it respects the server's choice of point formats. If no 872 Supported Point Formats Extension has been used, a certificate can 873 only be considered suitable for use with these authentication methods 874 if the point is represented in uncompressed point format.) 876 Meaning of this message: 878 This message is used to authentically convey the client's static 879 public key to the server. The following table summarizes what client 880 certificate types are appropriate for the ECC-based client 881 authentication mechanisms described in Section 3. ECC public keys 882 must be encoded in certificates as described in Section 5.9. 884 NOTE: The client's Certificate message is capable of carrying a chain 885 of certificates. The restrictions mentioned in Table 4 apply only to 886 the client's certificate (first in the chain). 888 +------------------+------------------------------------------------+ 889 | Client | Client Certificate Type | 890 | Authentication | | 891 | Method | | 892 +------------------+------------------------------------------------+ 893 | ECDSA_sign | Certificate MUST contain an ECDSA- or EdDSA- | 894 | | capable public key. | 895 | ECDSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 896 | | public key on the same elliptic curve as the | 897 | | server's long-term ECDH key. | 898 | RSA_fixed_ECDH | The same as ECDSA_fixed_ECDH. The codepoints | 899 | | meant different things, but due to changes in | 900 | | TLS 1.2, both mean the same thing now. | 901 +------------------+------------------------------------------------+ 903 Table 4: Client Certificate Types 905 Structure of this message: 907 Identical to the TLS client Certificate format. 909 Actions of the sender: 911 The client constructs an appropriate certificate chain, and conveys 912 it to the server in the Certificate message. 914 Actions of the receiver: 916 The TLS server validates the certificate chain, extracts the client's 917 public key, and checks that the key type is appropriate for the 918 client authentication method. 920 5.7. Client Key Exchange 922 When this message is sent: 924 This message is sent in all key exchange algorithms. If client 925 authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this 926 message is empty. Otherwise, it contains the client's ephemeral ECDH 927 public key. 929 Meaning of the message: 931 This message is used to convey ephemeral data relating to the key 932 exchange belonging to the client (such as its ephemeral ECDH public 933 key). 935 Structure of this message: 937 The TLS ClientKeyExchange message is extended as follows. 939 enum { 940 implicit, 941 explicit 942 } PublicValueEncoding; 944 implicit, explicit: For ECC cipher suites, this indicates whether 945 the client's ECDH public key is in the client's certificate 946 ("implicit") or is provided, as an ephemeral ECDH public key, in 947 the ClientKeyExchange message ("explicit"). (This is "explicit" 948 in ECC cipher suites except when the client uses the 949 ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication 950 mechanism.) 951 struct { 952 select (PublicValueEncoding) { 953 case implicit: struct { }; 954 case explicit: ECPoint ecdh_Yc; 955 } ecdh_public; 956 } ClientECDiffieHellmanPublic; 957 ecdh_Yc: Contains the client's ephemeral ECDH public key as a byte 958 string ECPoint.point, which may represent an elliptic curve point 959 in uncompressed or compressed format. Curves eddsa_ed25519 and 960 eddsa_ed448 MUST NOT be used here. Here, the format MUST conform 961 to what the server has requested through a Supported Point Formats 962 Extension if this extension was used, and MUST be uncompressed if 963 this extension was not used. 965 struct { 966 select (KeyExchangeAlgorithm) { 967 case ec_diffie_hellman: ClientECDiffieHellmanPublic; 968 } exchange_keys; 969 } ClientKeyExchange; 971 Actions of the sender: 973 The client selects an ephemeral ECDH public key corresponding to the 974 parameters it received from the server according to the ECKAS-DH1 975 scheme from IEEE 1363. It conveys this information to the client in 976 the ClientKeyExchange message using the format defined above. 978 Actions of the receiver: 980 The server retrieves the client's ephemeral ECDH public key from the 981 ClientKeyExchange message and checks that it is on the same elliptic 982 curve as the server's ECDH key. 984 5.8. Certificate Verify 986 When this message is sent: 988 This message is sent when the client sends a client certificate 989 containing a public key usable for digital signatures, e.g., when the 990 client is authenticated using the ECDSA_sign mechanism. 992 Meaning of the message: 994 This message contains a signature that proves possession of the 995 private key corresponding to the public key in the client's 996 Certificate message. 998 Structure of this message: 1000 The TLS CertificateVerify message and the underlying Signature type 1001 are defined in the TLS base specifications, and the latter is 1002 extended here in Section 5.4. For the ecdsa and eddsa cases, the 1003 signature field in the CertificateVerify message contains an ECDSA or 1004 EdDSA (respectively) signature computed over handshake messages 1005 exchanged so far, exactly similar to CertificateVerify with other 1006 signing algorithms: 1008 CertificateVerify.signature.sha_hash 1009 SHA(handshake_messages); 1010 CertificateVerify.signature.rawdata 1011 handshake_messages; 1013 ECDSA signatures are computed as described in Section 5.10, and SHA 1014 in the above template for sha_hash accordingly may denote a hash 1015 algorithm other than SHA-1. As per ANSI X9.62, an ECDSA signature 1016 consists of a pair of integers, r and s. The digitally-signed 1017 element is encoded as an opaque vector <0..2^16-1>, the contents of 1018 which are the DER encoding [CCITT.X690] corresponding to the 1019 following ASN.1 notation [CCITT.X680]. 1021 Ecdsa-Sig-Value ::= SEQUENCE { 1022 r INTEGER, 1023 s INTEGER 1024 } 1026 EdDSA signatures are generated and verified according to 1027 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 1028 vector<0..2^16-1>, the contents of which is the octet string output 1029 of the EdDSA signing algorithm. 1031 Actions of the sender: 1033 The client computes its signature over all handshake messages sent or 1034 received starting at client hello and up to but not including this 1035 message. It uses the private key corresponding to its certified 1036 public key to compute the signature, which is conveyed in the format 1037 defined above. 1039 Actions of the receiver: 1041 The server extracts the client's signature from the CertificateVerify 1042 message, and verifies the signature using the public key it received 1043 in the client's Certificate message. 1045 5.9. Elliptic Curve Certificates 1047 X.509 certificates containing ECC public keys or signed using ECDSA 1048 MUST comply with [RFC3279] or another RFC that replaces or extends 1049 it. X.509 certificates containing ECC public keys or signed using 1050 EdDSA MUST comply with [PKIX-EdDSA]. Clients SHOULD use the elliptic 1051 curve domain parameters recommended in ANSI X9.62, FIPS 186-4, and 1052 SEC 2 [SECG-SEC2] or in [CFRG-EdDSA]. 1054 EdDSA keys using Ed25519 and Ed25519ph algorithms MUST use the 1055 eddsa_ed25519 curve, and Ed448 and Ed448ph keys MUST use the 1056 eddsa_ed448 curve. Curves ecdh_x25519, ecdh_x448, eddsa_ed25519 and 1057 eddsa_ed448 MUST NOT be used for ECDSA. 1059 5.10. ECDH, ECDSA, and RSA Computations 1061 All ECDH calculations for the NIST curves (including parameter and 1062 key generation as well as the shared secret calculation) are 1063 performed according to [IEEE.P1363.1998] using the ECKAS-DH1 scheme 1064 with the identity map as key derivation function (KDF), so that the 1065 premaster secret is the x-coordinate of the ECDH shared secret 1066 elliptic curve point represented as an octet string. Note that this 1067 octet string (Z in IEEE 1363 terminology) as output by FE2OSP, the 1068 Field Element to Octet String Conversion Primitive, has constant 1069 length for any given field; leading zeros found in this octet string 1070 MUST NOT be truncated. 1072 (Note that this use of the identity KDF is a technicality. The 1073 complete picture is that ECDH is employed with a non-trivial KDF 1074 because TLS does not directly use the premaster secret for anything 1075 other than for computing the master secret. In TLS 1.0 and 1.1, this 1076 means that the MD5- and SHA-1-based TLS PRF serves as a KDF; in TLS 1077 1.2 the KDF is determined by ciphersuite; it is conceivable that 1078 future TLS versions or new TLS extensions introduced in the future 1079 may vary this computation.) 1081 An ECDHE key exchange using X25519 (curve ecdh_x25519) goes as 1082 follows: Each party picks a secret key d uniformly at random and 1083 computes the corresponding public key x = X25519(d, G). Parties 1084 exchange their public keys, and compute a shared secret as x_S = 1085 X25519(d, x_peer). If either party obtains all-zeroes x_S, it MUST 1086 abort the handshake (as required by definition of X25519 and X448). 1087 ECDHE for X448 works similarily, replacing X25519 with X448, and 1088 ecdh_x25519 with ecdh_x448. The derived shared secret is used 1089 directly as the premaster secret, which is always exactly 32 bytes 1090 when ECDHE with X25519 is used and 56 bytes when ECDHE with X448 is 1091 used. 1093 All ECDSA computations MUST be performed according to ANSI X9.62 or 1094 its successors. Data to be signed/verified is hashed, and the result 1095 run directly through the ECDSA algorithm with no additional hashing. 1096 The default hash function is SHA-1 [FIPS.180-2], and sha_size (see 1097 Section 5.4 and Section 5.8) is 20. However, an alternative hash 1098 function, such as one of the new SHA hash functions specified in FIPS 1099 180-2 [FIPS.180-2], SHOULD be used instead. 1101 All EdDSA computations MUST be performed according to [CFRG-EdDSA] or 1102 its succesors. Data to be signed/verified is run through the EdDSA 1103 algorithm wih no hashing (EdDSA will internally run the data through 1104 the PH function). 1106 RFC 4492 anticipated the standardization of a mechanism for 1107 specifying the required hash function in the certificate, perhaps in 1108 the parameters field of the subjectPublicKeyInfo. Such 1109 standardization never took place, and as a result, SHA-1 is used in 1110 TLS 1.1 and earlier (except for EdDSA, which uses identity function). 1111 TLS 1.2 added a SignatureAndHashAlgorithm parameter to the 1112 DigitallySigned struct, thus allowing agility in choosing the 1113 signature hash. EdDSA signatures MUST have HashAlgorithm of 0 1114 (None). 1116 All RSA signatures must be generated and verified according to 1117 [PKCS1] block type 1. 1119 5.11. Public Key Validation 1121 With the NIST curves, each party must validate the public key sent by 1122 its peer. A receiving party MUST check that the x and y parameters 1123 from the peer's public value satisfy the curve equation, y^2 = x^3 + 1124 ax + b mod p. See section 2.3 of [Menezes] for details. Failing to 1125 do so allows attackers to gain information about the private key, to 1126 the point that they may recover the entire private key in a few 1127 requests, if that key is not really ephemeral. 1129 X25519 was designed in a way that the result of X25519(x, d) will 1130 never reveal information about d, provided it was chosen as 1131 prescribed, for any value of x (the same holds true for X448). 1133 All-zeroes output from X25519 or X448 MUST NOT be used for premaster 1134 secret (as required by definition of X25519 and X448). If the 1135 premaster secret would be all zeroes, the handshake MUST be aborted 1136 (most probably by sending a fatal alert). 1138 Let's define legitimate values of x as the values that can be 1139 obtained as x = X25519(G, d') for some d', and call the other values 1140 illegitimate. The definition of the X25519 function shows that 1141 legitimate values all share the following property: the high-order 1142 bit of the last byte is not set (for X448, any bit can be set). 1144 Since there are some implementation of the X25519 function that 1145 impose this restriction on their input and others that don't, 1146 implementations of X25519 in TLS SHOULD reject public keys when the 1147 high-order bit of the final byte is set (in other words, when the 1148 value of the rightmost byte is greater than 0x7F) in order to prevent 1149 implementation fingerprinting. Note that this deviates from RFC 7748 1150 which suggests that This value be masked. 1152 Ed25519 and Ed448 internally do public key validation as part of 1153 signature verification. 1155 Other than this recommended check, implementations do not need to 1156 ensure that the public keys they receive are legitimate: this is not 1157 necessary for security with X25519. 1159 6. Cipher Suites 1161 The table below defines new ECC cipher suites that use the key 1162 exchange algorithms specified in Section 2. 1164 +---------------------------------------+----------------+ 1165 | CipherSuite | Identifier | 1166 +---------------------------------------+----------------+ 1167 | TLS_ECDHE_ECDSA_WITH_NULL_SHA | { 0xC0, 0x06 } | 1168 | TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x08 } | 1169 | TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x09 } | 1170 | TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0A } | 1171 | | | 1172 | TLS_ECDHE_RSA_WITH_NULL_SHA | { 0xC0, 0x10 } | 1173 | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x12 } | 1174 | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x13 } | 1175 | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x14 } | 1176 | | | 1177 | TLS_ECDH_anon_WITH_NULL_SHA | { 0xC0, 0x15 } | 1178 | TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x17 } | 1179 | TLS_ECDH_anon_WITH_AES_128_CBC_SHA | { 0xC0, 0x18 } | 1180 | TLS_ECDH_anon_WITH_AES_256_CBC_SHA | { 0xC0, 0x19 } | 1181 +---------------------------------------+----------------+ 1183 Table 5: TLS ECC cipher suites 1185 The key exchange method, cipher, and hash algorithm for each of these 1186 cipher suites are easily determined by examining the name. Ciphers 1187 (other than AES ciphers) and hash algorithms are defined in [RFC2246] 1188 and [RFC4346]. AES ciphers are defined in [RFC5246]. 1190 Server implementations SHOULD support all of the following cipher 1191 suites, and client implementations SHOULD support at least one of 1192 them: 1194 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 1195 o TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 1196 o TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 1197 o TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 1199 7. Security Considerations 1201 Security issues are discussed throughout this memo. 1203 For TLS handshakes using ECC cipher suites, the security 1204 considerations in appendices D of all three TLS base documemts apply 1205 accordingly. 1207 Security discussions specific to ECC can be found in 1208 [IEEE.P1363.1998] and [ANSI.X9-62.2005]. One important issue that 1209 implementers and users must consider is elliptic curve selection. 1210 Guidance on selecting an appropriate elliptic curve size is given in 1211 Table 1. Security considerations specific to X25519 and X448 are 1212 discussed in section 7 of [RFC7748]. 1214 Beyond elliptic curve size, the main issue is elliptic curve 1215 structure. As a general principle, it is more conservative to use 1216 elliptic curves with as little algebraic structure as possible. 1217 Thus, random curves are more conservative than special curves such as 1218 Koblitz curves, and curves over F_p with p random are more 1219 conservative than curves over F_p with p of a special form, and 1220 curves over F_p with p random are considered more conservative than 1221 curves over F_2^m as there is no choice between multiple fields of 1222 similar size for characteristic 2. 1224 NEED TO ADD A PARAGRAPH HERE ABOUT WHY X25519/X448 ARE PREFERRABLE TO 1225 NIST CURVES. 1227 Another issue is the potential for catastrophic failures when a 1228 single elliptic curve is widely used. In this case, an attack on the 1229 elliptic curve might result in the compromise of a large number of 1230 keys. Again, this concern may need to be balanced against efficiency 1231 and interoperability improvements associated with widely-used curves. 1232 Substantial additional information on elliptic curve choice can be 1233 found in [IEEE.P1363.1998], [ANSI.X9-62.2005], and [FIPS.186-4]. 1235 All of the key exchange algorithms defined in this document provide 1236 forward secrecy. Some of the deprecated key exchange algorithms do 1237 not. 1239 8. IANA Considerations 1241 [RFC4492], the predecessor of this document has already defined the 1242 IANA registries for the following: 1244 o Supported Groups Section 5.1 1245 o ECPointFormat Section 5.1 1246 o ECCurveType Section 5.4 1248 For each name space, this document defines the initial value 1249 assignments and defines a range of 256 values (NamedCurve) or eight 1250 values (ECPointFormat and ECCurveType) reserved for Private Use. The 1251 policy for any additional assignments is "Specification Required". 1252 The previous version of this document required IETF review. 1254 NOTE: IANA, please update the registries to reflect the new policy. 1256 NOTE: RFC editor please delete these two notes prior to publication. 1258 IANA, please update these two registries to refer to this document. 1260 IANA is requested to assign two values from the NamedCurve registry 1261 with names eddsa_ed25519(TBD3) and eddsa_ed448(TBD4) with this 1262 document as reference. IANA has already assigned the value 29 to 1263 ecdh_x25519, and the value 30 to ecdh_x448. 1265 IANA is requested to assign one value from SignatureAlgorithm 1266 Registry with name eddsa(TBD5) with this document as reference. 1268 9. Acknowledgements 1270 Most of the text is this document is taken from [RFC4492], the 1271 predecessor of this document. The authors of that document were: 1273 o Simon Blake-Wilson 1274 o Nelson Bolyard 1275 o Vipul Gupta 1276 o Chris Hawk 1277 o Bodo Moeller 1279 In the predecessor document, the authors acknowledged the 1280 contributions of Bill Anderson and Tim Dierks. 1282 The author would like to thank Nikos Mavrogiannopoulos, Martin 1283 Thomson, and Tanja Lange for contributions to this document. 1285 10. Version History for This Draft 1287 NOTE TO RFC EDITOR: PLEASE REMOVE THIS SECTION 1289 Changes from draft-ietf-tls-rfc4492bis-03 to draft-nir-tls- 1290 rfc4492bis-05: 1292 o Add support for CFRG curves and signatures work. 1294 Changes from draft-ietf-tls-rfc4492bis-01 to draft-nir-tls- 1295 rfc4492bis-03: 1297 o Removed unused curves. 1298 o Removed unused point formats (all but uncompressed) 1300 Changes from draft-nir-tls-rfc4492bis-00 and draft-ietf-tls- 1301 rfc4492bis-00 to draft-nir-tls-rfc4492bis-01: 1303 o Merged errata 1304 o Removed ECDH_RSA and ECDH_ECDSA 1306 Changes from RFC 4492 to draft-nir-tls-rfc4492bis-00: 1308 o Added TLS 1.2 to references. 1309 o Moved RFC 4492 authors to acknowledgements. 1310 o Removed list of required reading for ECC. 1312 11. References 1314 11.1. Normative References 1316 [ANSI.X9-62.2005] 1317 American National Standards Institute, "Public Key 1318 Cryptography for the Financial Services Industry, The 1319 Elliptic Curve Digital Signature Algorithm (ECDSA)", 1320 ANSI X9.62, 2005. 1322 [CCITT.X680] 1323 International Telephone and Telegraph Consultative 1324 Committee, "Abstract Syntax Notation One (ASN.1): 1325 Specification of basic notation", CCITT Recommendation 1326 X.680, July 2002. 1328 [CCITT.X690] 1329 International Telephone and Telegraph Consultative 1330 Committee, "ASN.1 encoding rules: Specification of basic 1331 encoding Rules (BER), Canonical encoding rules (CER) and 1332 Distinguished encoding rules (DER)", CCITT Recommendation 1333 X.690, July 2002. 1335 [CFRG-EdDSA] 1336 Josefsson, S. and I. Liusvaara, "Edwards-curve Digital 1337 Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-05 1338 (work in progress), March 2016. 1340 [FIPS.186-4] 1341 National Institute of Standards and Technology, "Digital 1342 Signature Standard", FIPS PUB 186-4, 2013, 1343 . 1346 [PKCS1] RSA Laboratories, "RSA Encryption Standard, Version 1.5", 1347 PKCS 1, November 1993. 1349 [PKIX-EdDSA] 1350 Josefsson, S. and N. Mavrogiannopoulos, "Using EdDSA in 1351 the Internet X.509 Public Key Infrastructure", draft-ietf- 1352 curdle-pkix-eddsa-00 (work in progress), March 2016. 1354 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1355 Requirement Levels", BCP 14, RFC 2119, March 1997. 1357 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1358 RFC 2246, January 1999. 1360 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 1361 Identifiers for the Internet X.509 Public Key 1362 Infrastructure Certificate and Certificate Revocation List 1363 (CRL) Profile", RFC 3279, April 2002. 1365 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1366 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 1368 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 1369 and T. Wright, "Transport Layer Security (TLS) 1370 Extensions", RFC 4366, April 2006. 1372 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1373 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1375 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1376 for Security", RFC 7748, January 2016. 1378 [SECG-SEC2] 1379 CECG, "Recommended Elliptic Curve Domain Parameters", 1380 SEC 2, 2000. 1382 11.2. Informative References 1384 [FIPS.180-2] 1385 National Institute of Standards and Technology, "Secure 1386 Hash Standard", FIPS PUB 180-2, August 2002, 1387 . 1390 [I-D.ietf-tls-tls13] 1391 Dierks, T. and E. Rescorla, "The Transport Layer Security 1392 (TLS) Protocol Version 1.3", draft-ietf-tls-tls13-02 (work 1393 in progress), July 2014. 1395 [IEEE.P1363.1998] 1396 Institute of Electrical and Electronics Engineers, 1397 "Standard Specifications for Public Key Cryptography", 1398 IEEE Draft P1363, 1998. 1400 [Lenstra_Verheul] 1401 Lenstra, A. and E. Verheul, "Selecting Cryptographic Key 1402 Sizes", Journal of Cryptology 14 (2001) 255-293, 2001. 1404 [Menezes] Menezes, A. and B. Ustaoglu, "On Reusing Ephemeral Keys In 1405 Diffie-Hellman Key Agreement Protocols", IACR Menezes2008, 1406 December 2008. 1408 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 1409 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 1410 for Transport Layer Security (TLS)", RFC 4492, May 2006. 1412 Appendix A. Equivalent Curves (Informative) 1414 All of the NIST curves [FIPS.186-4] and several of the ANSI curves 1415 [ANSI.X9-62.2005] are equivalent to curves listed in Section 5.1.1. 1416 In the following table, multiple names in one row represent aliases 1417 for the same curve. 1419 Curve names chosen by different standards organizations 1421 +-----------+------------+------------+ 1422 | SECG | ANSI X9.62 | NIST | 1423 +-----------+------------+------------+ 1424 | sect163k1 | | NIST K-163 | 1425 | sect163r1 | | | 1426 | sect163r2 | | NIST B-163 | 1427 | sect193r1 | | | 1428 | sect193r2 | | | 1429 | sect233k1 | | NIST K-233 | 1430 | sect233r1 | | NIST B-233 | 1431 | sect239k1 | | | 1432 | sect283k1 | | NIST K-283 | 1433 | sect283r1 | | NIST B-283 | 1434 | sect409k1 | | NIST K-409 | 1435 | sect409r1 | | NIST B-409 | 1436 | sect571k1 | | NIST K-571 | 1437 | sect571r1 | | NIST B-571 | 1438 | secp160k1 | | | 1439 | secp160r1 | | | 1440 | secp160r2 | | | 1441 | secp192k1 | | | 1442 | secp192r1 | prime192v1 | NIST P-192 | 1443 | secp224k1 | | | 1444 | secp224r1 | | NIST P-224 | 1445 | secp256k1 | | | 1446 | secp256r1 | prime256v1 | NIST P-256 | 1447 | secp384r1 | | NIST P-384 | 1448 | secp521r1 | | NIST P-521 | 1449 +-----------+------------+------------+ 1451 Table 6: Equivalent curves defined by SECG, ANSI, and NIST 1453 Appendix B. Differences from RFC 4492 1455 o Added TLS 1.2 1456 o Merged Errata 1457 o Removed the ECDH key exchange algorithms: ECDH_RSA and ECDH_ECDSA 1458 o Deprecated a bunch of ciphersuites: 1460 TLS_ECDH_ECDSA_WITH_NULL_SHA 1461 TLS_ECDH_ECDSA_WITH_RC4_128_SHA 1462 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 1463 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 1464 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 1465 TLS_ECDH_RSA_WITH_NULL_SHA 1466 TLS_ECDH_RSA_WITH_RC4_128_SHA 1467 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 1468 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 1469 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 1470 All the other RC4 ciphersuites 1472 Removed unused curves and all but the uncompressed point format. 1474 Added X25519 and X448. 1476 Deprecated explicit curves. 1478 Removed restriction on signature algorithm in certificate. 1480 Authors' Addresses 1482 Yoav Nir 1483 Check Point Software Technologies Ltd. 1484 5 Hasolelim st. 1485 Tel Aviv 6789735 1486 Israel 1488 Email: ynir.ietf@gmail.com 1490 Simon Josefsson 1491 SJD AB 1493 Email: simon@josefsson.org 1495 Manuel Pegourie-Gonnard 1496 Independent / PolarSSL 1498 Email: mpg@elzevir.fr