idnits 2.17.1 draft-ietf-tls-rfc4492bis-10.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 671 has weird spacing: '...rveType cur...' == Line 687 has weird spacing: '...ameters cur...' == Line 707 has weird spacing: '...HParams par...' == Line 802 has weird spacing: '...ionForm form;...' -- The document date (January 11, 2017) is 2661 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 180, but not defined ** Downref: Normative reference to an Informational draft: draft-irtf-cfrg-eddsa (ref. 'CFRG-EdDSA') -- Possible downref: Non-RFC (?) normative reference: ref. 'PKCS1' -- Possible downref: Non-RFC (?) normative reference: ref. 'PKIX-EdDSA' ** Obsolete normative reference: RFC 2246 (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 4346 (Obsoleted by RFC 5246) ** Obsolete normative reference: RFC 4366 (Obsoleted by RFC 5246, RFC 6066) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Downref: Normative reference to an Informational RFC: RFC 7748 -- Possible downref: Non-RFC (?) normative reference: ref. 'SECG-SEC2' == Outdated reference: 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 (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TLS Working Group Y. Nir 3 Internet-Draft Check Point 4 Obsoletes: 4492 (if approved) S. Josefsson 5 Intended status: Standards Track SJD AB 6 Expires: July 15, 2017 M. Pegourie-Gonnard 7 Independent / PolarSSL 8 January 11, 2017 10 Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer 11 Security (TLS) Versions 1.2 and Earlier 12 draft-ietf-tls-rfc4492bis-10 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 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 July 15, 2017. 40 Copyright Notice 42 Copyright (c) 2017 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 . . . . . . . . . . . . 3 59 2. Key Exchange Algorithm . . . . . . . . . . . . . . . . . . . 3 60 2.1. ECDHE_ECDSA . . . . . . . . . . . . . . . . . . . . . . . 5 61 2.2. ECDHE_RSA . . . . . . . . . . . . . . . . . . . . . . . . 5 62 2.3. ECDH_anon . . . . . . . . . . . . . . . . . . . . . . . . 5 63 3. Client Authentication . . . . . . . . . . . . . . . . . . . . 6 64 3.1. ECDSA_sign . . . . . . . . . . . . . . . . . . . . . . . 7 65 4. TLS Extensions for ECC . . . . . . . . . . . . . . . . . . . 7 66 5. Data Structures and Computations . . . . . . . . . . . . . . 8 67 5.1. Client Hello Extensions . . . . . . . . . . . . . . . . . 8 68 5.1.1. Supported Elliptic Curves Extension . . . . . . . . . 9 69 5.1.2. Supported Point Formats Extension . . . . . . . . . . 10 70 5.1.3. The signature_algorithms Extension and EdDSA . . . . 11 71 5.2. Server Hello Extension . . . . . . . . . . . . . . . . . 12 72 5.3. Server Certificate . . . . . . . . . . . . . . . . . . . 13 73 5.4. Server Key Exchange . . . . . . . . . . . . . . . . . . . 14 74 5.4.1. Uncompressed Point Format for NIST curves . . . . . . 17 75 5.5. Certificate Request . . . . . . . . . . . . . . . . . . . 18 76 5.6. Client Certificate . . . . . . . . . . . . . . . . . . . 19 77 5.7. Client Key Exchange . . . . . . . . . . . . . . . . . . . 20 78 5.8. Certificate Verify . . . . . . . . . . . . . . . . . . . 21 79 5.9. Elliptic Curve Certificates . . . . . . . . . . . . . . . 23 80 5.10. ECDH, ECDSA, and RSA Computations . . . . . . . . . . . . 23 81 5.11. Public Key Validation . . . . . . . . . . . . . . . . . . 24 82 6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . 25 83 7. Security Considerations . . . . . . . . . . . . . . . . . . . 26 84 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 85 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 27 86 10. Version History for This Draft . . . . . . . . . . . . . . . 28 87 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 28 88 11.1. Normative References . . . . . . . . . . . . . . . . . . 28 89 11.2. Informative References . . . . . . . . . . . . . . . . . 30 90 Appendix A. Equivalent Curves (Informative) . . . . . . . . . . 30 91 Appendix B. Differences from RFC 4492 . . . . . . . . . . . . . 31 92 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 94 1. Introduction 96 This document describes additions to TLS to support ECC, applicable 97 to TLS versions 1.0 [RFC2246], 1.1 [RFC4346], and 1.2 [RFC5246]. The 98 use of ECC in TLS 1.3 is defined in [I-D.ietf-tls-tls13], and is 99 explicitly out of scope for this document. In particular, this 100 document defines: 102 o the use of the Elliptic Curve Diffie-Hellman key agreement scheme 103 with ephemeral keys to establish the TLS premaster secret, and 104 o the use of ECDSA certificates for authentication of TLS peers. 106 The remainder of this document is organized as follows. Section 2 107 provides an overview of ECC-based key exchange algorithms for TLS. 108 Section 3 describes the use of ECC certificates for client 109 authentication. TLS extensions that allow a client to negotiate the 110 use of specific curves and point formats are presented in Section 4. 111 Section 5 specifies various data structures needed for an ECC-based 112 handshake, their encoding in TLS messages, and the processing of 113 those messages. Section 6 defines ECC-based cipher suites and 114 identifies a small subset of these as recommended for all 115 implementations of this specification. Section 7 discusses security 116 considerations. Section 8 describes IANA considerations for the name 117 spaces created by this document's predecessor. Section 9 gives 118 acknowledgements. Appendix B provides differences from [RFC4492], 119 the document that this one replaces. 121 Implementation of this specification requires familiarity with TLS, 122 TLS extensions [RFC4366], and ECC. 124 1.1. Conventions Used in This Document 126 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 127 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 128 document are to be interpreted as described in [RFC2119]. 130 2. Key Exchange Algorithm 132 This document defines three new ECC-based key exchange algorithms for 133 TLS. All of them use Ephemeral ECDH (ECDHE) to compute the TLS 134 premaster secret, and they differ only in the mechanism (if any) used 135 to authenticate them. The derivation of the TLS master secret from 136 the premaster secret and the subsequent generation of bulk 137 encryption/MAC keys and initialization vectors is independent of the 138 key exchange algorithm and not impacted by the introduction of ECC. 140 Table 1 summarizes the new key exchange algorithms. All of these key 141 exchange algorithms provide forward secrecy. 143 +-------------+------------------------------------------------+ 144 | Algorithm | Description | 145 +-------------+------------------------------------------------+ 146 | ECDHE_ECDSA | Ephemeral ECDH with ECDSA or EdDSA signatures. | 147 | ECDHE_RSA | Ephemeral ECDH with RSA signatures. | 148 | ECDH_anon | Anonymous ephemeral ECDH, no signatures. | 149 +-------------+------------------------------------------------+ 151 Table 1: ECC Key Exchange Algorithms 153 These key exchanges are analogous to DHE_DSS, DHE_RSA, and DH_anon, 154 respectively. 156 With ECDHE_RSA, a server can reuse its existing RSA certificate and 157 easily comply with a constrained client's elliptic curve preferences 158 (see Section 4). However, the computational cost incurred by a 159 server is higher for ECDHE_RSA than for the traditional RSA key 160 exchange, which does not provide forward secrecy. 162 The anonymous key exchange algorithm does not provide authentication 163 of the server or the client. Like other anonymous TLS key exchanges, 164 it is subject to man-in-the-middle attacks. Applications using TLS 165 with this algorithm SHOULD provide authentication by other means. 167 Client Server 168 ------ ------ 169 ClientHello --------> 170 ServerHello 171 Certificate* 172 ServerKeyExchange* 173 CertificateRequest*+ 174 <-------- ServerHelloDone 175 Certificate*+ 176 ClientKeyExchange 177 CertificateVerify*+ 178 [ChangeCipherSpec] 179 Finished --------> 180 [ChangeCipherSpec] 181 <-------- Finished 182 Application Data <-------> Application Data 183 * message is not sent under some conditions 184 + message is not sent unless client authentication 185 is desired 187 Figure 1: Message flow in a full TLS 1.2 handshake 189 Figure 1 shows all messages involved in the TLS key establishment 190 protocol (aka full handshake). The addition of ECC has direct impact 191 only on the ClientHello, the ServerHello, the server's Certificate 192 message, the ServerKeyExchange, the ClientKeyExchange, the 193 CertificateRequest, the client's Certificate message, and the 194 CertificateVerify. Next, we describe the ECC key exchange algorithm 195 in greater detail in terms of the content and processing of these 196 messages. For ease of exposition, we defer discussion of client 197 authentication and associated messages (identified with a + in 198 Figure 1) until Section 3 and of the optional ECC-specific extensions 199 (which impact the Hello messages) until Section 4. 201 2.1. ECDHE_ECDSA 203 In ECDHE_ECDSA, the server's certificate MUST contain an ECDSA- or 204 EdDSA-capable public key. 206 The server sends its ephemeral ECDH public key and a specification of 207 the corresponding curve in the ServerKeyExchange message. These 208 parameters MUST be signed with ECDSA or EdDSA using the private key 209 corresponding to the public key in the server's Certificate. 211 The client generates an ECDH key pair on the same curve as the 212 server's ephemeral ECDH key and sends its public key in the 213 ClientKeyExchange message. 215 Both client and server perform an ECDH operation Section 5.10 and use 216 the resultant shared secret as the premaster secret. 218 2.2. ECDHE_RSA 220 This key exchange algorithm is the same as ECDHE_ECDSA except that 221 the server's certificate MUST contain an RSA public key authorized 222 for signing, and that the signature in the ServerKeyExchange message 223 must be computed with the corresponding RSA private key. 225 2.3. ECDH_anon 227 NOTE: Despite the name beginning with "ECDH_" (no E), the key used in 228 ECDH_anon is ephemeral just like the key in ECDHE_RSA and 229 ECDHE_ECDSA. The naming follows the example of DH_anon, where the 230 key is also ephemeral but the name does not reflect it. 232 In ECDH_anon, the server's Certificate, the CertificateRequest, the 233 client's Certificate, and the CertificateVerify messages MUST NOT be 234 sent. 236 The server MUST send an ephemeral ECDH public key and a specification 237 of the corresponding curve in the ServerKeyExchange message. These 238 parameters MUST NOT be signed. 240 The client generates an ECDH key pair on the same curve as the 241 server's ephemeral ECDH key and sends its public key in the 242 ClientKeyExchange message. 244 Both client and server perform an ECDH operation and use the 245 resultant shared secret as the premaster secret. All ECDH 246 calculations are performed as specified in Section 5.10. 248 This specification does not impose restrictions on signature schemes 249 used anywhere in the certificate chain. The previous version of this 250 document required the signatures to match, but this restriction, 251 originating in previous TLS versions is lifted here as it had been in 252 RFC 5246. 254 3. Client Authentication 256 This document defines a client authentication mechanism, named after 257 the type of client certificate involved: ECDSA_sign. The ECDSA_sign 258 mechanism is usable with any of the non-anonymous ECC key exchange 259 algorithms described in Section 2 as well as other non-anonymous 260 (non-ECC) key exchange algorithms defined in TLS. 262 Note that client certificates with EdDSA public keys use this 263 mechanism. 265 The server can request ECC-based client authentication by including 266 this certificate type in its CertificateRequest message. The client 267 must check if it possesses a certificate appropriate for the method 268 suggested by the server and is willing to use it for authentication. 270 If these conditions are not met, the client should send a client 271 Certificate message containing no certificates. In this case, the 272 ClientKeyExchange should be sent as described in Section 2, and the 273 CertificateVerify should not be sent. If the server requires client 274 authentication, it may respond with a fatal handshake failure alert. 276 If the client has an appropriate certificate and is willing to use it 277 for authentication, it must send that certificate in the client's 278 Certificate message (as per Section 5.6) and prove possession of the 279 private key corresponding to the certified key. The process of 280 determining an appropriate certificate and proving possession is 281 different for each authentication mechanism and described below. 283 NOTE: It is permissible for a server to request (and the client to 284 send) a client certificate of a different type than the server 285 certificate. 287 3.1. ECDSA_sign 289 To use this authentication mechanism, the client MUST possess a 290 certificate containing an ECDSA- or EdDSA-capable public key. 292 The client proves possession of the private key corresponding to the 293 certified key by including a signature in the CertificateVerify 294 message as described in Section 5.8. 296 4. TLS Extensions for ECC 298 Two TLS extensions are defined in this specification: (i) the 299 Supported Elliptic Curves Extension, and (ii) the Supported Point 300 Formats Extension. These allow negotiating the use of specific 301 curves and point formats (e.g., compressed vs. uncompressed, 302 respectively) during a handshake starting a new session. These 303 extensions are especially relevant for constrained clients that may 304 only support a limited number of curves or point formats. They 305 follow the general approach outlined in [RFC4366]; message details 306 are specified in Section 5. The client enumerates the curves it 307 supports and the point formats it can parse by including the 308 appropriate extensions in its ClientHello message. The server 309 similarly enumerates the point formats it can parse by including an 310 extension in its ServerHello message. 312 A TLS client that proposes ECC cipher suites in its ClientHello 313 message SHOULD include these extensions. Servers implementing ECC 314 cipher suites MUST support these extensions, and when a client uses 315 these extensions, servers MUST NOT negotiate the use of an ECC cipher 316 suite unless they can complete the handshake while respecting the 317 choice of curves and compression techniques specified by the client. 318 This eliminates the possibility that a negotiated ECC handshake will 319 be subsequently aborted due to a client's inability to deal with the 320 server's EC key. 322 The client MUST NOT include these extensions in the ClientHello 323 message if it does not propose any ECC cipher suites. A client that 324 proposes ECC cipher suites may choose not to include these 325 extensions. In this case, the server is free to choose any one of 326 the elliptic curves or point formats listed in Section 5. That 327 section also describes the structure and processing of these 328 extensions in greater detail. 330 In the case of session resumption, the server simply ignores the 331 Supported Elliptic Curves Extension and the Supported Point Formats 332 Extension appearing in the current ClientHello message. These 333 extensions only play a role during handshakes negotiating a new 334 session. 336 5. Data Structures and Computations 338 This section specifies the data structures and computations used by 339 ECC-based key mechanisms specified in the previous three sections. 340 The presentation language used here is the same as that used in TLS. 341 Since this specification extends TLS, these descriptions should be 342 merged with those in the TLS specification and any others that extend 343 TLS. This means that enum types may not specify all possible values, 344 and structures with multiple formats chosen with a select() clause 345 may not indicate all possible cases. 347 5.1. Client Hello Extensions 349 This section specifies two TLS extensions that can be included with 350 the ClientHello message as described in [RFC4366], the Supported 351 Elliptic Curves Extension and the Supported Point Formats Extension. 353 When these extensions are sent: 355 The extensions SHOULD be sent along with any ClientHello message that 356 proposes ECC cipher suites. 358 Meaning of these extensions: 360 These extensions allow a client to enumerate the elliptic curves it 361 supports and/or the point formats it can parse. 363 Structure of these extensions: 365 The general structure of TLS extensions is described in [RFC4366], 366 and this specification adds two types to ExtensionType. 368 enum { 369 elliptic_curves(10), 370 ec_point_formats(11) 371 } ExtensionType; 373 o elliptic_curves (Supported Elliptic Curves Extension): Indicates 374 the set of elliptic curves supported by the client. For this 375 extension, the opaque extension_data field contains 376 EllipticCurveList. See Section 5.1.1 for details. 377 o ec_point_formats (Supported Point Formats Extension): Indicates 378 the set of point formats that the client can parse. For this 379 extension, the opaque extension_data field contains 380 ECPointFormatList. See Section 5.1.2 for details. 382 Actions of the sender: 384 A client that proposes ECC cipher suites in its ClientHello message 385 appends these extensions (along with any others), enumerating the 386 curves it supports and the point formats it can parse. Clients 387 SHOULD send both the Supported Elliptic Curves Extension and the 388 Supported Point Formats Extension. If the Supported Point Formats 389 Extension is indeed sent, it MUST contain the value 0 (uncompressed) 390 as one of the items in the list of point formats. 392 Actions of the receiver: 394 A server that receives a ClientHello containing one or both of these 395 extensions MUST use the client's enumerated capabilities to guide its 396 selection of an appropriate cipher suite. One of the proposed ECC 397 cipher suites must be negotiated only if the server can successfully 398 complete the handshake while using the curves and point formats 399 supported by the client (cf. Section 5.3 and Section 5.4). 401 NOTE: A server participating in an ECDHE_ECDSA key exchange may use 402 different curves for the ECDSA or EdDSA key in its certificate, and 403 for the ephemeral ECDH key in the ServerKeyExchange message. The 404 server MUST consider the extensions in both cases. 406 If a server does not understand the Supported Elliptic Curves 407 Extension, does not understand the Supported Point Formats Extension, 408 or is unable to complete the ECC handshake while restricting itself 409 to the enumerated curves and point formats, it MUST NOT negotiate the 410 use of an ECC cipher suite. Depending on what other cipher suites 411 are proposed by the client and supported by the server, this may 412 result in a fatal handshake failure alert due to the lack of common 413 cipher suites. 415 5.1.1. Supported Elliptic Curves Extension 417 RFC 4492 defined 25 different curves in the NamedCurve registry (now 418 renamed the "Supported Groups" registry, although the enumeration 419 below is still named NamedCurve) for use in TLS. Only three have 420 seen much use. This specification is deprecating the rest (with 421 numbers 1-22). This specification also deprecates the explicit 422 curves with identifiers 0xFF01 and 0xFF02. It also adds the new 423 curves defined in [RFC7748]. The end result is as follows: 425 enum { 426 deprecated(1..22), 427 secp256r1 (23), secp384r1 (24), secp521r1 (25), 428 ecdh_x25519(29), ecdh_x448(30), 429 reserved (0xFE00..0xFEFF), 430 deprecated(0xFF01..0xFF02), 431 (0xFFFF) 432 } NamedCurve; 434 Note that other specifications have since added other values to this 435 enumeration. 437 secp256r1, etc: Indicates support of the corresponding named curve or 438 class of explicitly defined curves. The named curves secp256r1, 439 secp384r1, and secp521r1 are specified in SEC 2 [SECG-SEC2]. These 440 curves are also recommended in ANSI X9.62 [ANSI.X9-62.2005] and FIPS 441 186-4 [FIPS.186-4]. The rest of this document refers to these three 442 curves as the "NIST curves" because they were originally standardized 443 by the National Institute of Standards and Technology. The curves 444 ecdh_x25519 and ecdh_x448 are defined in [RFC7748]. Values 0xFE00 445 through 0xFEFF are reserved for private use. 447 The NamedCurve name space is maintained by IANA. See Section 8 for 448 information on how new value assignments are added. 450 struct { 451 NamedCurve elliptic_curve_list<2..2^16-1> 452 } EllipticCurveList; 454 Items in elliptic_curve_list are ordered according to the client's 455 preferences (favorite choice first). 457 As an example, a client that only supports secp256r1 (aka NIST P-256; 458 value 23 = 0x0017) and secp384r1 (aka NIST P-384; value 24 = 0x0018) 459 and prefers to use secp256r1 would include a TLS extension consisting 460 of the following octets. Note that the first two octets indicate the 461 extension type (Supported Elliptic Curves Extension): 463 00 0A 00 06 00 04 00 17 00 18 465 5.1.2. Supported Point Formats Extension 466 enum { 467 uncompressed (0), 468 deprecated (1..2), 469 reserved (248..255) 470 } ECPointFormat; 471 struct { 472 ECPointFormat ec_point_format_list<1..2^8-1> 473 } ECPointFormatList; 475 Three point formats were included in the definition of ECPointFormat 476 above. This specification deprecates all but the uncompressed point 477 format. Implementations of this document MUST support the 478 uncompressed format for all of their supported curves, and MUST NOT 479 support other formats for curves defined in this specification. For 480 backwards compatibility purposes, the point format list extension 481 MUST still be included, and contain exactly one value: the 482 uncompressed point format (0). 484 The ECPointFormat name space is maintained by IANA. See Section 8 485 for information on how new value assignments are added. 487 Items in ec_point_format_list are ordered according to the client's 488 preferences (favorite choice first). 490 A client compliant with this specification that supports no other 491 curves MUST send the following octets; note that the first two octets 492 indicate the extension type (Supported Point Formats Extension): 494 00 0B 00 02 01 00 496 5.1.3. The signature_algorithms Extension and EdDSA 498 The signature_algorithms extension, defined in section 7.4.1.4.1 of 499 [RFC5246], advertises the combinations of signature algorithm and 500 hash function that the client supports. The pure (non pre-hashed) 501 forms of EdDSA do not hash the data before signing it. For this 502 reason it does not make sense to combine them with a signature 503 algorithm in the extension. 505 For bits-on-the-wire compatibility with TLS 1.3, we define a new 506 dummy value in the HashAlgorithm registry which we will call 507 "Intrinsic" (value TBD5) meaning that hashing is intrinsic to the 508 signature algorithm. 510 To represent ed25519 and ed448 in the signature_algorithms extension, 511 the value shall be (TBD5,TBD3) and (TBD5,TBD4) respectively. 513 5.2. Server Hello Extension 515 This section specifies a TLS extension that can be included with the 516 ServerHello message as described in [RFC4366], the Supported Point 517 Formats Extension. 519 When this extension is sent: 521 The Supported Point Formats Extension is included in a ServerHello 522 message in response to a ClientHello message containing the Supported 523 Point Formats Extension when negotiating an ECC cipher suite. 525 Meaning of this extension: 527 This extension allows a server to enumerate the point formats it can 528 parse (for the curve that will appear in its ServerKeyExchange 529 message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key 530 exchange algorithm. 532 Structure of this extension: 534 The server's Supported Point Formats Extension has the same structure 535 as the client's Supported Point Formats Extension (see 536 Section 5.1.2). Items in ec_point_format_list here are ordered 537 according to the server's preference (favorite choice first). Note 538 that the server may include items that were not found in the client's 539 list (e.g., the server may prefer to receive points in compressed 540 format even when a client cannot parse this format: the same client 541 may nevertheless be capable of outputting points in compressed 542 format). 544 Actions of the sender: 546 A server that selects an ECC cipher suite in response to a 547 ClientHello message including a Supported Point Formats Extension 548 appends this extension (along with others) to its ServerHello 549 message, enumerating the point formats it can parse. The Supported 550 Point Formats Extension, when used, MUST contain the value 0 551 (uncompressed) as one of the items in the list of point formats. 553 Actions of the receiver: 555 A client that receives a ServerHello message containing a Supported 556 Point Formats Extension MUST respect the server's choice of point 557 formats during the handshake (cf. Section 5.6 and Section 5.7). If 558 no Supported Point Formats Extension is received with the 559 ServerHello, this is equivalent to an extension allowing only the 560 uncompressed point format. 562 5.3. Server Certificate 564 When this message is sent: 566 This message is sent in all non-anonymous ECC-based key exchange 567 algorithms. 569 Meaning of this message: 571 This message is used to authentically convey the server's static 572 public key to the client. The following table shows the server 573 certificate type appropriate for each key exchange algorithm. ECC 574 public keys MUST be encoded in certificates as described in 575 Section 5.9. 577 NOTE: The server's Certificate message is capable of carrying a chain 578 of certificates. The restrictions mentioned in Table 3 apply only to 579 the server's certificate (first in the chain). 581 +-------------+-----------------------------------------------------+ 582 | Algorithm | Server Certificate Type | 583 +-------------+-----------------------------------------------------+ 584 | ECDHE_ECDSA | Certificate MUST contain an ECDSA- or EdDSA-capable | 585 | | public key. | 586 | ECDHE_RSA | Certificate MUST contain an RSA public key | 587 | | authorized for use in digital signatures. | 588 +-------------+-----------------------------------------------------+ 590 Table 2: Server Certificate Types 592 Structure of this message: 594 Identical to the TLS Certificate format. 596 Actions of the sender: 598 The server constructs an appropriate certificate chain and conveys it 599 to the client in the Certificate message. If the client has used a 600 Supported Elliptic Curves Extension, the public key in the server's 601 certificate MUST respect the client's choice of elliptic curves; in 602 particular, the public key MUST employ a named curve (not the same 603 curve as an explicit curve) unless the client has indicated support 604 for explicit curves of the appropriate type. If the client has used 605 a Supported Point Formats Extension, both the server's public key 606 point and (in the case of an explicit curve) the curve's base point 607 MUST respect the client's choice of point formats. (A server that 608 cannot satisfy these requirements MUST NOT choose an ECC cipher suite 609 in its ServerHello message.) 610 Actions of the receiver: 612 The client validates the certificate chain, extracts the server's 613 public key, and checks that the key type is appropriate for the 614 negotiated key exchange algorithm. (A possible reason for a fatal 615 handshake failure is that the client's capabilities for handling 616 elliptic curves and point formats are exceeded; cf. Section 5.1.) 618 5.4. Server Key Exchange 620 When this message is sent: 622 This message is sent when using the ECDHE_ECDSA, ECDHE_RSA, and 623 ECDH_anon key exchange algorithms. 625 Meaning of this message: 627 This message is used to convey the server's ephemeral ECDH public key 628 (and the corresponding elliptic curve domain parameters) to the 629 client. 631 The ECCCurveType enum used to have values for explicit prime and for 632 explicit char2 curves. Those values are now deprecated, so only one 633 value remains: 635 Structure of this message: 637 enum { 638 deprecated (1..2), 639 named_curve (3), 640 reserved(248..255) 641 } ECCurveType; 643 The value named_curve indicates that a named curve is used. This 644 option SHOULD be used when applicable. 646 Values 248 through 255 are reserved for private use. 648 The ECCurveType name space is maintained by IANA. See Section 8 for 649 information on how new value assignments are added. 651 RFC 4492 had a specification for an ECCurve structure and an 652 ECBasisType structure. Both of these are omitted now because they 653 were only used with the now deprecated explicit curves. 655 struct { 656 opaque point <1..2^8-1>; 657 } ECPoint; 659 point: This is the byte string representation of an elliptic curve 660 point following the conversion routine in Section 4.3.6 of 661 [ANSI.X9-62.2005]. This byte string may represent an elliptic curve 662 point in uncompressed, compressed, or hybrid format, but this 663 specification deprecates all but the uncompressed format. For the 664 NIST curves, the format is repeated in Section 5.4.1 for convenience. 665 For the X25519 and X448 curves, the only valid representation is the 666 one specified in [RFC7748] - a 32- or 56-octet representation of the 667 u value of the point. This structure MUST NOT be used with Ed25519 668 and Ed448 public keys. 670 struct { 671 ECCurveType curve_type; 672 select (curve_type) { 673 case named_curve: 674 NamedCurve namedcurve; 675 }; 676 } ECParameters; 678 curve_type: This identifies the type of the elliptic curve domain 679 parameters. 681 namedCurve: Specifies a recommended set of elliptic curve domain 682 parameters. All those values of NamedCurve are allowed that refer to 683 a curve capable of Diffie-Hellman. With the deprecation of the 684 explicit curves, this now includes all of the NamedCurve values. 686 struct { 687 ECParameters curve_params; 688 ECPoint public; 689 } ServerECDHParams; 691 curve_params: Specifies the elliptic curve domain parameters 692 associated with the ECDH public key. 694 public: The ephemeral ECDH public key. 696 The ServerKeyExchange message is extended as follows. 698 enum { 699 ec_diffie_hellman 700 } KeyExchangeAlgorithm; 702 o ec_diffie_hellman: Indicates the ServerKeyExchange message 703 contains an ECDH public key. 705 select (KeyExchangeAlgorithm) { 706 case ec_diffie_hellman: 707 ServerECDHParams params; 708 Signature signed_params; 709 } ServerKeyExchange; 711 o params: Specifies the ECDH public key and associated domain 712 parameters. 713 o signed_params: A hash of the params, with the signature 714 appropriate to that hash applied. The private key corresponding 715 to the certified public key in the server's Certificate message is 716 used for signing. 718 enum { 719 ecdsa(3), 720 ed25519(TBD3) 721 ed448(TBD4) 722 } SignatureAlgorithm; 723 select (SignatureAlgorithm) { 724 case ecdsa: 725 digitally-signed struct { 726 opaque sha_hash[sha_size]; 727 }; 728 case ed25519,ed448: 729 digitally-signed struct { 730 opaque rawdata[rawdata_size]; 731 }; 732 } Signature; 733 ServerKeyExchange.signed_params.sha_hash 734 SHA(ClientHello.random + ServerHello.random + 735 ServerKeyExchange.params); 736 ServerKeyExchange.signed_params.rawdata 737 ClientHello.random + ServerHello.random + 738 ServerKeyExchange.params; 740 NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange 741 algorithm and "anonymous" for ECDH_anon. These cases are defined in 742 TLS. SignatureAlgorithm is "ecdsa" or "eddsa" for ECDHE_ECDSA. 743 ECDSA signatures are generated and verified as described in 744 Section 5.10, and SHA in the above template for sha_hash accordingly 745 may denote a hash algorithm other than SHA-1. As per ANSI X9.62, an 746 ECDSA signature consists of a pair of integers, r and s. The 747 digitally-signed element is encoded as an opaque vector <0..2^16-1>, 748 the contents of which are the DER encoding corresponding to the 749 following ASN.1 notation. 751 Ecdsa-Sig-Value ::= SEQUENCE { 752 r INTEGER, 753 s INTEGER 754 } 756 EdDSA signatures in both the protocol and in certificates that 757 conform to [PKIX-EdDSA] are generated and verified according to 758 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 759 vector<0..2^16-1>, the contents of which is the octet string output 760 of the EdDSA signing algorithm. 762 Actions of the sender: 764 The server selects elliptic curve domain parameters and an ephemeral 765 ECDH public key corresponding to these parameters according to the 766 ECKAS-DH1 scheme from IEEE 1363 [IEEE.P1363.1998]. It conveys this 767 information to the client in the ServerKeyExchange message using the 768 format defined above. 770 Actions of the receiver: 772 The client verifies the signature (when present) and retrieves the 773 server's elliptic curve domain parameters and ephemeral ECDH public 774 key from the ServerKeyExchange message. (A possible reason for a 775 fatal handshake failure is that the client's capabilities for 776 handling elliptic curves and point formats are exceeded; cf. 777 Section 5.1.) 779 5.4.1. Uncompressed Point Format for NIST curves 781 The following represents the wire format for representing ECPoint in 782 ServerKeyExchange records. The first octet of the representation 783 indicates the form, which may be compressed, uncompressed, or hybrid. 784 This specification supports only the uncompressed format for these 785 curves. This is followed by the binary representation of the X value 786 in "big-endian" or "network" format, followed by the binary 787 representation of the Y value in "big-endian" or "network" format. 788 There are no internal length markers, so each number representation 789 occupies as many octets as implied by the curve parameters. For 790 P-256 this means that each of X and Y use 32 octets, padded on the 791 left by zeros if necessary. For P-384 they take 48 octets each, and 792 for P-521 they take 66 octets each. 794 Here's a more formal representation: 796 enum { 797 uncompressed(4), 798 (255) 799 } PointConversionForm; 801 struct { 802 PointConversionForm form; 803 opaque X[coordinate_length]; 804 opaque Y[coordinate_length]; 805 } UncompressedPointRepresentation; 807 5.5. Certificate Request 809 When this message is sent: 811 This message is sent when requesting client authentication. 813 Meaning of this message: 815 The server uses this message to suggest acceptable client 816 authentication methods. 818 Structure of this message: 820 The TLS CertificateRequest message is extended as follows. 822 enum { 823 ecdsa_sign(64), 824 rsa_fixed_ecdh(65), 825 ecdsa_fixed_ecdh(66), 826 (255) 827 } ClientCertificateType; 829 o ecdsa_sign, etc.: Indicates that the server would like to use the 830 corresponding client authentication method specified in Section 3. 832 Actions of the sender: 834 The server decides which client authentication methods it would like 835 to use, and conveys this information to the client using the format 836 defined above. 838 Actions of the receiver: 840 The client determines whether it has a suitable certificate for use 841 with any of the requested methods and whether to proceed with client 842 authentication. 844 5.6. Client Certificate 846 When this message is sent: 848 This message is sent in response to a CertificateRequest when a 849 client has a suitable certificate and has decided to proceed with 850 client authentication. (Note that if the server has used a Supported 851 Point Formats Extension, a certificate can only be considered 852 suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and 853 ECDSA_fixed_ECDH authentication methods if the public key point 854 specified in it respects the server's choice of point formats. If no 855 Supported Point Formats Extension has been used, a certificate can 856 only be considered suitable for use with these authentication methods 857 if the point is represented in uncompressed point format.) 859 Meaning of this message: 861 This message is used to authentically convey the client's static 862 public key to the server. The following table summarizes what client 863 certificate types are appropriate for the ECC-based client 864 authentication mechanisms described in Section 3. ECC public keys 865 must be encoded in certificates as described in Section 5.9. 867 NOTE: The client's Certificate message is capable of carrying a chain 868 of certificates. The restrictions mentioned in Table 4 apply only to 869 the client's certificate (first in the chain). 871 +------------------+------------------------------------------------+ 872 | Client | Client Certificate Type | 873 | Authentication | | 874 | Method | | 875 +------------------+------------------------------------------------+ 876 | ECDSA_sign | Certificate MUST contain an ECDSA- or EdDSA- | 877 | | capable public key. | 878 | ECDSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 879 | | public key on the same elliptic curve as the | 880 | | server's long-term ECDH key. | 881 | RSA_fixed_ECDH | The same as ECDSA_fixed_ECDH. The codepoints | 882 | | meant different things, but due to changes in | 883 | | TLS 1.2, both mean the same thing now. | 884 +------------------+------------------------------------------------+ 886 Table 3: Client Certificate Types 888 Structure of this message: 890 Identical to the TLS client Certificate format. 892 Actions of the sender: 894 The client constructs an appropriate certificate chain, and conveys 895 it to the server in the Certificate message. 897 Actions of the receiver: 899 The TLS server validates the certificate chain, extracts the client's 900 public key, and checks that the key type is appropriate for the 901 client authentication method. 903 5.7. Client Key Exchange 905 When this message is sent: 907 This message is sent in all key exchange algorithms. If client 908 authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this 909 message is empty. Otherwise, it contains the client's ephemeral ECDH 910 public key. 912 Meaning of the message: 914 This message is used to convey ephemeral data relating to the key 915 exchange belonging to the client (such as its ephemeral ECDH public 916 key). 918 Structure of this message: 920 The TLS ClientKeyExchange message is extended as follows. 922 enum { 923 implicit, 924 explicit 925 } PublicValueEncoding; 927 o implicit, explicit: For ECC cipher suites, this indicates whether 928 the client's ECDH public key is in the client's certificate 929 ("implicit") or is provided, as an ephemeral ECDH public key, in 930 the ClientKeyExchange message ("explicit"). (This is "explicit" 931 in ECC cipher suites except when the client uses the 932 ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication 933 mechanism.) 934 struct { 935 select (PublicValueEncoding) { 936 case implicit: struct { }; 937 case explicit: ECPoint ecdh_Yc; 938 } ecdh_public; 939 } ClientECDiffieHellmanPublic; 940 o ecdh_Yc: Contains the client's ephemeral ECDH public key as a byte 941 string ECPoint.point, which may represent an elliptic curve point 942 in uncompressed or compressed format. Curves eddsa_ed25519 and 943 eddsa_ed448 MUST NOT be used here. Here, the format MUST conform 944 to what the server has requested through a Supported Point Formats 945 Extension if this extension was used, and MUST be uncompressed if 946 this extension was not used. 948 struct { 949 select (KeyExchangeAlgorithm) { 950 case ec_diffie_hellman: ClientECDiffieHellmanPublic; 951 } exchange_keys; 952 } ClientKeyExchange; 954 Actions of the sender: 956 The client selects an ephemeral ECDH public key corresponding to the 957 parameters it received from the server according to the ECKAS-DH1 958 scheme from IEEE 1363. It conveys this information to the client in 959 the ClientKeyExchange message using the format defined above. 961 Actions of the receiver: 963 The server retrieves the client's ephemeral ECDH public key from the 964 ClientKeyExchange message and checks that it is on the same elliptic 965 curve as the server's ECDH key. 967 5.8. Certificate Verify 969 When this message is sent: 971 This message is sent when the client sends a client certificate 972 containing a public key usable for digital signatures, e.g., when the 973 client is authenticated using the ECDSA_sign mechanism. 975 Meaning of the message: 977 This message contains a signature that proves possession of the 978 private key corresponding to the public key in the client's 979 Certificate message. 981 Structure of this message: 983 The TLS CertificateVerify message and the underlying Signature type 984 are defined in the TLS base specifications, and the latter is 985 extended here in Section 5.4. For the ecdsa and eddsa cases, the 986 signature field in the CertificateVerify message contains an ECDSA or 987 EdDSA (respectively) signature computed over handshake messages 988 exchanged so far, exactly similar to CertificateVerify with other 989 signing algorithms: 991 CertificateVerify.signature.sha_hash 992 SHA(handshake_messages); 993 CertificateVerify.signature.rawdata 994 handshake_messages; 996 ECDSA signatures are computed as described in Section 5.10, and SHA 997 in the above template for sha_hash accordingly may denote a hash 998 algorithm other than SHA-1. As per ANSI X9.62, an ECDSA signature 999 consists of a pair of integers, r and s. The digitally-signed 1000 element is encoded as an opaque vector <0..2^16-1>, the contents of 1001 which are the DER encoding [CCITT.X690] corresponding to the 1002 following ASN.1 notation [CCITT.X680]. 1004 Ecdsa-Sig-Value ::= SEQUENCE { 1005 r INTEGER, 1006 s INTEGER 1007 } 1009 EdDSA signatures are generated and verified according to 1010 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 1011 vector<0..2^16-1>, the contents of which is the octet string output 1012 of the EdDSA signing algorithm. 1014 Actions of the sender: 1016 The client computes its signature over all handshake messages sent or 1017 received starting at client hello and up to but not including this 1018 message. It uses the private key corresponding to its certified 1019 public key to compute the signature, which is conveyed in the format 1020 defined above. 1022 Actions of the receiver: 1024 The server extracts the client's signature from the CertificateVerify 1025 message, and verifies the signature using the public key it received 1026 in the client's Certificate message. 1028 5.9. Elliptic Curve Certificates 1030 X.509 certificates containing ECC public keys or signed using ECDSA 1031 MUST comply with [RFC3279] or another RFC that replaces or extends 1032 it. X.509 certificates containing ECC public keys or signed using 1033 EdDSA MUST comply with [PKIX-EdDSA]. Clients SHOULD use the elliptic 1034 curve domain parameters recommended in ANSI X9.62, FIPS 186-4, and 1035 SEC 2 [SECG-SEC2] or in [CFRG-EdDSA]. 1037 EdDSA keys using Ed25519 and Ed25519ph algorithms MUST use the 1038 eddsa_ed25519 curve, and Ed448 and Ed448ph keys MUST use the 1039 eddsa_ed448 curve. Curves ecdh_x25519, ecdh_x448, eddsa_ed25519 and 1040 eddsa_ed448 MUST NOT be used for ECDSA. 1042 5.10. ECDH, ECDSA, and RSA Computations 1044 All ECDH calculations for the NIST curves (including parameter and 1045 key generation as well as the shared secret calculation) are 1046 performed according to [IEEE.P1363.1998] using the ECKAS-DH1 scheme 1047 with the identity map as key derivation function (KDF), so that the 1048 premaster secret is the x-coordinate of the ECDH shared secret 1049 elliptic curve point represented as an octet string. Note that this 1050 octet string (Z in IEEE 1363 terminology) as output by FE2OSP, the 1051 Field Element to Octet String Conversion Primitive, has constant 1052 length for any given field; leading zeros found in this octet string 1053 MUST NOT be truncated. 1055 (Note that this use of the identity KDF is a technicality. The 1056 complete picture is that ECDH is employed with a non-trivial KDF 1057 because TLS does not directly use the premaster secret for anything 1058 other than for computing the master secret. In TLS 1.0 and 1.1, this 1059 means that the MD5- and SHA-1-based TLS PRF serves as a KDF; in TLS 1060 1.2 the KDF is determined by ciphersuite; it is conceivable that 1061 future TLS versions or new TLS extensions introduced in the future 1062 may vary this computation.) 1064 An ECDHE key exchange using X25519 (curve ecdh_x25519) goes as 1065 follows: Each party picks a secret key d uniformly at random and 1066 computes the corresponding public key x = X25519(d, G). Parties 1067 exchange their public keys, and compute a shared secret as x_S = 1068 X25519(d, x_peer). If either party obtains all-zeroes x_S, it MUST 1069 abort the handshake (as required by definition of X25519 and X448). 1070 ECDHE for X448 works similarily, replacing X25519 with X448, and 1071 ecdh_x25519 with ecdh_x448. The derived shared secret is used 1072 directly as the premaster secret, which is always exactly 32 bytes 1073 when ECDHE with X25519 is used and 56 bytes when ECDHE with X448 is 1074 used. 1076 All ECDSA computations MUST be performed according to ANSI X9.62 or 1077 its successors. Data to be signed/verified is hashed, and the result 1078 run directly through the ECDSA algorithm with no additional hashing. 1079 The default hash function is SHA-1 [FIPS.180-2], and sha_size (see 1080 Section 5.4 and Section 5.8) is 20. However, an alternative hash 1081 function, such as one of the new SHA hash functions specified in FIPS 1082 180-2 [FIPS.180-2], SHOULD be used instead. 1084 All EdDSA computations MUST be performed according to [CFRG-EdDSA] or 1085 its succesors. Data to be signed/verified is run through the EdDSA 1086 algorithm wih no hashing (EdDSA will internally run the data through 1087 the PH function). 1089 RFC 4492 anticipated the standardization of a mechanism for 1090 specifying the required hash function in the certificate, perhaps in 1091 the parameters field of the subjectPublicKeyInfo. Such 1092 standardization never took place, and as a result, SHA-1 is used in 1093 TLS 1.1 and earlier (except for EdDSA, which uses identity function). 1094 TLS 1.2 added a SignatureAndHashAlgorithm parameter to the 1095 DigitallySigned struct, thus allowing agility in choosing the 1096 signature hash. EdDSA signatures MUST have HashAlgorithm of 0 1097 (None). 1099 All RSA signatures must be generated and verified according to 1100 [PKCS1] block type 1. 1102 5.11. Public Key Validation 1104 With the NIST curves, each party must validate the public key sent by 1105 its peer. A receiving party MUST check that the x and y parameters 1106 from the peer's public value satisfy the curve equation, y^2 = x^3 + 1107 ax + b mod p. See section 2.3 of [Menezes] for details. Failing to 1108 do so allows attackers to gain information about the private key, to 1109 the point that they may recover the entire private key in a few 1110 requests, if that key is not really ephemeral. 1112 X25519 was designed in a way that the result of X25519(x, d) will 1113 never reveal information about d, provided it was chosen as 1114 prescribed, for any value of x (the same holds true for X448). 1116 All-zeroes output from X25519 or X448 MUST NOT be used for premaster 1117 secret (as required by definition of X25519 and X448). If the 1118 premaster secret would be all zeroes, the handshake MUST be aborted 1119 (most probably by sending a fatal alert). 1121 Let's define legitimate values of x as the values that can be 1122 obtained as x = X25519(G, d') for some d', and call the other values 1123 illegitimate. The definition of the X25519 function shows that 1124 legitimate values all share the following property: the high-order 1125 bit of the last byte is not set (for X448, any bit can be set). 1127 Since there are some implementation of the X25519 function that 1128 impose this restriction on their input and others that don't, 1129 implementations of X25519 in TLS SHOULD reject public keys when the 1130 high-order bit of the final byte is set (in other words, when the 1131 value of the rightmost byte is greater than 0x7F) in order to prevent 1132 implementation fingerprinting. Note that this deviates from RFC 7748 1133 which suggests that This value be masked. 1135 Ed25519 and Ed448 internally do public key validation as part of 1136 signature verification. 1138 Other than this recommended check, implementations do not need to 1139 ensure that the public keys they receive are legitimate: this is not 1140 necessary for security with X25519. 1142 6. Cipher Suites 1144 The table below defines new ECC cipher suites that use the key 1145 exchange algorithms specified in Section 2. 1147 +---------------------------------------+----------------+ 1148 | CipherSuite | Identifier | 1149 +---------------------------------------+----------------+ 1150 | TLS_ECDHE_ECDSA_WITH_NULL_SHA | { 0xC0, 0x06 } | 1151 | TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x08 } | 1152 | TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x09 } | 1153 | TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0A } | 1154 | | | 1155 | TLS_ECDHE_RSA_WITH_NULL_SHA | { 0xC0, 0x10 } | 1156 | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x12 } | 1157 | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x13 } | 1158 | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x14 } | 1159 | | | 1160 | TLS_ECDH_anon_WITH_NULL_SHA | { 0xC0, 0x15 } | 1161 | TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x17 } | 1162 | TLS_ECDH_anon_WITH_AES_128_CBC_SHA | { 0xC0, 0x18 } | 1163 | TLS_ECDH_anon_WITH_AES_256_CBC_SHA | { 0xC0, 0x19 } | 1164 +---------------------------------------+----------------+ 1166 Table 4: TLS ECC cipher suites 1168 The key exchange method, cipher, and hash algorithm for each of these 1169 cipher suites are easily determined by examining the name. Ciphers 1170 (other than AES ciphers) and hash algorithms are defined in [RFC2246] 1171 and [RFC4346]. AES ciphers are defined in [RFC5246]. 1173 Server implementations SHOULD support all of the following cipher 1174 suites, and client implementations SHOULD support at least one of 1175 them: 1177 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 1178 o TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 1179 o TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 1180 o TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 1182 7. Security Considerations 1184 Security issues are discussed throughout this memo. 1186 For TLS handshakes using ECC cipher suites, the security 1187 considerations in appendices D of all three TLS base documemts apply 1188 accordingly. 1190 Security discussions specific to ECC can be found in 1191 [IEEE.P1363.1998] and [ANSI.X9-62.2005]. One important issue that 1192 implementers and users must consider is elliptic curve selection. 1193 Guidance on selecting an appropriate elliptic curve size is given in 1194 Table 1. Security considerations specific to X25519 and X448 are 1195 discussed in section 7 of [RFC7748]. 1197 Beyond elliptic curve size, the main issue is elliptic curve 1198 structure. As a general principle, it is more conservative to use 1199 elliptic curves with as little algebraic structure as possible. 1200 Thus, random curves are more conservative than special curves such as 1201 Koblitz curves, and curves over F_p with p random are more 1202 conservative than curves over F_p with p of a special form, and 1203 curves over F_p with p random are considered more conservative than 1204 curves over F_2^m as there is no choice between multiple fields of 1205 similar size for characteristic 2. 1207 NEED TO ADD A PARAGRAPH HERE ABOUT WHY X25519/X448 ARE PREFERRABLE TO 1208 NIST CURVES. 1210 Another issue is the potential for catastrophic failures when a 1211 single elliptic curve is widely used. In this case, an attack on the 1212 elliptic curve might result in the compromise of a large number of 1213 keys. Again, this concern may need to be balanced against efficiency 1214 and interoperability improvements associated with widely-used curves. 1215 Substantial additional information on elliptic curve choice can be 1216 found in [IEEE.P1363.1998], [ANSI.X9-62.2005], and [FIPS.186-4]. 1218 All of the key exchange algorithms defined in this document provide 1219 forward secrecy. Some of the deprecated key exchange algorithms do 1220 not. 1222 8. IANA Considerations 1224 [RFC4492], the predecessor of this document has already defined the 1225 IANA registries for the following: 1227 o Supported Groups Section 5.1 1228 o ECPointFormat Section 5.1 1229 o ECCurveType Section 5.4 1231 For each name space, this document defines the initial value 1232 assignments and defines a range of 256 values (NamedCurve) or eight 1233 values (ECPointFormat and ECCurveType) reserved for Private Use. The 1234 policy for any additional assignments is "Specification Required". 1235 The previous version of this document required IETF review. 1237 NOTE: IANA, please update the registries to reflect the new policy. 1239 NOTE: RFC editor please delete these two notes prior to publication. 1241 IANA, please update these two registries to refer to this document. 1243 IANA has already assigned the value 29 to ecdh_x25519, and the value 1244 30 to ecdh_x448. 1246 IANA is requested to assign two values from the NamedCurve registry 1247 with names ed25519(TBD3) and ed448(TBD4) with this document as 1248 reference. To keep compatibility with TLS 1.3, TBD3 should be 0x07, 1249 and TBD4 should be 0x08. 1251 IANA is requested to assign one value from the "TLS HashAlgorithm 1252 Registry" with name Intrinsic(TBD5) and this document as reference. 1253 To keep compatibility with TLS 1.3, TBD5 should be 0x08. 1255 9. Acknowledgements 1257 Most of the text is this document is taken from [RFC4492], the 1258 predecessor of this document. The authors of that document were: 1260 o Simon Blake-Wilson 1261 o Nelson Bolyard 1262 o Vipul Gupta 1263 o Chris Hawk 1264 o Bodo Moeller 1266 In the predecessor document, the authors acknowledged the 1267 contributions of Bill Anderson and Tim Dierks. 1269 The author would like to thank Nikos Mavrogiannopoulos, Martin 1270 Thomson, and Tanja Lange for contributions to this document. 1272 10. Version History for This Draft 1274 NOTE TO RFC EDITOR: PLEASE REMOVE THIS SECTION 1276 Changes from draft-ietf-tls-rfc4492bis-03 to draft-nir-tls- 1277 rfc4492bis-05: 1279 o Add support for CFRG curves and signatures work. 1281 Changes from draft-ietf-tls-rfc4492bis-01 to draft-nir-tls- 1282 rfc4492bis-03: 1284 o Removed unused curves. 1285 o Removed unused point formats (all but uncompressed) 1287 Changes from draft-nir-tls-rfc4492bis-00 and draft-ietf-tls- 1288 rfc4492bis-00 to draft-nir-tls-rfc4492bis-01: 1290 o Merged errata 1291 o Removed ECDH_RSA and ECDH_ECDSA 1293 Changes from RFC 4492 to draft-nir-tls-rfc4492bis-00: 1295 o Added TLS 1.2 to references. 1296 o Moved RFC 4492 authors to acknowledgements. 1297 o Removed list of required reading for ECC. 1299 11. References 1301 11.1. Normative References 1303 [ANSI.X9-62.2005] 1304 American National Standards Institute, "Public Key 1305 Cryptography for the Financial Services Industry, The 1306 Elliptic Curve Digital Signature Algorithm (ECDSA)", 1307 ANSI X9.62, 2005. 1309 [CCITT.X680] 1310 International Telephone and Telegraph Consultative 1311 Committee, "Abstract Syntax Notation One (ASN.1): 1312 Specification of basic notation", CCITT Recommendation 1313 X.680, July 2002. 1315 [CCITT.X690] 1316 International Telephone and Telegraph Consultative 1317 Committee, "ASN.1 encoding rules: Specification of basic 1318 encoding Rules (BER), Canonical encoding rules (CER) and 1319 Distinguished encoding rules (DER)", CCITT Recommendation 1320 X.690, July 2002. 1322 [CFRG-EdDSA] 1323 Josefsson, S. and I. Liusvaara, "Edwards-curve Digital 1324 Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-08 1325 (work in progress), August 2016. 1327 [FIPS.186-4] 1328 National Institute of Standards and Technology, "Digital 1329 Signature Standard", FIPS PUB 186-4, 2013, 1330 . 1333 [PKCS1] RSA Laboratories, "RSA Encryption Standard, Version 1.5", 1334 PKCS 1, November 1993. 1336 [PKIX-EdDSA] 1337 Josefsson, S. and J. Schaad, "Algorithm Identifiers for 1338 Ed25519, Ed25519ph, Ed448, Ed448ph, X25519 and X448 for 1339 use in the Internet X.509 Public Key Infrastructure", 1340 August 2016, . 1343 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1344 Requirement Levels", BCP 14, RFC 2119, March 1997. 1346 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1347 RFC 2246, January 1999. 1349 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 1350 Identifiers for the Internet X.509 Public Key 1351 Infrastructure Certificate and Certificate Revocation List 1352 (CRL) Profile", RFC 3279, April 2002. 1354 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1355 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 1357 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 1358 and T. Wright, "Transport Layer Security (TLS) 1359 Extensions", RFC 4366, April 2006. 1361 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1362 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1364 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1365 for Security", RFC 7748, January 2016. 1367 [SECG-SEC2] 1368 CECG, "Recommended Elliptic Curve Domain Parameters", 1369 SEC 2, 2000. 1371 11.2. Informative References 1373 [FIPS.180-2] 1374 National Institute of Standards and Technology, "Secure 1375 Hash Standard", FIPS PUB 180-2, August 2002, 1376 . 1379 [I-D.ietf-tls-tls13] 1380 Rescorla, E., "The Transport Layer Security (TLS) Protocol 1381 Version 1.3", draft-ietf-tls-tls13-18 (work in progress), 1382 October 2016. 1384 [IEEE.P1363.1998] 1385 Institute of Electrical and Electronics Engineers, 1386 "Standard Specifications for Public Key Cryptography", 1387 IEEE Draft P1363, 1998. 1389 [Menezes] Menezes, A. and B. Ustaoglu, "On Reusing Ephemeral Keys In 1390 Diffie-Hellman Key Agreement Protocols", IACR Menezes2008, 1391 December 2008. 1393 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 1394 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 1395 for Transport Layer Security (TLS)", RFC 4492, May 2006. 1397 Appendix A. Equivalent Curves (Informative) 1399 All of the NIST curves [FIPS.186-4] and several of the ANSI curves 1400 [ANSI.X9-62.2005] are equivalent to curves listed in Section 5.1.1. 1401 In the following table, multiple names in one row represent aliases 1402 for the same curve. 1404 Curve names chosen by different standards organizations 1406 +-----------+------------+------------+ 1407 | SECG | ANSI X9.62 | NIST | 1408 +-----------+------------+------------+ 1409 | sect163k1 | | NIST K-163 | 1410 | sect163r1 | | | 1411 | sect163r2 | | NIST B-163 | 1412 | sect193r1 | | | 1413 | sect193r2 | | | 1414 | sect233k1 | | NIST K-233 | 1415 | sect233r1 | | NIST B-233 | 1416 | sect239k1 | | | 1417 | sect283k1 | | NIST K-283 | 1418 | sect283r1 | | NIST B-283 | 1419 | sect409k1 | | NIST K-409 | 1420 | sect409r1 | | NIST B-409 | 1421 | sect571k1 | | NIST K-571 | 1422 | sect571r1 | | NIST B-571 | 1423 | secp160k1 | | | 1424 | secp160r1 | | | 1425 | secp160r2 | | | 1426 | secp192k1 | | | 1427 | secp192r1 | prime192v1 | NIST P-192 | 1428 | secp224k1 | | | 1429 | secp224r1 | | NIST P-224 | 1430 | secp256k1 | | | 1431 | secp256r1 | prime256v1 | NIST P-256 | 1432 | secp384r1 | | NIST P-384 | 1433 | secp521r1 | | NIST P-521 | 1434 +-----------+------------+------------+ 1436 Table 5: Equivalent curves defined by SECG, ANSI, and NIST 1438 Appendix B. Differences from RFC 4492 1440 o Added TLS 1.2 1441 o Merged Errata 1442 o Removed the ECDH key exchange algorithms: ECDH_RSA and ECDH_ECDSA 1443 o Deprecated a bunch of ciphersuites: 1445 TLS_ECDH_ECDSA_WITH_NULL_SHA 1446 TLS_ECDH_ECDSA_WITH_RC4_128_SHA 1447 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 1448 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 1449 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 1450 TLS_ECDH_RSA_WITH_NULL_SHA 1451 TLS_ECDH_RSA_WITH_RC4_128_SHA 1452 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 1453 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 1454 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 1455 All the other RC4 ciphersuites 1457 Removed unused curves and all but the uncompressed point format. 1459 Added X25519 and X448. 1461 Deprecated explicit curves. 1463 Removed restriction on signature algorithm in certificate. 1465 Authors' Addresses 1467 Yoav Nir 1468 Check Point Software Technologies Ltd. 1469 5 Hasolelim st. 1470 Tel Aviv 6789735 1471 Israel 1473 Email: ynir.ietf@gmail.com 1475 Simon Josefsson 1476 SJD AB 1478 Email: simon@josefsson.org 1480 Manuel Pegourie-Gonnard 1481 Independent / PolarSSL 1483 Email: mpg@elzevir.fr