idnits 2.17.00 (12 Aug 2021) /tmp/idnits20480/draft-ietf-tls-rfc4492bis-05.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 676 has weird spacing: '...rveType cur...' == Line 692 has weird spacing: '...ameters cur...' == Line 710 has weird spacing: '...HParams par...' -- The document date (November 4, 2015) is 2389 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 210, but not defined == Outdated reference: draft-irtf-cfrg-curves has been published as RFC 7748 ** Downref: Normative reference to an Informational draft: draft-irtf-cfrg-curves (ref. 'CFRG-Curves') == Outdated reference: draft-irtf-cfrg-eddsa has been published as RFC 8032 ** Downref: Normative reference to an Informational draft: draft-irtf-cfrg-eddsa (ref. 'CFRG-EdDSA') -- Possible downref: Non-RFC (?) normative reference: ref. 'PKCS1' == Outdated reference: A later version (-04) exists of draft-josefsson-pkix-eddsa-03 ** Downref: Normative reference to an Informational draft: draft-josefsson-pkix-eddsa (ref. 'PKIX-EdDSA') ** Obsolete normative reference: RFC 2246 (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 4346 (Obsoleted by RFC 5246) ** Obsolete normative reference: RFC 4366 (Obsoleted by RFC 5246, RFC 6066) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) -- Possible downref: Non-RFC (?) normative reference: ref. 'SECG-SEC2' == Outdated reference: draft-ietf-tls-tls13 has been published as RFC 8446 -- Obsolete informational reference (is this intentional?): RFC 4492 (Obsoleted by RFC 8422) Summary: 7 errors (**), 0 flaws (~~), 9 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: May 7, 2016 M. Pegourie-Gonnard 7 Independent / PolarSSL 8 November 4, 2015 10 Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer 11 Security (TLS) Versions 1.2 and Earlier 12 draft-ietf-tls-rfc4492bis-05 14 Abstract 16 This document describes key exchange algorithms based on Elliptic 17 Curve Cryptography (ECC) for the Transport Layer Security (TLS) 18 protocol. In particular, it specifies the use of Ephemeral Elliptic 19 Curve Diffie-Hellman (ECDHE) key agreement in a TLS handshake and the 20 use of Elliptic Curve Digital Signature Algorithm (ECDSA) and Edwards 21 Digital Signature Algorithm (EdDSA) as new authentication mechanisms. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on May 7, 2016. 40 Copyright Notice 42 Copyright (c) 2015 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 58 1.1. Conventions Used in This Document . . . . . . . . . . . . 4 59 2. Key Exchange Algorithm . . . . . . . . . . . . . . . . . . . 4 60 2.1. ECDHE_ECDSA . . . . . . . . . . . . . . . . . . . . . . . 5 61 2.2. ECDHE_RSA . . . . . . . . . . . . . . . . . . . . . . . . 6 62 2.3. ECDH_anon . . . . . . . . . . . . . . . . . . . . . . . . 6 63 3. Client Authentication . . . . . . . . . . . . . . . . . . . . 7 64 3.1. ECDSA_sign . . . . . . . . . . . . . . . . . . . . . . . 7 65 4. TLS Extensions for ECC . . . . . . . . . . . . . . . . . . . 7 66 5. Data Structures and Computations . . . . . . . . . . . . . . 8 67 5.1. Client Hello Extensions . . . . . . . . . . . . . . . . . 8 68 5.1.1. Supported Elliptic Curves Extension . . . . . . . . . 10 69 5.1.2. Supported Point Formats Extension . . . . . . . . . . 11 70 5.2. Server Hello Extension . . . . . . . . . . . . . . . . . 12 71 5.3. Server Certificate . . . . . . . . . . . . . . . . . . . 13 72 5.4. Server Key Exchange . . . . . . . . . . . . . . . . . . . 14 73 5.5. Certificate Request . . . . . . . . . . . . . . . . . . . 17 74 5.6. Client Certificate . . . . . . . . . . . . . . . . . . . 18 75 5.7. Client Key Exchange . . . . . . . . . . . . . . . . . . . 19 76 5.8. Certificate Verify . . . . . . . . . . . . . . . . . . . 20 77 5.9. Elliptic Curve Certificates . . . . . . . . . . . . . . . 22 78 5.10. ECDH, ECDSA, and RSA Computations . . . . . . . . . . . . 22 79 5.11. Public Key Validation . . . . . . . . . . . . . . . . . . 23 80 6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . 24 81 7. Security Considerations . . . . . . . . . . . . . . . . . . . 25 82 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 83 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 84 10. Version History for This Draft . . . . . . . . . . . . . . . 26 85 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 27 86 11.1. Normative References . . . . . . . . . . . . . . . . . . 27 87 11.2. Informative References . . . . . . . . . . . . . . . . . 28 88 Appendix A. Equivalent Curves (Informative) . . . . . . . . . . 29 89 Appendix B. Differences from RFC 4492 . . . . . . . . . . . . . 30 90 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 31 92 1. Introduction 94 Elliptic Curve Cryptography (ECC) has emerged as an attractive 95 public-key cryptosystem, in particular for mobile (i.e., wireless) 96 environments. Compared to currently prevalent cryptosystems such as 97 RSA, ECC offers equivalent security with smaller key sizes. This is 98 illustrated in the following table, based on [Lenstra_Verheul], which 99 gives approximate comparable key sizes for symmetric- and asymmetric- 100 key cryptosystems based on the best-known algorithms for attacking 101 them. 103 +-----------+-------+------------+ 104 | Symmetric | ECC | DH/DSA/RSA | 105 +-----------+-------+------------+ 106 | 80 | >=158 | 1024 | 107 | 112 | >=221 | 2048 | 108 | 128 | >=252 | 3072 | 109 | 192 | >=379 | 7680 | 110 | 256 | >=506 | 15360 | 111 +-----------+-------+------------+ 113 Table 1: Comparable Key Sizes (in bits) 115 Smaller key sizes result in savings for power, memory, bandwidth, and 116 computational cost that make ECC especially attractive for 117 constrained environments. 119 This document describes additions to TLS to support ECC, applicable 120 to TLS versions 1.0 [RFC2246], 1.1 [RFC4346], and 1.2 [RFC5246]. The 121 use of ECC in TLS 1.3 is defined in [I-D.ietf-tls-tls13], and is 122 explicitly out of scope for this document. In particular, this 123 document defines: 125 o the use of the Elliptic Curve Diffie-Hellman key agreement scheme 126 with ephemeral keys to establish the TLS premaster secret, and 127 o the use of ECDSA certificates for authentication of TLS peers. 129 The remainder of this document is organized as follows. Section 2 130 provides an overview of ECC-based key exchange algorithms for TLS. 131 Section 3 describes the use of ECC certificates for client 132 authentication. TLS extensions that allow a client to negotiate the 133 use of specific curves and point formats are presented in Section 4. 134 Section 5 specifies various data structures needed for an ECC-based 135 handshake, their encoding in TLS messages, and the processing of 136 those messages. Section 6 defines ECC-based cipher suites and 137 identifies a small subset of these as recommended for all 138 implementations of this specification. Section 7 discusses security 139 considerations. Section 8 describes IANA considerations for the name 140 spaces created by this document's predecessor. Section 9 gives 141 acknowledgements. Appendix B provides differences from [RFC4492], 142 the document that this one replaces. 144 Implementation of this specification requires familiarity with TLS, 145 TLS extensions [RFC4366], and ECC (TBD: reference Wikipedia here?). 147 1.1. Conventions Used in This Document 149 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 150 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 151 document are to be interpreted as described in [RFC2119]. 153 2. Key Exchange Algorithm 155 This document defines three new ECC-based key exchange algorithms for 156 TLS. All of them use Ephemeral ECDH (ECDHE) to compute the TLS 157 premaster secret, and they differ only in the mechanism (if any) used 158 to authenticate them. The derivation of the TLS master secret from 159 the premaster secret and the subsequent generation of bulk 160 encryption/MAC keys and initialization vectors is independent of the 161 key exchange algorithm and not impacted by the introduction of ECC. 163 Table 2 summarizes the new key exchange algorithms. All of these key 164 exchange algorithms provide forward secrecy. 166 +-------------+------------------------------------------------+ 167 | Algorithm | Description | 168 +-------------+------------------------------------------------+ 169 | ECDHE_ECDSA | Ephemeral ECDH with ECDSA or EdDSA signatures. | 170 | ECDHE_RSA | Ephemeral ECDH with RSA signatures. | 171 | ECDH_anon | Anonymous ephemeral ECDH, no signatures. | 172 +-------------+------------------------------------------------+ 174 Table 2: ECC Key Exchange Algorithms 176 These key exchanges are analogous to DHE_DSS, DHE_RSA, and DH_anon, 177 respectively. 179 With ECDHE_RSA, a server can reuse its existing RSA certificate and 180 easily comply with a constrained client's elliptic curve preferences 181 (see Section 4). However, the computational cost incurred by a 182 server is higher for ECDHE_RSA than for the traditional RSA key 183 exchange, which does not provide forward secrecy. 185 The anonymous key exchange algorithm does not provide authentication 186 of the server or the client. Like other anonymous TLS key exchanges, 187 it is subject to man-in-the-middle attacks. Implementations of this 188 algorithm SHOULD provide authentication by other means. 190 Note that there is no structural difference between ECDH and ECDSA 191 keys. A certificate issuer may use X.509 v3 keyUsage and 192 extendedKeyUsage extensions to restrict the use of an ECC public key 193 to certain computations. This document refers to an ECC key as ECDH- 194 capable if its use in ECDH is permitted. ECDSA-capable and EdDSA- 195 capable are defined similarly. 197 Client Server 198 ------ ------ 199 ClientHello --------> 200 ServerHello 201 Certificate* 202 ServerKeyExchange* 203 CertificateRequest*+ 204 <-------- ServerHelloDone 205 Certificate*+ 206 ClientKeyExchange 207 CertificateVerify*+ 208 [ChangeCipherSpec] 209 Finished --------> 210 [ChangeCipherSpec] 211 <-------- Finished 212 Application Data <-------> Application Data 213 * message is not sent under some conditions 214 + message is not sent unless client authentication 215 is desired 217 Figure 1: Message flow in a full TLS handshake 219 Figure 1 shows all messages involved in the TLS key establishment 220 protocol (aka full handshake). The addition of ECC has direct impact 221 only on the ClientHello, the ServerHello, the server's Certificate 222 message, the ServerKeyExchange, the ClientKeyExchange, the 223 CertificateRequest, the client's Certificate message, and the 224 CertificateVerify. Next, we describe the ECC key exchange algorithm 225 in greater detail in terms of the content and processing of these 226 messages. For ease of exposition, we defer discussion of client 227 authentication and associated messages (identified with a + in 228 Figure 1) until Section 3 and of the optional ECC-specific extensions 229 (which impact the Hello messages) until Section 4. 231 2.1. ECDHE_ECDSA 233 In ECDHE_ECDSA, the server's certificate MUST contain an ECDSA- or 234 EdDSA-capable public key. 236 The server sends its ephemeral ECDH public key and a specification of 237 the corresponding curve in the ServerKeyExchange message. These 238 parameters MUST be signed with ECDSA or EdDSA using the private key 239 corresponding to the public key in the server's Certificate. 241 The client generates an ECDH key pair on the same curve as the 242 server's ephemeral ECDH key and sends its public key in the 243 ClientKeyExchange message. 245 Both client and server perform an ECDH operation Section 5.10 and use 246 the resultant shared secret as the premaster secret. 248 2.2. ECDHE_RSA 250 This key exchange algorithm is the same as ECDHE_ECDSA except that 251 the server's certificate MUST contain an RSA public key authorized 252 for signing, and that the signature in the ServerKeyExchange message 253 must be computed with the corresponding RSA private key. 255 2.3. ECDH_anon 257 NOTE: Despite the name beginning with "ECDH_" (no E), the key used in 258 ECDH_anon is ephemeral just like the key in ECDHE_RSA and 259 ECDHE_ECDSA. The naming follows the example of DH_anon, where the 260 key is also ephemeral but the name does not reflect it. TBD: Do we 261 want to rename this so that it makes sense? 263 In ECDH_anon, the server's Certificate, the CertificateRequest, the 264 client's Certificate, and the CertificateVerify messages MUST NOT be 265 sent. 267 The server MUST send an ephemeral ECDH public key and a specification 268 of the corresponding curve in the ServerKeyExchange message. These 269 parameters MUST NOT be signed. 271 The client generates an ECDH key pair on the same curve as the 272 server's ephemeral ECDH key and sends its public key in the 273 ClientKeyExchange message. 275 Both client and server perform an ECDH operation and use the 276 resultant shared secret as the premaster secret. All ECDH 277 calculations are performed as specified in Section 5.10. 279 This specification does not impose restrictions on signature schemes 280 used anywhere in the certificate chain. The previous version of this 281 document required the signatures to match, but this restriction, 282 originating in previous TLS versions is lifted here as it had been in 283 RFC 5246. 285 3. Client Authentication 287 This document defines a client authentication mechanism, named after 288 the type of client certificate involved: ECDSA_sign. The ECDSA_sign 289 mechanism is usable with any of the non-anonymous ECC key exchange 290 algorithms described in Section 2 as well as other non-anonymous 291 (non-ECC) key exchange algorithms defined in TLS. 293 The server can request ECC-based client authentication by including 294 this certificate type in its CertificateRequest message. The client 295 must check if it possesses a certificate appropriate for the method 296 suggested by the server and is willing to use it for authentication. 298 If these conditions are not met, the client should send a client 299 Certificate message containing no certificates. In this case, the 300 ClientKeyExchange should be sent as described in Section 2, and the 301 CertificateVerify should not be sent. If the server requires client 302 authentication, it may respond with a fatal handshake failure alert. 304 If the client has an appropriate certificate and is willing to use it 305 for authentication, it must send that certificate in the client's 306 Certificate message (as per Section 5.6) and prove possession of the 307 private key corresponding to the certified key. The process of 308 determining an appropriate certificate and proving possession is 309 different for each authentication mechanism and described below. 311 NOTE: It is permissible for a server to request (and the client to 312 send) a client certificate of a different type than the server 313 certificate. 315 3.1. ECDSA_sign 317 To use this authentication mechanism, the client MUST possess a 318 certificate containing an ECDSA- or EdDSA-capable public key. 320 The client proves possession of the private key corresponding to the 321 certified key by including a signature in the CertificateVerify 322 message as described in Section 5.8. 324 4. TLS Extensions for ECC 326 Two new TLS extensions are defined in this specification: (i) the 327 Supported Elliptic Curves Extension, and (ii) the Supported Point 328 Formats Extension. These allow negotiating the use of specific 329 curves and point formats (e.g., compressed vs. uncompressed, 330 respectively) during a handshake starting a new session. These 331 extensions are especially relevant for constrained clients that may 332 only support a limited number of curves or point formats. They 333 follow the general approach outlined in [RFC4366]; message details 334 are specified in Section 5. The client enumerates the curves it 335 supports and the point formats it can parse by including the 336 appropriate extensions in its ClientHello message. The server 337 similarly enumerates the point formats it can parse by including an 338 extension in its ServerHello message. 340 A TLS client that proposes ECC cipher suites in its ClientHello 341 message SHOULD include these extensions. Servers implementing ECC 342 cipher suites MUST support these extensions, and when a client uses 343 these extensions, servers MUST NOT negotiate the use of an ECC cipher 344 suite unless they can complete the handshake while respecting the 345 choice of curves and compression techniques specified by the client. 346 This eliminates the possibility that a negotiated ECC handshake will 347 be subsequently aborted due to a client's inability to deal with the 348 server's EC key. 350 The client MUST NOT include these extensions in the ClientHello 351 message if it does not propose any ECC cipher suites. A client that 352 proposes ECC cipher suites may choose not to include these 353 extensions. In this case, the server is free to choose any one of 354 the elliptic curves or point formats listed in Section 5. That 355 section also describes the structure and processing of these 356 extensions in greater detail. 358 In the case of session resumption, the server simply ignores the 359 Supported Elliptic Curves Extension and the Supported Point Formats 360 Extension appearing in the current ClientHello message. These 361 extensions only play a role during handshakes negotiating a new 362 session. 364 5. Data Structures and Computations 366 This section specifies the data structures and computations used by 367 ECC-based key mechanisms specified in the previous three sections. 368 The presentation language used here is the same as that used in TLS. 369 Since this specification extends TLS, these descriptions should be 370 merged with those in the TLS specification and any others that extend 371 TLS. This means that enum types may not specify all possible values, 372 and structures with multiple formats chosen with a select() clause 373 may not indicate all possible cases. 375 5.1. Client Hello Extensions 377 This section specifies two TLS extensions that can be included with 378 the ClientHello message as described in [RFC4366], the Supported 379 Elliptic Curves Extension and the Supported Point Formats Extension. 381 When these extensions are sent: 383 The extensions SHOULD be sent along with any ClientHello message that 384 proposes ECC cipher suites. 386 Meaning of these extensions: 388 These extensions allow a client to enumerate the elliptic curves it 389 supports and/or the point formats it can parse. 391 Structure of these extensions: 393 The general structure of TLS extensions is described in [RFC4366], 394 and this specification adds two new types to ExtensionType. 396 enum { elliptic_curves(10), ec_point_formats(11) } ExtensionType; 398 elliptic_curves (Supported Elliptic Curves Extension): Indicates the 399 set of elliptic curves supported by the client. For this 400 extension, the opaque extension_data field contains 401 EllipticCurveList. See Section 5.1.1 for details. 402 ec_point_formats (Supported Point Formats Extension): Indicates the 403 set of point formats that the client can parse. For this 404 extension, the opaque extension_data field contains 405 ECPointFormatList. See Section 5.1.2 for details. 407 Actions of the sender: 409 A client that proposes ECC cipher suites in its ClientHello message 410 appends these extensions (along with any others), enumerating the 411 curves it supports and the point formats it can parse. Clients 412 SHOULD send both the Supported Elliptic Curves Extension and the 413 Supported Point Formats Extension. If the Supported Point Formats 414 Extension is indeed sent, it MUST contain the value 0 (uncompressed) 415 as one of the items in the list of point formats. 417 Actions of the receiver: 419 A server that receives a ClientHello containing one or both of these 420 extensions MUST use the client's enumerated capabilities to guide its 421 selection of an appropriate cipher suite. One of the proposed ECC 422 cipher suites must be negotiated only if the server can successfully 423 complete the handshake while using the curves and point formats 424 supported by the client (cf. Section 5.3 and Section 5.4). 426 NOTE: A server participating in an ECDHE_ECDSA key exchange may use 427 different curves for the ECDSA or EdDSA key in its certificate, and 428 for the ephemeral ECDH key in the ServerKeyExchange message. The 429 server MUST consider the extensions in both cases. 431 If a server does not understand the Supported Elliptic Curves 432 Extension, does not understand the Supported Point Formats Extension, 433 or is unable to complete the ECC handshake while restricting itself 434 to the enumerated curves and point formats, it MUST NOT negotiate the 435 use of an ECC cipher suite. Depending on what other cipher suites 436 are proposed by the client and supported by the server, this may 437 result in a fatal handshake failure alert due to the lack of common 438 cipher suites. 440 5.1.1. Supported Elliptic Curves Extension 442 RFC 4492 defined 25 different curves in the NamedCurve registry for 443 use in TLS. Only three have seen any use. This specification is 444 deprecating the rest (with numbers 1-22). This specification also 445 deprecates the explicit curves with identifiers 0xFF01 and 0xFF02. 446 It also adds the new curves defined in [CFRG-Curves] and 447 [CFRG-EdDSA]. The end result is as follows: 449 enum { 450 deprecated(1..22), 451 secp256r1 (23), secp384r1 (24), secp521r1 (25), 452 Curve25519(TBD1), 453 Curve448(TBD2), 454 Ed25519(TBD3), 455 Ed448(TBD4), 456 reserved (0xFE00..0xFEFF), 457 deprecated(0xFF01..0xFF02), 458 (0xFFFF) 459 } NamedCurve; 461 Note that other specification have since added other values to this 462 enumeration. 464 secp256r1, etc: Indicates support of the corresponding named curve or 465 class of explicitly defined curves. The named curves secp256r1, 466 secp384r1, and secp521r1 are specified in SEC 2 [SECG-SEC2]. These 467 curves are also recommended in ANSI X9.62 [ANSI.X9-62.2005] and FIPS 468 186-4 [FIPS.186-4]. Curve25519 and Curve448 are defined in 469 [CFRG-Curves]. Ed25519 and Ed448 are signature-only curves defined 470 in [CFRG-EdDSA]. Values 0xFE00 through 0xFEFF are reserved for 471 private use. 473 The NamedCurve name space is maintained by IANA. See Section 8 for 474 information on how new value assignments are added. 476 struct { 477 NamedCurve elliptic_curve_list<1..2^16-1> 478 } EllipticCurveList; 480 Items in elliptic_curve_list are ordered according to the client's 481 preferences (favorite choice first). 483 As an example, a client that only supports secp256r1 (aka NIST P-256; 484 value 23 = 0x0017) and secp384r1 (aka NIST P-384; value 24 = 0x0018) 485 and prefers to use secp256r1 would include a TLS extension consisting 486 of the following octets. Note that the first two octets indicate the 487 extension type (Supported Elliptic Curves Extension): 489 00 0A 00 06 00 04 00 17 00 18 491 5.1.2. Supported Point Formats Extension 493 enum { uncompressed (0), ansiX962_compressed_prime (1), 494 ansiX962_compressed_char2 (2), reserved (248..255) 495 } ECPointFormat; 496 struct { 497 ECPointFormat ec_point_format_list<1..2^8-1> 498 } ECPointFormatList; 500 Three point formats were included in the definition of ECPointFormat 501 above. This specification deprecates all but the uncompressed point 502 format. Implementations of this document MUST support the 503 uncompressed format for all of their supported curves, and MUST NOT 504 support other formats for curves defined in this specification. For 505 backwards compatibility purposes, the point format list extension 506 MUST still be included, and contain exactly one value: the 507 uncomptessed point format (0). 509 The ECPointFormat name space is maintained by IANA. See Section 8 510 for information on how new value assignments are added. 512 Items in ec_point_format_list are ordered according to the client's 513 preferences (favorite choice first). 515 A client compliant with this specification that supports no other 516 curves MUST send the following octets; note that the first two octets 517 indicate the extension type (Supported Point Formats Extension): 519 00 0B 00 02 01 00 521 5.2. Server Hello Extension 523 This section specifies a TLS extension that can be included with the 524 ServerHello message as described in [RFC4366], the Supported Point 525 Formats Extension. 527 When this extension is sent: 529 The Supported Point Formats Extension is included in a ServerHello 530 message in response to a ClientHello message containing the Supported 531 Point Formats Extension when negotiating an ECC cipher suite. 533 Meaning of this extension: 535 This extension allows a server to enumerate the point formats it can 536 parse (for the curve that will appear in its ServerKeyExchange 537 message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key 538 exchange algorithm. 540 Structure of this extension: 542 The server's Supported Point Formats Extension has the same structure 543 as the client's Supported Point Formats Extension (see 544 Section 5.1.2). Items in ec_point_format_list here are ordered 545 according to the server's preference (favorite choice first). Note 546 that the server may include items that were not found in the client's 547 list (e.g., the server may prefer to receive points in compressed 548 format even when a client cannot parse this format: the same client 549 may nevertheless be capable of outputting points in compressed 550 format). 552 Actions of the sender: 554 A server that selects an ECC cipher suite in response to a 555 ClientHello message including a Supported Point Formats Extension 556 appends this extension (along with others) to its ServerHello 557 message, enumerating the point formats it can parse. The Supported 558 Point Formats Extension, when used, MUST contain the value 0 559 (uncompressed) as one of the items in the list of point formats. 561 Actions of the receiver: 563 A client that receives a ServerHello message containing a Supported 564 Point Formats Extension MUST respect the server's choice of point 565 formats during the handshake (cf. Section 5.6 and Section 5.7). If 566 no Supported Point Formats Extension is received with the 567 ServerHello, this is equivalent to an extension allowing only the 568 uncompressed point format. 570 5.3. Server Certificate 572 When this message is sent: 574 This message is sent in all non-anonymous ECC-based key exchange 575 algorithms. 577 Meaning of this message: 579 This message is used to authentically convey the server's static 580 public key to the client. The following table shows the server 581 certificate type appropriate for each key exchange algorithm. ECC 582 public keys MUST be encoded in certificates as described in 583 Section 5.9. 585 NOTE: The server's Certificate message is capable of carrying a chain 586 of certificates. The restrictions mentioned in Table 3 apply only to 587 the server's certificate (first in the chain). 589 +-------------+-----------------------------------------------------+ 590 | Algorithm | Server Certificate Type | 591 +-------------+-----------------------------------------------------+ 592 | ECDHE_ECDSA | Certificate MUST contain an ECDSA- or EdDSA-capable | 593 | | public key. | 594 | ECDHE_RSA | Certificate MUST contain an RSA public key | 595 | | authorized for use in digital signatures. | 596 +-------------+-----------------------------------------------------+ 598 Table 3: Server Certificate Types 600 Structure of this message: 602 Identical to the TLS Certificate format. 604 Actions of the sender: 606 The server constructs an appropriate certificate chain and conveys it 607 to the client in the Certificate message. If the client has used a 608 Supported Elliptic Curves Extension, the public key in the server's 609 certificate MUST respect the client's choice of elliptic curves; in 610 particular, the public key MUST employ a named curve (not the same 611 curve as an explicit curve) unless the client has indicated support 612 for explicit curves of the appropriate type. If the client has used 613 a Supported Point Formats Extension, both the server's public key 614 point and (in the case of an explicit curve) the curve's base point 615 MUST respect the client's choice of point formats. (A server that 616 cannot satisfy these requirements MUST NOT choose an ECC cipher suite 617 in its ServerHello message.) 618 Actions of the receiver: 620 The client validates the certificate chain, extracts the server's 621 public key, and checks that the key type is appropriate for the 622 negotiated key exchange algorithm. (A possible reason for a fatal 623 handshake failure is that the client's capabilities for handling 624 elliptic curves and point formats are exceeded; cf. Section 5.1.) 626 5.4. Server Key Exchange 628 When this message is sent: 630 This message is sent when using the ECDHE_ECDSA, ECDHE_RSA, and 631 ECDH_anon key exchange algorithms. 633 Meaning of this message: 635 This message is used to convey the server's ephemeral ECDH public key 636 (and the corresponding elliptic curve domain parameters) to the 637 client. 639 The ECCCurveType enum used to have values for explicit prime and for 640 explicit char2 curves. Those values are now deprecated, so only one 641 value remains: 643 Structure of this message: 645 enum { deprecated (1..2), named_curve (3), reserved(248..255) 646 } ECCurveType; 648 The value named_curve indicates that a named curve is used. This 649 option SHOULD be used when applicable. 651 Values 248 through 255 are reserved for private use. 653 The ECCurveType name space is maintained by IANA. See Section 8 for 654 information on how new value assignments are added. 656 RFC 4492 had a specification for an ECCurve structure and an 657 ECBasisType structure. Both of these are omitted now because they 658 were only used with the now deprecated explicit curves. 660 struct { 661 opaque point <1..2^8-1>; 662 } ECPoint; 664 This is the byte string representation of an elliptic curve point 665 following the conversion routine in Section 4.3.6 of 667 [ANSI.X9-62.2005]. This byte string may represent an elliptic curve 668 point in uncompressed or compressed format; it MUST conform to what 669 the client has requested through a Supported Point Formats Extension 670 if this extension was used. For the Curve25519 and Curve448 curves, 671 the only valid representation is the one specified in [CFRG-Curves] - 672 a 32- or 56-octet representation of the u value of the point. This 673 structure MUST NOT be used with Ed25519 and Ed448 public keys. 675 struct { 676 ECCurveType curve_type; 677 select (curve_type) { 678 case named_curve: 679 NamedCurve namedcurve; 680 }; 681 } ECParameters; 683 This identifies the type of the elliptic curve domain parameters. 685 Specifies a recommended set of elliptic curve domain parameters. All 686 those values of NamedCurve are allowed that refer to a curve capable 687 of Diffie-Hellman. With the deprecation of the explicit curves, this 688 now includes all values of NamedCurve except Ed25519(TBD3) and 689 Ed448(TBD4). 691 struct { 692 ECParameters curve_params; 693 ECPoint public; 694 } ServerECDHParams; 696 Specifies the elliptic curve domain parameters associated with the 697 ECDH public key. 699 The ephemeral ECDH public key. 701 The ServerKeyExchange message is extended as follows. 703 enum { ec_diffie_hellman } KeyExchangeAlgorithm; 705 ec_diffie_hellman: Indicates the ServerKeyExchange message contains 706 an ECDH public key. 708 select (KeyExchangeAlgorithm) { 709 case ec_diffie_hellman: 710 ServerECDHParams params; 711 Signature signed_params; 712 } ServerKeyExchange; 714 params: Specifies the ECDH public key and associated domain 715 parameters. 716 signed_params: A hash of the params, with the signature appropriate 717 to that hash applied. The private key corresponding to the 718 certified public key in the server's Certificate message is used 719 for signing. 721 enum { ecdsa(3), eddsa(TBD5) } SignatureAlgorithm; 722 select (SignatureAlgorithm) { 723 case ecdsa: 724 digitally-signed struct { 725 opaque sha_hash[sha_size]; 726 }; 727 case eddsa: 728 digitally-signed struct { 729 opaque rawdata[rawdata_size]; 730 }; 731 } Signature; 732 ServerKeyExchange.signed_params.sha_hash 733 SHA(ClientHello.random + ServerHello.random + 734 ServerKeyExchange.params); 735 ServerKeyExchange.signed_params.rawdata 736 ClientHello.random + ServerHello.random + 737 ServerKeyExchange.params; 739 NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange 740 algorithm and "anonymous" for ECDH_anon. These cases are defined in 741 TLS. SignatureAlgorithm is "ecdsa" or "eddsa" for ECDHE_ECDSA. 742 ECDSA signatures are generated and verified as described in 743 Section 5.10, and SHA in the above template for sha_hash accordingly 744 may denote a hash algorithm other than SHA-1. As per ANSI X9.62, an 745 ECDSA signature consists of a pair of integers, r and s. The 746 digitally-signed element is encoded as an opaque vector <0..2^16-1>, 747 the contents of which are the DER encoding corresponding to the 748 following ASN.1 notation. 750 Ecdsa-Sig-Value ::= SEQUENCE { 751 r INTEGER, 752 s INTEGER 753 } 755 EdDSA signatures are generated and verified according to 756 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 757 vector<0..2^16-1>, the contents of which is the octet string output 758 of the EdDSA signing algorithm. 760 Actions of the sender: 762 The server selects elliptic curve domain parameters and an ephemeral 763 ECDH public key corresponding to these parameters according to the 764 ECKAS-DH1 scheme from IEEE 1363 [IEEE.P1363.1998]. It conveys this 765 information to the client in the ServerKeyExchange message using the 766 format defined above. 768 Actions of the receiver: 770 The client verifies the signature (when present) and retrieves the 771 server's elliptic curve domain parameters and ephemeral ECDH public 772 key from the ServerKeyExchange message. (A possible reason for a 773 fatal handshake failure is that the client's capabilities for 774 handling elliptic curves and point formats are exceeded; cf. 775 Section 5.1.) 777 5.5. Certificate Request 779 When this message is sent: 781 This message is sent when requesting client authentication. 783 Meaning of this message: 785 The server uses this message to suggest acceptable client 786 authentication methods. 788 Structure of this message: 790 The TLS CertificateRequest message is extended as follows. 792 enum { 793 ecdsa_sign(64), rsa_fixed_ecdh(65), 794 ecdsa_fixed_ecdh(66), (255) 795 } ClientCertificateType; 797 ecdsa_sign, etc. Indicates that the server would like to use the 798 corresponding client authentication method specified in Section 3. 800 Actions of the sender: 802 The server decides which client authentication methods it would like 803 to use, and conveys this information to the client using the format 804 defined above. 806 Actions of the receiver: 808 The client determines whether it has a suitable certificate for use 809 with any of the requested methods and whether to proceed with client 810 authentication. 812 5.6. Client Certificate 814 When this message is sent: 816 This message is sent in response to a CertificateRequest when a 817 client has a suitable certificate and has decided to proceed with 818 client authentication. (Note that if the server has used a Supported 819 Point Formats Extension, a certificate can only be considered 820 suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and 821 ECDSA_fixed_ECDH authentication methods if the public key point 822 specified in it respects the server's choice of point formats. If no 823 Supported Point Formats Extension has been used, a certificate can 824 only be considered suitable for use with these authentication methods 825 if the point is represented in uncompressed point format.) 827 Meaning of this message: 829 This message is used to authentically convey the client's static 830 public key to the server. The following table summarizes what client 831 certificate types are appropriate for the ECC-based client 832 authentication mechanisms described in Section 3. ECC public keys 833 must be encoded in certificates as described in Section 5.9. 835 NOTE: The client's Certificate message is capable of carrying a chain 836 of certificates. The restrictions mentioned in Table 4 apply only to 837 the client's certificate (first in the chain). 839 +------------------+------------------------------------------------+ 840 | Client | Client Certificate Type | 841 | Authentication | | 842 | Method | | 843 +------------------+------------------------------------------------+ 844 | ECDSA_sign | Certificate MUST contain an ECDSA- or EdDSA- | 845 | | capable public key. | 846 | ECDSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 847 | | public key on the same elliptic curve as the | 848 | | server's long-term ECDH key. | 849 | RSA_fixed_ECDH | The same as ECDSA_fixed_ECDH. The codepoints | 850 | | meant different things, but due to changes in | 851 | | TLS 1.2, both mean the same thing now. | 852 +------------------+------------------------------------------------+ 854 Table 4: Client Certificate Types 856 Structure of this message: 858 Identical to the TLS client Certificate format. 860 Actions of the sender: 862 The client constructs an appropriate certificate chain, and conveys 863 it to the server in the Certificate message. 865 Actions of the receiver: 867 The TLS server validates the certificate chain, extracts the client's 868 public key, and checks that the key type is appropriate for the 869 client authentication method. 871 5.7. Client Key Exchange 873 When this message is sent: 875 This message is sent in all key exchange algorithms. If client 876 authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this 877 message is empty. Otherwise, it contains the client's ephemeral ECDH 878 public key. 880 Meaning of the message: 882 This message is used to convey ephemeral data relating to the key 883 exchange belonging to the client (such as its ephemeral ECDH public 884 key). 886 Structure of this message: 888 The TLS ClientKeyExchange message is extended as follows. 890 enum { implicit, explicit } PublicValueEncoding; 892 implicit, explicit: For ECC cipher suites, this indicates whether 893 the client's ECDH public key is in the client's certificate 894 ("implicit") or is provided, as an ephemeral ECDH public key, in 895 the ClientKeyExchange message ("explicit"). (This is "explicit" 896 in ECC cipher suites except when the client uses the 897 ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication 898 mechanism.) 899 struct { 900 select (PublicValueEncoding) { 901 case implicit: struct { }; 902 case explicit: ECPoint ecdh_Yc; 903 } ecdh_public; 904 } ClientECDiffieHellmanPublic; 905 ecdh_Yc: Contains the client's ephemeral ECDH public key as a byte 906 string ECPoint.point, which may represent an elliptic curve point 907 in uncompressed or compressed format. Curves Ed25519 and Ed448 908 MUST NOT be used. Here, the format MUST conform to what the 909 server has requested through a Supported Point Formats Extension 910 if this extension was used, and MUST be uncompressed if this 911 extension was not used. 913 struct { 914 select (KeyExchangeAlgorithm) { 915 case ec_diffie_hellman: ClientECDiffieHellmanPublic; 916 } exchange_keys; 917 } ClientKeyExchange; 919 Actions of the sender: 921 The client selects an ephemeral ECDH public key corresponding to the 922 parameters it received from the server according to the ECKAS-DH1 923 scheme from IEEE 1363. It conveys this information to the client in 924 the ClientKeyExchange message using the format defined above. 926 Actions of the receiver: 928 The server retrieves the client's ephemeral ECDH public key from the 929 ClientKeyExchange message and checks that it is on the same elliptic 930 curve as the server's ECDH key. 932 5.8. Certificate Verify 934 When this message is sent: 936 This message is sent when the client sends a client certificate 937 containing a public key usable for digital signatures, e.g., when the 938 client is authenticated using the ECDSA_sign mechanism. 940 Meaning of the message: 942 This message contains a signature that proves possession of the 943 private key corresponding to the public key in the client's 944 Certificate message. 946 Structure of this message: 948 The TLS CertificateVerify message and the underlying Signature type 949 are defined in the TLS base specifications, and the latter is 950 extended here in Section 5.4. For the ecdsa and eddsa cases, the 951 signature field in the CertificateVerify message contains an ECDSA or 952 EdDSA (respectively) signature computed over handshake messages 953 exchanged so far, exactly similar to CertificateVerify with other 954 signing algorithms: 956 CertificateVerify.signature.sha_hash 957 SHA(handshake_messages); 958 CertificateVerify.signature.rawdata 959 handshake_messages; 961 ECDSA signatures are computed as described in Section 5.10, and SHA 962 in the above template for sha_hash accordingly may denote a hash 963 algorithm other than SHA-1. As per ANSI X9.62, an ECDSA signature 964 consists of a pair of integers, r and s. The digitally-signed 965 element is encoded as an opaque vector <0..2^16-1>, the contents of 966 which are the DER encoding [CCITT.X690] corresponding to the 967 following ASN.1 notation [CCITT.X680]. 969 Ecdsa-Sig-Value ::= SEQUENCE { 970 r INTEGER, 971 s INTEGER 972 } 974 EdDSA signatures are generated and verified according to 975 [CFRG-EdDSA]. The digitally-signed element is encoded as an opaque 976 vector<0..2^16-1>, the contents of which is the octet string output 977 of the EdDSA signing algorithm. 979 Actions of the sender: 981 The client computes its signature over all handshake messages sent or 982 received starting at client hello and up to but not including this 983 message. It uses the private key corresponding to its certified 984 public key to compute the signature, which is conveyed in the format 985 defined above. 987 Actions of the receiver: 989 The server extracts the client's signature from the CertificateVerify 990 message, and verifies the signature using the public key it received 991 in the client's Certificate message. 993 5.9. Elliptic Curve Certificates 995 X.509 certificates containing ECC public keys or signed using ECDSA 996 MUST comply with [RFC3279] or another RFC that replaces or extends 997 it. X.509 certificates containing ECC public keys or signed using 998 EdDSA MUST comply with [PKIX-EdDSA]. Clients SHOULD use the elliptic 999 curve domain parameters recommended in ANSI X9.62, FIPS 186-4, and 1000 SEC 2 [SECG-SEC2] or in [CFRG-EdDSA]. 1002 EdDSA keys using Ed25519 and Ed25519ph algorithms MUST use the 1003 Ed25519 curve, and Ed448 and Ed448ph keys MUST use the Ed448 curve. 1004 Curves Curve25519, Curve448, Ed25519 and Ed448 MUST NOT be used for 1005 ECDSA. 1007 5.10. ECDH, ECDSA, and RSA Computations 1009 All ECDH calculations for the NIST curves (including parameter and 1010 key generation as well as the shared secret calculation) are 1011 performed according to [IEEE.P1363.1998] using the ECKAS-DH1 scheme 1012 with the identity map as key derivation function (KDF), so that the 1013 premaster secret is the x-coordinate of the ECDH shared secret 1014 elliptic curve point represented as an octet string. Note that this 1015 octet string (Z in IEEE 1363 terminology) as output by FE2OSP, the 1016 Field Element to Octet String Conversion Primitive, has constant 1017 length for any given field; leading zeros found in this octet string 1018 MUST NOT be truncated. 1020 (Note that this use of the identity KDF is a technicality. The 1021 complete picture is that ECDH is employed with a non-trivial KDF 1022 because TLS does not directly use the premaster secret for anything 1023 other than for computing the master secret. In TLS 1.0 and 1.1, this 1024 means that the MD5- and SHA-1-based TLS PRF serves as a KDF; in TLS 1025 1.2 the KDF is determined by ciphersuite; it is conceivable that 1026 future TLS versions or new TLS extensions introduced in the future 1027 may vary this computation.) 1029 An ECDHE key exchange using Curve25519 goes as follows. Each party 1030 picks a secret key d uniformly at random and computes the 1031 corresponding public key x = Curve25519(d, G). Parties exchange 1032 their public keys and compute a shared secret as x_S = Curve25519(d, 1033 x_peer). ECDHE for Curve448 works similarily, replacing Curve25519 1034 with Curve448. The derived shared secret is used directly as the 1035 premaster secret, which is always exactly 32 bytes when ECDHE with 1036 Curve25519 is used and 56 bytes when ECDHE with Curve448 is used. 1038 All ECDSA computations MUST be performed according to ANSI X9.62 or 1039 its successors. Data to be signed/verified is hashed, and the result 1040 run directly through the ECDSA algorithm with no additional hashing. 1042 The default hash function is SHA-1 [FIPS.180-2], and sha_size (see 1043 Section 5.4 and Section 5.8) is 20. However, an alternative hash 1044 function, such as one of the new SHA hash functions specified in FIPS 1045 180-2 [FIPS.180-2], SHOULD be used instead. 1047 All EdDSA computations MUST be performed according to [CFRG-EdDSA] or 1048 its succesors. Data to be signed/verified is run through the EdDSA 1049 algorithm wih no hashing (EdDSA will internally run the data through 1050 the PH function). 1052 RFC 4492 anticipated the standardization of a mechanism for 1053 specifying the required hash function in the certificate, perhaps in 1054 the parameters field of the subjectPublicKeyInfo. Such 1055 standardization never took place, and as a result, SHA-1 is used in 1056 TLS 1.1 and earlier (except for EdDSA, which uses identity function). 1057 TLS 1.2 added a SignatureAndHashAlgorithm parameter to the 1058 DigitallySigned struct, thus allowing agility in choosing the 1059 signature hash. EdDSA signatures MUST have HashAlgorithm of 0 1060 (None). 1062 All RSA signatures must be generated and verified according to 1063 [PKCS1] block type 1. 1065 5.11. Public Key Validation 1067 With the NIST curves, each party must validate the public key sent by 1068 its peer before performing cryptographic computations with it. 1069 Failing to do so allows attackers to gain information about the 1070 private key, to the point that they may recover the entire private 1071 key in a few requests, if that key is not really ephemeral. 1073 Curve25519 was designed in a way that the result of Curve25519(x, d) 1074 will never reveal information about d, provided it was chosen as 1075 prescribed, for any value of x (the same holds true for Curve448). 1077 Let's define legitimate values of x as the values that can be 1078 obtained as x = Curve25519(G, d') for some d, and call the other 1079 values illegitimate. The definition of the Curve25519 function shows 1080 that legitimate values all share the following property: the high- 1081 order bit of the last byte is not set (for Ed448, any bit can be 1082 set). 1084 Since there are some implementation of the Curve25519 function that 1085 impose this restriction on their input and others that don't, 1086 implementations of Curve25519 in TLS SHOULD reject public keys when 1087 the high-order bit of the last byte is set (in other words, when the 1088 value of the leftmost byte is greater than 0x7F) in order to prevent 1089 implementation fingerprinting. 1091 Ed25519 and Ed448 internally do public key validation as part of 1092 signature verification. 1094 Other than this recommended check, implementations do not need to 1095 ensure that the public keys they receive are legitimate: this is not 1096 necessary for security with Curve25519. 1098 6. Cipher Suites 1100 The table below defines new ECC cipher suites that use the key 1101 exchange algorithms specified in Section 2. 1103 +---------------------------------------+----------------+ 1104 | CipherSuite | Identifier | 1105 +---------------------------------------+----------------+ 1106 | TLS_ECDHE_ECDSA_WITH_NULL_SHA | { 0xC0, 0x06 } | 1107 | TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x08 } | 1108 | TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x09 } | 1109 | TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0A } | 1110 | | | 1111 | TLS_ECDHE_RSA_WITH_NULL_SHA | { 0xC0, 0x10 } | 1112 | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x12 } | 1113 | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x13 } | 1114 | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x14 } | 1115 | | | 1116 | TLS_ECDH_anon_WITH_NULL_SHA | { 0xC0, 0x15 } | 1117 | TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x17 } | 1118 | TLS_ECDH_anon_WITH_AES_128_CBC_SHA | { 0xC0, 0x18 } | 1119 | TLS_ECDH_anon_WITH_AES_256_CBC_SHA | { 0xC0, 0x19 } | 1120 +---------------------------------------+----------------+ 1122 Table 5: TLS ECC cipher suites 1124 The key exchange method, cipher, and hash algorithm for each of these 1125 cipher suites are easily determined by examining the name. Ciphers 1126 (other than AES ciphers) and hash algorithms are defined in [RFC2246] 1127 and [RFC4346]. AES ciphers are defined in [RFC5246]. 1129 Server implementations SHOULD support all of the following cipher 1130 suites, and client implementations SHOULD support at least one of 1131 them: 1133 o TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 1134 o TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA 1135 o TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 1136 o TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 1138 7. Security Considerations 1140 Security issues are discussed throughout this memo. 1142 For TLS handshakes using ECC cipher suites, the security 1143 considerations in appendices D of all three TLS base documemts apply 1144 accordingly. 1146 Security discussions specific to ECC can be found in 1147 [IEEE.P1363.1998] and [ANSI.X9-62.2005]. One important issue that 1148 implementers and users must consider is elliptic curve selection. 1149 Guidance on selecting an appropriate elliptic curve size is given in 1150 Table 1. 1152 Beyond elliptic curve size, the main issue is elliptic curve 1153 structure. As a general principle, it is more conservative to use 1154 elliptic curves with as little algebraic structure as possible. 1155 Thus, random curves are more conservative than special curves such as 1156 Koblitz curves, and curves over F_p with p random are more 1157 conservative than curves over F_p with p of a special form (and 1158 curves over F_p with p random might be considered more conservative 1159 than curves over F_2^m as there is no choice between multiple fields 1160 of similar size for characteristic 2). Note, however, that algebraic 1161 structure can also lead to implementation efficiencies, and 1162 implementers and users may, therefore, need to balance conservatism 1163 against a need for efficiency. Concrete attacks are known against 1164 only very few special classes of curves, such as supersingular 1165 curves, and these classes are excluded from the ECC standards that 1166 this document references [IEEE.P1363.1998], [ANSI.X9-62.2005]. 1168 Another issue is the potential for catastrophic failures when a 1169 single elliptic curve is widely used. In this case, an attack on the 1170 elliptic curve might result in the compromise of a large number of 1171 keys. Again, this concern may need to be balanced against efficiency 1172 and interoperability improvements associated with widely-used curves. 1173 Substantial additional information on elliptic curve choice can be 1174 found in [IEEE.P1363.1998], [ANSI.X9-62.2005], and [FIPS.186-4]. 1176 All of the key exchange algorithms defined in this document provide 1177 forward secrecy. Some of the deprecated key exchange algorithms do 1178 not. 1180 8. IANA Considerations 1182 [RFC4492], the predecessor of this document has already defined the 1183 IANA registries for the following: 1185 o NamedCurve Section 5.1 1186 o ECPointFormat Section 5.1 1187 o ECCurveType Section 5.4 1189 For each name space, this document defines the initial value 1190 assignments and defines a range of 256 values (NamedCurve) or eight 1191 values (ECPointFormat and ECCurveType) reserved for Private Use. Any 1192 additional assignments require IETF Review. 1194 NOTE: IANA, please update the registries to reflect the new policy 1195 name. 1197 NOTE: RFC editor please delete these two notes prior to publication. 1199 IANA, please update these two registries to refer to this document. 1201 IANA is requested to assign four values from the NamedCurve registry 1202 with names Curve25519(TBD1), Curve448(TBD2), Ed25519(TBD3) and 1203 Ed448(TBD4) with this document as reference. 1205 IANA is requested to assign one value from SignatureAlgorithm 1206 Registry with name eddsa(TBD5) with this document as reference. 1208 9. Acknowledgements 1210 Most of the text is this document is taken from [RFC4492], the 1211 predecessor of this document. The authors of that document were: 1213 o Simon Blake-Wilson 1214 o Nelson Bolyard 1215 o Vipul Gupta 1216 o Chris Hawk 1217 o Bodo Moeller 1219 In the predecessor document, the authors acknowledged the 1220 contributions of Bill Anderson and Tim Dierks. 1222 10. Version History for This Draft 1224 NOTE TO RFC EDITOR: PLEASE REMOVE THIS SECTION 1226 Changes from draft-ietf-tls-rfc4492bis-03 to draft-nir-tls- 1227 rfc4492bis-05: 1229 o Add support for CFRG curves and signatures work. 1231 Changes from draft-ietf-tls-rfc4492bis-01 to draft-nir-tls- 1232 rfc4492bis-03: 1234 o Removed unused curves. 1235 o Removed unused point formats (all but uncompressed) 1237 Changes from draft-nir-tls-rfc4492bis-00 and draft-ietf-tls- 1238 rfc4492bis-00 to draft-nir-tls-rfc4492bis-01: 1240 o Merged errata 1241 o Removed ECDH_RSA and ECDH_ECDSA 1243 Changes from RFC 4492 to draft-nir-tls-rfc4492bis-00: 1245 o Added TLS 1.2 to references. 1246 o Moved RFC 4492 authors to acknowledgements. 1247 o Removed list of required reading for ECC. 1249 11. References 1251 11.1. Normative References 1253 [ANSI.X9-62.2005] 1254 American National Standards Institute, "Public Key 1255 Cryptography for the Financial Services Industry, The 1256 Elliptic Curve Digital Signature Algorithm (ECDSA)", 1257 ANSI X9.62, 2005. 1259 [CCITT.X680] 1260 International Telephone and Telegraph Consultative 1261 Committee, "Abstract Syntax Notation One (ASN.1): 1262 Specification of basic notation", CCITT Recommendation 1263 X.680, July 2002. 1265 [CCITT.X690] 1266 International Telephone and Telegraph Consultative 1267 Committee, "ASN.1 encoding rules: Specification of basic 1268 encoding Rules (BER), Canonical encoding rules (CER) and 1269 Distinguished encoding rules (DER)", CCITT Recommendation 1270 X.690, July 2002. 1272 [CFRG-Curves] 1273 Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 1274 for Security", draft-irtf-cfrg-curves-11 (work in 1275 progress), October 2015. 1277 [CFRG-EdDSA] 1278 Josefsson, S. and I. Liusvaara, "Edwards-curve Digital 1279 Signature Algorithm (EdDSA)", draft-irtf-cfrg-eddsa-00 1280 (work in progress), October 2015. 1282 [FIPS.186-4] 1283 National Institute of Standards and Technology, "Digital 1284 Signature Standard", FIPS PUB 186-4, 2013, 1285 . 1288 [PKCS1] RSA Laboratories, "RSA Encryption Standard, Version 1.5", 1289 PKCS 1, November 1993. 1291 [PKIX-EdDSA] 1292 Josefsson, S. and N. Mavrogiannopoulos, "Using EdDSA in 1293 the Internet X.509 Public Key Infrastructure", draft- 1294 josefsson-pkix-eddsa-03 (work in progress), September 1295 2015. 1297 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1298 Requirement Levels", BCP 14, RFC 2119, March 1997. 1300 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1301 RFC 2246, January 1999. 1303 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 1304 Identifiers for the Internet X.509 Public Key 1305 Infrastructure Certificate and Certificate Revocation List 1306 (CRL) Profile", RFC 3279, April 2002. 1308 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1309 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 1311 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 1312 and T. Wright, "Transport Layer Security (TLS) 1313 Extensions", RFC 4366, April 2006. 1315 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1316 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1318 [SECG-SEC2] 1319 CECG, "Recommended Elliptic Curve Domain Parameters", 1320 SEC 2, 2000. 1322 11.2. Informative References 1324 [FIPS.180-2] 1325 National Institute of Standards and Technology, "Secure 1326 Hash Standard", FIPS PUB 180-2, August 2002, 1327 . 1330 [I-D.ietf-tls-tls13] 1331 Dierks, T. and E. Rescorla, "The Transport Layer Security 1332 (TLS) Protocol Version 1.3", draft-ietf-tls-tls13-02 (work 1333 in progress), July 2014. 1335 [IEEE.P1363.1998] 1336 Institute of Electrical and Electronics Engineers, 1337 "Standard Specifications for Public Key Cryptography", 1338 IEEE Draft P1363, 1998. 1340 [Lenstra_Verheul] 1341 Lenstra, A. and E. Verheul, "Selecting Cryptographic Key 1342 Sizes", Journal of Cryptology 14 (2001) 255-293, 2001. 1344 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 1345 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 1346 for Transport Layer Security (TLS)", RFC 4492, May 2006. 1348 Appendix A. Equivalent Curves (Informative) 1350 All of the NIST curves [FIPS.186-4] and several of the ANSI curves 1351 [ANSI.X9-62.2005] are equivalent to curves listed in Section 5.1.1. 1352 In the following table, multiple names in one row represent aliases 1353 for the same curve. 1355 Curve names chosen by different standards organizations 1357 +-----------+------------+------------+ 1358 | SECG | ANSI X9.62 | NIST | 1359 +-----------+------------+------------+ 1360 | sect163k1 | | NIST K-163 | 1361 | sect163r1 | | | 1362 | sect163r2 | | NIST B-163 | 1363 | sect193r1 | | | 1364 | sect193r2 | | | 1365 | sect233k1 | | NIST K-233 | 1366 | sect233r1 | | NIST B-233 | 1367 | sect239k1 | | | 1368 | sect283k1 | | NIST K-283 | 1369 | sect283r1 | | NIST B-283 | 1370 | sect409k1 | | NIST K-409 | 1371 | sect409r1 | | NIST B-409 | 1372 | sect571k1 | | NIST K-571 | 1373 | sect571r1 | | NIST B-571 | 1374 | secp160k1 | | | 1375 | secp160r1 | | | 1376 | secp160r2 | | | 1377 | secp192k1 | | | 1378 | secp192r1 | prime192v1 | NIST P-192 | 1379 | secp224k1 | | | 1380 | secp224r1 | | NIST P-224 | 1381 | secp256k1 | | | 1382 | secp256r1 | prime256v1 | NIST P-256 | 1383 | secp384r1 | | NIST P-384 | 1384 | secp521r1 | | NIST P-521 | 1385 +-----------+------------+------------+ 1387 Table 6: Equivalent curves defined by SECG, ANSI, and NIST 1389 Appendix B. Differences from RFC 4492 1391 o Added TLS 1.2 1392 o Merged Errata 1393 o Removed the ECDH key exchange algorithms: ECDH_RSA and ECDH_ECDSA 1394 o Deprecated a bunch of ciphersuites: 1396 TLS_ECDH_ECDSA_WITH_NULL_SHA 1397 TLS_ECDH_ECDSA_WITH_RC4_128_SHA 1398 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 1399 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 1400 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA 1401 TLS_ECDH_RSA_WITH_NULL_SHA 1402 TLS_ECDH_RSA_WITH_RC4_128_SHA 1403 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA 1404 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA 1405 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA 1406 All the other RC4 ciphersuites 1408 Removed unused curves and all but the uncompressed point format. 1410 Added Curve25519 and Curve448. 1412 Deprecated explicit curves. 1414 Removed restriction on signature algorithm in certificate. 1416 Authors' Addresses 1418 Yoav Nir 1419 Check Point Software Technologies Ltd. 1420 5 Hasolelim st. 1421 Tel Aviv 6789735 1422 Israel 1424 Email: ynir.ietf@gmail.com 1426 Simon Josefsson 1427 SJD AB 1429 Email: simon@josefsson.org 1431 Manuel Pegourie-Gonnard 1432 Independent / PolarSSL 1434 Email: mpg@elzevir.fr