idnits 2.17.1 draft-nir-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 798 has weird spacing: '...rveType cur...' == Line 811 has weird spacing: '... opaque k <1....' == Line 813 has weird spacing: '... opaque k1 <1...' == Line 814 has weird spacing: '... opaque k2 <1...' == Line 815 has weird spacing: '... opaque k3 <1...' == (2 more instances...) -- The document date (August 4, 2014) is 3546 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Missing Reference: 'ChangeCipherSpec' is mentioned on line 221, but not defined ** 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) == Outdated reference: A later version (-28) exists of draft-ietf-tls-tls13-02 -- Obsolete informational reference (is this intentional?): RFC 4492 (Obsoleted by RFC 8422) Summary: 4 errors (**), 0 flaws (~~), 9 warnings (==), 2 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: Experimental August 4, 2014 5 Expires: February 5, 2015 7 Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer 8 Security (TLS) Versions 1.2 and Earlier 9 draft-nir-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 February 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 . . . . . . . . . . . . . . . . . . . . . . . . . 3 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 . . . . . . . . . . . . . . . . . . . . . . . . . 7 60 2.4. ECDHE_RSA . . . . . . . . . . . . . . . . . . . . . . . . 7 61 2.5. ECDH_anon . . . . . . . . . . . . . . . . . . . . . . . . 7 62 3. Client Authentication . . . . . . . . . . . . . . . . . . . . 8 63 3.1. ECDSA_sign . . . . . . . . . . . . . . . . . . . . . . . . 8 64 3.2. ECDSA_fixed_ECDH . . . . . . . . . . . . . . . . . . . . . 9 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 . . . . . . . . . . . . . . . . . 11 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: 124 o the use of the Elliptic Curve Diffie-Hellman (ECDH) key agreement 125 scheme with long-term or ephemeral keys to establish the TLS 126 premaster secret, and 127 o the use of fixed-ECDH certificates and ECDSA for authentication of 128 TLS peers. 130 The remainder of this document is organized as follows. Section 2 131 provides an overview of ECC-based key exchange algorithms for TLS. 132 Section 3 describes the use of ECC certificates for client 133 authentication. TLS extensions that allow a client to negotiate the 134 use of specific curves and point formats are presented in Section 4. 135 Section 5 specifies various data structures needed for an ECC-based 136 handshake, their encoding in TLS messages, and the processing of 137 those messages. Section 6 defines ECC-based cipher suites and 138 identifies a small subset of these as recommended for all 139 implementations of this specification. Section 7 discusses security 140 considerations. Section 8 describes IANA considerations for the name 141 spaces created by this document's predecessor. Section 9 gives 142 acknowledgements. Appendix B provides differences from [RFC4492], 143 the document that this one replaces. 145 Implementation of this specification requires familiarity with TLS, 146 TLS extensions [RFC4366], and ECC (TBD: reference Wikipedia here?). 148 1.1. Conventions Used in This Document 150 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 151 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 152 document are to be interpreted as described in [RFC2119]. 154 2. Key Exchange Algorithm 156 This document introduces five new ECC-based key exchange algorithms 157 for TLS. All of them use ECDH to compute the TLS premaster secret, 158 and they differ only in the lifetime of ECDH keys (long-term or 159 ephemeral) and the mechanism (if any) used to authenticate them. The 160 derivation of the TLS master secret from the premaster secret and the 161 subsequent generation of bulk encryption/MAC keys and initialization 162 vectors is independent of the key exchange algorithm and not impacted 163 by the introduction of ECC. 165 The table below summarizes the new key exchange algorithms, which 166 mimic DH_DSS, DHE_DSS, DH_RSA, DHE_RSA, and DH_anon, respectively. 168 +-------------+--------------------------------------------+ 169 | Algorithm | Description | 170 +-------------+--------------------------------------------+ 171 | ECDH_ECDSA | Fixed ECDH with ECDSA-signed certificates. | 172 | ECDHE_ECDSA | Ephemeral ECDH with ECDSA signatures. | 173 | ECDH_RSA | Fixed ECDH with RSA-signed certificates. | 174 | ECDHE_RSA | Ephemeral ECDH with RSA signatures. | 175 | ECDH_anon | Anonymous ECDH, no signatures. | 176 +-------------+--------------------------------------------+ 178 Table 2: ECC Key Exchange Algorithms 180 The ECDHE_ECDSA and ECDHE_RSA key exchange mechanisms provide forward 181 secrecy. With ECDHE_RSA, a server can reuse its existing RSA 182 certificate and easily comply with a constrained client's elliptic 183 curve preferences (see Section 4). However, the computational cost 184 incurred by a server is higher for ECDHE_RSA than for the traditional 185 RSA key exchange, which does not provide forward secrecy. 187 The ECDH_RSA mechanism requires a server to acquire an ECC 188 certificate, but the certificate issuer can still use an existing RSA 189 key for signing. This eliminates the need to update the keys of 190 trusted certification authorities accepted by TLS clients. The 191 ECDH_ECDSA mechanism requires ECC keys for the server as well as the 192 certification authority and is best suited for constrained devices 193 unable to support RSA. 195 The anonymous key exchange algorithm does not provide authentication 196 of the server or the client. Like other anonymous TLS key exchanges, 197 it is subject to man-in-the-middle attacks. Implementations of this 198 algorithm SHOULD provide authentication by other means. 200 Note that there is no structural difference between ECDH and ECDSA 201 keys. A certificate issuer may use X.509 v3 keyUsage and 202 extendedKeyUsage extensions to restrict the use of an ECC public key 203 to certain computations. This document refers to an ECC key as ECDH- 204 capable if its use in ECDH is permitted. ECDSA-capable is defined 205 similarly. 207 Client Server 208 ------ ------ 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 224 Application Data <-------> Application Data 226 * message is not sent under some conditions 227 + message is not sent unless client authentication 228 is desired 230 Figure 1: Message flow in a full TLS handshake 232 Figure 1 shows all messages involved in the TLS key establishment 233 protocol (aka full handshake). The addition of ECC has direct impact 234 only on the ClientHello, the ServerHello, the server's Certificate 235 message, the ServerKeyExchange, the ClientKeyExchange, the 236 CertificateRequest, the client's Certificate message, and the 237 CertificateVerify. Next, we describe each ECC key exchange algorithm 238 in greater detail in terms of the content and processing of these 239 messages. For ease of exposition, we defer discussion of client 240 authentication and associated messages (identified with a + in Figure 241 1) until Section 3 and of the optional ECC-specific extensions (which 242 impact the Hello messages) until Section 4. 244 2.1. ECDH_ECDSA 246 In ECDH_ECDSA, the server's certificate MUST contain an ECDH-capable 247 public key and be signed with ECDSA. 249 A ServerKeyExchange MUST NOT be sent (the server's certificate 250 contains all the necessary keying information required by the client 251 to arrive at the premaster secret). 253 The client generates an ECDH key pair on the same curve as the 254 server's long-term public key and sends its public key in the 255 ClientKeyExchange message (except when using client authentication 256 algorithm ECDSA_fixed_ECDH or RSA_fixed_ECDH, in which case the 257 modifications from Section 3.2 or Section 3.3. 259 Both client and server perform an ECDH operation and use the 260 resultant shared secret as the premaster secret. All ECDH 261 calculations are performed as specified in Section 5.10. 263 2.2. ECDHE_ECDSA 265 In ECDHE_ECDSA, the server's certificate MUST contain an ECDSA- 266 capable public key and be signed with ECDSA. 268 The server sends its ephemeral ECDH public key and a specification of 269 the corresponding curve in the ServerKeyExchange message. These 270 parameters MUST be signed with ECDSA using the private key 271 corresponding to the public key in the server's Certificate. 273 The client generates an ECDH key pair on the same curve as the 274 server's ephemeral ECDH key and sends its public key in the 275 ClientKeyExchange message. 277 Both client and server perform an ECDH operation Section 5.10 and use 278 the resultant shared secret as the premaster secret. 280 2.3. ECDH_RSA 282 This key exchange algorithm is the same as ECDH_ECDSA except that the 283 server's certificate MUST be signed with RSA rather than ECDSA. 285 2.4. ECDHE_RSA 287 This key exchange algorithm is the same as ECDHE_ECDSA except that 288 the server's certificate MUST contain an RSA public key authorized 289 for signing, and that the signature in the ServerKeyExchange message 290 must be computed with the corresponding RSA private key. The server 291 certificate MUST be signed with RSA. 293 2.5. ECDH_anon 295 In ECDH_anon, the server's Certificate, the CertificateRequest, the 296 client's Certificate, and the CertificateVerify messages MUST NOT be 297 sent. 299 The server MUST send an ephemeral ECDH public key and a specification 300 of the corresponding curve in the ServerKeyExchange message. These 301 parameters MUST NOT be signed. 303 The client generates an ECDH key pair on the same curve as the 304 server's ephemeral ECDH key and sends its public key in the 305 ClientKeyExchange message. 307 Both client and server perform an ECDH operation and use the 308 resultant shared secret as the premaster secret. All ECDH 309 calculations are performed as specified in Section 5.10. 311 Note that while the ECDH_ECDSA, ECDHE_ECDSA, ECDH_RSA, and ECDHE_RSA 312 key exchange algorithms require the server's certificate to be signed 313 with a particular signature scheme, this specification (following the 314 similar cases of DH_DSS, DHE_DSS, DH_RSA, and DHE_RSA in the TLS base 315 documents) does not impose restrictions on signature schemes used 316 elsewhere in the certificate chain. (Often such restrictions will be 317 useful, and it is expected that this will be taken into account in 318 certification authorities' signing practices. However, such 319 restrictions are not strictly required in general: Even if it is 320 beyond the capabilities of a client to completely validate a given 321 chain, the client may be able to validate the server's certificate by 322 relying on a trusted certification authority whose certificate 323 appears as one of the intermediate certificates in the chain.) 325 3. Client Authentication 327 This document defines three new client authentication mechanisms, 328 each named after the type of client certificate involved: ECDSA_sign, 329 ECDSA_fixed_ECDH, and RSA_fixed_ECDH. The ECDSA_sign mechanism is 330 usable with any of the non-anonymous ECC key exchange algorithms 331 described in Section 2 as well as other non-anonymous (non-ECC) key 332 exchange algorithms defined in TLS. The ECDSA_fixed_ECDH and 333 RSA_fixed_ECDH mechanisms are usable with ECDH_ECDSA and ECDH_RSA. 334 Their use with ECDHE_ECDSA and ECDHE_RSA is prohibited because the 335 use of a long-term ECDH client key would jeopardize the forward 336 secrecy property of these algorithms. 338 The server can request ECC-based client authentication by including 339 one or more of these certificate types in its CertificateRequest 340 message. The server must not include any certificate types that are 341 prohibited for the negotiated key exchange algorithm. The client 342 must check if it possesses a certificate appropriate for any of the 343 methods suggested by the server and is willing to use it for 344 authentication. 346 If these conditions are not met, the client should send a client 347 Certificate message containing no certificates. In this case, the 348 ClientKeyExchange should be sent as described in Section 2, and the 349 CertificateVerify should not be sent. If the server requires client 350 authentication, it may respond with a fatal handshake failure alert. 352 If the client has an appropriate certificate and is willing to use it 353 for authentication, it must send that certificate in the client's 354 Certificate message (as per Section 5.6) and prove possession of the 355 private key corresponding to the certified key. The process of 356 determining an appropriate certificate and proving possession is 357 different for each authentication mechanism and described below. 359 NOTE: It is permissible for a server to request (and the client to 360 send) a client certificate of a different type than the server 361 certificate. 363 3.1. ECDSA_sign 365 To use this authentication mechanism, the client MUST possess a 366 certificate containing an ECDSA-capable public key and signed with 367 ECDSA. 369 The client proves possession of the private key corresponding to the 370 certified key by including a signature in the CertificateVerify 371 message as described in Section 5.8. 373 3.2. ECDSA_fixed_ECDH 375 To use this authentication mechanism, the client MUST possess a 376 certificate containing an ECDH-capable public key, and that 377 certificate MUST be signed with ECDSA. Furthermore, the client's 378 ECDH key MUST be on the same elliptic curve as the server's long-term 379 (certified) ECDH key. This might limit use of this mechanism to 380 closed environments. In situations where the client has an ECC key 381 on a different curve, it would have to authenticate using either 382 ECDSA_sign or a non-ECC mechanism (e.g., RSA). Using fixed ECDH for 383 both servers and clients is computationally more efficient than 384 mechanisms providing forward secrecy. 386 When using this authentication mechanism, the client MUST send an 387 empty ClientKeyExchange as described in Section 5.7 and MUST NOT send 388 the CertificateVerify message. The ClientKeyExchange is empty since 389 the client's ECDH public key required by the server to compute the 390 premaster secret is available inside the client's certificate. The 391 client's ability to arrive at the same premaster secret as the server 392 (demonstrated by a successful exchange of Finished messages) proves 393 possession of the private key corresponding to the certified public 394 key, and the CertificateVerify message is unnecessary. 396 3.3. RSA_fixed_ECDH 398 This authentication mechanism is identical to ECDSA_fixed_ECDH except 399 that the client's certificate MUST be signed with RSA. 401 Note that while the ECDSA_sign, ECDSA_fixed_ECDH, and RSA_fixed_ECDH 402 client authentication mechanisms require the client's certificate to 403 be signed with a particular signature scheme, this specification does 404 not impose restrictions on signature schemes used elsewhere in the 405 certificate chain. (Often such restrictions will be useful, and it 406 is expected that this will be taken into account in certification 407 authorities' signing practices. However, such restrictions are not 408 strictly required in general: Even if it is beyond the capabilities 409 of a server to completely validate a given chain, the server may be 410 able to validate the clients certificate by relying on a trust anchor 411 that appears as one of the intermediate certificates in the chain.) 413 4. TLS Extensions for ECC 415 Two new TLS extensions are defined in this specification: (i) the 416 Supported Elliptic Curves Extension, and (ii) the Supported Point 417 Formats Extension. These allow negotiating the use of specific 418 curves and point formats (e.g., compressed vs. uncompressed, 419 respectively) during a handshake starting a new session. These 420 extensions are especially relevant for constrained clients that may 421 only support a limited number of curves or point formats. They 422 follow the general approach outlined in [RFC4366]; message details 423 are specified in Section 5. The client enumerates the curves it 424 supports and the point formats it can parse by including the 425 appropriate extensions in its ClientHello message. The server 426 similarly enumerates the point formats it can parse by including an 427 extension in its ServerHello message. 429 A TLS client that proposes ECC cipher suites in its ClientHello 430 message SHOULD include these extensions. Servers implementing ECC 431 cipher suites MUST support these extensions, and when a client uses 432 these extensions, servers MUST NOT negotiate the use of an ECC cipher 433 suite unless they can complete the handshake while respecting the 434 choice of curves and compression techniques specified by the client. 435 This eliminates the possibility that a negotiated ECC handshake will 436 be subsequently aborted due to a client's inability to deal with the 437 server's EC key. 439 The client MUST NOT include these extensions in the ClientHello 440 message if it does not propose any ECC cipher suites. A client that 441 proposes ECC cipher suites may choose not to include these 442 extensions. In this case, the server is free to choose any one of 443 the elliptic curves or point formats listed in Section 5. That 444 section also describes the structure and processing of these 445 extensions in greater detail. 447 In the case of session resumption, the server simply ignores the 448 Supported Elliptic Curves Extension and the Supported Point Formats 449 Extension appearing in the current ClientHello message. These 450 extensions only play a role during handshakes negotiating a new 451 session. 453 5. Data Structures and Computations 455 This section specifies the data structures and computations used by 456 ECC-based key mechanisms specified in the previous three sections. 457 The presentation language used here is the same as that used in TLS. 458 Since this specification extends TLS, these descriptions should be 459 merged with those in the TLS specification and any others that extend 460 TLS. This means that enum types may not specify all possible values, 461 and structures with multiple formats chosen with a select() clause 462 may not indicate all possible cases. 464 5.1. Client Hello Extensions 466 This section specifies two TLS extensions that can be included with 467 the ClientHello message as described in [RFC4366], the Supported 468 Elliptic Curves Extension and the Supported Point Formats Extension. 470 When these extensions are sent: 472 The extensions SHOULD be sent along with any ClientHello message that 473 proposes ECC cipher suites. 475 Meaning of these extensions: 477 These extensions allow a client to enumerate the elliptic curves it 478 supports and/or the point formats it can parse. 480 Structure of these extensions: 482 The general structure of TLS extensions is described in [RFC4366], 483 and this specification adds two new types to ExtensionType. 485 enum { elliptic_curves(10), ec_point_formats(11) } ExtensionType; 487 elliptic_curves (Supported Elliptic Curves Extension): Indicates the 488 set of elliptic curves supported by the client. For this 489 extension, the opaque extension_data field contains 490 EllipticCurveList. See Section 5.1.1 for details. 491 ec_point_formats (Supported Point Formats Extension): Indicates the 492 set of point formats that the client can parse. For this 493 extension, the opaque extension_data field contains 494 ECPointFormatList. See Section 5.1.2 for details. 496 Actions of the sender: 498 A client that proposes ECC cipher suites in its ClientHello message 499 appends these extensions (along with any others), enumerating the 500 curves it supports and the point formats it can parse. Clients 501 SHOULD send both the Supported Elliptic Curves Extension and the 502 Supported Point Formats Extension. If the Supported Point Formats 503 Extension is indeed sent, it MUST contain the value 0 (uncompressed) 504 as one of the items in the list of point formats. 506 Actions of the receiver: 508 A server that receives a ClientHello containing one or both of these 509 extensions MUST use the client's enumerated capabilities to guide its 510 selection of an appropriate cipher suite. One of the proposed ECC 511 cipher suites must be negotiated only if the server can successfully 512 complete the handshake while using the curves and point formats 513 supported by the client (cf. Section 5.3 and Section 5.4). 515 NOTE: A server participating in an ECDHE-ECDSA key exchange may use 516 different curves for (i) the ECDSA key in its certificate, and (ii) 517 the ephemeral ECDH key in the ServerKeyExchange message. The server 518 must consider the extensions in both cases. 520 If a server does not understand the Supported Elliptic Curves 521 Extension, does not understand the Supported Point Formats Extension, 522 or is unable to complete the ECC handshake while restricting itself 523 to the enumerated curves and point formats, it MUST NOT negotiate the 524 use of an ECC cipher suite. Depending on what other cipher suites 525 are proposed by the client and supported by the server, this may 526 result in a fatal handshake failure alert due to the lack of common 527 cipher suites. 529 5.1.1. Supported Elliptic Curves Extension 531 enum { 532 sect163k1 (1), sect163r1 (2), sect163r2 (3), 533 sect193r1 (4), sect193r2 (5), sect233k1 (6), 534 sect233r1 (7), sect239k1 (8), sect283k1 (9), 535 sect283r1 (10), sect409k1 (11), sect409r1 (12), 536 sect571k1 (13), sect571r1 (14), secp160k1 (15), 537 secp160r1 (16), secp160r2 (17), secp192k1 (18), 538 secp192r1 (19), secp224k1 (20), secp224r1 (21), 539 secp256k1 (22), secp256r1 (23), secp384r1 (24), 540 secp521r1 (25), 541 reserved (0xFE00..0xFEFF), 542 arbitrary_explicit_prime_curves(0xFF01), 543 arbitrary_explicit_char2_curves(0xFF02), 544 (0xFFFF) 545 } NamedCurve; 547 sect163k1, etc: Indicates support of the corresponding named curve or 548 class of explicitly defined curves. The named curves defined here 549 are those specified in SEC 2 [SECG-SEC2]. Note that many of these 550 curves are also recommended in ANSI X9.62 [ANSI.X9-62.2005] and FIPS 551 186-4 [FIPS.186-4]. Values 0xFE00 through 0xFEFF are reserved for 552 private use. Values 0xFF01 and 0xFF02 indicate that the client 553 supports arbitrary prime and characteristic-2 curves, respectively 554 (the curve parameters must be encoded explicitly in ECParameters). 556 The NamedCurve name space is maintained by IANA. See Section 8 for 557 information on how new value assignments are added. 559 struct { 560 NamedCurve elliptic_curve_list<1..2^16-1> 561 } EllipticCurveList; 563 Items in elliptic_curve_list are ordered according to the client's 564 preferences (favorite choice first). 566 As an example, a client that only supports secp192r1 (aka NIST P-192; 567 value 19 = 0x0013) and secp224r1 (aka NIST P-224; value 21 = 0x0015) 568 and prefers to use secp192r1 would include a TLS extension consisting 569 of the following octets. Note that the first two octets indicate the 570 extension type (Supported Elliptic Curves Extension): 572 00 0A 00 06 00 04 00 13 00 15 574 A client that supports arbitrary explicit characteristic-2 curves 575 (value 0xFF02) would include an extension consisting of the following 576 octets: 578 00 0A 00 04 00 02 FF 02 580 5.1.2. Supported Point Formats Extension 582 enum { uncompressed (0), ansiX962_compressed_prime (1), 583 ansiX962_compressed_char2 (2), reserved (248..255) 584 } ECPointFormat; 586 struct { 587 ECPointFormat ec_point_format_list<1..2^8-1> 588 } ECPointFormatList; 590 Three point formats are included in the definition of ECPointFormat 591 above. The uncompressed point format is the default format in that 592 implementations of this document MUST support it for all of their 593 supported curves. Compressed point formats reduce bandwidth by 594 including only the x-coordinate and a single bit of the y-coordinate 595 of the point. Implementations of this document MAY support the 596 ansiX962_compressed_prime and ansiX962_compressed_char2 formats, 597 where the former applies only to prime curves and the latter applies 598 only to characteristic-2 curves. (These formats are specified in 599 [ANSI.X9-62.2005].) Values 248 through 255 are reserved for private 600 use. 602 The ECPointFormat name space is maintained by IANA. See Section 8 603 for information on how new value assignments are added. 605 Items in ec_point_format_list are ordered according to the client's 606 preferences (favorite choice first). 608 A client that can parse only the uncompressed point format (value 0) 609 includes an extension consisting of the following octets; note that 610 the first two octets indicate the extension type (Supported Point 611 Formats Extension): 613 00 0B 00 02 01 00 615 A client that in the case of prime fields prefers the compressed 616 format (ansiX962_compressed_prime, value 1) over the uncompressed 617 format (value 0), but in the case of characteristic-2 fields prefers 618 the uncompressed format (value 0) over the compressed format 619 (ansiX962_compressed_char2, value 2), may indicate these preferences 620 by including an extension consisting of the following octets: 622 00 0B 00 04 03 01 00 02 624 5.2. Server Hello Extension 626 This section specifies a TLS extension that can be included with the 627 ServerHello message as described in [RFC4366], the Supported Point 628 Formats Extension. 630 When this extension is sent: 632 The Supported Point Formats Extension is included in a ServerHello 633 message in response to a ClientHello message containing the Supported 634 Point Formats Extension when negotiating an ECC cipher suite. 636 Meaning of this extension: 638 This extension allows a server to enumerate the point formats it can 639 parse (for the curve that will appear in its ServerKeyExchange 640 message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key 641 exchange algorithm, or for the curve that is used in the server's 642 public key that will appear in its Certificate message when using the 643 ECDH_ECDSA or ECDH_RSA key exchange algorithm). 645 Structure of this extension: 647 The server's Supported Point Formats Extension has the same structure 648 as the client's Supported Point Formats Extension (see 649 Section 5.1.2). Items in elliptic_curve_list here are ordered 650 according to the server's preference (favorite choice first). Note 651 that the server may include items that were not found in the client's 652 list (e.g., the server may prefer to receive points in compressed 653 format even when a client cannot parse this format: the same client 654 may nevertheless be capable of outputting points in compressed 655 format). 657 Actions of the sender: 659 A server that selects an ECC cipher suite in response to a 660 ClientHello message including a Supported Point Formats Extension 661 appends this extension (along with others) to its ServerHello 662 message, enumerating the point formats it can parse. The Supported 663 Point Formats Extension, when used, MUST contain the value 0 664 (uncompressed) as one of the items in the list of point formats. 666 Actions of the receiver: 668 A client that receives a ServerHello message containing a Supported 669 Point Formats Extension MUST respect the server's choice of point 670 formats during the handshake (cf. Section 5.6 and Section 5.7). If 671 no Supported Point Formats Extension is received with the 672 ServerHello, this is equivalent to an extension allowing only the 673 uncompressed point format. 675 5.3. Server Certificate 677 When this message is sent: 679 This message is sent in all non-anonymous ECC-based key exchange 680 algorithms. 682 Meaning of this message: 684 This message is used to authentically convey the server's static 685 public key to the client. The following table shows the server 686 certificate type appropriate for each key exchange algorithm. ECC 687 public keys MUST be encoded in certificates as described in 688 Section 5.9. 690 NOTE: The server's Certificate message is capable of carrying a chain 691 of certificates. The restrictions mentioned in Table 3 apply only to 692 the server's certificate (first in the chain). 694 +-------------+-----------------------------------------------------+ 695 | Algorithm | Server Certificate Type | 696 +-------------+-----------------------------------------------------+ 697 | ECDH_ECDSA | Certificate MUST contain an ECDH-capable public | 698 | | key. It MUST be signed with ECDSA. | 699 | ECDHE_ECDSA | Certificate MUST contain an ECDSA-capable public | 700 | | key. It MUST be signed with ECDSA. | 701 | ECDH_RSA | Certificate MUST contain an ECDH-capable public | 702 | | key. It MUST be signed with RSA. | 703 | ECDHE_RSA | Certificate MUST contain an RSA public key | 704 | | authorized for use in digital signatures. It MUST | 705 | | be signed with RSA. | 706 +-------------+-----------------------------------------------------+ 708 Table 3: Server Certificate Types 710 Structure of this message: 712 Identical to the TLS Certificate format. 714 Actions of the sender: 716 The server constructs an appropriate certificate chain and conveys it 717 to the client in the Certificate message. If the client has used a 718 Supported Elliptic Curves Extension, the public key in the server's 719 certificate MUST respect the client's choice of elliptic curves; in 720 particular, the public key MUST employ a named curve (not the same 721 curve as an explicit curve) unless the client has indicated support 722 for explicit curves of the appropriate type. If the client has used 723 a Supported Point Formats Extension, both the server's public key 724 point and (in the case of an explicit curve) the curve's base point 725 MUST respect the client's choice of point formats. (A server that 726 cannot satisfy these requirements MUST NOT choose an ECC cipher suite 727 in its ServerHello message.) 729 Actions of the receiver: 731 The client validates the certificate chain, extracts the server's 732 public key, and checks that the key type is appropriate for the 733 negotiated key exchange algorithm. (A possible reason for a fatal 734 handshake failure is that the client's capabilities for handling 735 elliptic curves and point formats are exceeded; cf. Section 5.1.) 737 5.4. Server Key Exchange 739 When this message is sent: 741 This message is sent when using the ECDHE_ECDSA, ECDHE_RSA, and 742 ECDH_anon key exchange algorithms. 744 Meaning of this message: 746 This message is used to convey the server's ephemeral ECDH public key 747 (and the corresponding elliptic curve domain parameters) to the 748 client. 750 Structure of this message: 752 enum { explicit_prime (1), explicit_char2 (2), 753 named_curve (3), reserved(248..255) } ECCurveType; 755 explicit_prime: Indicates the elliptic curve domain parameters are 756 conveyed verbosely, and the underlying finite field is a prime 757 field. 758 explicit_char2: Indicates the elliptic curve domain parameters are 759 conveyed verbosely, and the underlying finite field is a 760 characteristic-2 field. 761 named_curve: Indicates that a named curve is used. This option 762 SHOULD be used when applicable. 764 Values 248 through 255 are reserved for private use. 766 The ECCurveType name space is maintained by IANA. See Section 8 for 767 information on how new value assignments are added. 769 struct { 770 opaque a <1..2^8-1>; 771 opaque b <1..2^8-1>; 772 } ECCurve; 774 a, b: These parameters specify the coefficients of the elliptic 775 curve. Each value contains the byte string representation of a 776 field element following the conversion routine in Section 4.3.3 of 777 [ANSI.X9-62.2005]. 779 struct { 780 opaque point <1..2^8-1>; 781 } ECPoint; 783 point: This is the byte string representation of an elliptic curve 784 point following the conversion routine in Section 4.3.6 of 785 [ANSI.X9-62.2005]. This byte string may represent an elliptic 786 curve point in uncompressed or compressed format; it MUST conform 787 to what the client has requested through a Supported Point Formats 788 Extension if this extension was used. 790 enum { ec_basis_trinomial, ec_basis_pentanomial } ECBasisType; 792 ec_basis_trinomial: Indicates representation of a characteristic-2 793 field using a trinomial basis. 794 ec_basis_pentanomial: Indicates representation of a characteristic-2 795 field using a pentanomial basis. 797 struct { 798 ECCurveType curve_type; 799 select (curve_type) { 800 case explicit_prime: 801 opaque prime_p <1..2^8-1>; 802 ECCurve curve; 803 ECPoint base; 804 opaque order <1..2^8-1>; 805 opaque cofactor <1..2^8-1>; 806 case explicit_char2: 807 uint16 m; 808 ECBasisType basis; 809 select (basis) { 810 case ec_trinomial: 811 opaque k <1..2^8-1>; 812 case ec_pentanomial: 813 opaque k1 <1..2^8-1>; 814 opaque k2 <1..2^8-1>; 815 opaque k3 <1..2^8-1>; 816 }; 817 ECCurve curve; 818 ECPoint base; 819 opaque order <1..2^8-1>; 820 opaque cofactor <1..2^8-1>; 821 case named_curve: 822 NamedCurve namedcurve; 823 }; 824 } ECParameters; 826 curve_type: This identifies the type of the elliptic curve domain 827 parameters. 828 prime_p: This is the odd prime defining the field Fp. 829 curve: Specifies the coefficients a and b of the elliptic curve E. 830 base: Specifies the base point G on the elliptic curve. 831 order: Specifies the order n of the base point. 832 cofactor: Specifies the cofactor h = #E(Fq)/n, where #E(Fq) 833 represents the number of points on the elliptic curve E defined 834 over the field Fq (either Fp or F2^m). 835 m: This is the degree of the characteristic-2 field F2^m. 836 k: The exponent k for the trinomial basis representation x^m + x^k+1. 837 k1, k2, k3: The exponents for the pentanomial representation x^m + 838 x^k3 + x^k2 + x^k1 + 1 (such that k3 > k2 > k1). 839 namedcurve: Specifies a recommended set of elliptic curve domain 840 parameters. All those values of NamedCurve are allowed that refer 841 to a specific curve. Values of NamedCurve that indicate support 842 for a class of explicitly defined curves are not allowed here 843 (they are only permissible in the ClientHello extension); this 844 applies to arbitrary_explicit_prime_curves(0xFF01) and 845 arbitrary_explicit_char2_curves(0xFF02). 847 struct { 848 ECParameters curve_params; 849 ECPoint public; 850 } ServerECDHParams; 852 curve_params: Specifies the elliptic curve domain parameters 853 associated with the ECDH public key. 854 public: The ephemeral ECDH public key. 856 The ServerKeyExchange message is extended as follows. 858 enum { ec_diffie_hellman } KeyExchangeAlgorithm; 860 ec_diffie_hellman: Indicates the ServerKeyExchange message contains 861 an ECDH public key. 863 select (KeyExchangeAlgorithm) { 864 case ec_diffie_hellman: 865 ServerECDHParams params; 866 Signature signed_params; 867 } ServerKeyExchange; 869 params: Specifies the ECDH public key and associated domain 870 parameters. 871 signed_params: A hash of the params, with the signature appropriate 872 to that hash applied. The private key corresponding to the 873 certified public key in the server's Certificate message is used 874 for signing. 876 enum { ecdsa } SignatureAlgorithm; 878 select (SignatureAlgorithm) { 879 case ecdsa: 880 digitally-signed struct { 881 opaque sha_hash[sha_size]; 882 }; 883 } Signature; 885 ServerKeyExchange.signed_params.sha_hash 886 SHA(ClientHello.random + ServerHello.random + 887 ServerKeyExchange.params); 889 NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange 890 algorithm and "anonymous" for ECDH_anon. These cases are defined in 891 TLS. SignatureAlgorithm is "ecdsa" for ECDHE_ECDSA. ECDSA 892 signatures are generated and verified as described in Section 5.10, 893 and SHA in the above template for sha_hash accordingly may denote a 894 hash algorithm other than SHA-1. As per ANSI X9.62, an ECDSA 895 signature consists of a pair of integers, r and s. The digitally- 896 signed element is encoded as an opaque vector <0..2^16-1>, the 897 contents of which are the DER encoding corresponding to the following 898 ASN.1 notation. 900 Ecdsa-Sig-Value ::= SEQUENCE { 901 r INTEGER, 902 s INTEGER 903 } 905 Actions of the sender: 907 The server selects elliptic curve domain parameters and an ephemeral 908 ECDH public key corresponding to these parameters according to the 909 ECKAS-DH1 scheme from IEEE 1363 [IEEE.P1363.1998]. It conveys this 910 information to the client in the ServerKeyExchange message using the 911 format defined above. 913 Actions of the receiver: 915 The client verifies the signature (when present) and retrieves the 916 server's elliptic curve domain parameters and ephemeral ECDH public 917 key from the ServerKeyExchange message. (A possible reason for a 918 fatal handshake failure is that the client's capabilities for 919 handling elliptic curves and point formats are exceeded; cf. 920 Section 5.1.) 922 5.5. Certificate Request 924 When this message is sent: 926 This message is sent when requesting client authentication. 928 Meaning of this message: 930 The server uses this message to suggest acceptable client 931 authentication methods. 933 Structure of this message: 935 The TLS CertificateRequest message is extended as follows. 937 enum { 938 ecdsa_sign(64), rsa_fixed_ecdh(65), 939 ecdsa_fixed_ecdh(66), (255) 940 } ClientCertificateType; 942 ecdsa_sign, etc. Indicates that the server would like to use the 943 corresponding client authentication method specified in Section 3. 945 Actions of the sender: 947 The server decides which client authentication methods it would like 948 to use, and conveys this information to the client using the format 949 defined above. 951 Actions of the receiver: 953 The client determines whether it has a suitable certificate for use 954 with any of the requested methods and whether to proceed with client 955 authentication. 957 5.6. Client Certificate 959 When this message is sent: 961 This message is sent in response to a CertificateRequest when a 962 client has a suitable certificate and has decided to proceed with 963 client authentication. (Note that if the server has used a Supported 964 Point Formats Extension, a certificate can only be considered 965 suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and 966 ECDSA_fixed_ECDH authentication methods if the public key point 967 specified in it respects the server's choice of point formats. If no 968 Supported Point Formats Extension has been used, a certificate can 969 only be considered suitable for use with these authentication methods 970 if the point is represented in uncompressed point format.) 972 Meaning of this message: 974 This message is used to authentically convey the client's static 975 public key to the server. The following table summarizes what client 976 certificate types are appropriate for the ECC-based client 977 authentication mechanisms described in Section 3. ECC public keys 978 must be encoded in certificates as described in Section 5.9. 980 NOTE: The client's Certificate message is capable of carrying a chain 981 of certificates. The restrictions mentioned in Table 4 apply only to 982 the client's certificate (first in the chain). 984 +------------------+------------------------------------------------+ 985 | Client | Client Certificate Type | 986 | Authentication | | 987 | Method | | 988 +------------------+------------------------------------------------+ 989 | ECDSA_sign | Certificate MUST contain an ECDSA-capable | 990 | | public key and be signed with ECDSA. | 991 | ECDSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 992 | | public key on the same elliptic curve as the | 993 | | server's long-term ECDH key. This certificate | 994 | | MUST be signed with ECDSA. | 995 | RSA_fixed_ECDH | Certificate MUST contain an ECDH-capable | 996 | | public key on the same elliptic curve as the | 997 | | server's long-term ECDH key. This certificate | 998 | | MUST be signed with RSA. | 999 +------------------+------------------------------------------------+ 1001 Table 4: Client Certificate Types 1003 Structure of this message: 1005 Identical to the TLS client Certificate format. 1007 Actions of the sender: 1009 The client constructs an appropriate certificate chain, and conveys 1010 it to the server in the Certificate message. 1012 Actions of the receiver: 1014 The TLS server validates the certificate chain, extracts the client's 1015 public key, and checks that the key type is appropriate for the 1016 client authentication method. 1018 5.7. Client Key Exchange 1020 When this message is sent: 1022 This message is sent in all key exchange algorithms. If client 1023 authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this 1024 message is empty. Otherwise, it contains the client's ephemeral ECDH 1025 public key. 1027 Meaning of the message: 1029 This message is used to convey ephemeral data relating to the key 1030 exchange belonging to the client (such as its ephemeral ECDH public 1031 key). 1033 Structure of this message: 1035 The TLS ClientKeyExchange message is extended as follows. 1037 enum { implicit, explicit } PublicValueEncoding; 1039 implicit, explicit: For ECC cipher suites, this indicates whether 1040 the client's ECDH public key is in the client's certificate 1041 ("implicit") or is provided, as an ephemeral ECDH public key, in 1042 the ClientKeyExchange message ("explicit"). (This is "explicit" 1043 in ECC cipher suites except when the client uses the 1044 ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication 1045 mechanism.) 1047 struct { 1048 select (PublicValueEncoding) { 1049 case implicit: struct { }; 1050 case explicit: ECPoint ecdh_Yc; 1051 } ecdh_public; 1052 } ClientECDiffieHellmanPublic; 1054 ecdh_Yc: Contains the client's ephemeral ECDH public key as a byte 1055 string ECPoint.point, which may represent an elliptic curve point 1056 in uncompressed or compressed format. Here, the format MUST 1057 conform to what the server has requested through a Supported Point 1058 Formats Extension if this extension was used, and MUST be 1059 uncompressed if this extension was not used. 1061 struct { 1062 select (KeyExchangeAlgorithm) { 1063 case ec_diffie_hellman: ClientECDiffieHellmanPublic; 1064 } exchange_keys; 1065 } ClientKeyExchange; 1067 Actions of the sender: 1069 The client selects an ephemeral ECDH public key corresponding to the 1070 parameters it received from the server according to the ECKAS-DH1 1071 scheme from IEEE 1363. It conveys this information to the client in 1072 the ClientKeyExchange message using the format defined above. 1074 Actions of the receiver: 1076 The server retrieves the client's ephemeral ECDH public key from the 1077 ClientKeyExchange message and checks that it is on the same elliptic 1078 curve as the server's ECDH key. 1080 5.8. Certificate Verify 1082 When this message is sent: 1084 This message is sent when the client sends a client certificate 1085 containing a public key usable for digital signatures, e.g., when the 1086 client is authenticated using the ECDSA_sign mechanism. 1088 Meaning of the message: 1090 This message contains a signature that proves possession of the 1091 private key corresponding to the public key in the client's 1092 Certificate message. 1094 Structure of this message: 1096 The TLS CertificateVerify message and the underlying Signature type 1097 are defined in the TLS base specifications, and the latter is 1098 extended here in Section 5.4. For the ecdsa case, the signature 1099 field in the CertificateVerify message contains an ECDSA signature 1100 computed over handshake messages exchanged so far, exactly similar to 1101 CertificateVerify with other signing algorithms: 1103 CertificateVerify.signature.sha_hash 1104 SHA(handshake_messages); 1106 ECDSA signatures are computed as described in Section 5.10, and SHA 1107 in the above template for sha_hash accordingly may denote a hash 1108 algorithm other than SHA-1. As per ANSI X9.62, an ECDSA signature 1109 consists of a pair of integers, r and s. The digitally-signed 1110 element is encoded as an opaque vector <0..2^16-1>, the contents of 1111 which are the DER encoding [CCITT.X690] corresponding to the 1112 following ASN.1 notation [CCITT.X680]. 1114 Ecdsa-Sig-Value ::= SEQUENCE { 1115 r INTEGER, 1116 s INTEGER 1117 } 1119 Actions of the sender: 1121 The client computes its signature over all handshake messages sent or 1122 received starting at client hello and up to but not including this 1123 message. It uses the private key corresponding to its certified 1124 public key to compute the signature, which is conveyed in the format 1125 defined above. 1127 Actions of the receiver: 1129 The server extracts the client's signature from the CertificateVerify 1130 message, and verifies the signature using the public key it received 1131 in the client's Certificate message. 1133 5.9. Elliptic Curve Certificates 1135 X.509 certificates containing ECC public keys or signed using ECDSA 1136 MUST comply with [RFC3279] or another RFC that replaces or extends 1137 it. Clients SHOULD use the elliptic curve domain parameters 1138 recommended in ANSI X9.62, FIPS 186-4, and SEC 2 [SECG-SEC2]. 1140 5.10. ECDH, ECDSA, and RSA Computations 1142 All ECDH calculations (including parameter and key generation as well 1143 as the shared secret calculation) are performed according to 1144 [IEEE.P1363.1998] using the ECKAS-DH1 scheme with the identity map as 1145 key derivation function (KDF), so that the premaster secret is the 1146 x-coordinate of the ECDH shared secret elliptic curve point 1147 represented as an octet string. Note that this octet string (Z in 1148 IEEE 1363 terminology) as output by FE2OSP, the Field Element to 1149 Octet String Conversion Primitive, has constant length for any given 1150 field; leading zeros found in this octet string MUST NOT be 1151 truncated. 1153 (Note that this use of the identity KDF is a technicality. The 1154 complete picture is that ECDH is employed with a non-trivial KDF 1155 because TLS does not directly use the premaster secret for anything 1156 other than for computing the master secret. In TLS 1.0 and 1.1, this 1157 means that the MD5- and SHA-1-based TLS PRF serves as a KDF; in TLS 1158 1.2 the KDF is determined by ciphersuite; it is conceivable that 1159 future TLS versions or new TLS extensions introduced in the future 1160 may vary this computation.) 1162 All ECDSA computations MUST be performed according to ANSI X9.62 or 1163 its successors. Data to be signed/verified is hashed, and the result 1164 run directly through the ECDSA algorithm with no additional hashing. 1165 The default hash function is SHA-1 [FIPS.180-2], and sha_size (see 1166 Section 5.4 and Section 5.8) is 20. However, an alternative hash 1167 function, such as one of the new SHA hash functions specified in FIPS 1168 180-2 [FIPS.180-2], may be used instead if the certificate containing 1169 the EC public key explicitly requires use of another hash function. 1170 (The mechanism for specifying the required hash function has not been 1171 standardized, but this provision anticipates such standardization and 1172 obviates the need to update this document in response. Future PKIX 1173 RFCs may choose, for example, to specify the hash function to be used 1174 with a public key in the parameters field of subjectPublicKeyInfo.) 1176 All RSA signatures must be generated and verified according to 1178 [PKCS#1] block type 1. 1180 6. Cipher Suites 1182 The table below defines new ECC cipher suites that use the key 1183 exchange algorithms specified in Section 2. 1185 +---------------------------------------+----------------+ 1186 | CipherSuite | Identifier | 1187 +---------------------------------------+----------------+ 1188 | TLS_ECDH_ECDSA_WITH_NULL_SHA | { 0xC0, 0x01 } | 1189 | TLS_ECDH_ECDSA_WITH_RC4_128_SHA | { 0xC0, 0x02 } | 1190 | TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x03 } | 1191 | TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x04 } | 1192 | TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x05 } | 1193 | TLS_ECDHE_ECDSA_WITH_NULL_SHA | { 0xC0, 0x06 } | 1194 | TLS_ECDHE_ECDSA_WITH_RC4_128_SHA | { 0xC0, 0x07 } | 1195 | TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x08 } | 1196 | TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x09 } | 1197 | TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0A } | 1198 | TLS_ECDH_RSA_WITH_NULL_SHA | { 0xC0, 0x0B } | 1199 | TLS_ECDH_RSA_WITH_RC4_128_SHA | { 0xC0, 0x0C } | 1200 | TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x0D } | 1201 | TLS_ECDH_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x0E } | 1202 | TLS_ECDH_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x0F } | 1203 | TLS_ECDHE_RSA_WITH_NULL_SHA | { 0xC0, 0x10 } | 1204 | TLS_ECDHE_RSA_WITH_RC4_128_SHA | { 0xC0, 0x11 } | 1205 | TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x12 } | 1206 | TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA | { 0xC0, 0x13 } | 1207 | TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | { 0xC0, 0x14 } | 1208 | TLS_ECDH_anon_WITH_NULL_SHA | { 0xC0, 0x15 } | 1209 | TLS_ECDH_anon_WITH_RC4_128_SHA | { 0xC0, 0x16 } | 1210 | TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA | { 0xC0, 0x17 } | 1211 | TLS_ECDH_anon_WITH_AES_128_CBC_SHA | { 0xC0, 0x18 } | 1212 | TLS_ECDH_anon_WITH_AES_256_CBC_SHA | { 0xC0, 0x19 } | 1213 +---------------------------------------+----------------+ 1215 Table 5: TLS ECC cipher suites 1217 The key exchange method, cipher, and hash algorithm for each of these 1218 cipher suites are easily determined by examining the name. Ciphers 1219 (other than AES ciphers) and hash algorithms are defined in [RFC2246] 1220 and [RFC4346]. AES ciphers are defined in [RFC5246]. 1222 Server implementations SHOULD support all of the following cipher 1223 suites, and client implementations SHOULD support at least one of 1224 them: 1226 o TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA 1227 o TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA 1228 o TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA 1229 o TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA. 1231 7. Security Considerations 1233 Security issues are discussed throughout this memo. 1235 For TLS handshakes using ECC cipher suites, the security 1236 considerations in appendices D of all three TLS base documemts apply 1237 accordingly. 1239 Security discussions specific to ECC can be found in 1240 [IEEE.P1363.1998] and [ANSI.X9-62.2005]. One important issue that 1241 implementers and users must consider is elliptic curve selection. 1242 Guidance on selecting an appropriate elliptic curve size is given in 1243 Table 1. 1245 Beyond elliptic curve size, the main issue is elliptic curve 1246 structure. As a general principle, it is more conservative to use 1247 elliptic curves with as little algebraic structure as possible. 1248 Thus, random curves are more conservative than special curves such as 1249 Koblitz curves, and curves over F_p with p random are more 1250 conservative than curves over F_p with p of a special form (and 1251 curves over F_p with p random might be considered more conservative 1252 than curves over F_2^m as there is no choice between multiple fields 1253 of similar size for characteristic 2). Note, however, that algebraic 1254 structure can also lead to implementation efficiencies, and 1255 implementers and users may, therefore, need to balance conservatism 1256 against a need for efficiency. Concrete attacks are known against 1257 only very few special classes of curves, such as supersingular 1258 curves, and these classes are excluded from the ECC standards that 1259 this document references [IEEE.P1363.1998], [ANSI.X9-62.2005]. 1261 Another issue is the potential for catastrophic failures when a 1262 single elliptic curve is widely used. In this case, an attack on the 1263 elliptic curve might result in the compromise of a large number of 1264 keys. Again, this concern may need to be balanced against efficiency 1265 and interoperability improvements associated with widely-used curves. 1266 Substantial additional information on elliptic curve choice can be 1267 found in [IEEE.P1363.1998], [ANSI.X9-62.2005], and [FIPS.186-4]. 1269 Implementers and users must also consider whether they need forward 1270 secrecy. Forward secrecy refers to the property that session keys 1271 are not compromised if the static, certified keys belonging to the 1272 server and client are compromised. The ECDHE_ECDSA and ECDHE_RSA key 1273 exchange algorithms provide forward secrecy protection in the event 1274 of server key compromise, while ECDH_ECDSA and ECDH_RSA do not. 1275 Similarly, if the client is providing a static, certified key, 1276 ECDSA_sign client authentication provides forward secrecy protection 1277 in the event of client key compromise, while ECDSA_fixed_ECDH and 1278 RSA_fixed_ECDH do not. Thus, to obtain complete forward secrecy 1279 protection, ECDHE_ECDSA or ECDHE_RSA must be used for key exchange, 1280 with ECDSA_sign used for client authentication if necessary. Here 1281 again the security benefits of forward secrecy may need to be 1282 balanced against the improved efficiency offered by other options. 1284 8. IANA Considerations 1286 [RFC4492], the predecessor of this document has already defined the 1287 IANA registries for the following: 1288 o NamedCurve Section 5.1 1289 o ECPointFormat Section 5.1 1290 o ECCurveType Section 5.4 1292 For each name space, this document defines the initial value 1293 assignments and defines a range of 256 values (NamedCurve) or eight 1294 values (ECPointFormat and ECCurveType) reserved for Private Use. Any 1295 additional assignments require IETF Consensus action. 1297 9. Acknowledgements 1299 Most of the text is this document is taken from [RFC4492], the 1300 predecessor of this document. The authors of that document were: 1301 o Simon Blake-Wilson 1302 o Nelson Bolyard 1303 o Vipul Gupta 1304 o Chris Hawk 1305 o Bodo Moeller 1307 In the predecessor document, the authors acknowledged the 1308 contributions of Bill Anderson and Tim Dierks. 1310 10. Version History for This Draft 1312 NOTE TO RFC EDITOR: PLEASE REMOVE THIS SECTION 1314 Changes from RFC 4492 to draft-nir-tls-rfc4492bis-00: 1315 o Added TLS 1.2 to references. 1317 o Moved RFC 4492 authors to acknowledgements. 1318 o Removed list of required reading for ECC. 1320 11. References 1322 11.1. Normative References 1324 [ANSI.X9-62.2005] 1325 American National Standards Institute, "Public Key 1326 Cryptography for the Financial Services Industry, The 1327 Elliptic Curve Digital Signature Algorithm (ECDSA)", 1328 ANSI X9.62, 2005. 1330 [CCITT.X680] 1331 International Telephone and Telegraph Consultative 1332 Committee, "Abstract Syntax Notation One (ASN.1): 1333 Specification of basic notation", CCITT Recommendation 1334 X.680, July 2002. 1336 [CCITT.X690] 1337 International Telephone and Telegraph Consultative 1338 Committee, "ASN.1 encoding rules: Specification of basic 1339 encoding Rules (BER), Canonical encoding rules (CER) and 1340 Distinguished encoding rules (DER)", CCITT Recommendation 1341 X.690, July 2002. 1343 [FIPS.186-4] 1344 National Institute of Standards and Technology, "Digital 1345 Signature Standard", FIPS PUB 186-4, 2013, . 1348 [PKCS#1] RSA Laboratories, "RSA Encryption Standard, Version 1.5", 1349 PKCS 1, November 1993. 1351 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1352 Requirement Levels", BCP 14, RFC 2119, March 1997. 1354 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 1355 RFC 2246, January 1999. 1357 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 1358 Identifiers for the Internet X.509 Public Key 1359 Infrastructure Certificate and Certificate Revocation List 1360 (CRL) Profile", RFC 3279, April 2002. 1362 [RFC4346] Dierks, T. and E. Rescorla, "The Transport Layer Security 1363 (TLS) Protocol Version 1.1", RFC 4346, April 2006. 1365 [RFC4366] Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., 1366 and T. Wright, "Transport Layer Security (TLS) 1367 Extensions", RFC 4366, April 2006. 1369 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1370 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1372 [SECG-SEC2] 1373 CECG, "Recommended Elliptic Curve Domain Parameters", 1374 SEC 2, 2000. 1376 11.2. Informative References 1378 [FIPS.180-2] 1379 National Institute of Standards and Technology, "Secure 1380 Hash Standard", FIPS PUB 180-2, August 2002, . 1383 [I-D.ietf-tls-tls13] 1384 Dierks, T. and E. Rescorla, "The Transport Layer Security 1385 (TLS) Protocol Version 1.3", draft-ietf-tls-tls13-02 (work 1386 in progress), July 2014. 1388 [IEEE.P1363.1998] 1389 Institute of Electrical and Electronics Engineers, 1390 "Standard Specifications for Public Key Cryptography", 1391 IEEE Draft P1363, 1998. 1393 [Lenstra+Verheul] 1394 Lenstra, A. and E. Verheul, "Selecting Cryptographic Key 1395 Sizes", Journal of Cryptology 14 (2001) 255-293, 2001. 1397 [RFC4492] Blake-Wilson, S., Bolyard, N., Gupta, V., Hawk, C., and B. 1398 Moeller, "Elliptic Curve Cryptography (ECC) Cipher Suites 1399 for Transport Layer Security (TLS)", RFC 4492, May 2006. 1401 Appendix A. Equivalent Curves (Informative) 1403 All of the NIST curves [FIPS.186-4] and several of the ANSI curves 1404 [ANSI.X9-62.2005] are equivalent to curves listed in Section 5.1.1. 1405 In the following table, multiple names in one row represent aliases 1406 for the same curve. 1408 Curve names chosen by different standards organizations 1410 +-----------+------------+------------+ 1411 | SECG | ANSI X9.62 | NIST | 1412 +-----------+------------+------------+ 1413 | sect163k1 | | NIST K-163 | 1414 | sect163r1 | | | 1415 | sect163r2 | | NIST B-163 | 1416 | sect193r1 | | | 1417 | sect193r2 | | | 1418 | sect233k1 | | NIST K-233 | 1419 | sect233r1 | | NIST B-233 | 1420 | sect239k1 | | | 1421 | sect283k1 | | NIST K-283 | 1422 | sect283r1 | | NIST B-283 | 1423 | sect409k1 | | NIST K-409 | 1424 | sect409r1 | | NIST B-409 | 1425 | sect571k1 | | NIST K-571 | 1426 | sect571r1 | | NIST B-571 | 1427 | secp160k1 | | | 1428 | secp160r1 | | | 1429 | secp160r2 | | | 1430 | secp192k1 | | | 1431 | secp192r1 | prime192v1 | NIST P-192 | 1432 | secp224k1 | | | 1433 | secp224r1 | | NIST P-224 | 1434 | secp256k1 | | | 1435 | secp256r1 | prime256v1 | NIST P-256 | 1436 | secp384r1 | | NIST P-384 | 1437 | secp521r1 | | NIST P-521 | 1438 +-----------+------------+------------+ 1440 Table 6: Equivalent curves defined by SECG, ANSI, and NIST 1442 Appendix B. Differences from RFC 4492 1444 o Added TLS 1.2 1446 Author's Address 1448 Yoav Nir 1449 Check Point Software Technologies Ltd. 1450 5 Hasolelim st. 1451 Tel Aviv 6789735 1452 Israel 1454 Email: ynir.ietf@gmail.com