idnits 2.17.00 (12 Aug 2021) /tmp/idnits23136/draft-ietf-tls-rfc4492bis-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 793 has weird spacing: '...rveType cur...' == Line 806 has weird spacing: '... opaque k <1....' == Line 808 has weird spacing: '... opaque k1 <1...' == Line 809 has weird spacing: '... opaque k2 <1...' == Line 810 has weird spacing: '... opaque k3 <1...' == (2 more instances...) -- The document date (December 2, 2014) is 2726 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 221, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'PKCS1' ** 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: 4 errors (**), 0 flaws (~~), 9 warnings (==), 4 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 Intended status: Standards Track December 2, 2014 5 Expires: June 5, 2015 7 Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer 8 Security (TLS) Versions 1.2 and Earlier 9 draft-ietf-tls-rfc4492bis-00 11 Abstract 13 This document describes key exchange algorithms based on Elliptic 14 Curve Cryptography (ECC) for the Transport Layer Security (TLS) 15 protocol. In particular, it specifies the use of Elliptic Curve 16 Diffie-Hellman (ECDH) key agreement in a TLS handshake and the use of 17 Elliptic Curve Digital Signature Algorithm (ECDSA) as a new 18 authentication mechanism. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on June 5, 2015. 37 Copyright Notice 39 Copyright (c) 2014 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 1.1. Conventions Used in This Document . . . . . . . . . . . . 4 56 2. Key Exchange Algorithm . . . . . . . . . . . . . . . . . . . 4 57 2.1. ECDH_ECDSA . . . . . . . . . . . . . . . . . . . . . . . 6 58 2.2. ECDHE_ECDSA . . . . . . . . . . . . . . . . . . . . . . . 6 59 2.3. ECDH_RSA . . . . . . . . . . . . . . . . . . . . . . . . 6 60 2.4. ECDHE_RSA . . . . . . . . . . . . . . . . . . . . . . . . 6 61 2.5. ECDH_anon . . . . . . . . . . . . . . . . . . . . . . . . 7 62 3. Client Authentication . . . . . . . . . . . . . . . . . . . . 7 63 3.1. ECDSA_sign . . . . . . . . . . . . . . . . . . . . . . . 8 64 3.2. ECDSA_fixed_ECDH . . . . . . . . . . . . . . . . . . . . 8 65 3.3. RSA_fixed_ECDH . . . . . . . . . . . . . . . . . . . . . 9 66 4. TLS Extensions for ECC . . . . . . . . . . . . . . . . . . . 9 67 5. Data Structures and Computations . . . . . . . . . . . . . . 10 68 5.1. Client Hello Extensions . . . . . . . . . . . . . . . . . 10 69 5.1.1. Supported Elliptic Curves Extension . . . . . . . . . 12 70 5.1.2. Supported Point Formats Extension . . . . . . . . . . 13 71 5.2. Server Hello Extension . . . . . . . . . . . . . . . . . 14 72 5.3. Server Certificate . . . . . . . . . . . . . . . . . . . 15 73 5.4. Server Key Exchange . . . . . . . . . . . . . . . . . . . 16 74 5.5. Certificate Request . . . . . . . . . . . . . . . . . . . 20 75 5.6. Client Certificate . . . . . . . . . . . . . . . . . . . 21 76 5.7. Client Key Exchange . . . . . . . . . . . . . . . . . . . 22 77 5.8. Certificate Verify . . . . . . . . . . . . . . . . . . . 24 78 5.9. Elliptic Curve Certificates . . . . . . . . . . . . . . . 25 79 5.10. ECDH, ECDSA, and RSA Computations . . . . . . . . . . . . 25 80 6. Cipher Suites . . . . . . . . . . . . . . . . . . . . . . . . 26 81 7. Security Considerations . . . . . . . . . . . . . . . . . . . 27 82 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28 83 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 28 84 10. Version History for This Draft . . . . . . . . . . . . . . . 28 85 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 29 86 11.1. Normative References . . . . . . . . . . . . . . . . . . 29 87 11.2. Informative References . . . . . . . . . . . . . . . . . 30 88 Appendix A. Equivalent Curves (Informative) . . . . . . . . . . 30 89 Appendix B. Differences from RFC 4492 . . . . . . . . . . . . . 31 90 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 31 92 1. Introduction 94 Elliptic Curve Cryptography (ECC) is emerging 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 | 163 | 1024 | 107 | 112 | 233 | 2048 | 108 | 128 | 283 | 3072 | 109 | 192 | 409 | 7680 | 110 | 256 | 571 | 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 (ECDH) key agreement 126 scheme with long-term or ephemeral keys to establish the TLS 127 premaster secret, and 128 o the use of fixed-ECDH certificates and ECDSA for authentication of 129 TLS peers. 131 The remainder of this document is organized as follows. Section 2 132 provides an overview of ECC-based key exchange algorithms for TLS. 133 Section 3 describes the use of ECC certificates for client 134 authentication. TLS extensions that allow a client to negotiate the 135 use of specific curves and point formats are presented in Section 4. 136 Section 5 specifies various data structures needed for an ECC-based 137 handshake, their encoding in TLS messages, and the processing of 138 those messages. Section 6 defines ECC-based cipher suites and 139 identifies a small subset of these as recommended for all 140 implementations of this specification. Section 7 discusses security 141 considerations. Section 8 describes IANA considerations for the name 142 spaces created by this document's predecessor. Section 9 gives 143 acknowledgements. Appendix B provides differences from [RFC4492], 144 the document that this one replaces. 146 Implementation of this specification requires familiarity with TLS, 147 TLS extensions [RFC4366], and ECC (TBD: reference Wikipedia here?). 149 1.1. Conventions Used in This Document 151 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 152 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 153 document are to be interpreted as described in [RFC2119]. 155 2. Key Exchange Algorithm 157 This document introduces five new ECC-based key exchange algorithms 158 for TLS. All of them use ECDH to compute the TLS premaster secret, 159 and they differ only in the lifetime of ECDH keys (long-term or 160 ephemeral) and the mechanism (if any) used to authenticate them. The 161 derivation of the TLS master secret from the premaster secret and the 162 subsequent generation of bulk encryption/MAC keys and initialization 163 vectors is independent of the key exchange algorithm and not impacted 164 by the introduction of ECC. 166 The table below summarizes the new key exchange algorithms, which 167 mimic DH_DSS, DHE_DSS, DH_RSA, DHE_RSA, and DH_anon, respectively. 169 +-------------+--------------------------------------------+ 170 | Algorithm | Description | 171 +-------------+--------------------------------------------+ 172 | ECDH_ECDSA | Fixed ECDH with ECDSA-signed certificates. | 173 | ECDHE_ECDSA | Ephemeral ECDH with ECDSA signatures. | 174 | ECDH_RSA | Fixed ECDH with RSA-signed certificates. | 175 | ECDHE_RSA | Ephemeral ECDH with RSA signatures. | 176 | ECDH_anon | Anonymous ECDH, no signatures. | 177 +-------------+--------------------------------------------+ 179 Table 2: ECC Key Exchange Algorithms 181 The ECDHE_ECDSA and ECDHE_RSA key exchange mechanisms provide forward 182 secrecy. With ECDHE_RSA, a server can reuse its existing RSA 183 certificate and easily comply with a constrained client's elliptic 184 curve preferences (see Section 4). However, the computational cost 185 incurred by a server is higher for ECDHE_RSA than for the traditional 186 RSA key exchange, which does not provide forward secrecy. 188 The ECDH_RSA mechanism requires a server to acquire an ECC 189 certificate, but the certificate issuer can still use an existing RSA 190 key for signing. This eliminates the need to update the keys of 191 trusted certification authorities accepted by TLS clients. The 192 ECDH_ECDSA mechanism requires ECC keys for the server as well as the 193 certification authority and is best suited for constrained devices 194 unable to support RSA. 196 The anonymous key exchange algorithm does not provide authentication 197 of the server or the client. Like other anonymous TLS key exchanges, 198 it is subject to man-in-the-middle attacks. Implementations of this 199 algorithm SHOULD provide authentication by other means. 201 Note that there is no structural difference between ECDH and ECDSA 202 keys. A certificate issuer may use X.509 v3 keyUsage and 203 extendedKeyUsage extensions to restrict the use of an ECC public key 204 to certain computations. This document refers to an ECC key as ECDH- 205 capable if its use in ECDH is permitted. ECDSA-capable is defined 206 similarly. 208 Client Server 209 ------ ------ 210 ClientHello --------> 211 ServerHello 212 Certificate* 213 ServerKeyExchange* 214 CertificateRequest*+ 215 <-------- ServerHelloDone 216 Certificate*+ 217 ClientKeyExchange 218 CertificateVerify*+ 219 [ChangeCipherSpec] 220 Finished --------> 221 [ChangeCipherSpec] 222 <-------- Finished 223 Application Data <-------> Application Data 224 * message is not sent under some conditions 225 + message is not sent unless client authentication 226 is desired 228 Figure 1: Message flow in a full TLS handshake 230 Figure 1 shows all messages involved in the TLS key establishment 231 protocol (aka full handshake). The addition of ECC has direct impact 232 only on the ClientHello, the ServerHello, the server's Certificate 233 message, the ServerKeyExchange, the ClientKeyExchange, the 234 CertificateRequest, the client's Certificate message, and the 235 CertificateVerify. Next, we describe each ECC key exchange algorithm 236 in greater detail in terms of the content and processing of these 237 messages. For ease of exposition, we defer discussion of client 238 authentication and associated messages (identified with a + in 239 Figure 1) until Section 3 and of the optional ECC-specific extensions 240 (which impact the Hello messages) until Section 4. 242 2.1. ECDH_ECDSA 244 In ECDH_ECDSA, the server's certificate MUST contain an ECDH-capable 245 public key and be signed with ECDSA. 247 A ServerKeyExchange MUST NOT be sent (the server's certificate 248 contains all the necessary keying information required by the client 249 to arrive at the premaster secret). 251 The client generates an ECDH key pair on the same curve as the 252 server's long-term public key and sends its public key in the 253 ClientKeyExchange message (except when using client authentication 254 algorithm ECDSA_fixed_ECDH or RSA_fixed_ECDH, in which case the 255 modifications from Section 3.2 or Section 3.3. 257 Both client and server perform an ECDH operation and use the 258 resultant shared secret as the premaster secret. All ECDH 259 calculations are performed as specified in Section 5.10. 261 2.2. ECDHE_ECDSA 263 In ECDHE_ECDSA, the server's certificate MUST contain an ECDSA- 264 capable public key and be signed with ECDSA. 266 The server sends its ephemeral ECDH public key and a specification of 267 the corresponding curve in the ServerKeyExchange message. These 268 parameters MUST be signed with ECDSA using the private key 269 corresponding to the public key in the server's Certificate. 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 Section 5.10 and use 276 the resultant shared secret as the premaster secret. 278 2.3. ECDH_RSA 280 This key exchange algorithm is the same as ECDH_ECDSA except that the 281 server's certificate MUST be signed with RSA rather than ECDSA. 283 2.4. ECDHE_RSA 285 This key exchange algorithm is the same as ECDHE_ECDSA except that 286 the server's certificate MUST contain an RSA public key authorized 287 for signing, and that the signature in the ServerKeyExchange message 288 must be computed with the corresponding RSA private key. The server 289 certificate MUST be signed with RSA. 291 2.5. ECDH_anon 293 In ECDH_anon, the server's Certificate, the CertificateRequest, the 294 client's Certificate, and the CertificateVerify messages MUST NOT be 295 sent. 297 The server MUST send an ephemeral ECDH public key and a specification 298 of the corresponding curve in the ServerKeyExchange message. These 299 parameters MUST NOT be signed. 301 The client generates an ECDH key pair on the same curve as the 302 server's ephemeral ECDH key and sends its public key in the 303 ClientKeyExchange message. 305 Both client and server perform an ECDH operation and use the 306 resultant shared secret as the premaster secret. All ECDH 307 calculations are performed as specified in Section 5.10. 309 Note that while the ECDH_ECDSA, ECDHE_ECDSA, ECDH_RSA, and ECDHE_RSA 310 key exchange algorithms require the server's certificate to be signed 311 with a particular signature scheme, this specification (following the 312 similar cases of DH_DSS, DHE_DSS, DH_RSA, and DHE_RSA in the TLS base 313 documents) does not impose restrictions on signature schemes used 314 elsewhere in the certificate chain. (Often such restrictions will be 315 useful, and it is expected that this will be taken into account in 316 certification authorities' signing practices. However, such 317 restrictions are not strictly required in general: Even if it is 318 beyond the capabilities of a client to completely validate a given 319 chain, the client may be able to validate the server's certificate by 320 relying on a trusted certification authority whose certificate 321 appears as one of the intermediate certificates in the chain.) 323 3. Client Authentication 325 This document defines three new client authentication mechanisms, 326 each named after the type of client certificate involved: ECDSA_sign, 327 ECDSA_fixed_ECDH, and RSA_fixed_ECDH. The ECDSA_sign mechanism is 328 usable with any of the non-anonymous ECC key exchange algorithms 329 described in Section 2 as well as other non-anonymous (non-ECC) key 330 exchange algorithms defined in TLS. The ECDSA_fixed_ECDH and 331 RSA_fixed_ECDH mechanisms are usable with ECDH_ECDSA and ECDH_RSA. 332 Their use with ECDHE_ECDSA and ECDHE_RSA is prohibited because the 333 use of a long-term ECDH client key would jeopardize the forward 334 secrecy property of these algorithms. 336 The server can request ECC-based client authentication by including 337 one or more of these certificate types in its CertificateRequest 338 message. The server must not include any certificate types that are 339 prohibited for the negotiated key exchange algorithm. The client 340 must check if it possesses a certificate appropriate for any of the 341 methods suggested by the server and is willing to use it for 342 authentication. 344 If these conditions are not met, the client should send a client 345 Certificate message containing no certificates. In this case, the 346 ClientKeyExchange should be sent as described in Section 2, and the 347 CertificateVerify should not be sent. If the server requires client 348 authentication, it may respond with a fatal handshake failure alert. 350 If the client has an appropriate certificate and is willing to use it 351 for authentication, it must send that certificate in the client's 352 Certificate message (as per Section 5.6) and prove possession of the 353 private key corresponding to the certified key. The process of 354 determining an appropriate certificate and proving possession is 355 different for each authentication mechanism and described below. 357 NOTE: It is permissible for a server to request (and the client to 358 send) a client certificate of a different type than the server 359 certificate. 361 3.1. ECDSA_sign 363 To use this authentication mechanism, the client MUST possess a 364 certificate containing an ECDSA-capable public key and signed with 365 ECDSA. 367 The client proves possession of the private key corresponding to the 368 certified key by including a signature in the CertificateVerify 369 message as described in Section 5.8. 371 3.2. ECDSA_fixed_ECDH 373 To use this authentication mechanism, the client MUST possess a 374 certificate containing an ECDH-capable public key, and that 375 certificate MUST be signed with ECDSA. Furthermore, the client's 376 ECDH key MUST be on the same elliptic curve as the server's long-term 377 (certified) ECDH key. This might limit use of this mechanism to 378 closed environments. In situations where the client has an ECC key 379 on a different curve, it would have to authenticate using either 380 ECDSA_sign or a non-ECC mechanism (e.g., RSA). Using fixed ECDH for 381 both servers and clients is computationally more efficient than 382 mechanisms providing forward secrecy. 384 When using this authentication mechanism, the client MUST send an 385 empty ClientKeyExchange as described in Section 5.7 and MUST NOT send 386 the CertificateVerify message. The ClientKeyExchange is empty since 387 the client's ECDH public key required by the server to compute the 388 premaster secret is available inside the client's certificate. The 389 client's ability to arrive at the same premaster secret as the server 390 (demonstrated by a successful exchange of Finished messages) proves 391 possession of the private key corresponding to the certified public 392 key, and the CertificateVerify message is unnecessary. 394 3.3. RSA_fixed_ECDH 396 This authentication mechanism is identical to ECDSA_fixed_ECDH except 397 that the client's certificate MUST be signed with RSA. 399 Note that while the ECDSA_sign, ECDSA_fixed_ECDH, and RSA_fixed_ECDH 400 client authentication mechanisms require the client's certificate to 401 be signed with a particular signature scheme, this specification does 402 not impose restrictions on signature schemes used elsewhere in the 403 certificate chain. (Often such restrictions will be useful, and it 404 is expected that this will be taken into account in certification 405 authorities' signing practices. However, such restrictions are not 406 strictly required in general: Even if it is beyond the capabilities 407 of a server to completely validate a given chain, the server may be 408 able to validate the clients certificate by relying on a trust anchor 409 that appears as one of the intermediate certificates in the chain.) 411 4. TLS Extensions for ECC 413 Two new TLS extensions are defined in this specification: (i) the 414 Supported Elliptic Curves Extension, and (ii) the Supported Point 415 Formats Extension. These allow negotiating the use of specific 416 curves and point formats (e.g., compressed vs. uncompressed, 417 respectively) during a handshake starting a new session. These 418 extensions are especially relevant for constrained clients that may 419 only support a limited number of curves or point formats. They 420 follow the general approach outlined in [RFC4366]; message details 421 are specified in Section 5. The client enumerates the curves it 422 supports and the point formats it can parse by including the 423 appropriate extensions in its ClientHello message. The server 424 similarly enumerates the point formats it can parse by including an 425 extension in its ServerHello message. 427 A TLS client that proposes ECC cipher suites in its ClientHello 428 message SHOULD include these extensions. Servers implementing ECC 429 cipher suites MUST support these extensions, and when a client uses 430 these extensions, servers MUST NOT negotiate the use of an ECC cipher 431 suite unless they can complete the handshake while respecting the 432 choice of curves and compression techniques specified by the client. 433 This eliminates the possibility that a negotiated ECC handshake will 434 be subsequently aborted due to a client's inability to deal with the 435 server's EC key. 437 The client MUST NOT include these extensions in the ClientHello 438 message if it does not propose any ECC cipher suites. A client that 439 proposes ECC cipher suites may choose not to include these 440 extensions. In this case, the server is free to choose any one of 441 the elliptic curves or point formats listed in Section 5. That 442 section also describes the structure and processing of these 443 extensions in greater detail. 445 In the case of session resumption, the server simply ignores the 446 Supported Elliptic Curves Extension and the Supported Point Formats 447 Extension appearing in the current ClientHello message. These 448 extensions only play a role during handshakes negotiating a new 449 session. 451 5. Data Structures and Computations 453 This section specifies the data structures and computations used by 454 ECC-based key mechanisms specified in the previous three sections. 455 The presentation language used here is the same as that used in TLS. 456 Since this specification extends TLS, these descriptions should be 457 merged with those in the TLS specification and any others that extend 458 TLS. This means that enum types may not specify all possible values, 459 and structures with multiple formats chosen with a select() clause 460 may not indicate all possible cases. 462 5.1. Client Hello Extensions 464 This section specifies two TLS extensions that can be included with 465 the ClientHello message as described in [RFC4366], the Supported 466 Elliptic Curves Extension and the Supported Point Formats Extension. 468 When these extensions are sent: 470 The extensions SHOULD be sent along with any ClientHello message that 471 proposes ECC cipher suites. 473 Meaning of these extensions: 475 These extensions allow a client to enumerate the elliptic curves it 476 supports and/or the point formats it can parse. 478 Structure of these extensions: 480 The general structure of TLS extensions is described in [RFC4366], 481 and this specification adds two new types to ExtensionType. 483 enum { elliptic_curves(10), ec_point_formats(11) } ExtensionType; 485 elliptic_curves (Supported Elliptic Curves Extension): Indicates the 486 set of elliptic curves supported by the client. For this 487 extension, the opaque extension_data field contains 488 EllipticCurveList. See Section 5.1.1 for details. 489 ec_point_formats (Supported Point Formats Extension): Indicates the 490 set of point formats that the client can parse. For this 491 extension, the opaque extension_data field contains 492 ECPointFormatList. See Section 5.1.2 for details. 494 Actions of the sender: 496 A client that proposes ECC cipher suites in its ClientHello message 497 appends these extensions (along with any others), enumerating the 498 curves it supports and the point formats it can parse. Clients 499 SHOULD send both the Supported Elliptic Curves Extension and the 500 Supported Point Formats Extension. If the Supported Point Formats 501 Extension is indeed sent, it MUST contain the value 0 (uncompressed) 502 as one of the items in the list of point formats. 504 Actions of the receiver: 506 A server that receives a ClientHello containing one or both of these 507 extensions MUST use the client's enumerated capabilities to guide its 508 selection of an appropriate cipher suite. One of the proposed ECC 509 cipher suites must be negotiated only if the server can successfully 510 complete the handshake while using the curves and point formats 511 supported by the client (cf. Section 5.3 and Section 5.4). 513 NOTE: A server participating in an ECDHE-ECDSA key exchange may use 514 different curves for (i) the ECDSA key in its certificate, and (ii) 515 the ephemeral ECDH key in the ServerKeyExchange message. The server 516 must consider the extensions in both cases. 518 If a server does not understand the Supported Elliptic Curves 519 Extension, does not understand the Supported Point Formats Extension, 520 or is unable to complete the ECC handshake while restricting itself 521 to the enumerated curves and point formats, it MUST NOT negotiate the 522 use of an ECC cipher suite. Depending on what other cipher suites 523 are proposed by the client and supported by the server, this may 524 result in a fatal handshake failure alert due to the lack of common 525 cipher suites. 527 5.1.1. Supported Elliptic Curves Extension 529 enum { 530 sect163k1 (1), sect163r1 (2), sect163r2 (3), 531 sect193r1 (4), sect193r2 (5), sect233k1 (6), 532 sect233r1 (7), sect239k1 (8), sect283k1 (9), 533 sect283r1 (10), sect409k1 (11), sect409r1 (12), 534 sect571k1 (13), sect571r1 (14), secp160k1 (15), 535 secp160r1 (16), secp160r2 (17), secp192k1 (18), 536 secp192r1 (19), secp224k1 (20), secp224r1 (21), 537 secp256k1 (22), secp256r1 (23), secp384r1 (24), 538 secp521r1 (25), 539 reserved (0xFE00..0xFEFF), 540 arbitrary_explicit_prime_curves(0xFF01), 541 arbitrary_explicit_char2_curves(0xFF02), 542 (0xFFFF) 543 } NamedCurve; 545 sect163k1, etc: Indicates support of the corresponding named curve or 546 class of explicitly defined curves. The named curves defined here 547 are those specified in SEC 2 [SECG-SEC2]. Note that many of these 548 curves are also recommended in ANSI X9.62 [ANSI.X9-62.2005] and FIPS 549 186-4 [FIPS.186-4]. Values 0xFE00 through 0xFEFF are reserved for 550 private use. Values 0xFF01 and 0xFF02 indicate that the client 551 supports arbitrary prime and characteristic-2 curves, respectively 552 (the curve parameters must be encoded explicitly in ECParameters). 554 The NamedCurve name space is maintained by IANA. See Section 8 for 555 information on how new value assignments are added. 557 struct { 558 NamedCurve elliptic_curve_list<1..2^16-1> 559 } EllipticCurveList; 561 Items in elliptic_curve_list are ordered according to the client's 562 preferences (favorite choice first). 564 As an example, a client that only supports secp192r1 (aka NIST P-192; 565 value 19 = 0x0013) and secp224r1 (aka NIST P-224; value 21 = 0x0015) 566 and prefers to use secp192r1 would include a TLS extension consisting 567 of the following octets. Note that the first two octets indicate the 568 extension type (Supported Elliptic Curves Extension): 570 00 0A 00 06 00 04 00 13 00 15 572 A client that supports arbitrary explicit characteristic-2 curves 573 (value 0xFF02) would include an extension consisting of the following 574 octets: 576 00 0A 00 04 00 02 FF 02 578 5.1.2. Supported Point Formats Extension 580 enum { uncompressed (0), ansiX962_compressed_prime (1), 581 ansiX962_compressed_char2 (2), reserved (248..255) 582 } ECPointFormat; 583 struct { 584 ECPointFormat ec_point_format_list<1..2^8-1> 585 } ECPointFormatList; 587 Three point formats are included in the definition of ECPointFormat 588 above. The uncompressed point format is the default format in that 589 implementations of this document MUST support it for all of their 590 supported curves. Compressed point formats reduce bandwidth by 591 including only the x-coordinate and a single bit of the y-coordinate 592 of the point. Implementations of this document MAY support the 593 ansiX962_compressed_prime and ansiX962_compressed_char2 formats, 594 where the former applies only to prime curves and the latter applies 595 only to characteristic-2 curves. (These formats are specified in 596 [ANSI.X9-62.2005].) Values 248 through 255 are reserved for private 597 use. 599 The ECPointFormat name space is maintained by IANA. See Section 8 600 for information on how new value assignments are added. 602 Items in ec_point_format_list are ordered according to the client's 603 preferences (favorite choice first). 605 A client that can parse only the uncompressed point format (value 0) 606 includes an extension consisting of the following octets; note that 607 the first two octets indicate the extension type (Supported Point 608 Formats Extension): 610 00 0B 00 02 01 00 612 A client that in the case of prime fields prefers the compressed 613 format (ansiX962_compressed_prime, value 1) over the uncompressed 614 format (value 0), but in the case of characteristic-2 fields prefers 615 the uncompressed format (value 0) over the compressed format 616 (ansiX962_compressed_char2, value 2), may indicate these preferences 617 by including an extension consisting of the following octets: 619 00 0B 00 04 03 01 00 02 621 5.2. Server Hello Extension 623 This section specifies a TLS extension that can be included with the 624 ServerHello message as described in [RFC4366], the Supported Point 625 Formats Extension. 627 When this extension is sent: 629 The Supported Point Formats Extension is included in a ServerHello 630 message in response to a ClientHello message containing the Supported 631 Point Formats Extension when negotiating an ECC cipher suite. 633 Meaning of this extension: 635 This extension allows a server to enumerate the point formats it can 636 parse (for the curve that will appear in its ServerKeyExchange 637 message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key 638 exchange algorithm, or for the curve that is used in the server's 639 public key that will appear in its Certificate message when using the 640 ECDH_ECDSA or ECDH_RSA key exchange algorithm). 642 Structure of this extension: 644 The server's Supported Point Formats Extension has the same structure 645 as the client's Supported Point Formats Extension (see 646 Section 5.1.2). Items in elliptic_curve_list here are ordered 647 according to the server's preference (favorite choice first). Note 648 that the server may include items that were not found in the client's 649 list (e.g., the server may prefer to receive points in compressed 650 format even when a client cannot parse this format: the same client 651 may nevertheless be capable of outputting points in compressed 652 format). 654 Actions of the sender: 656 A server that selects an ECC cipher suite in response to a 657 ClientHello message including a Supported Point Formats Extension 658 appends this extension (along with others) to its ServerHello 659 message, enumerating the point formats it can parse. The Supported 660 Point Formats Extension, when used, MUST contain the value 0 661 (uncompressed) as one of the items in the list of point formats. 663 Actions of the receiver: 665 A client that receives a ServerHello message containing a Supported 666 Point Formats Extension MUST respect the server's choice of point 667 formats during the handshake (cf. Section 5.6 and Section 5.7). If 668 no Supported Point Formats Extension is received with the 669 ServerHello, this is equivalent to an extension allowing only the 670 uncompressed point format. 672 5.3. Server Certificate 674 When this message is sent: 676 This message is sent in all non-anonymous ECC-based key exchange 677 algorithms. 679 Meaning of this message: 681 This message is used to authentically convey the server's static 682 public key to the client. The following table shows the server 683 certificate type appropriate for each key exchange algorithm. ECC 684 public keys MUST be encoded in certificates as described in 685 Section 5.9. 687 NOTE: The server's Certificate message is capable of carrying a chain 688 of certificates. The restrictions mentioned in Table 3 apply only to 689 the server's certificate (first in the chain). 691 +-------------+-----------------------------------------------------+ 692 | Algorithm | Server Certificate Type | 693 +-------------+-----------------------------------------------------+ 694 | ECDH_ECDSA | Certificate MUST contain an ECDH-capable public | 695 | | key. It MUST be signed with ECDSA. | 696 | ECDHE_ECDSA | Certificate MUST contain an ECDSA-capable public | 697 | | key. It MUST be signed with ECDSA. | 698 | ECDH_RSA | Certificate MUST contain an ECDH-capable public | 699 | | key. It MUST be signed with RSA. | 700 | ECDHE_RSA | Certificate MUST contain an RSA public key | 701 | | authorized for use in digital signatures. It MUST | 702 | | be signed with RSA. | 703 +-------------+-----------------------------------------------------+ 705 Table 3: Server Certificate Types 707 Structure of this message: 709 Identical to the TLS Certificate format. 711 Actions of the sender: 713 The server constructs an appropriate certificate chain and conveys it 714 to the client in the Certificate message. If the client has used a 715 Supported Elliptic Curves Extension, the public key in the server's 716 certificate MUST respect the client's choice of elliptic curves; in 717 particular, the public key MUST employ a named curve (not the same 718 curve as an explicit curve) unless the client has indicated support 719 for explicit curves of the appropriate type. If the client has used 720 a Supported Point Formats Extension, both the server's public key 721 point and (in the case of an explicit curve) the curve's base point 722 MUST respect the client's choice of point formats. (A server that 723 cannot satisfy these requirements MUST NOT choose an ECC cipher suite 724 in its ServerHello message.) 726 Actions of the receiver: 728 The client validates the certificate chain, extracts the server's 729 public key, and checks that the key type is appropriate for the 730 negotiated key exchange algorithm. (A possible reason for a fatal 731 handshake failure is that the client's capabilities for handling 732 elliptic curves and point formats are exceeded; cf. Section 5.1.) 734 5.4. Server Key Exchange 736 When this message is sent: 738 This message is sent when using the ECDHE_ECDSA, ECDHE_RSA, and 739 ECDH_anon key exchange algorithms. 741 Meaning of this message: 743 This message is used to convey the server's ephemeral ECDH public key 744 (and the corresponding elliptic curve domain parameters) to the 745 client. 747 Structure of this message: 749 enum { explicit_prime (1), explicit_char2 (2), 750 named_curve (3), reserved(248..255) } ECCurveType; 752 explicit_prime: Indicates the elliptic curve domain parameters are 753 conveyed verbosely, and the underlying finite field is a prime 754 field. 755 explicit_char2: Indicates the elliptic curve domain parameters are 756 conveyed verbosely, and the underlying finite field is a 757 characteristic-2 field. 758 named_curve: Indicates that a named curve is used. This option 759 SHOULD be used when applicable. 761 Values 248 through 255 are reserved for private use. 763 The ECCurveType name space is maintained by IANA. See Section 8 for 764 information on how new value assignments are added. 766 struct { 767 opaque a <1..2^8-1>; 768 opaque b <1..2^8-1>; 769 } ECCurve; 771 a, b: These parameters specify the coefficients of the elliptic 772 curve. Each value contains the byte string representation of a 773 field element following the conversion routine in Section 4.3.3 of 774 [ANSI.X9-62.2005]. 776 struct { 777 opaque point <1..2^8-1>; 778 } ECPoint; 779 point: This is the byte string representation of an elliptic curve 780 point following the conversion routine in Section 4.3.6 of 781 [ANSI.X9-62.2005]. This byte string may represent an elliptic 782 curve point in uncompressed or compressed format; it MUST conform 783 to what the client has requested through a Supported Point Formats 784 Extension if this extension was used. 786 enum { ec_basis_trinomial, ec_basis_pentanomial } ECBasisType; 787 ec_basis_trinomial: Indicates representation of a characteristic-2 788 field using a trinomial basis. 789 ec_basis_pentanomial: Indicates representation of a characteristic-2 790 field using a pentanomial basis. 792 struct { 793 ECCurveType curve_type; 794 select (curve_type) { 795 case explicit_prime: 796 opaque prime_p <1..2^8-1>; 797 ECCurve curve; 798 ECPoint base; 799 opaque order <1..2^8-1>; 800 opaque cofactor <1..2^8-1>; 801 case explicit_char2: 802 uint16 m; 803 ECBasisType basis; 804 select (basis) { 805 case ec_trinomial: 806 opaque k <1..2^8-1>; 807 case ec_pentanomial: 808 opaque k1 <1..2^8-1>; 809 opaque k2 <1..2^8-1>; 810 opaque k3 <1..2^8-1>; 811 }; 812 ECCurve curve; 813 ECPoint base; 814 opaque order <1..2^8-1>; 815 opaque cofactor <1..2^8-1>; 816 case named_curve: 817 NamedCurve namedcurve; 818 }; 819 } ECParameters; 820 curve_type: This identifies the type of the elliptic curve domain 821 parameters. 822 prime_p: This is the odd prime defining the field Fp. 823 curve: Specifies the coefficients a and b of the elliptic curve E. 824 base: Specifies the base point G on the elliptic curve. 825 order: Specifies the order n of the base point. 826 cofactor: Specifies the cofactor h = #E(Fq)/n, where #E(Fq) 827 represents the number of points on the elliptic curve E defined 828 over the field Fq (either Fp or F2^m). 829 m: This is the degree of the characteristic-2 field F2^m. 830 k: The exponent k for the trinomial basis representation x^m + x^k+1. 831 k1, k2, k3: The exponents for the pentanomial representation x^m + 832 x^k3 + x^k2 + x^k1 + 1 (such that k3 > k2 > k1). 833 namedcurve: Specifies a recommended set of elliptic curve domain 834 parameters. All those values of NamedCurve are allowed that refer 835 to a specific curve. Values of NamedCurve that indicate support 836 for a class of explicitly defined curves are not allowed here 837 (they are only permissible in the ClientHello extension); this 838 applies to arbitrary_explicit_prime_curves(0xFF01) and 839 arbitrary_explicit_char2_curves(0xFF02). 841 struct { 842 ECParameters curve_params; 843 ECPoint public; 844 } ServerECDHParams; 845 curve_params: Specifies the elliptic curve domain parameters 846 associated with the ECDH public key. 847 public: The ephemeral ECDH public key. 849 The ServerKeyExchange message is extended as follows. 851 enum { ec_diffie_hellman } KeyExchangeAlgorithm; 853 ec_diffie_hellman: Indicates the ServerKeyExchange message contains 854 an ECDH public key. 856 select (KeyExchangeAlgorithm) { 857 case ec_diffie_hellman: 858 ServerECDHParams params; 859 Signature signed_params; 860 } ServerKeyExchange; 862 params: Specifies the ECDH public key and associated domain 863 parameters. 864 signed_params: A hash of the params, with the signature appropriate 865 to that hash applied. The private key corresponding to the 866 certified public key in the server's Certificate message is used 867 for signing. 869 enum { ecdsa } SignatureAlgorithm; 870 select (SignatureAlgorithm) { 871 case ecdsa: 872 digitally-signed struct { 873 opaque sha_hash[sha_size]; 874 }; 875 } Signature; 876 ServerKeyExchange.signed_params.sha_hash 877 SHA(ClientHello.random + ServerHello.random + 878 ServerKeyExchange.params); 880 NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange 881 algorithm and "anonymous" for ECDH_anon. These cases are defined in 882 TLS. SignatureAlgorithm is "ecdsa" for ECDHE_ECDSA. ECDSA 883 signatures are generated and verified as described in Section 5.10, 884 and SHA in the above template for sha_hash accordingly may denote a 885 hash algorithm other than SHA-1. As per ANSI X9.62, an ECDSA 886 signature consists of a pair of integers, r and s. The digitally- 887 signed element is encoded as an opaque vector <0..2^16-1>, the 888 contents of which are the DER encoding corresponding to the following 889 ASN.1 notation. 891 Ecdsa-Sig-Value ::= SEQUENCE { 892 r INTEGER, 893 s INTEGER 894 } 896 Actions of the sender: 898 The server selects elliptic curve domain parameters and an ephemeral 899 ECDH public key corresponding to these parameters according to the 900 ECKAS-DH1 scheme from IEEE 1363 [IEEE.P1363.1998]. It conveys this 901 information to the client in the ServerKeyExchange message using the 902 format defined above. 904 Actions of the receiver: 906 The client verifies the signature (when present) and retrieves the 907 server's elliptic curve domain parameters and ephemeral ECDH public 908 key from the ServerKeyExchange message. (A possible reason for a 909 fatal handshake failure is that the client's capabilities for 910 handling elliptic curves and point formats are exceeded; cf. 911 Section 5.1.) 913 5.5. Certificate Request 915 When this message is sent: 917 This message is sent when requesting client authentication. 919 Meaning of this message: 921 The server uses this message to suggest acceptable client 922 authentication methods. 924 Structure of this message: 926 The TLS CertificateRequest message is extended as follows. 928 enum { 929 ecdsa_sign(64), rsa_fixed_ecdh(65), 930 ecdsa_fixed_ecdh(66), (255) 931 } ClientCertificateType; 933 ecdsa_sign, etc. Indicates that the server would like to use the 934 corresponding client authentication method specified in Section 3. 936 Actions of the sender: 938 The server decides which client authentication methods it would like 939 to use, and conveys this information to the client using the format 940 defined above. 942 Actions of the receiver: 944 The client determines whether it has a suitable certificate for use 945 with any of the requested methods and whether to proceed with client 946 authentication. 948 5.6. Client Certificate 950 When this message is sent: 952 This message is sent in response to a CertificateRequest when a 953 client has a suitable certificate and has decided to proceed with 954 client authentication. (Note that if the server has used a Supported 955 Point Formats Extension, a certificate can only be considered 956 suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and 957 ECDSA_fixed_ECDH authentication methods if the public key point 958 specified in it respects the server's choice of point formats. If no 959 Supported Point Formats Extension has been used, a certificate can 960 only be considered suitable for use with these authentication methods 961 if the point is represented in uncompressed point format.) 963 Meaning of this message: 965 This message is used to authentically convey the client's static 966 public key to the server. The following table summarizes what client 967 certificate types are appropriate for the ECC-based client 968 authentication mechanisms described in Section 3. ECC public keys 969 must be encoded in certificates as described in Section 5.9. 971 NOTE: The client's Certificate message is capable of carrying a chain 972 of certificates. The restrictions mentioned in Table 4 apply only to 973 the client's certificate (first in the chain). 975 +------------------+------------------------------------------------+ 976 | Client | Client Certificate Type | 977 | Authentication | | 978 | Method | | 979 +------------------+------------------------------------------------+ 980 | ECDSA_sign | Certificate MUST contain an ECDSA-capable | 981 | | public key and be signed with ECDSA. | 982 | ECDSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 983 | | public key on the same elliptic curve as the | 984 | | server's long-term ECDH key. This certificate | 985 | | MUST be signed with ECDSA. | 986 | RSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 987 | | public key on the same elliptic curve as the | 988 | | server's long-term ECDH key. This certificate | 989 | | MUST be signed with RSA. | 990 +------------------+------------------------------------------------+ 992 Table 4: Client Certificate Types 994 Structure of this message: 996 Identical to the TLS client Certificate format. 998 Actions of the sender: 1000 The client constructs an appropriate certificate chain, and conveys 1001 it to the server in the Certificate message. 1003 Actions of the receiver: 1005 The TLS server validates the certificate chain, extracts the client's 1006 public key, and checks that the key type is appropriate for the 1007 client authentication method. 1009 5.7. Client Key Exchange 1011 When this message is sent: 1013 This message is sent in all key exchange algorithms. If client 1014 authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this 1015 message is empty. Otherwise, it contains the client's ephemeral ECDH 1016 public key. 1018 Meaning of the message: 1020 This message is used to convey ephemeral data relating to the key 1021 exchange belonging to the client (such as its ephemeral ECDH public 1022 key). 1024 Structure of this message: 1026 The TLS ClientKeyExchange message is extended as follows. 1028 enum { implicit, explicit } PublicValueEncoding; 1030 implicit, explicit: For ECC cipher suites, this indicates whether 1031 the client's ECDH public key is in the client's certificate 1032 ("implicit") or is provided, as an ephemeral ECDH public key, in 1033 the ClientKeyExchange message ("explicit"). (This is "explicit" 1034 in ECC cipher suites except when the client uses the 1035 ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication 1036 mechanism.) 1038 struct { 1039 select (PublicValueEncoding) { 1040 case implicit: struct { }; 1041 case explicit: ECPoint ecdh_Yc; 1042 } ecdh_public; 1043 } ClientECDiffieHellmanPublic; 1044 ecdh_Yc: Contains the client's ephemeral ECDH public key as a byte 1045 string ECPoint.point, which may represent an elliptic curve point 1046 in uncompressed or compressed format. Here, the format MUST 1047 conform to what the server has requested through a Supported Point 1048 Formats Extension if this extension was used, and MUST be 1049 uncompressed if this extension was not used. 1051 struct { 1052 select (KeyExchangeAlgorithm) { 1053 case ec_diffie_hellman: ClientECDiffieHellmanPublic; 1054 } exchange_keys; 1055 } ClientKeyExchange; 1057 Actions of the sender: 1059 The client selects an ephemeral ECDH public key corresponding to the 1060 parameters it received from the server according to the ECKAS-DH1 1061 scheme from IEEE 1363. It conveys this information to the client in 1062 the ClientKeyExchange message using the format defined above. 1064 Actions of the receiver: 1066 The server retrieves the client's ephemeral ECDH public key from the 1067 ClientKeyExchange message and checks that it is on the same elliptic 1068 curve as the server's ECDH key. 1070 5.8. Certificate Verify 1072 When this message is sent: 1074 This message is sent when the client sends a client certificate 1075 containing a public key usable for digital signatures, e.g., when the 1076 client is authenticated using the ECDSA_sign mechanism. 1078 Meaning of the message: 1080 This message contains a signature that proves possession of the 1081 private key corresponding to the public key in the client's 1082 Certificate message. 1084 Structure of this message: 1086 The TLS CertificateVerify message and the underlying Signature type 1087 are defined in the TLS base specifications, and the latter is 1088 extended here in Section 5.4. For the ecdsa case, the signature 1089 field in the CertificateVerify message contains an ECDSA signature 1090 computed over handshake messages exchanged so far, exactly similar to 1091 CertificateVerify with other signing algorithms: 1093 CertificateVerify.signature.sha_hash 1094 SHA(handshake_messages); 1096 ECDSA signatures are computed as described in Section 5.10, and SHA 1097 in the above template for sha_hash accordingly may denote a hash 1098 algorithm other than SHA-1. As per ANSI X9.62, an ECDSA signature 1099 consists of a pair of integers, r and s. The digitally-signed 1100 element is encoded as an opaque vector <0..2^16-1>, the contents of 1101 which are the DER encoding [CCITT.X690] corresponding to the 1102 following ASN.1 notation [CCITT.X680]. 1104 Ecdsa-Sig-Value ::= SEQUENCE { 1105 r INTEGER, 1106 s INTEGER 1107 } 1109 Actions of the sender: 1111 The client computes its signature over all handshake messages sent or 1112 received starting at client hello and up to but not including this 1113 message. It uses the private key corresponding to its certified 1114 public key to compute the signature, which is conveyed in the format 1115 defined above. 1117 Actions of the receiver: 1119 The server extracts the client's signature from the CertificateVerify 1120 message, and verifies the signature using the public key it received 1121 in the client's Certificate message. 1123 5.9. Elliptic Curve Certificates 1125 X.509 certificates containing ECC public keys or signed using ECDSA 1126 MUST comply with [RFC3279] or another RFC that replaces or extends 1127 it. Clients SHOULD use the elliptic curve domain parameters 1128 recommended in ANSI X9.62, FIPS 186-4, and SEC 2 [SECG-SEC2]. 1130 5.10. ECDH, ECDSA, and RSA Computations 1132 All ECDH calculations (including parameter and key generation as well 1133 as the shared secret calculation) are performed according to 1134 [IEEE.P1363.1998] using the ECKAS-DH1 scheme with the identity map as 1135 key derivation function (KDF), so that the premaster secret is the 1136 x-coordinate of the ECDH shared secret elliptic curve point 1137 represented as an octet string. Note that this octet string (Z in 1138 IEEE 1363 terminology) as output by FE2OSP, the Field Element to 1139 Octet String Conversion Primitive, has constant length for any given 1140 field; leading zeros found in this octet string MUST NOT be 1141 truncated. 1143 (Note that this use of the identity KDF is a technicality. The 1144 complete picture is that ECDH is employed with a non-trivial KDF 1145 because TLS does not directly use the premaster secret for anything 1146 other than for computing the master secret. In TLS 1.0 and 1.1, this 1147 means that the MD5- and SHA-1-based TLS PRF serves as a KDF; in TLS 1148 1.2 the KDF is determined by ciphersuite; it is conceivable that 1149 future TLS versions or new TLS extensions introduced in the future 1150 may vary this computation.) 1152 All ECDSA computations MUST be performed according to ANSI X9.62 or 1153 its successors. Data to be signed/verified is hashed, and the result 1154 run directly through the ECDSA algorithm with no additional hashing. 1155 The default hash function is SHA-1 [FIPS.180-2], and sha_size (see 1156 Section 5.4 and Section 5.8) is 20. However, an alternative hash 1157 function, such as one of the new SHA hash functions specified in FIPS 1158 180-2 [FIPS.180-2], may be used instead if the certificate containing 1159 the EC public key explicitly requires use of another hash function. 1160 (The mechanism for specifying the required hash function has not been 1161 standardized, but this provision anticipates such standardization and 1162 obviates the need to update this document in response. Future PKIX 1163 RFCs may choose, for example, to specify the hash function to be used 1164 with a public key in the parameters field of subjectPublicKeyInfo.) 1165 All RSA signatures must be generated and verified according to 1166 [PKCS1] block type 1. 1168 6. Cipher Suites 1170 The table below defines new ECC cipher suites that use the key 1171 exchange algorithms specified in Section 2. 1173 +---------------------------------------+----------------+ 1174 | CipherSuite | Identifier | 1175 +---------------------------------------+----------------+ 1176 | TLS_ECDH_ECDSA_WITH_NULL_SHA | { 0xC0, 0x01 } | 1177 | TLS_ECDH_ECDSA_WITH_RC4_128_SHA | { 0xC0, 0x02 } | 1178 | TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x03 } | 1179 | TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x04 } | 1180 | TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x05 } | 1181 | | | 1182 | TLS_ECDHE_ECDSA_WITH_NULL_SHA | { 0xC0, 0x06 } | 1183 | TLS_ECDHE_ECDSA_WITH_RC4_128_SHA | { 0xC0, 0x07 } | 1184 | TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x08 } | 1185 | TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x09 } | 1186 | TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0A } | 1187 | | | 1188 | TLS_ECDH_RSA_WITH_NULL_SHA | { 0xC0, 0x0B } | 1189 | TLS_ECDH_RSA_WITH_RC4_128_SHA | { 0xC0, 0x0C } | 1190 | TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x0D } | 1191 | TLS_ECDH_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x0E } | 1192 | TLS_ECDH_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0F } | 1193 | | | 1194 | TLS_ECDHE_RSA_WITH_NULL_SHA | { 0xC0, 0x10 } | 1195 | TLS_ECDHE_RSA_WITH_RC4_128_SHA | { 0xC0, 0x11 } | 1196 | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x12 } | 1197 | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x13 } | 1198 | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x14 } | 1199 | | | 1200 | TLS_ECDH_anon_WITH_NULL_SHA | { 0xC0, 0x15 } | 1201 | TLS_ECDH_anon_WITH_RC4_128_SHA | { 0xC0, 0x16 } | 1202 | TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x17 } | 1203 | TLS_ECDH_anon_WITH_AES_128_CBC_SHA | { 0xC0, 0x18 } | 1204 | TLS_ECDH_anon_WITH_AES_256_CBC_SHA | { 0xC0, 0x19 } | 1205 +---------------------------------------+----------------+ 1207 Table 5: TLS ECC cipher suites 1209 The key exchange method, cipher, and hash algorithm for each of these 1210 cipher suites are easily determined by examining the name. Ciphers 1211 (other than AES ciphers) and hash algorithms are defined in [RFC2246] 1212 and [RFC4346]. AES ciphers are defined in [RFC5246]. 1214 Server implementations SHOULD support all of the following cipher 1215 suites, and client implementations SHOULD support at least one of 1216 them: 1218 o TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 1219 o TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 1220 o TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 1221 o TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA. 1223 7. Security Considerations 1225 Security issues are discussed throughout this memo. 1227 For TLS handshakes using ECC cipher suites, the security 1228 considerations in appendices D of all three TLS base documemts apply 1229 accordingly. 1231 Security discussions specific to ECC can be found in 1232 [IEEE.P1363.1998] and [ANSI.X9-62.2005]. One important issue that 1233 implementers and users must consider is elliptic curve selection. 1234 Guidance on selecting an appropriate elliptic curve size is given in 1235 Table 1. 1237 Beyond elliptic curve size, the main issue is elliptic curve 1238 structure. As a general principle, it is more conservative to use 1239 elliptic curves with as little algebraic structure as possible. 1240 Thus, random curves are more conservative than special curves such as 1241 Koblitz curves, and curves over F_p with p random are more 1242 conservative than curves over F_p with p of a special form (and 1243 curves over F_p with p random might be considered more conservative 1244 than curves over F_2^m as there is no choice between multiple fields 1245 of similar size for characteristic 2). Note, however, that algebraic 1246 structure can also lead to implementation efficiencies, and 1247 implementers and users may, therefore, need to balance conservatism 1248 against a need for efficiency. Concrete attacks are known against 1249 only very few special classes of curves, such as supersingular 1250 curves, and these classes are excluded from the ECC standards that 1251 this document references [IEEE.P1363.1998], [ANSI.X9-62.2005]. 1253 Another issue is the potential for catastrophic failures when a 1254 single elliptic curve is widely used. In this case, an attack on the 1255 elliptic curve might result in the compromise of a large number of 1256 keys. Again, this concern may need to be balanced against efficiency 1257 and interoperability improvements associated with widely-used curves. 1258 Substantial additional information on elliptic curve choice can be 1259 found in [IEEE.P1363.1998], [ANSI.X9-62.2005], and [FIPS.186-4]. 1261 Implementers and users must also consider whether they need forward 1262 secrecy. Forward secrecy refers to the property that session keys 1263 are not compromised if the static, certified keys belonging to the 1264 server and client are compromised. The ECDHE_ECDSA and ECDHE_RSA key 1265 exchange algorithms provide forward secrecy protection in the event 1266 of server key compromise, while ECDH_ECDSA and ECDH_RSA do not. 1267 Similarly, if the client is providing a static, certified key, 1268 ECDSA_sign client authentication provides forward secrecy protection 1269 in the event of client key compromise, while ECDSA_fixed_ECDH and 1270 RSA_fixed_ECDH do not. Thus, to obtain complete forward secrecy 1271 protection, ECDHE_ECDSA or ECDHE_RSA must be used for key exchange, 1272 with ECDSA_sign used for client authentication if necessary. Here 1273 again the security benefits of forward secrecy may need to be 1274 balanced against the improved efficiency offered by other options. 1276 8. IANA Considerations 1278 [RFC4492], the predecessor of this document has already defined the 1279 IANA registries for the following: 1281 o NamedCurve Section 5.1 1282 o ECPointFormat Section 5.1 1283 o ECCurveType Section 5.4 1285 For each name space, this document defines the initial value 1286 assignments and defines a range of 256 values (NamedCurve) or eight 1287 values (ECPointFormat and ECCurveType) reserved for Private Use. Any 1288 additional assignments require IETF Consensus action. 1290 9. Acknowledgements 1292 Most of the text is this document is taken from [RFC4492], the 1293 predecessor of this document. The authors of that document were: 1295 o Simon Blake-Wilson 1296 o Nelson Bolyard 1297 o Vipul Gupta 1298 o Chris Hawk 1299 o Bodo Moeller 1301 In the predecessor document, the authors acknowledged the 1302 contributions of Bill Anderson and Tim Dierks. 1304 10. Version History for This Draft 1306 NOTE TO RFC EDITOR: PLEASE REMOVE THIS SECTION 1308 Changes from RFC 4492 to draft-nir-tls-rfc4492bis-00: 1310 o Added TLS 1.2 to references. 1311 o Moved RFC 4492 authors to acknowledgements. 1312 o Removed list of required reading for ECC. 1314 11. References 1316 11.1. Normative References 1318 [ANSI.X9-62.2005] 1319 American National Standards Institute, "Public Key 1320 Cryptography for the Financial Services Industry, The 1321 Elliptic Curve Digital Signature Algorithm (ECDSA)", ANSI 1322 X9.62, 2005. 1324 [CCITT.X680] 1325 International Telephone and Telegraph Consultative 1326 Committee, "Abstract Syntax Notation One (ASN.1): 1327 Specification of basic notation", CCITT Recommendation 1328 X.680, July 2002. 1330 [CCITT.X690] 1331 International Telephone and Telegraph Consultative 1332 Committee, "ASN.1 encoding rules: Specification of basic 1333 encoding Rules (BER), Canonical encoding rules (CER) and 1334 Distinguished encoding rules (DER)", CCITT Recommendation 1335 X.690, July 2002. 1337 [FIPS.186-4] 1338 National Institute of Standards and Technology, "Digital 1339 Signature Standard", FIPS PUB 186-4, 2013, 1340 . 1343 [PKCS1] RSA Laboratories, "RSA Encryption Standard, Version 1.5", 1344 PKCS 1, November 1993. 1346 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1347 Requirement Levels", BCP 14, RFC 2119, March 1997. 1349 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1350 RFC 2246, January 1999. 1352 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 1353 Identifiers for the Internet X.509 Public Key 1354 Infrastructure Certificate and Certificate Revocation List 1355 (CRL) Profile", RFC 3279, April 2002. 1357 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1358 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 1360 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 1361 and T. Wright, "Transport Layer Security (TLS) 1362 Extensions", RFC 4366, April 2006. 1364 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1365 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1367 [SECG-SEC2] 1368 CECG, "Recommended Elliptic Curve Domain Parameters", SEC 1369 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 Dierks, T. and E. Rescorla, "The Transport Layer Security 1381 (TLS) Protocol Version 1.3", draft-ietf-tls-tls13-02 (work 1382 in progress), July 2014. 1384 [IEEE.P1363.1998] 1385 Institute of Electrical and Electronics Engineers, 1386 "Standard Specifications for Public Key Cryptography", 1387 IEEE Draft P1363, 1998. 1389 [Lenstra_Verheul] 1390 Lenstra, A. and E. Verheul, "Selecting Cryptographic Key 1391 Sizes", Journal of Cryptology 14 (2001) 255-293, 2001. 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 6: Equivalent curves defined by SECG, ANSI, and NIST 1438 Appendix B. Differences from RFC 4492 1440 o Added TLS 1.2 1442 Author's Address 1444 Yoav Nir 1445 Check Point Software Technologies Ltd. 1446 5 Hasolelim st. 1447 Tel Aviv 6789735 1448 Israel 1450 Email: ynir.ietf@gmail.com