Request for Comments: 4492 SafeNet
Category: Informational N. Bolyard
Sun Microsystems
V. Gupta
Sun Labs
C. Hawk
Corriente
B. Moeller
Ruhr-Uni Bochum
May 2006
Elliptic Curve Cryptography (ECC) Cipher Suites
for Transport Layer Security (TLS)
Status of This Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2006).
Abstract
This document describes new key exchange algorithms based on Elliptic
Curve Cryptography (ECC) for the Transport Layer Security (TLS)
protocol. In particular, it specifies the use of Elliptic Curve
Diffie-Hellman (ECDH) key agreement in a TLS handshake and the use of
Elliptic Curve Digital Signature Algorithm (ECDSA) as a new
authentication mechanism.
Table of Contents
1. Introduction ....................................................3
2. Key Exchange Algorithms .........................................4
2.1. ECDH_ECDSA .................................................6
2.2. ECDHE_ECDSA ................................................6
2.3. ECDH_RSA ...................................................7
2.4. ECDHE_RSA ..................................................7
2.5. ECDH_anon ..................................................7
3. Client Authentication ...........................................8
3.1. ECDSA_sign .................................................8
3.2. ECDSA_fixed_ECDH ...........................................9
3.3. RSA_fixed_ECDH .............................................9
4. TLS Extensions for ECC ..........................................9
5. Data Structures and Computations ...............................10
5.1. Client Hello Extensions ...................................10
5.1.1. Supported Elliptic Curves Extension ................12
5.1.2. Supported Point Formats Extension ..................13
5.2. Server Hello Extension ....................................14
5.3. Server Certificate ........................................15
5.4. Server Key Exchange .......................................17
5.5. Certificate Request .......................................21
5.6. Client Certificate ........................................22
5.7. Client Key Exchange .......................................23
5.8. Certificate Verify ........................................25
5.9. Elliptic Curve Certificates ...............................26
5.10. ECDH, ECDSA, and RSA Computations ........................26
6. Cipher Suites ..................................................27
7. Security Considerations ........................................28
8. IANA Considerations ............................................29
9. Acknowledgements ...............................................29
10. References ....................................................30
10.1. Normative References .....................................30
10.2. Informative References ...................................31
Appendix A. Equivalent Curves (Informative) ......................32
1. Introduction
Elliptic Curve Cryptography (ECC) is emerging as an attractive
public-key cryptosystem, in particular for mobile (i.e., wireless)
environments. Compared to currently prevalent cryptosystems such as
RSA, ECC offers equivalent security with smaller key sizes. This is
illustrated in the following table, based on [18], which gives
approximate comparable key sizes for symmetric- and asymmetric-key
cryptosystems based on the best-known algorithms for attacking them.
Symmetric | ECC | DH/DSA/RSA
------------+---------+-------------
80 | 163 | 1024
112 | 233 | 2048
128 | 283 | 3072
192 | 409 | 7680
256 | 571 | 15360
Table 1: Comparable Key Sizes (in bits)
Smaller key sizes result in savings for power, memory, bandwidth, and
computational cost that make ECC especially attractive for
constrained environments.
This document describes additions to TLS to support ECC, applicable
both to TLS Version 1.0 [2] and to TLS Version 1.1 [3]. In
particular, it defines
o the use of the Elliptic Curve Diffie-Hellman (ECDH) key agreement
scheme with long-term or ephemeral keys to establish the TLS
premaster secret, and
o the use of fixed-ECDH certificates and ECDSA for authentication of
TLS peers.
The remainder of this document is organized as follows. Section 2
provides an overview of ECC-based key exchange algorithms for TLS.
Section 3 describes the use of ECC certificates for client
authentication. TLS extensions that allow a client to negotiate the
use of specific curves and point formats are presented in Section 4.
Section 5 specifies various data structures needed for an ECC-based
handshake, their encoding in TLS messages, and the processing of
those messages. Section 6 defines new ECC-based cipher suites and
identifies a small subset of these as recommended for all
implementations of this specification. Section 7 discusses security
considerations. Section 8 describes IANA considerations for the name
spaces created by this document. Section 9 gives acknowledgements.
This is followed by the lists of normative and informative references
cited in this document, the authors’ contact information, and
statements on intellectual property rights and copyrights.
Implementation of this specification requires familiarity with TLS
[2][3], TLS extensions [4], and ECC [5][6][7][11][17].
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [1].
2. Key Exchange Algorithms
This document introduces five new ECC-based key exchange algorithms
for TLS. All of them use ECDH to compute the TLS premaster secret,
and they differ only in the lifetime of ECDH keys (long-term or
ephemeral) and the mechanism (if any) used to authenticate them. The
derivation of the TLS master secret from the premaster secret and the
subsequent generation of bulk encryption/MAC keys and initialization
vectors is independent of the key exchange algorithm and not impacted
by the introduction of ECC.
The table below summarizes the new key exchange algorithms, which
mimic DH_DSS, DHE_DSS, DH_RSA, DHE_RSA, and DH_anon (see [2] and
[3]), respectively.
Key
Exchange
Algorithm Description
--------- -----------
ECDH_ECDSA Fixed ECDH with ECDSA-signed certificates.
ECDHE_ECDSA Ephemeral ECDH with ECDSA signatures.
ECDH_RSA Fixed ECDH with RSA-signed certificates.
ECDHE_RSA Ephemeral ECDH with RSA signatures.
ECDH_anon Anonymous ECDH, no signatures.
Table 2: ECC Key Exchange Algorithms
The ECDHE_ECDSA and ECDHE_RSA key exchange mechanisms provide forward
secrecy. With ECDHE_RSA, a server can reuse its existing RSA
certificate and easily comply with a constrained client’s elliptic
curve preferences (see Section 4). However, the computational cost
incurred by a server is higher for ECDHE_RSA than for the traditional
RSA key exchange, which does not provide forward secrecy.
The ECDH_RSA mechanism requires a server to acquire an ECC
certificate, but the certificate issuer can still use an existing RSA
key for signing. This eliminates the need to update the keys of
trusted certification authorities accepted by TLS clients. The
ECDH_ECDSA mechanism requires ECC keys for the server as well as the
certification authority and is best suited for constrained devices
unable to support RSA.
The anonymous key exchange algorithm does not provide authentication
of the server or the client. Like other anonymous TLS key exchanges,
it is subject to man-in-the-middle attacks. Implementations of this
algorithm SHOULD provide authentication by other means.
Note that there is no structural difference between ECDH and ECDSA
keys. A certificate issuer may use X.509 v3 keyUsage and
extendedKeyUsage extensions to restrict the use of an ECC public key
to certain computations [15]. This document refers to an ECC key as
ECDH-capable if its use in ECDH is permitted. ECDSA-capable is
defined similarly.
Client Server
------ ------
ClientHello -------->
ServerHello
Certificate*
ServerKeyExchange*
CertificateRequest*+
<-------- ServerHelloDone
Certificate*+
ClientKeyExchange
CertificateVerify*+
[ChangeCipherSpec]
Finished -------->
[ChangeCipherSpec]
<-------- Finished
Application Data <-------> Application Data
* message is not sent under some conditions
+ message is not sent unless client authentication
is desired
Figure 1: Message flow in a full TLS handshake
Figure 1 shows all messages involved in the TLS key establishment
protocol (aka full handshake). The addition of ECC has direct impact
only on the ClientHello, the ServerHello, the server’s Certificate
message, the ServerKeyExchange, the ClientKeyExchange, the
CertificateRequest, the client’s Certificate message, and the
CertificateVerify. Next, we describe each ECC key exchange algorithm
in greater detail in terms of the content and processing of these
messages. For ease of exposition, we defer discussion of client
authentication and associated messages (identified with a + in
Figure 1) until Section 3 and of the optional ECC-specific extensions
(which impact the Hello messages) until Section 4.
2.1. ECDH_ECDSA
In ECDH_ECDSA, the server’s certificate MUST contain an ECDH-capable
public key and be signed with ECDSA.
A ServerKeyExchange MUST NOT be sent (the server’s certificate
contains all the necessary keying information required by the client
to arrive at the premaster secret).
The client generates an ECDH key pair on the same curve as the
server’s long-term public key and sends its public key in the
ClientKeyExchange message (except when using client authentication
algorithm ECDSA_fixed_ECDH or RSA_fixed_ECDH, in which case the
modifications from Section 3.2 or Section 3.3 apply).
Both client and server perform an ECDH operation and use the
resultant shared secret as the premaster secret. All ECDH
calculations are performed as specified in Section 5.10.
2.2. ECDHE_ECDSA
In ECDHE_ECDSA, the server’s certificate MUST contain an ECDSA-
capable public key and be signed with ECDSA.
The server sends its ephemeral ECDH public key and a specification of
the corresponding curve in the ServerKeyExchange message. These
parameters MUST be signed with ECDSA using the private key
corresponding to the public key in the server’s Certificate.
The client generates an ECDH key pair on the same curve as the
server’s ephemeral ECDH key and sends its public key in the
ClientKeyExchange message.
Both client and server perform an ECDH operation (Section 5.10) and
use the resultant shared secret as the premaster secret.
2.3. ECDH_RSA
This key exchange algorithm is the same as ECDH_ECDSA except that the
server’s certificate MUST be signed with RSA rather than ECDSA.
2.4. ECDHE_RSA
This key exchange algorithm is the same as ECDHE_ECDSA except that
the server’s certificate MUST contain an RSA public key authorized
for signing, and that the signature in the ServerKeyExchange message
must be computed with the corresponding RSA private key. The server
certificate MUST be signed with RSA.
2.5. ECDH_anon
In ECDH_anon, the server’s Certificate, the CertificateRequest, the
client’s Certificate, and the CertificateVerify messages MUST NOT be
sent.
The server MUST send an ephemeral ECDH public key and a specification
of the corresponding curve in the ServerKeyExchange message. These
parameters MUST NOT be signed.
The client generates an ECDH key pair on the same curve as the
server’s ephemeral ECDH key and sends its public key in the
ClientKeyExchange message.
Both client and server perform an ECDH operation and use the
resultant shared secret as the premaster secret. All ECDH
calculations are performed as specified in Section 5.10.
Note that while the ECDH_ECDSA, ECDHE_ECDSA, ECDH_RSA, and ECDHE_RSA
key exchange algorithms require the server’s certificate to be signed
with a particular signature scheme, this specification (following the
similar cases of DH_DSS, DHE_DSS, DH_RSA, and DHE_RSA in [2] and [3])
does not impose restrictions on signature schemes used elsewhere in
the certificate chain. (Often such restrictions will be useful, and
it is expected that this will be taken into account in certification
authorities’ signing practices. However, such restrictions are not
strictly required in general: Even if it is beyond the capabilities
of a client to completely validate a given chain, the client may be
able to validate the server’s certificate by relying on a trusted
certification authority whose certificate appears as one of the
intermediate certificates in the chain.)
3. Client Authentication
This document defines three new client authentication mechanisms,
each named after the type of client certificate involved: ECDSA_sign,
ECDSA_fixed_ECDH, and RSA_fixed_ECDH. The ECDSA_sign mechanism is
usable with any of the non-anonymous ECC key exchange algorithms
described in Section 2 as well as other non-anonymous (non-ECC) key
exchange algorithms defined in TLS [2][3]. The ECDSA_fixed_ECDH and
RSA_fixed_ECDH mechanisms are usable with ECDH_ECDSA and ECDH_RSA.
Their use with ECDHE_ECDSA and ECDHE_RSA is prohibited because the
use of a long-term ECDH client key would jeopardize the forward
secrecy property of these algorithms.
The server can request ECC-based client authentication by including
one or more of these certificate types in its CertificateRequest
message. The server must not include any certificate types that are
prohibited for the negotiated key exchange algorithm. The client
must check if it possesses a certificate appropriate for any of the
methods suggested by the server and is willing to use it for
authentication.
If these conditions are not met, the client should send a client
Certificate message containing no certificates. In this case, the
ClientKeyExchange should be sent as described in Section 2, and the
CertificateVerify should not be sent. If the server requires client
authentication, it may respond with a fatal handshake failure alert.
If the client has an appropriate certificate and is willing to use it
for authentication, it must send that certificate in the client’s
Certificate message (as per Section 5.6) and prove possession of the
private key corresponding to the certified key. The process of
determining an appropriate certificate and proving possession is
different for each authentication mechanism and described below.
NOTE: It is permissible for a server to request (and the client to
send) a client certificate of a different type than the server
certificate.
3.1. ECDSA_sign
To use this authentication mechanism, the client MUST possess a
certificate containing an ECDSA-capable public key and signed with
ECDSA.
The client proves possession of the private key corresponding to the
certified key by including a signature in the CertificateVerify
message as described in Section 5.8.
3.2. ECDSA_fixed_ECDH
To use this authentication mechanism, the client MUST possess a
certificate containing an ECDH-capable public key, and that
certificate MUST be signed with ECDSA. Furthermore, the client’s
ECDH key MUST be on the same elliptic curve as the server’s long-term
(certified) ECDH key. This might limit use of this mechanism to
closed environments. In situations where the client has an ECC key
on a different curve, it would have to authenticate using either
ECDSA_sign or a non-ECC mechanism (e.g., RSA). Using fixed ECDH for
both servers and clients is computationally more efficient than
mechanisms providing forward secrecy.
When using this authentication mechanism, the client MUST send an
empty ClientKeyExchange as described in Section 5.7 and MUST NOT send
the CertificateVerify message. The ClientKeyExchange is empty since
the client’s ECDH public key required by the server to compute the
premaster secret is available inside the client’s certificate. The
client’s ability to arrive at the same premaster secret as the server
(demonstrated by a successful exchange of Finished messages) proves
possession of the private key corresponding to the certified public
key, and the CertificateVerify message is unnecessary.
3.3. RSA_fixed_ECDH
This authentication mechanism is identical to ECDSA_fixed_ECDH except
that the client’s certificate MUST be signed with RSA.
Note that while the ECDSA_sign, ECDSA_fixed_ECDH, and RSA_fixed_ECDH
client authentication mechanisms require the client’s certificate to
be signed with a particular signature scheme, this specification does
not impose restrictions on signature schemes used elsewhere in the
certificate chain. (Often such restrictions will be useful, and it
is expected that this will be taken into account in certification
authorities’ signing practices. However, such restrictions are not
strictly required in general: Even if it is beyond the capabilities
of a server to completely validate a given chain, the server may be
able to validate the clients certificate by relying on a trust anchor
that appears as one of the intermediate certificates in the chain.)
4. TLS Extensions for ECC
Two new TLS extensions are defined in this specification: (i) the
Supported Elliptic Curves Extension, and (ii) the Supported Point
Formats Extension. These allow negotiating the use of specific
curves and point formats (e.g., compressed vs. uncompressed,
respectively) during a handshake starting a new session. These
extensions are especially relevant for constrained clients that may
only support a limited number of curves or point formats. They
follow the general approach outlined in [4]; message details are
specified in Section 5. The client enumerates the curves it supports
and the point formats it can parse by including the appropriate
extensions in its ClientHello message. The server similarly
enumerates the point formats it can parse by including an extension
in its ServerHello message.
A TLS client that proposes ECC cipher suites in its ClientHello
message SHOULD include these extensions. Servers implementing ECC
cipher suites MUST support these extensions, and when a client uses
these extensions, servers MUST NOT negotiate the use of an ECC cipher
suite unless they can complete the handshake while respecting the
choice of curves and compression techniques specified by the client.
This eliminates the possibility that a negotiated ECC handshake will
be subsequently aborted due to a client’s inability to deal with the
server’s EC key.
The client MUST NOT include these extensions in the ClientHello
message if it does not propose any ECC cipher suites. A client that
proposes ECC cipher suites may choose not to include these
extensions. In this case, the server is free to choose any one of
the elliptic curves or point formats listed in Section 5. That
section also describes the structure and processing of these
extensions in greater detail.
In the case of session resumption, the server simply ignores the
Supported Elliptic Curves Extension and the Supported Point Formats
Extension appearing in the current ClientHello message. These
extensions only play a role during handshakes negotiating a new
session.
5. Data Structures and Computations
This section specifies the data structures and computations used by
ECC-based key mechanisms specified in Sections 2, 3, and 4. The
presentation language used here is the same as that used in TLS
[2][3]. Since this specification extends TLS, these descriptions
should be merged with those in the TLS specification and any others
that extend TLS. This means that enum types may not specify all
possible values, and structures with multiple formats chosen with a
select() clause may not indicate all possible cases.
5.1. Client Hello Extensions
This section specifies two TLS extensions that can be included with
the ClientHello message as described in [4], the Supported Elliptic
