idnits 2.17.1 draft-ietf-tls-rfc4492bis-15.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 678 has weird spacing: '...rveType cur...' == Line 694 has weird spacing: '...ameters cur...' == Line 714 has weird spacing: '...HParams par...' == Line 809 has weird spacing: '...ionForm form;...' -- The document date (March 13, 2017) is 2593 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 184, but not defined -- 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 ** Downref: Normative reference to an Informational RFC: RFC 8032 -- Possible downref: Non-RFC (?) normative reference: ref. 'SECG-SEC2' == Outdated reference: A later version (-28) exists of draft-ietf-tls-tls13-18 -- Obsolete informational reference (is this intentional?): RFC 4492 (Obsoleted by RFC 8422) Summary: 6 errors (**), 0 flaws (~~), 7 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: September 14, 2017 M. Pegourie-Gonnard 7 Independent / PolarSSL 8 March 13, 2017 10 Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer 11 Security (TLS) Versions 1.2 and Earlier 12 draft-ietf-tls-rfc4492bis-15 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 authentication mechanisms. 23 This document obsoletes and replaces RFC 4492. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on September 14, 2017. 42 Copyright Notice 44 Copyright (c) 2017 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 60 1.1. Conventions Used in This Document . . . . . . . . . . . . 3 61 2. Key Exchange Algorithm . . . . . . . . . . . . . . . . . . . 3 62 2.1. ECDHE_ECDSA . . . . . . . . . . . . . . . . . . . . . . . 5 63 2.2. ECDHE_RSA . . . . . . . . . . . . . . . . . . . . . . . . 5 64 2.3. ECDH_anon . . . . . . . . . . . . . . . . . . . . . . . . 5 65 3. Client Authentication . . . . . . . . . . . . . . . . . . . . 6 66 3.1. ECDSA_sign . . . . . . . . . . . . . . . . . . . . . . . 7 67 4. TLS Extensions for ECC . . . . . . . . . . . . . . . . . . . 7 68 5. Data Structures and Computations . . . . . . . . . . . . . . 8 69 5.1. Client Hello Extensions . . . . . . . . . . . . . . . . . 8 70 5.1.1. Supported Elliptic Curves Extension . . . . . . . . . 9 71 5.1.2. Supported Point Formats Extension . . . . . . . . . . 11 72 5.1.3. The signature_algorithms Extension and EdDSA . . . . 11 73 5.2. Server Hello Extension . . . . . . . . . . . . . . . . . 12 74 5.3. Server Certificate . . . . . . . . . . . . . . . . . . . 13 75 5.4. Server Key Exchange . . . . . . . . . . . . . . . . . . . 14 76 5.4.1. Uncompressed Point Format for NIST curves . . . . . . 17 77 5.5. Certificate Request . . . . . . . . . . . . . . . . . . . 18 78 5.6. Client Certificate . . . . . . . . . . . . . . . . . . . 19 79 5.7. Client Key Exchange . . . . . . . . . . . . . . . . . . . 20 80 5.8. Certificate Verify . . . . . . . . . . . . . . . . . . . 21 81 5.9. Elliptic Curve Certificates . . . . . . . . . . . . . . . 23 82 5.10. ECDH, ECDSA, and RSA Computations . . . . . . . . . . . . 23 83 5.11. Public Key Validation . . . . . . . . . . . . . . . . . . 24 84 6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . 25 85 7. Implementation Status . . . . . . . . . . . . . . . . . . . . 26 86 8. Security Considerations . . . . . . . . . . . . . . . . . . . 26 87 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 88 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 89 11. Version History for This Draft . . . . . . . . . . . . . . . 28 90 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 91 12.1. Normative References . . . . . . . . . . . . . . . . . . 29 92 12.2. Informative References . . . . . . . . . . . . . . . . . 30 93 Appendix A. Equivalent Curves (Informative) . . . . . . . . . . 31 94 Appendix B. Differences from RFC 4492 . . . . . . . . . . . . . 32 95 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 33 97 1. Introduction 99 This document describes additions to TLS to support ECC, applicable 100 to TLS versions 1.0 [RFC2246], 1.1 [RFC4346], and 1.2 [RFC5246]. The 101 use of ECC in TLS 1.3 is defined in [I-D.ietf-tls-tls13], and is 102 explicitly out of scope for this document. In particular, this 103 document defines: 105 o the use of the ECDHE key agreement scheme with ephemeral keys to 106 establish the TLS premaster secret, and 107 o the use of ECDSA and EdDSA signatures for authentication of TLS 108 peers. 110 The remainder of this document is organized as follows. Section 2 111 provides an overview of ECC-based key exchange algorithms for TLS. 112 Section 3 describes the use of ECC certificates for client 113 authentication. TLS extensions that allow a client to negotiate the 114 use of specific curves and point formats are presented in Section 4. 115 Section 5 specifies various data structures needed for an ECC-based 116 handshake, their encoding in TLS messages, and the processing of 117 those messages. Section 6 defines ECC-based cipher suites and 118 identifies a small subset of these as recommended for all 119 implementations of this specification. Section 8 discusses security 120 considerations. Section 9 describes IANA considerations for the name 121 spaces created by this document's predecessor. Section 10 gives 122 acknowledgements. Appendix B provides differences from [RFC4492], 123 the document that this one replaces. 125 Implementation of this specification requires familiarity with TLS, 126 TLS extensions [RFC4366], and ECC. 128 1.1. Conventions Used in This Document 130 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 131 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 132 document are to be interpreted as described in [RFC2119]. 134 2. Key Exchange Algorithm 136 This document defines three new ECC-based key exchange algorithms for 137 TLS. All of them use Ephemeral ECDH (ECDHE) to compute the TLS 138 premaster secret, and they differ only in the mechanism (if any) used 139 to authenticate them. The derivation of the TLS master secret from 140 the premaster secret and the subsequent generation of bulk 141 encryption/MAC keys and initialization vectors is independent of the 142 key exchange algorithm and not impacted by the introduction of ECC. 144 Table 1 summarizes the new key exchange algorithms. All of these key 145 exchange algorithms provide forward secrecy. 147 +-------------+------------------------------------------------+ 148 | Algorithm | Description | 149 +-------------+------------------------------------------------+ 150 | ECDHE_ECDSA | Ephemeral ECDH with ECDSA or EdDSA signatures. | 151 | ECDHE_RSA | Ephemeral ECDH with RSA signatures. | 152 | ECDH_anon | Anonymous ephemeral ECDH, no signatures. | 153 +-------------+------------------------------------------------+ 155 Table 1: ECC Key Exchange Algorithms 157 These key exchanges are analogous to DHE_DSS, DHE_RSA, and DH_anon, 158 respectively. 160 With ECDHE_RSA, a server can reuse its existing RSA certificate and 161 easily comply with a constrained client's elliptic curve preferences 162 (see Section 4). However, the computational cost incurred by a 163 server is higher for ECDHE_RSA than for the traditional RSA key 164 exchange, which does not provide forward secrecy. 166 The anonymous key exchange algorithm does not provide authentication 167 of the server or the client. Like other anonymous TLS key exchanges, 168 it is subject to man-in-the-middle attacks. Applications using TLS 169 with this algorithm SHOULD provide authentication by other means. 171 Client Server 172 ------ ------ 173 ClientHello --------> 174 ServerHello 175 Certificate* 176 ServerKeyExchange* 177 CertificateRequest*+ 178 <-------- ServerHelloDone 179 Certificate*+ 180 ClientKeyExchange 181 CertificateVerify*+ 182 [ChangeCipherSpec] 183 Finished --------> 184 [ChangeCipherSpec] 185 <-------- Finished 186 Application Data <-------> Application Data 187 * message is not sent under some conditions 188 + message is not sent unless client authentication 189 is desired 191 Figure 1: Message flow in a full TLS 1.2 handshake 192 Figure 1 shows all messages involved in the TLS key establishment 193 protocol (aka full handshake). The addition of ECC has direct impact 194 only on the ClientHello, the ServerHello, the server's Certificate 195 message, the ServerKeyExchange, the ClientKeyExchange, the 196 CertificateRequest, the client's Certificate message, and the 197 CertificateVerify. Next, we describe the ECC key exchange algorithm 198 in greater detail in terms of the content and processing of these 199 messages. For ease of exposition, we defer discussion of client 200 authentication and associated messages (identified with a + in 201 Figure 1) until Section 3 and of the optional ECC-specific extensions 202 (which impact the Hello messages) until Section 4. 204 2.1. ECDHE_ECDSA 206 In ECDHE_ECDSA, the server's certificate MUST contain an ECDSA- or 207 EdDSA-capable public key. 209 The server sends its ephemeral ECDH public key and a specification of 210 the corresponding curve in the ServerKeyExchange message. These 211 parameters MUST be signed with ECDSA or EdDSA using the private key 212 corresponding to the public key in the server's Certificate. 214 The client generates an ECDH key pair on the same curve as the 215 server's ephemeral ECDH key and sends its public key in the 216 ClientKeyExchange message. 218 Both client and server perform an ECDH operation Section 5.10 and use 219 the resultant shared secret as the premaster secret. 221 2.2. ECDHE_RSA 223 This key exchange algorithm is the same as ECDHE_ECDSA except that 224 the server's certificate MUST contain an RSA public key authorized 225 for signing, and that the signature in the ServerKeyExchange message 226 must be computed with the corresponding RSA private key. 228 2.3. ECDH_anon 230 NOTE: Despite the name beginning with "ECDH_" (no E), the key used in 231 ECDH_anon is ephemeral just like the key in ECDHE_RSA and 232 ECDHE_ECDSA. The naming follows the example of DH_anon, where the 233 key is also ephemeral but the name does not reflect it. 235 In ECDH_anon, the server's Certificate, the CertificateRequest, the 236 client's Certificate, and the CertificateVerify messages MUST NOT be 237 sent. 239 The server MUST send an ephemeral ECDH public key and a specification 240 of the corresponding curve in the ServerKeyExchange message. These 241 parameters MUST NOT be signed. 243 The client generates an ECDH key pair on the same curve as the 244 server's ephemeral ECDH key and sends its public key in the 245 ClientKeyExchange message. 247 Both client and server perform an ECDH operation and use the 248 resultant shared secret as the premaster secret. All ECDH 249 calculations are performed as specified in Section 5.10. 251 This specification does not impose restrictions on signature schemes 252 used anywhere in the certificate chain. The previous version of this 253 document required the signatures to match, but this restriction, 254 originating in previous TLS versions is lifted here as it had been in 255 RFC 5246. 257 3. Client Authentication 259 This document defines a client authentication mechanism, named after 260 the type of client certificate involved: ECDSA_sign. The ECDSA_sign 261 mechanism is usable with any of the non-anonymous ECC key exchange 262 algorithms described in Section 2 as well as other non-anonymous 263 (non-ECC) key exchange algorithms defined in TLS. 265 Note that client certificates with EdDSA public keys use this 266 mechanism. 268 The server can request ECC-based client authentication by including 269 this certificate type in its CertificateRequest message. The client 270 must check if it possesses a certificate appropriate for the method 271 suggested by the server and is willing to use it for authentication. 273 If these conditions are not met, the client should send a client 274 Certificate message containing no certificates. In this case, the 275 ClientKeyExchange should be sent as described in Section 2, and the 276 CertificateVerify should not be sent. If the server requires client 277 authentication, it may respond with a fatal handshake failure alert. 279 If the client has an appropriate certificate and is willing to use it 280 for authentication, it must send that certificate in the client's 281 Certificate message (as per Section 5.6) and prove possession of the 282 private key corresponding to the certified key. The process of 283 determining an appropriate certificate and proving possession is 284 different for each authentication mechanism and described below. 286 NOTE: It is permissible for a server to request (and the client to 287 send) a client certificate of a different type than the server 288 certificate. 290 3.1. ECDSA_sign 292 To use this authentication mechanism, the client MUST possess a 293 certificate containing an ECDSA- or EdDSA-capable public key. 295 The client proves possession of the private key corresponding to the 296 certified key by including a signature in the CertificateVerify 297 message as described in Section 5.8. 299 4. TLS Extensions for ECC 301 Two TLS extensions are defined in this specification: (i) the 302 Supported Elliptic Curves Extension, and (ii) the Supported Point 303 Formats Extension. These allow negotiating the use of specific 304 curves and point formats (e.g., compressed vs. uncompressed, 305 respectively) during a handshake starting a new session. These 306 extensions are especially relevant for constrained clients that may 307 only support a limited number of curves or point formats. They 308 follow the general approach outlined in [RFC4366]; message details 309 are specified in Section 5. The client enumerates the curves it 310 supports and the point formats it can parse by including the 311 appropriate extensions in its ClientHello message. The server 312 similarly enumerates the point formats it can parse by including an 313 extension in its ServerHello message. 315 A TLS client that proposes ECC cipher suites in its ClientHello 316 message SHOULD include these extensions. Servers implementing ECC 317 cipher suites MUST support these extensions, and when a client uses 318 these extensions, servers MUST NOT negotiate the use of an ECC cipher 319 suite unless they can complete the handshake while respecting the 320 choice of curves and compression techniques specified by the client. 321 This eliminates the possibility that a negotiated ECC handshake will 322 be subsequently aborted due to a client's inability to deal with the 323 server's EC key. 325 The client MUST NOT include these extensions in the ClientHello 326 message if it does not propose any ECC cipher suites. A client that 327 proposes ECC cipher suites may choose not to include these 328 extensions. In this case, the server is free to choose any one of 329 the elliptic curves or point formats listed in Section 5. That 330 section also describes the structure and processing of these 331 extensions in greater detail. 333 In the case of session resumption, the server simply ignores the 334 Supported Elliptic Curves Extension and the Supported Point Formats 335 Extension appearing in the current ClientHello message. These 336 extensions only play a role during handshakes negotiating a new 337 session. 339 5. Data Structures and Computations 341 This section specifies the data structures and computations used by 342 ECC-based key mechanisms specified in the previous three sections. 343 The presentation language used here is the same as that used in TLS. 344 Since this specification extends TLS, these descriptions should be 345 merged with those in the TLS specification and any others that extend 346 TLS. This means that enum types may not specify all possible values, 347 and structures with multiple formats chosen with a select() clause 348 may not indicate all possible cases. 350 5.1. Client Hello Extensions 352 This section specifies two TLS extensions that can be included with 353 the ClientHello message as described in [RFC4366], the Supported 354 Elliptic Curves Extension and the Supported Point Formats Extension. 356 When these extensions are sent: 358 The extensions SHOULD be sent along with any ClientHello message that 359 proposes ECC cipher suites. 361 Meaning of these extensions: 363 These extensions allow a client to enumerate the elliptic curves it 364 supports and/or the point formats it can parse. 366 Structure of these extensions: 368 The general structure of TLS extensions is described in [RFC4366], 369 and this specification adds two types to ExtensionType. 371 enum { 372 elliptic_curves(10), 373 ec_point_formats(11) 374 } ExtensionType; 376 o elliptic_curves (Supported Elliptic Curves Extension): Indicates 377 the set of elliptic curves supported by the client. For this 378 extension, the opaque extension_data field contains 379 EllipticCurveList. See Section 5.1.1 for details. 381 o ec_point_formats (Supported Point Formats Extension): Indicates 382 the set of point formats that the client can parse. For this 383 extension, the opaque extension_data field contains 384 ECPointFormatList. See Section 5.1.2 for details. 386 Actions of the sender: 388 A client that proposes ECC cipher suites in its ClientHello message 389 appends these extensions (along with any others), enumerating the 390 curves it supports and the point formats it can parse. Clients 391 SHOULD send both the Supported Elliptic Curves Extension and the 392 Supported Point Formats Extension. If the Supported Point Formats 393 Extension is indeed sent, it MUST contain the value 0 (uncompressed) 394 as one of the items in the list of point formats. 396 Actions of the receiver: 398 A server that receives a ClientHello containing one or both of these 399 extensions MUST use the client's enumerated capabilities to guide its 400 selection of an appropriate cipher suite. One of the proposed ECC 401 cipher suites must be negotiated only if the server can successfully 402 complete the handshake while using the curves and point formats 403 supported by the client (cf. Section 5.3 and Section 5.4). 405 NOTE: A server participating in an ECDHE_ECDSA key exchange may use 406 different curves for the ECDSA or EdDSA key in its certificate, and 407 for the ephemeral ECDH key in the ServerKeyExchange message. The 408 server MUST consider the extensions in both cases. 410 If a server does not understand the Supported Elliptic Curves 411 Extension, does not understand the Supported Point Formats Extension, 412 or is unable to complete the ECC handshake while restricting itself 413 to the enumerated curves and point formats, it MUST NOT negotiate the 414 use of an ECC cipher suite. Depending on what other cipher suites 415 are proposed by the client and supported by the server, this may 416 result in a fatal handshake failure alert due to the lack of common 417 cipher suites. 419 5.1.1. Supported Elliptic Curves Extension 421 RFC 4492 defined 25 different curves in the NamedCurve registry (now 422 renamed the "Supported Groups" registry, although the enumeration 423 below is still named NamedCurve) for use in TLS. Only three have 424 seen much use. This specification is deprecating the rest (with 425 numbers 1-22). This specification also deprecates the explicit 426 curves with identifiers 0xFF01 and 0xFF02. It also adds the new 427 curves defined in [RFC7748]. The end result is as follows: 429 enum { 430 deprecated(1..22), 431 secp256r1 (23), secp384r1 (24), secp521r1 (25), 432 ecdh_x25519(29), ecdh_x448(30), 433 reserved (0xFE00..0xFEFF), 434 deprecated(0xFF01..0xFF02), 435 (0xFFFF) 436 } NamedCurve; 438 Note that other specifications have since added other values to this 439 enumeration. Some of those values are not curves at all, but finite 440 field groups. See [RFC7919]. 442 secp256r1, etc: Indicates support of the corresponding named curve or 443 groups. The named curves secp256r1, secp384r1, and secp521r1 are 444 specified in SEC 2 [SECG-SEC2]. These curves are also recommended in 445 ANSI X9.62 [ANSI.X9-62.2005] and FIPS 186-4 [FIPS.186-4]. The rest 446 of this document refers to these three curves as the "NIST curves" 447 because they were originally standardized by the National Institute 448 of Standards and Technology. The curves ecdh_x25519 and ecdh_x448 449 are defined in [RFC7748]. Values 0xFE00 through 0xFEFF are reserved 450 for private use. 452 The predecessor of this document also supported explicitly defined 453 prime and char2 curves, but these are deprecated by this 454 specification. 456 The NamedCurve name space is maintained by IANA. See Section 9 for 457 information on how new value assignments are added. 459 struct { 460 NamedCurve elliptic_curve_list<2..2^16-1> 461 } EllipticCurveList; 463 Items in elliptic_curve_list are ordered according to the client's 464 preferences (favorite choice first). 466 As an example, a client that only supports secp256r1 (aka NIST P-256; 467 value 23 = 0x0017) and secp384r1 (aka NIST P-384; value 24 = 0x0018) 468 and prefers to use secp256r1 would include a TLS extension consisting 469 of the following octets. Note that the first two octets indicate the 470 extension type (Supported Elliptic Curves Extension): 472 00 0A 00 06 00 04 00 17 00 18 474 5.1.2. Supported Point Formats Extension 476 enum { 477 uncompressed (0), 478 deprecated (1..2), 479 reserved (248..255) 480 } ECPointFormat; 481 struct { 482 ECPointFormat ec_point_format_list<1..2^8-1> 483 } ECPointFormatList; 485 Three point formats were included in the definition of ECPointFormat 486 above. This specification deprecates all but the uncompressed point 487 format. Implementations of this document MUST support the 488 uncompressed format for all of their supported curves, and MUST NOT 489 support other formats for curves defined in this specification. For 490 backwards compatibility purposes, the point format list extension 491 MUST still be included, and contain exactly one value: the 492 uncompressed point format (0). 494 The ECPointFormat name space is maintained by IANA. See Section 9 495 for information on how new value assignments are added. 497 Items in ec_point_format_list are ordered according to the client's 498 preferences (favorite choice first). 500 A client compliant with this specification that supports no other 501 curves MUST send the following octets; note that the first two octets 502 indicate the extension type (Supported Point Formats Extension): 504 00 0B 00 02 01 00 506 5.1.3. The signature_algorithms Extension and EdDSA 508 The signature_algorithms extension, defined in section 7.4.1.4.1 of 509 [RFC5246], advertises the combinations of signature algorithm and 510 hash function that the client supports. The pure (non pre-hashed) 511 forms of EdDSA do not hash the data before signing it. For this 512 reason it does not make sense to combine them with a signature 513 algorithm in the extension. 515 For bits-on-the-wire compatibility with TLS 1.3, we define a new 516 dummy value in the HashAlgorithm registry which we will call 517 "Intrinsic" (value TBD5) meaning that hashing is intrinsic to the 518 signature algorithm. 520 To represent ed25519 and ed448 in the signature_algorithms extension, 521 the value shall be (TBD5,TBD3) and (TBD5,TBD4) respectively. 523 5.2. Server Hello Extension 525 This section specifies a TLS extension that can be included with the 526 ServerHello message as described in [RFC4366], the Supported Point 527 Formats Extension. 529 When this extension is sent: 531 The Supported Point Formats Extension is included in a ServerHello 532 message in response to a ClientHello message containing the Supported 533 Point Formats Extension when negotiating an ECC cipher suite. 535 Meaning of this extension: 537 This extension allows a server to enumerate the point formats it can 538 parse (for the curve that will appear in its ServerKeyExchange 539 message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key 540 exchange algorithm. 542 Structure of this extension: 544 The server's Supported Point Formats Extension has the same structure 545 as the client's Supported Point Formats Extension (see 546 Section 5.1.2). Items in ec_point_format_list here are ordered 547 according to the server's preference (favorite choice first). Note 548 that the server MAY include items that were not found in the client's 549 list. However, without extensions this specification allows exactly 550 one point format, so there is not really any opportunity for 551 mismatches. 553 Actions of the sender: 555 A server that selects an ECC cipher suite in response to a 556 ClientHello message including a Supported Point Formats Extension 557 appends this extension (along with others) to its ServerHello 558 message, enumerating the point formats it can parse. The Supported 559 Point Formats Extension, when used, MUST contain the value 0 560 (uncompressed) as one of the items in the list of point formats. 562 Actions of the receiver: 564 A client that receives a ServerHello message containing a Supported 565 Point Formats Extension MUST respect the server's choice of point 566 formats during the handshake (cf. Section 5.6 and Section 5.7). If 567 no Supported Point Formats Extension is received with the 568 ServerHello, this is equivalent to an extension allowing only the 569 uncompressed point format. 571 5.3. Server Certificate 573 When this message is sent: 575 This message is sent in all non-anonymous ECC-based key exchange 576 algorithms. 578 Meaning of this message: 580 This message is used to authentically convey the server's static 581 public key to the client. The following table shows the server 582 certificate type appropriate for each key exchange algorithm. ECC 583 public keys MUST be encoded in certificates as described in 584 Section 5.9. 586 NOTE: The server's Certificate message is capable of carrying a chain 587 of certificates. The restrictions mentioned in Table 3 apply only to 588 the server's certificate (first in the chain). 590 +-------------+-----------------------------------------------------+ 591 | Algorithm | Server Certificate Type | 592 +-------------+-----------------------------------------------------+ 593 | ECDHE_ECDSA | Certificate MUST contain an ECDSA- or EdDSA-capable | 594 | | public key. | 595 | ECDHE_RSA | Certificate MUST contain an RSA public key | 596 | | authorized for use in digital signatures. | 597 +-------------+-----------------------------------------------------+ 599 Table 2: Server Certificate Types 601 Structure of this message: 603 Identical to the TLS Certificate format. 605 Actions of the sender: 607 The server constructs an appropriate certificate chain and conveys it 608 to the client in the Certificate message. If the client has used a 609 Supported Elliptic Curves Extension, the public key in the server's 610 certificate MUST respect the client's choice of elliptic curves; If 611 the client has used a Supported Point Formats Extension, both the 612 server's public key point and (in the case of an explicit curve) the 613 curve's base point MUST respect the client's choice of point formats. 614 (A server that cannot satisfy these requirements MUST NOT choose an 615 ECC cipher suite in its ServerHello message.) 617 Actions of the receiver: 619 The client validates the certificate chain, extracts the server's 620 public key, and checks that the key type is appropriate for the 621 negotiated key exchange algorithm. (A possible reason for a fatal 622 handshake failure is that the client's capabilities for handling 623 elliptic curves and point formats are exceeded; cf. Section 5.1.) 625 5.4. Server Key Exchange 627 When this message is sent: 629 This message is sent when using the ECDHE_ECDSA, ECDHE_RSA, and 630 ECDH_anon key exchange algorithms. 632 Meaning of this message: 634 This message is used to convey the server's ephemeral ECDH public key 635 (and the corresponding elliptic curve domain parameters) to the 636 client. 638 The ECCCurveType enum used to have values for explicit prime and for 639 explicit char2 curves. Those values are now deprecated, so only one 640 value remains: 642 Structure of this message: 644 enum { 645 deprecated (1..2), 646 named_curve (3), 647 reserved(248..255) 648 } ECCurveType; 650 The value named_curve indicates that a named curve is used. This 651 option SHOULD be used when applicable. 653 Values 248 through 255 are reserved for private use. 655 The ECCurveType name space is maintained by IANA. See Section 9 for 656 information on how new value assignments are added. 658 RFC 4492 had a specification for an ECCurve structure and an 659 ECBasisType structure. Both of these are omitted now because they 660 were only used with the now deprecated explicit curves. 662 struct { 663 opaque point <1..2^8-1>; 664 } ECPoint; 666 point: This is the byte string representation of an elliptic curve 667 point following the conversion routine in Section 4.3.6 of 668 [ANSI.X9-62.2005]. This byte string may represent an elliptic curve 669 point in uncompressed, compressed, or hybrid format, but this 670 specification deprecates all but the uncompressed format. For the 671 NIST curves, the format is repeated in Section 5.4.1 for convenience. 672 For the X25519 and X448 curves, the only valid representation is the 673 one specified in [RFC7748] - a 32- or 56-octet representation of the 674 u value of the point. This structure MUST NOT be used with Ed25519 675 and Ed448 public keys. 677 struct { 678 ECCurveType curve_type; 679 select (curve_type) { 680 case named_curve: 681 NamedCurve namedcurve; 682 }; 683 } ECParameters; 685 curve_type: This identifies the type of the elliptic curve domain 686 parameters. 688 namedCurve: Specifies a recommended set of elliptic curve domain 689 parameters. All those values of NamedCurve are allowed that refer to 690 a curve capable of Diffie-Hellman. With the deprecation of the 691 explicit curves, this now includes all of the NamedCurve values. 693 struct { 694 ECParameters curve_params; 695 ECPoint public; 696 } ServerECDHParams; 698 curve_params: Specifies the elliptic curve domain parameters 699 associated with the ECDH public key. 701 public: The ephemeral ECDH public key. 703 The ServerKeyExchange message is extended as follows. 705 enum { 706 ec_diffie_hellman 707 } KeyExchangeAlgorithm; 709 o ec_diffie_hellman: Indicates the ServerKeyExchange message 710 contains an ECDH public key. 712 select (KeyExchangeAlgorithm) { 713 case ec_diffie_hellman: 714 ServerECDHParams params; 715 Signature signed_params; 716 } ServerKeyExchange; 718 o params: Specifies the ECDH public key and associated domain 719 parameters. 720 o signed_params: A hash of the params, with the signature 721 appropriate to that hash applied. The private key corresponding 722 to the certified public key in the server's Certificate message is 723 used for signing. 725 enum { 726 ecdsa(3), 727 ed25519(TBD3) 728 ed448(TBD4) 729 } SignatureAlgorithm; 730 select (SignatureAlgorithm) { 731 case ecdsa: 732 digitally-signed struct { 733 opaque sha_hash[sha_size]; 734 }; 735 case ed25519,ed448: 736 digitally-signed struct { 737 opaque rawdata[rawdata_size]; 738 }; 739 } Signature; 740 ServerKeyExchange.signed_params.sha_hash 741 SHA(ClientHello.random + ServerHello.random + 742 ServerKeyExchange.params); 743 ServerKeyExchange.signed_params.rawdata 744 ClientHello.random + ServerHello.random + 745 ServerKeyExchange.params; 747 NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange 748 algorithm and "anonymous" for ECDH_anon. These cases are defined in 749 TLS. SignatureAlgorithm is "ecdsa" or "eddsa" for ECDHE_ECDSA. 750 ECDSA signatures are generated and verified as described in 751 Section 5.10, and SHA in the above template for sha_hash accordingly 752 may denote a hash algorithm other than SHA-1. As per ANSI X9.62, an 753 ECDSA signature consists of a pair of integers, r and s. The 754 digitally-signed element is encoded as an opaque vector <0..2^16-1>, 755 the contents of which are the DER encoding corresponding to the 756 following ASN.1 notation. 758 Ecdsa-Sig-Value ::= SEQUENCE { 759 r INTEGER, 760 s INTEGER 761 } 763 EdDSA signatures in both the protocol and in certificates that 764 conform to [PKIX-EdDSA] are generated and verified according to 765 [RFC8032]. The digitally-signed element is encoded as an opaque 766 vector<0..2^16-1>, the contents of which is the octet string output 767 of the EdDSA signing algorithm. 769 Actions of the sender: 771 The server selects elliptic curve domain parameters and an ephemeral 772 ECDH public key corresponding to these parameters according to the 773 ECKAS-DH1 scheme from IEEE 1363 [IEEE.P1363.1998]. It conveys this 774 information to the client in the ServerKeyExchange message using the 775 format defined above. 777 Actions of the receiver: 779 The client verifies the signature (when present) and retrieves the 780 server's elliptic curve domain parameters and ephemeral ECDH public 781 key from the ServerKeyExchange message. (A possible reason for a 782 fatal handshake failure is that the client's capabilities for 783 handling elliptic curves and point formats are exceeded; cf. 784 Section 5.1.) 786 5.4.1. Uncompressed Point Format for NIST curves 788 The following represents the wire format for representing ECPoint in 789 ServerKeyExchange records. The first octet of the representation 790 indicates the form, which may be compressed, uncompressed, or hybrid. 791 This specification supports only the uncompressed format for these 792 curves. This is followed by the binary representation of the X value 793 in "big-endian" or "network" format, followed by the binary 794 representation of the Y value in "big-endian" or "network" format. 795 There are no internal length markers, so each number representation 796 occupies as many octets as implied by the curve parameters. For 797 P-256 this means that each of X and Y use 32 octets, padded on the 798 left by zeros if necessary. For P-384 they take 48 octets each, and 799 for P-521 they take 66 octets each. 801 Here's a more formal representation: 803 enum { 804 uncompressed(4), 805 (255) 806 } PointConversionForm; 808 struct { 809 PointConversionForm form; 810 opaque X[coordinate_length]; 811 opaque Y[coordinate_length]; 812 } UncompressedPointRepresentation; 814 5.5. Certificate Request 816 When this message is sent: 818 This message is sent when requesting client authentication. 820 Meaning of this message: 822 The server uses this message to suggest acceptable client 823 authentication methods. 825 Structure of this message: 827 The TLS CertificateRequest message is extended as follows. 829 enum { 830 ecdsa_sign(64), 831 rsa_fixed_ecdh(65), 832 ecdsa_fixed_ecdh(66), 833 (255) 834 } ClientCertificateType; 836 o ecdsa_sign, etc.: Indicates that the server would like to use the 837 corresponding client authentication method specified in Section 3. 839 Actions of the sender: 841 The server decides which client authentication methods it would like 842 to use, and conveys this information to the client using the format 843 defined above. 845 Actions of the receiver: 847 The client determines whether it has a suitable certificate for use 848 with any of the requested methods and whether to proceed with client 849 authentication. 851 5.6. Client Certificate 853 When this message is sent: 855 This message is sent in response to a CertificateRequest when a 856 client has a suitable certificate and has decided to proceed with 857 client authentication. (Note that if the server has used a Supported 858 Point Formats Extension, a certificate can only be considered 859 suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and 860 ECDSA_fixed_ECDH authentication methods if the public key point 861 specified in it respects the server's choice of point formats. If no 862 Supported Point Formats Extension has been used, a certificate can 863 only be considered suitable for use with these authentication methods 864 if the point is represented in uncompressed point format.) 866 Meaning of this message: 868 This message is used to authentically convey the client's static 869 public key to the server. The following table summarizes what client 870 certificate types are appropriate for the ECC-based client 871 authentication mechanisms described in Section 3. ECC public keys 872 must be encoded in certificates as described in Section 5.9. 874 NOTE: The client's Certificate message is capable of carrying a chain 875 of certificates. The restrictions mentioned in Table 4 apply only to 876 the client's certificate (first in the chain). 878 +------------------+------------------------------------------------+ 879 | Client | Client Certificate Type | 880 | Authentication | | 881 | Method | | 882 +------------------+------------------------------------------------+ 883 | ECDSA_sign | Certificate MUST contain an ECDSA- or EdDSA- | 884 | | capable public key. | 885 | ECDSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 886 | | public key on the same elliptic curve as the | 887 | | server's long-term ECDH key. | 888 | RSA_fixed_ECDH | The same as ECDSA_fixed_ECDH. The codepoints | 889 | | meant different things, but due to changes in | 890 | | TLS 1.2, both mean the same thing now. | 891 +------------------+------------------------------------------------+ 893 Table 3: Client Certificate Types 895 Structure of this message: 897 Identical to the TLS client Certificate format. 899 Actions of the sender: 901 The client constructs an appropriate certificate chain, and conveys 902 it to the server in the Certificate message. 904 Actions of the receiver: 906 The TLS server validates the certificate chain, extracts the client's 907 public key, and checks that the key type is appropriate for the 908 client authentication method. 910 5.7. Client Key Exchange 912 When this message is sent: 914 This message is sent in all key exchange algorithms. If client 915 authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this 916 message is empty. Otherwise, it contains the client's ephemeral ECDH 917 public key. 919 Meaning of the message: 921 This message is used to convey ephemeral data relating to the key 922 exchange belonging to the client (such as its ephemeral ECDH public 923 key). 925 Structure of this message: 927 The TLS ClientKeyExchange message is extended as follows. 929 enum { 930 implicit, 931 explicit 932 } PublicValueEncoding; 934 o implicit, explicit: For ECC cipher suites, this indicates whether 935 the client's ECDH public key is in the client's certificate 936 ("implicit") or is provided, as an ephemeral ECDH public key, in 937 the ClientKeyExchange message ("explicit"). (This is "explicit" 938 in ECC cipher suites except when the client uses the 939 ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication 940 mechanism.) 941 struct { 942 select (PublicValueEncoding) { 943 case implicit: struct { }; 944 case explicit: ECPoint ecdh_Yc; 945 } ecdh_public; 946 } ClientECDiffieHellmanPublic; 947 o ecdh_Yc: Contains the client's ephemeral ECDH public key as a byte 948 string ECPoint.point, which may represent an elliptic curve point 949 in uncompressed or compressed format. Curves eddsa_ed25519 and 950 eddsa_ed448 MUST NOT be used here. Here, the format MUST conform 951 to what the server has requested through a Supported Point Formats 952 Extension if this extension was used, and MUST be uncompressed if 953 this extension was not used. 955 struct { 956 select (KeyExchangeAlgorithm) { 957 case ec_diffie_hellman: ClientECDiffieHellmanPublic; 958 } exchange_keys; 959 } ClientKeyExchange; 961 Actions of the sender: 963 The client selects an ephemeral ECDH public key corresponding to the 964 parameters it received from the server according to the ECKAS-DH1 965 scheme from IEEE 1363. It conveys this information to the client in 966 the ClientKeyExchange message using the format defined above. 968 Actions of the receiver: 970 The server retrieves the client's ephemeral ECDH public key from the 971 ClientKeyExchange message and checks that it is on the same elliptic 972 curve as the server's ECDH key. 974 5.8. Certificate Verify 976 When this message is sent: 978 This message is sent when the client sends a client certificate 979 containing a public key usable for digital signatures, e.g., when the 980 client is authenticated using the ECDSA_sign mechanism. 982 Meaning of the message: 984 This message contains a signature that proves possession of the 985 private key corresponding to the public key in the client's 986 Certificate message. 988 Structure of this message: 990 The TLS CertificateVerify message and the underlying Signature type 991 are defined in the TLS base specifications, and the latter is 992 extended here in Section 5.4. For the ecdsa and eddsa cases, the 993 signature field in the CertificateVerify message contains an ECDSA or 994 EdDSA (respectively) signature computed over handshake messages 995 exchanged so far, exactly similar to CertificateVerify with other 996 signing algorithms: 998 CertificateVerify.signature.sha_hash 999 SHA(handshake_messages); 1000 CertificateVerify.signature.rawdata 1001 handshake_messages; 1003 ECDSA signatures are computed as described in Section 5.10, and SHA 1004 in the above template for sha_hash accordingly may denote a hash 1005 algorithm other than SHA-1. As per ANSI X9.62, an ECDSA signature 1006 consists of a pair of integers, r and s. The digitally-signed 1007 element is encoded as an opaque vector <0..2^16-1>, the contents of 1008 which are the DER encoding [CCITT.X690] corresponding to the 1009 following ASN.1 notation [CCITT.X680]. 1011 Ecdsa-Sig-Value ::= SEQUENCE { 1012 r INTEGER, 1013 s INTEGER 1014 } 1016 EdDSA signatures are generated and verified according to [RFC8032]. 1017 The digitally-signed element is encoded as an opaque 1018 vector<0..2^16-1>, the contents of which is the octet string output 1019 of the EdDSA signing algorithm. 1021 Actions of the sender: 1023 The client computes its signature over all handshake messages sent or 1024 received starting at client hello and up to but not including this 1025 message. It uses the private key corresponding to its certified 1026 public key to compute the signature, which is conveyed in the format 1027 defined above. 1029 Actions of the receiver: 1031 The server extracts the client's signature from the CertificateVerify 1032 message, and verifies the signature using the public key it received 1033 in the client's Certificate message. 1035 5.9. Elliptic Curve Certificates 1037 X.509 certificates containing ECC public keys or signed using ECDSA 1038 MUST comply with [RFC3279] or another RFC that replaces or extends 1039 it. X.509 certificates containing ECC public keys or signed using 1040 EdDSA MUST comply with [PKIX-EdDSA]. Clients SHOULD use the elliptic 1041 curve domain parameters recommended in ANSI X9.62, FIPS 186-4, and 1042 SEC 2 [SECG-SEC2] or in [RFC8032]. 1044 EdDSA keys using Ed25519 and Ed25519ph algorithms MUST use the 1045 eddsa_ed25519 curve, and Ed448 and Ed448ph keys MUST use the 1046 eddsa_ed448 curve. Curves ecdh_x25519, ecdh_x448, eddsa_ed25519 and 1047 eddsa_ed448 MUST NOT be used for ECDSA. 1049 5.10. ECDH, ECDSA, and RSA Computations 1051 All ECDH calculations for the NIST curves (including parameter and 1052 key generation as well as the shared secret calculation) are 1053 performed according to [IEEE.P1363.1998] using the ECKAS-DH1 scheme 1054 with the identity map as key derivation function (KDF), so that the 1055 premaster secret is the x-coordinate of the ECDH shared secret 1056 elliptic curve point represented as an octet string. Note that this 1057 octet string (Z in IEEE 1363 terminology) as output by FE2OSP, the 1058 Field Element to Octet String Conversion Primitive, has constant 1059 length for any given field; leading zeros found in this octet string 1060 MUST NOT be truncated. 1062 (Note that this use of the identity KDF is a technicality. The 1063 complete picture is that ECDH is employed with a non-trivial KDF 1064 because TLS does not directly use the premaster secret for anything 1065 other than for computing the master secret. In TLS 1.0 and 1.1, this 1066 means that the MD5- and SHA-1-based TLS PRF serves as a KDF; in TLS 1067 1.2 the KDF is determined by ciphersuite; it is conceivable that 1068 future TLS versions or new TLS extensions introduced in the future 1069 may vary this computation.) 1071 An ECDHE key exchange using X25519 (curve ecdh_x25519) goes as 1072 follows: Each party picks a secret key d uniformly at random and 1073 computes the corresponding public key x = X25519(d, G). Parties 1074 exchange their public keys, and compute a shared secret as x_S = 1075 X25519(d, x_peer). If either party obtains all-zeroes x_S, it MUST 1076 abort the handshake (as required by definition of X25519 and X448). 1077 ECDHE for X448 works similarily, replacing X25519 with X448, and 1078 ecdh_x25519 with ecdh_x448. The derived shared secret is used 1079 directly as the premaster secret, which is always exactly 32 bytes 1080 when ECDHE with X25519 is used and 56 bytes when ECDHE with X448 is 1081 used. 1083 All ECDSA computations MUST be performed according to ANSI X9.62 or 1084 its successors. Data to be signed/verified is hashed, and the result 1085 run directly through the ECDSA algorithm with no additional hashing. 1086 The default hash function is SHA-1 [FIPS.180-2], and sha_size (see 1087 Section 5.4 and Section 5.8) is 20. However, an alternative hash 1088 function, such as one of the new SHA hash functions specified in FIPS 1089 180-2 [FIPS.180-2], SHOULD be used instead. 1091 All EdDSA computations MUST be performed according to [RFC8032] or 1092 its succesors. Data to be signed/verified is run through the EdDSA 1093 algorithm wih no hashing (EdDSA will internally run the data through 1094 the PH function). The context parameter for Ed448 MUST be set to the 1095 empty string. 1097 RFC 4492 anticipated the standardization of a mechanism for 1098 specifying the required hash function in the certificate, perhaps in 1099 the parameters field of the subjectPublicKeyInfo. Such 1100 standardization never took place, and as a result, SHA-1 is used in 1101 TLS 1.1 and earlier (except for EdDSA, which uses identity function). 1102 TLS 1.2 added a SignatureAndHashAlgorithm parameter to the 1103 DigitallySigned struct, thus allowing agility in choosing the 1104 signature hash. EdDSA signatures MUST have HashAlgorithm of TBD5 1105 (Intrinsic). 1107 All RSA signatures must be generated and verified according to 1108 [PKCS1] block type 1. 1110 5.11. Public Key Validation 1112 With the NIST curves, each party must validate the public key sent by 1113 its peer. A receiving party MUST check that the x and y parameters 1114 from the peer's public value satisfy the curve equation, y^2 = x^3 + 1115 ax + b mod p. See section 2.3 of [Menezes] for details. Failing to 1116 do so allows attackers to gain information about the private key, to 1117 the point that they may recover the entire private key in a few 1118 requests, if that key is not really ephemeral. 1120 X25519 was designed in a way that the result of X25519(x, d) will 1121 never reveal information about d, provided it was chosen as 1122 prescribed, for any value of x (the same holds true for X448). 1124 All-zeroes output from X25519 or X448 MUST NOT be used for premaster 1125 secret (as required by definition of X25519 and X448). If the 1126 premaster secret would be all zeroes, the handshake MUST be aborted 1127 (most probably by sending a fatal alert). 1129 Let's define legitimate values of x as the values that can be 1130 obtained as x = X25519(G, d') for some d', and call the other values 1131 illegitimate. The definition of the X25519 function shows that 1132 legitimate values all share the following property: the high-order 1133 bit of the last byte is not set (for X448, any bit can be set). 1135 Since there are some implementation of the X25519 function that 1136 impose this restriction on their input and others that don't, 1137 implementations of X25519 in TLS SHOULD reject public keys when the 1138 high-order bit of the final byte is set (in other words, when the 1139 value of the rightmost byte is greater than 0x7F) in order to prevent 1140 implementation fingerprinting. Note that this deviates from RFC 7748 1141 which suggests that This value be masked. 1143 Ed25519 and Ed448 internally do public key validation as part of 1144 signature verification. 1146 Other than this recommended check, implementations do not need to 1147 ensure that the public keys they receive are legitimate: this is not 1148 necessary for security with X25519. 1150 6. Cipher Suites 1152 The table below defines new ECC cipher suites that use the key 1153 exchange algorithms specified in Section 2. 1155 +---------------------------------------+----------------+ 1156 | CipherSuite | Identifier | 1157 +---------------------------------------+----------------+ 1158 | TLS_ECDHE_ECDSA_WITH_NULL_SHA | { 0xC0, 0x06 } | 1159 | TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x08 } | 1160 | TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x09 } | 1161 | TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0A } | 1162 | | | 1163 | TLS_ECDHE_RSA_WITH_NULL_SHA | { 0xC0, 0x10 } | 1164 | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x12 } | 1165 | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x13 } | 1166 | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x14 } | 1167 | | | 1168 | TLS_ECDH_anon_WITH_NULL_SHA | { 0xC0, 0x15 } | 1169 | TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x17 } | 1170 | TLS_ECDH_anon_WITH_AES_128_CBC_SHA | { 0xC0, 0x18 } | 1171 | TLS_ECDH_anon_WITH_AES_256_CBC_SHA | { 0xC0, 0x19 } | 1172 +---------------------------------------+----------------+ 1174 Table 4: TLS ECC cipher suites 1176 The key exchange method, cipher, and hash algorithm for each of these 1177 cipher suites are easily determined by examining the name. Ciphers 1178 (other than AES ciphers) and hash algorithms are defined in [RFC2246] 1179 and [RFC4346]. AES ciphers are defined in [RFC5246]. 1181 Server implementations SHOULD support all of the following cipher 1182 suites, and client implementations SHOULD support at least one of 1183 them: 1185 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 1186 o TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 1187 o TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 1188 o TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 1190 7. Implementation Status 1192 Both ECDHE and ECDSA with the NIST curves are widely implemented, 1193 supported in all major browsers and all widely used TLS libraries. 1194 ECDHE with Curve25519 is by now implemented in several browsers and 1195 several TLS libraries including OpenSSL. Curve448 and EdDSA have 1196 working, interoperable implementations, but are not yet as widely 1197 deployed. 1199 8. 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 Another issue is the potential for catastrophic failures when a 1225 single elliptic curve is widely used. In this case, an attack on the 1226 elliptic curve might result in the compromise of a large number of 1227 keys. Again, this concern may need to be balanced against efficiency 1228 and interoperability improvements associated with widely-used curves. 1229 Substantial additional information on elliptic curve choice can be 1230 found in [IEEE.P1363.1998], [ANSI.X9-62.2005], and [FIPS.186-4]. 1232 The Introduction of [RFC8032] lists the security, performance, and 1233 operational advantages of EdDSA signatures over ECDSA signatures 1234 using the NIST curves. 1236 All of the key exchange algorithms defined in this document provide 1237 forward secrecy. Some of the deprecated key exchange algorithms do 1238 not. 1240 9. IANA Considerations 1242 [RFC4492], the predecessor of this document has already defined the 1243 IANA registries for the following: 1245 o Supported Groups Section 5.1 1246 o ECPointFormat Section 5.1 1247 o ECCurveType Section 5.4 1249 IANA is requested to prepend "TLS" to the names of the previous three 1250 registries. 1252 For each name space, this document defines the initial value 1253 assignments and defines a range of 256 values (NamedCurve) or eight 1254 values (ECPointFormat and ECCurveType) reserved for Private Use. The 1255 policy for any additional assignments is "Specification Required". 1256 The previous version of this document required IETF review. 1258 NOTE: IANA, please update the registries to reflect the new policy. 1260 NOTE: RFC editor please delete these two notes prior to publication. 1262 IANA, please update these two registries to refer to this document. 1264 IANA has already assigned the value 29 to ecdh_x25519, and the value 1265 30 to ecdh_x448. 1267 IANA is requested to assign two values from the TLS 1268 SignatureAlgorithm Registry with names ed25519(TBD3) and ed448(TBD4) 1269 with this document as reference. To keep compatibility with TLS 1.3, 1270 TBD3 should be 7, and TBD4 should be 8. 1272 IANA is requested to assign one value from the "TLS HashAlgorithm 1273 Registry" with name Intrinsic(TBD5) and this document as reference. 1275 To keep compatibility with TLS 1.3, TBD5 should be 8 and DTLS-OK 1276 should be set to true (Y). 1278 10. Acknowledgements 1280 Most of the text is this document is taken from [RFC4492], the 1281 predecessor of this document. The authors of that document were: 1283 o Simon Blake-Wilson 1284 o Nelson Bolyard 1285 o Vipul Gupta 1286 o Chris Hawk 1287 o Bodo Moeller 1289 In the predecessor document, the authors acknowledged the 1290 contributions of Bill Anderson and Tim Dierks. 1292 The author would like to thank Nikos Mavrogiannopoulos, Martin 1293 Thomson, and Tanja Lange for contributions to this document. 1295 11. Version History for This Draft 1297 NOTE TO RFC EDITOR: PLEASE REMOVE THIS SECTION 1299 Changes from draft-ietf-tls-rfc4492bis-03 to draft-nir-tls- 1300 rfc4492bis-05: 1302 o Add support for CFRG curves and signatures work. 1304 Changes from draft-ietf-tls-rfc4492bis-01 to draft-nir-tls- 1305 rfc4492bis-03: 1307 o Removed unused curves. 1308 o Removed unused point formats (all but uncompressed) 1310 Changes from draft-nir-tls-rfc4492bis-00 and draft-ietf-tls- 1311 rfc4492bis-00 to draft-nir-tls-rfc4492bis-01: 1313 o Merged errata 1314 o Removed ECDH_RSA and ECDH_ECDSA 1316 Changes from RFC 4492 to draft-nir-tls-rfc4492bis-00: 1318 o Added TLS 1.2 to references. 1319 o Moved RFC 4492 authors to acknowledgements. 1320 o Removed list of required reading for ECC. 1321 o Prepended "TLS" to the names of the three registries defined in 1322 the IANA Considerations section. 1324 12. References 1326 12.1. Normative References 1328 [ANSI.X9-62.2005] 1329 American National Standards Institute, "Public Key 1330 Cryptography for the Financial Services Industry, The 1331 Elliptic Curve Digital Signature Algorithm (ECDSA)", 1332 ANSI X9.62, 2005. 1334 [CCITT.X680] 1335 International Telephone and Telegraph Consultative 1336 Committee, "Abstract Syntax Notation One (ASN.1): 1337 Specification of basic notation", CCITT Recommendation 1338 X.680, July 2002. 1340 [CCITT.X690] 1341 International Telephone and Telegraph Consultative 1342 Committee, "ASN.1 encoding rules: Specification of basic 1343 encoding Rules (BER), Canonical encoding rules (CER) and 1344 Distinguished encoding rules (DER)", CCITT Recommendation 1345 X.690, July 2002. 1347 [FIPS.186-4] 1348 National Institute of Standards and Technology, "Digital 1349 Signature Standard", FIPS PUB 186-4, 2013, 1350 . 1353 [PKCS1] RSA Laboratories, "RSA Encryption Standard, Version 1.5", 1354 PKCS 1, November 1993. 1356 [PKIX-EdDSA] 1357 Josefsson, S. and J. Schaad, "Algorithm Identifiers for 1358 Ed25519, Ed25519ph, Ed448, Ed448ph, X25519 and X448 for 1359 use in the Internet X.509 Public Key Infrastructure", 1360 August 2016, . 1363 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1364 Requirement Levels", BCP 14, RFC 2119, March 1997. 1366 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1367 RFC 2246, January 1999. 1369 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 1370 Identifiers for the Internet X.509 Public Key 1371 Infrastructure Certificate and Certificate Revocation List 1372 (CRL) Profile", RFC 3279, April 2002. 1374 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1375 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 1377 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 1378 and T. Wright, "Transport Layer Security (TLS) 1379 Extensions", RFC 4366, April 2006. 1381 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1382 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1384 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1385 for Security", RFC 7748, January 2016. 1387 [RFC8032] Josefsson, S. and I. Liusvaara, "Edwards-Curve Digital 1388 Signature Algorithm (EdDSA)", RFC 8032, January 2017. 1390 [SECG-SEC2] 1391 CECG, "Recommended Elliptic Curve Domain Parameters", 1392 SEC 2, 2000. 1394 12.2. Informative References 1396 [FIPS.180-2] 1397 National Institute of Standards and Technology, "Secure 1398 Hash Standard", FIPS PUB 180-2, August 2002, 1399 . 1402 [I-D.ietf-tls-tls13] 1403 Rescorla, E., "The Transport Layer Security (TLS) Protocol 1404 Version 1.3", draft-ietf-tls-tls13-18 (work in progress), 1405 October 2016. 1407 [IEEE.P1363.1998] 1408 Institute of Electrical and Electronics Engineers, 1409 "Standard Specifications for Public Key Cryptography", 1410 IEEE Draft P1363, 1998. 1412 [Menezes] Menezes, A. and B. Ustaoglu, "On Reusing Ephemeral Keys In 1413 Diffie-Hellman Key Agreement Protocols", IACR Menezes2008, 1414 December 2008. 1416 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 1417 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 1418 for Transport Layer Security (TLS)", RFC 4492, May 2006. 1420 [RFC7919] Gillmor, D., "Negotiated Finite Field Diffie-Hellman 1421 Ephemeral Parameters for Transport Layer Security (TLS)", 1422 RFC 7919, DOI 10.17487/RFC7919, August 2016, 1423 . 1425 Appendix A. Equivalent Curves (Informative) 1427 All of the NIST curves [FIPS.186-4] and several of the ANSI curves 1428 [ANSI.X9-62.2005] are equivalent to curves listed in Section 5.1.1. 1429 In the following table, multiple names in one row represent aliases 1430 for the same curve. 1432 Curve names chosen by different standards organizations 1434 +-----------+------------+------------+ 1435 | SECG | ANSI X9.62 | NIST | 1436 +-----------+------------+------------+ 1437 | sect163k1 | | NIST K-163 | 1438 | sect163r1 | | | 1439 | sect163r2 | | NIST B-163 | 1440 | sect193r1 | | | 1441 | sect193r2 | | | 1442 | sect233k1 | | NIST K-233 | 1443 | sect233r1 | | NIST B-233 | 1444 | sect239k1 | | | 1445 | sect283k1 | | NIST K-283 | 1446 | sect283r1 | | NIST B-283 | 1447 | sect409k1 | | NIST K-409 | 1448 | sect409r1 | | NIST B-409 | 1449 | sect571k1 | | NIST K-571 | 1450 | sect571r1 | | NIST B-571 | 1451 | secp160k1 | | | 1452 | secp160r1 | | | 1453 | secp160r2 | | | 1454 | secp192k1 | | | 1455 | secp192r1 | prime192v1 | NIST P-192 | 1456 | secp224k1 | | | 1457 | secp224r1 | | NIST P-224 | 1458 | secp256k1 | | | 1459 | secp256r1 | prime256v1 | NIST P-256 | 1460 | secp384r1 | | NIST P-384 | 1461 | secp521r1 | | NIST P-521 | 1462 +-----------+------------+------------+ 1464 Table 5: Equivalent curves defined by SECG, ANSI, and NIST 1466 Appendix B. Differences from RFC 4492 1468 o Added TLS 1.2 1469 o Merged Errata 1470 o Removed the ECDH key exchange algorithms: ECDH_RSA and ECDH_ECDSA 1471 o Deprecated a bunch of ciphersuites: 1473 TLS_ECDH_ECDSA_WITH_NULL_SHA 1474 TLS_ECDH_ECDSA_WITH_RC4_128_SHA 1475 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 1476 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 1477 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 1478 TLS_ECDH_RSA_WITH_NULL_SHA 1479 TLS_ECDH_RSA_WITH_RC4_128_SHA 1480 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 1481 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 1482 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 1483 All the other RC4 ciphersuites 1485 Removed unused curves and all but the uncompressed point format. 1487 Added X25519 and X448. 1489 Deprecated explicit curves. 1491 Removed restriction on signature algorithm in certificate. 1493 Authors' Addresses 1495 Yoav Nir 1496 Check Point Software Technologies Ltd. 1497 5 Hasolelim st. 1498 Tel Aviv 6789735 1499 Israel 1501 Email: ynir.ietf@gmail.com 1503 Simon Josefsson 1504 SJD AB 1506 Email: simon@josefsson.org 1508 Manuel Pegourie-Gonnard 1509 Independent / PolarSSL 1511 Email: mpg@elzevir.fr