Improve GTK-DOC coverage.
[gnutls.git] / doc / protocol / draft-ietf-tls-ecc-10.txt
blob7b191b30984379ebff96f96392265470062f8b6e
4 TLS Working Group                                               V. Gupta
5 Internet-Draft                                                  Sun Labs
6 Expires: December 2, 2005                                S. Blake-Wilson
7                                                                      BCI
8                                                               B. Moeller
9                                                    University of Calgary
10                                                                  C. Hawk
11                                                       Corriente Networks
12                                                               N. Bolyard
13                                                             May 31, 2005
16                        ECC Cipher Suites for TLS
17                       <draft-ietf-tls-ecc-10.txt>
19 Status of this Memo
21    By submitting this Internet-Draft, each author represents that any
22    applicable patent or other IPR claims of which he or she is aware
23    have been or will be disclosed, and any of which he or she becomes
24    aware will be disclosed, in accordance with Section 6 of BCP 79.
26    Internet-Drafts are working documents of the Internet Engineering
27    Task Force (IETF), its areas, and its working groups.  Note that
28    other groups may also distribute working documents as Internet-
29    Drafts.
31    Internet-Drafts are draft documents valid for a maximum of six months
32    and may be updated, replaced, or obsoleted by other documents at any
33    time.  It is inappropriate to use Internet-Drafts as reference
34    material or to cite them other than as "work in progress."
36    The list of current Internet-Drafts can be accessed at
37    http://www.ietf.org/ietf/1id-abstracts.txt.
39    The list of Internet-Draft Shadow Directories can be accessed at
40    http://www.ietf.org/shadow.html.
42    This Internet-Draft will expire on December 2, 2005.
44 Copyright Notice
46    Copyright (C) The Internet Society (2005).
48 Abstract
50    This document describes new key exchange algorithms based on Elliptic
51    Curve Cryptography (ECC) for the TLS (Transport Layer Security)
55 Gupta, et al.           Expires December 2, 2005                [Page 1]
57 Internet-Draft          ECC Cipher Suites for TLS               May 2005
60    protocol.  In particular, it specifies the use of Elliptic Curve
61    Diffie-Hellman (ECDH) key agreement in a TLS handshake and the use of
62    Elliptic Curve Digital Signature Algorithm (ECDSA) as a new
63    authentication mechanism.
65    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
66    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
67    document are to be interpreted as described in RFC 2119 [1].
69    Please send comments on this document to the TLS mailing list.
71 Table of Contents
73    1.   Introduction . . . . . . . . . . . . . . . . . . . . . . . .   3
74    2.   Key Exchange Algorithms  . . . . . . . . . . . . . . . . . .   5
75      2.1  ECDH_ECDSA . . . . . . . . . . . . . . . . . . . . . . . .   7
76      2.2  ECDHE_ECDSA  . . . . . . . . . . . . . . . . . . . . . . .   7
77      2.3  ECDH_RSA . . . . . . . . . . . . . . . . . . . . . . . . .   7
78      2.4  ECDHE_RSA  . . . . . . . . . . . . . . . . . . . . . . . .   7
79      2.5  ECDH_anon  . . . . . . . . . . . . . . . . . . . . . . . .   8
80    3.   Client Authentication  . . . . . . . . . . . . . . . . . . .   9
81      3.1  ECDSA_sign . . . . . . . . . . . . . . . . . . . . . . . .   9
82      3.2  ECDSA_fixed_ECDH . . . . . . . . . . . . . . . . . . . . .  10
83      3.3  RSA_fixed_ECDH . . . . . . . . . . . . . . . . . . . . . .  10
84    4.   TLS Extensions for ECC . . . . . . . . . . . . . . . . . . .  11
85    5.   Data Structures and Computations . . . . . . . . . . . . . .  12
86      5.1  Client Hello Extensions  . . . . . . . . . . . . . . . . .  12
87      5.2  Server Hello Extension . . . . . . . . . . . . . . . . . .  15
88      5.3  Server Certificate . . . . . . . . . . . . . . . . . . . .  16
89      5.4  Server Key Exchange  . . . . . . . . . . . . . . . . . . .  18
90      5.5  Certificate Request  . . . . . . . . . . . . . . . . . . .  22
91      5.6  Client Certificate . . . . . . . . . . . . . . . . . . . .  23
92      5.7  Client Key Exchange  . . . . . . . . . . . . . . . . . . .  24
93      5.8  Certificate Verify . . . . . . . . . . . . . . . . . . . .  25
94      5.9  Elliptic Curve Certificates  . . . . . . . . . . . . . . .  26
95      5.10   ECDH, ECDSA and RSA Computations . . . . . . . . . . . .  26
96    6.   Cipher Suites  . . . . . . . . . . . . . . . . . . . . . . .  28
97    7.   Security Considerations  . . . . . . . . . . . . . . . . . .  30
98    8.   Acknowledgments  . . . . . . . . . . . . . . . . . . . . . .  31
99    9.   References . . . . . . . . . . . . . . . . . . . . . . . . .  32
100      9.1  Normative References . . . . . . . . . . . . . . . . . . .  32
101      9.2  Informative References . . . . . . . . . . . . . . . . . .  32
102         Authors' Addresses . . . . . . . . . . . . . . . . . . . . .  33
103         Intellectual Property and Copyright Statements . . . . . . .  35
111 Gupta, et al.           Expires December 2, 2005                [Page 2]
113 Internet-Draft          ECC Cipher Suites for TLS               May 2005
116 1.  Introduction
118    Elliptic Curve Cryptography (ECC) is emerging as an attractive
119    public-key cryptosystem for mobile/wireless environments.  Compared
120    to currently prevalent cryptosystems such as RSA, ECC offers
121    equivalent security with smaller key sizes.  This is illustrated in
122    the following table, based on [13], which gives approximate
123    comparable key sizes for symmetric- and asymmetric-key cryptosystems
124    based on the best-known algorithms for attacking them.
126                    Symmetric    |  ECC    |  DH/DSA/RSA
127                    -------------+---------+------------
128                       80        |  163    |  1024
129                      112        |  233    |  2048
130                      128        |  283    |  3072
131                      192        |  409    |  7680
132                      256        |  571    |  15360
134                   Table 1: Comparable key sizes (in bits)
137    Smaller key sizes result in power, bandwidth and computational
138    savings that make ECC especially attractive for constrained
139    environments.
141    This document describes additions to TLS to support ECC.  In
142    particular, it defines
144    o  the use of the Elliptic Curve Diffie-Hellman (ECDH) key agreement
145       scheme with long-term or ephemeral keys to establish the TLS
146       premaster secret, and
148    o  the use of fixed-ECDH certificates and ECDSA for authentication of
149       TLS peers.
151    The remainder of this document is organized as follows.  Section 2
152    provides an overview of ECC-based key exchange algorithms for TLS.
153    Section 3 describes the use of ECC certificates for client
154    authentication.  TLS extensions that allow a client to negotiate the
155    use of specific curves and point formats are presented in Section 4.
156    Section 5 specifies various data structures needed for an ECC-based
157    handshake, their encoding in TLS messages and the processing of those
158    messages.  Section 6 defines new ECC-based cipher suites and
159    identifies a small subset of these as recommended for all
160    implementations of this specification.  Section 7 and Section 8
161    mention security considerations and acknowledgments, respectively.
162    This is followed by a list of references cited in this document, the
163    authors' contact information, and statements on intellectual property
167 Gupta, et al.           Expires December 2, 2005                [Page 3]
169 Internet-Draft          ECC Cipher Suites for TLS               May 2005
172    rights and copyrights.
174    Implementation of this specification requires familiarity with TLS
175    [2], TLS extensions [3] and ECC [4][5][6][8].
223 Gupta, et al.           Expires December 2, 2005                [Page 4]
225 Internet-Draft          ECC Cipher Suites for TLS               May 2005
228 2.  Key Exchange Algorithms
230    This document introduces five new ECC-based key exchange algorithms
231    for TLS.  All of them use ECDH to compute the TLS premaster secret
232    and differ only in the lifetime of ECDH keys (long-term or ephemeral)
233    and the mechanism (if any) used to authenticate them.  The derivation
234    of the TLS master secret from the premaster secret and the subsequent
235    generation of bulk encryption/MAC keys and initialization vectors is
236    independent of the key exchange algorithm and not impacted by the
237    introduction of ECC.
239    The table below summarizes the new key exchange algorithms which
240    mimic DH_DSS, DHE_DSS, DH_RSA, DHE_RSA, and DH_anon (see [2]),
241    respectively.
243           Key
244           Exchange
245           Algorithm           Description
246           ---------           -----------
248           ECDH_ECDSA          Fixed ECDH with ECDSA-signed certificates.
250           ECDHE_ECDSA         Ephemeral ECDH with ECDSA signatures.
252           ECDH_RSA            Fixed ECDH with RSA-signed certificates.
254           ECDHE_RSA           Ephemeral ECDH with RSA signatures.
256           ECDH_anon           Anonymous ECDH, no signatures.
258                      Table 2: ECC key exchange algorithms
261    The ECDHE_ECDSA and ECDHE_RSA key exchange mechanisms provide forward
262    secrecy.  With ECDHE_RSA, a server can reuse its existing RSA
263    certificate and easily comply with a constrained client's elliptic
264    curve preferences (see Section 4).  However, the computational cost
265    incurred by a server is higher for ECDHE_RSA than for the traditional
266    RSA key exchange which does not provide forward secrecy.
268    The ECDH_RSA mechanism requires a server to acquire an ECC
269    certificate but the certificate issuer can still use an existing RSA
270    key for signing.  This eliminates the need to update the trusted key
271    store in TLS clients.  The ECDH_ECDSA mechanism requires ECC keys for
272    the server as well as the certification authority and is best suited
273    for constrained devices unable to support RSA.
275    The anonymous key exchange algorithm does not provide authentication
279 Gupta, et al.           Expires December 2, 2005                [Page 5]
281 Internet-Draft          ECC Cipher Suites for TLS               May 2005
284    of the server or the client.  Like other anonymous TLS key exchanges,
285    it is subject to man-in-the-middle attacks.  Implementations of this
286    algorithm SHOULD provide authentication by other means.
288    Note that there is no structural difference between ECDH and ECDSA
289    keys.  A certificate issuer may use X509.v3 keyUsage and
290    extendedKeyUsage extensions to restrict the use of an ECC public key
291    to certain computations.  This document refers to an ECC key as ECDH-
292    capable if its use in ECDH is permitted.  ECDSA-capable is defined
293    similarly.
296               Client                                        Server
297               ------                                        ------
299               ClientHello          -------->
300                                                        ServerHello
301                                                       Certificate*
302                                                 ServerKeyExchange*
303                                               CertificateRequest*+
304                                    <--------       ServerHelloDone
305               Certificate*+
306               ClientKeyExchange
307               CertificateVerify*+
308               [ChangeCipherSpec]
309               Finished             -------->
310                                                 [ChangeCipherSpec]
311                                    <--------              Finished
313               Application Data     <------->      Application Data
316                    * message is not sent under some conditions
317                    + message is not sent unless client authentication
318                      is desired
320                  Figure 1: Message flow in a full TLS handshake
323    Figure 1 shows all messages involved in the TLS key establishment
324    protocol (aka full handshake).  The addition of ECC has direct impact
325    only on the ClientHello, the ServerHello, the server's Certificate
326    message, the ServerKeyExchange, the ClientKeyExchange, the
327    CertificateRequest, the client's Certificate message, and the
328    CertificateVerify.  Next, we describe each ECC key exchange algorithm
329    in greater detail in terms of the content and processing of these
330    messages.  For ease of exposition, we defer discussion of client
331    authentication and associated messages (identified with a + in
335 Gupta, et al.           Expires December 2, 2005                [Page 6]
337 Internet-Draft          ECC Cipher Suites for TLS               May 2005
340    Figure 1) until Section 3 and of the optional ECC-specific extensions
341    (which impact the Hello messages) until Section 4.
343 2.1  ECDH_ECDSA
345    In ECDH_ECDSA, the server's certificate MUST contain an ECDH-capable
346    public key and be signed with ECDSA.
348    A ServerKeyExchange MUST NOT be sent (the server's certificate
349    contains all the necessary keying information required by the client
350    to arrive at the premaster secret).
352    The client generates an ECDH key pair on the same curve as the
353    server's long-term public key and send its public key in the
354    ClientKeyExchange message (except when using client authentication
355    algorithm ECDSA_fixed_ECDH or RSA_fixed_ECDH, in which case the
356    modifications from section Section 3.2 or Section 3.3 apply).
358    Both client and server perform an ECDH operation and use the
359    resultant shared secret as the premaster secret.  All ECDH
360    calculations are performed as specified in Section 5.10
362 2.2  ECDHE_ECDSA
364    In ECDHE_ECDSA, the server's certificate MUST contain an ECDSA-
365    capable public key and be signed with ECDSA.
367    The server sends its ephemeral ECDH public key and a specification of
368    the corresponding curve in the ServerKeyExchange message.  These
369    parameters MUST be signed with ECDSA using the private key
370    corresponding to the public key in the server's Certificate.
372    The client generates an ECDH key pair on the same curve as the
373    server's ephemeral ECDH key and send its public key in the
374    ClientKeyExchange message.
376    Both client and server perform an ECDH operation (Section 5.10) and
377    use the resultant shared secret as the premaster secret.
379 2.3  ECDH_RSA
381    This key exchange algorithm is the same as ECDH_ECDSA except the
382    server's certificate MUST be signed with RSA rather than ECDSA.
384 2.4  ECDHE_RSA
386    This key exchange algorithm is the same as ECDHE_ECDSA except the
387    server's certificate MUST contain an RSA public key authorized for
391 Gupta, et al.           Expires December 2, 2005                [Page 7]
393 Internet-Draft          ECC Cipher Suites for TLS               May 2005
396    signing and the signature in the ServerKeyExchange message must be
397    computed with the corresponding RSA private key.  The server
398    certificate MUST be signed with RSA.
400 2.5  ECDH_anon
402    In ECDH_anon, the server's Certificate, the CertificateRequest, the
403    client's Certificate, and the CertificateVerify messages MUST NOT be
404    sent.
406    The server MUST send an ephemeral ECDH public key and a specification
407    of the corresponding curve in the ServerKeyExchange message.  These
408    parameters MUST NOT be signed.
410    The client generates an ECDH key pair on the same curve as the
411    server's ephemeral ECDH key and send its public key in the
412    ClientKeyExchange message.
414    Both client and server perform an ECDH operation and use the
415    resultant shared secret as the premaster secret.  All ECDH
416    calculations are performed as specified in Section 5.10.
418    Note that while the ECDH_ECDSA, ECDHE_ECDSA, ECDH_RSA, and ECDHE_RSA
419    key exchange algorithms require the server's certificate to be signed
420    with a particular signature scheme, this specification (following the
421    similar cases DH_DSS, DHE_DSS, DH_RSA, and DHE_RSA in [2]) does not
422    impose restrictions on signature schemes used elsewhere in the
423    certificate chain.  (Often such restrictions will be useful, and it
424    is expected that this will be taken into account in certification
425    authorities' signing practices.  However, such restrictions are not
426    strictly required in general: Even if it is beyond the capabilities
427    of a client to completely validate a given chain, the client may be
428    able to validate the server's certificate by relying on a trust
429    anchor that appears as one of the intermediate certificates in the
430    chain.)
447 Gupta, et al.           Expires December 2, 2005                [Page 8]
449 Internet-Draft          ECC Cipher Suites for TLS               May 2005
452 3.  Client Authentication
454    This document defines three new client authentication mechanisms
455    named after the type of client certificate involved: ECDSA_sign,
456    ECDSA_fixed_ECDH and RSA_fixed_ECDH.  The ECDSA_sign mechanism is
457    usable with any of the non-anonymous ECC key exchange algorithms
458    described in Section 2 as well as other non-anonymous (non-ECC) key
459    exchange algorithms defined in TLS [2].  The ECDSA_fixed_ECDH and
460    RSA_fixed_ECDH mechanisms are usable with ECDH_ECDSA and ECDH_RSA.
461    Their use with ECDHE_ECDSA and ECDHE_RSA is prohibited because the
462    use of a long-term ECDH client key would jeopardize the forward
463    secrecy property of these algorithms.
465    The server can request ECC-based client authentication by including
466    one or more of these certificate types in its CertificateRequest
467    message.  The server must not include any certificate types that are
468    prohibited for the negotiated key exchange algorithm.  The client
469    must check if it possesses a certificate appropriate for any of the
470    methods suggested by the server and is willing to use it for
471    authentication.
473    If these conditions are not met, the client should send a client
474    Certificate message containing no certificates.  In this case, the
475    ClientKeyExchange should be sent as described in Section 2 and the
476    CertificateVerify should not be sent.  If the server requires client
477    authentication, it may respond with a fatal handshake failure alert.
479    If the client has an appropriate certificate and is willing to use it
480    for authentication, it must send that certificate in the client's
481    Certificate message (as per Section 5.6) and prove possession of the
482    private key corresponding to the certified key.  The process of
483    determining an appropriate certificate and proving possession is
484    different for each authentication mechanism and described below.
486    NOTE: It is permissible for a server to request (and the client to
487    send) a client certificate of a different type than the server
488    certificate.
490 3.1  ECDSA_sign
492    To use this authentication mechanism, the client MUST possess a
493    certificate containing an ECDSA-capable public key and signed with
494    ECDSA.
496    The client proves possession of the private key corresponding to the
497    certified key by including a signature in the CertificateVerify
498    message as described in Section 5.8.
503 Gupta, et al.           Expires December 2, 2005                [Page 9]
505 Internet-Draft          ECC Cipher Suites for TLS               May 2005
508 3.2  ECDSA_fixed_ECDH
510    To use this authentication mechanism, the client MUST possess a
511    certificate containing an ECDH-capable public key and that
512    certificate MUST be signed with ECDSA.  Furthermore, the client's
513    ECDH key MUST be on the same elliptic curve as the server's long-term
514    (certified) ECDH key.  This might limit use of this mechanism to
515    closed environments.  In situations where the client has an ECC key
516    on a different curve, it would have to authenticate either using
517    ECDSA_sign or a non-ECC mechanism (e.g.  RSA).  Using fixed ECDH for
518    both servers and clients is computationally more efficient than
519    mechanisms providing forward secrecy.
521    When using this authentication mechanism, the client MUST send an
522    empty ClientKeyExchange as described in Section 5.7 and MUST NOT send
523    the CertificateVerify message.  The ClientKeyExchange is empty since
524    the client's ECDH public key required by the server to compute the
525    premaster secret is available inside the client's certificate.  The
526    client's ability to arrive at the same premaster secret as the server
527    (demonstrated by a successful exchange of Finished messages) proves
528    possession of the private key corresponding to the certified public
529    key and the CertificateVerify message is unnecessary.
531 3.3  RSA_fixed_ECDH
533    This authentication mechanism is identical to ECDSA_fixed_ECDH except
534    the client's certificate MUST be signed with RSA.
536    Note that while the ECDSA_sign, ECDSA_fixed_ECDH, and RSA_fixed_ECDH
537    client authentication mechanisms require the clients's certificate to
538    be signed with a particular signature scheme, this specification does
539    not impose restrictions on signature schemes used elsewhere in the
540    certificate chain.  (Often such restrictions will be useful, and it
541    is expected that this will be taken into account in certification
542    authorities' signing practices.  However, such restrictions are not
543    strictly required in general: Even if it is beyond the capabilities
544    of a server to completely validate a given chain, the server may be
545    able to validate the clients certificate by relying on a trust anchor
546    that appears as one of the intermediate certificates in the chain.)
559 Gupta, et al.           Expires December 2, 2005               [Page 10]
561 Internet-Draft          ECC Cipher Suites for TLS               May 2005
564 4.  TLS Extensions for ECC
566    Two new TLS extensions are defined in this specification: (i) the
567    Supported Elliptic Curves Extension, and (ii) the Supported Point
568    Formats Extension.  These allow negotiating the use of specific
569    curves and point formats (e.g. compressed vs. uncompressed),
570    respectively, during a handshake starting a new session.  These
571    extensions are especially relevant for constrained clients that may
572    only support a limited number of curves or point formats.  They
573    follow the general approach outlined in [3]; message details are
574    specified in Section 5.  The client enumerates the curves it supports
575    and the point formats it can parse by including the appropriate
576    extensions in its ClientHello message.  The server similarly
577    enumerates the point formats it can parse by including an extension
578    in its ServerHello message.
580    A TLS client that proposes ECC cipher suites in its ClientHello
581    message SHOULD include these extensions.  Servers implementing ECC
582    cipher suites MUST support these extensions, and when a client uses
583    these extensions, servers MUST NOT negotiate the use of an ECC cipher
584    suite unless they can complete the handshake while respecting the
585    choice of curves and compression techniques specified by the client.
586    This eliminates the possibility that a negotiated ECC handshake will
587    be subsequently aborted due to a client's inability to deal with the
588    server's EC key.
590    These extensions MUST NOT be included if the client does not propose
591    any ECC cipher suites.  A client that proposes ECC cipher suites may
592    choose not to include these extension.  In this case, the server is
593    free to choose any one of the elliptic curves or point formats listed
594    in Section 5.  That section also describes the structure and
595    processing of these extensions in greater detail.
597    In the case of session resumption, the server simply ignores the
598    Supported Elliptic Curves Extension and the Supported Point Formats
599    Extension as appearing in the current ClientHello message.  These
600    extensions only play a role during handshakes negotiating a new
601    session.
615 Gupta, et al.           Expires December 2, 2005               [Page 11]
617 Internet-Draft          ECC Cipher Suites for TLS               May 2005
620 5.  Data Structures and Computations
622    This section specifies the data structures and computations used by
623    ECC-based key mechanisms specified in Section 2, Section 3 and
624    Section 4.  The presentation language used here is the same as that
625    used in TLS [2].  Since this specification extends TLS, these
626    descriptions should be merged with those in the TLS specification and
627    any others that extend TLS.  This means that enum types may not
628    specify all possible values and structures with multiple formats
629    chosen with a select() clause may not indicate all possible cases.
631 5.1  Client Hello Extensions
633    This section specifies two TLS extensions that can be included with
634    the ClientHello message as described in [3], the Supported Elliptic
635    Curves Extension and the Supported Point Formats Extension.
637    When these extensions are sent:
639    The extensions SHOULD be sent along with any ClientHello message that
640    proposes ECC cipher suites.
642    Meaning of these extensions:
644    These extensions allow a client to enumerate the elliptic curves it
645    supports and/or the point formats it can parse.
647    Structure of these extensions:
649    The general structure of TLS extensions is described in [3] and this
650    specification adds two new types to ExtensionType.
653        enum { elliptic_curves(??), ec_point_formats(??) } ExtensionType;
655    [[ EDITOR: The values used for elliptic_curves and ec_point_formats
656    have been left as ??.  These values will be assigned when this draft
657    progresses to RFC.  (The examples below will have to be changed
658    accordingly.) ]]
660    elliptic_curves (Supported Elliptic Curves Extension):  Indicates the
661       set of elliptic curves supported by the client.  For this
662       extension, the opaque extension_data field contains
663       EllipticCurveList.
671 Gupta, et al.           Expires December 2, 2005               [Page 12]
673 Internet-Draft          ECC Cipher Suites for TLS               May 2005
676    ec_point_formats (Supported Point Formats Extension):  Indicates the
677       set of point formats that the client can parse.  For this
678       extension, the opaque extension_data field contains
679       ECPointFormatList.
682         enum {
683             sect163k1 (1), sect163r1 (2), sect163r2 (3),
684             sect193r1 (4), sect193r2 (5), sect233k1 (6),
685             sect233r1 (7), sect239k1 (8), sect283k1 (9),
686             sect283r1 (10), sect409k1 (11), sect409r1 (12),
687             sect571k1 (13), sect571r1 (14), secp160k1 (15),
688             secp160r1 (16), secp160r2 (17), secp192k1 (18),
689             secp192r1 (19), secp224k1 (20), secp224r1 (21),
690             secp256k1 (22), secp256r1 (23), secp384r1 (24),
691             secp521r1 (25), reserved (240..247),
692             arbitrary_explicit_prime_curves(253),
693             arbitrary_explicit_char2_curves(254),
694             (255)
695         } NamedCurve;
697    sect163k1, etc:  Indicates support of the corresponding named curve
698       specified in SEC 2 [10].  Note that many of these curves are also
699       recommended in ANSI X9.62 [6], and FIPS 186-2 [8].  Values 240
700       through 247 are reserved for private use.  Values 253 and 254
701       indicate that the client supports arbitrary prime and
702       characteristic-2 curves, respectively (the curve parameters must
703       be encoded explicitly in ECParameters).
706         struct {
707             NamedCurve elliptic_curve_list<1..2^8-1>
708         } EllipticCurveList;
711    Items in elliptic_curve_list are ordered according to the client's
712    preferences (favorite choice first).
714    As an example, a client that only supports secp192r1 (aka NIST P-192;
715    value 19 = 0x13) and secp224r1 (aka NIST P-224; value 21 = 0x15) and
716    prefers to use secp192r1 would include a TLS extension consisting of
717    the following octets:
719         00 ?? 00 03 02 13 15
721    A client that supports arbitrary explicit characteristic-2 curves
722    (value 254 = 0xFE) would include an extension consisting of the
723    following octets:
727 Gupta, et al.           Expires December 2, 2005               [Page 13]
729 Internet-Draft          ECC Cipher Suites for TLS               May 2005
732         00 ?? 00 02 01 FE
735         enum { uncompressed (0), ansiX962_compressed_prime (1),
736                ansiX962_compressed_char2 (2), reserved (3 .. 255)
737         } ECPointFormat;
739         struct {
740             ECPointFormat ec_point_format_list<1..2^8-1>
741         } ECPointFormatList;
743    Three point formats are included in the definition of ECPointFormat
744    above.  The uncompressed point format is the default format in that
745    implementations of this document MUST support it for all of their
746    supported curves.  Compressed point formats reduce bandwidth by
747    including only the x-coordinate and a single bit of the y-coordinate
748    of the point.  Implementations of this document MAY support the
749    ansiX962_compressed_prime and ansiX962_compressed_char2 formats,
750    where the former applies only to prime curves and the latter applies
751    only to characteristic-2 curves.  (All formats are described in [6].)
752    Values 248 through 255 are reserved for private use.
754    Items in ec_point_format_list are ordered according to the client's
755    preferences (favorite choice first).
757    A client that can parse only the uncompressed point format (value 0)
758    includes an extension consisting of the following octets:
760         00 ?? 00 02 01 00
762    A client that in the case of prime fields prefers the compressed
763    format (ansiX962_compressed_prime, value 1) over the uncompressed
764    format (value 0), but in the case of characteristic-2 fields prefers
765    the uncompressed format (value 0) over the compressed format
766    (ansiX962_compressed_char2, value 2), may indicate these preferences
767    by including an extension consisting of the following octets:
769         00 ?? 00 04 03 01 00 02
771    Actions of the sender:
773    A client that proposes ECC cipher suites in its ClientHello message
774    appends these extensions (along with any others), enumerating the
775    curves it supports and the point formats it can parse.  Clients
776    SHOULD send both the Supported Elliptic Curves Extension and the
777    Supported Point Formats Extension.  If the Supported Point Formats
778    Extension is indeed sent, it MUST contain the value 0 (uncompressed)
779    as one of the items in the list of point formats.
783 Gupta, et al.           Expires December 2, 2005               [Page 14]
785 Internet-Draft          ECC Cipher Suites for TLS               May 2005
788    Actions of the receiver:
790    A server that receives a ClientHello containing one or both of these
791    extensions MUST use the client's enumerated capabilities to guide its
792    selection of an appropriate cipher suite.  One of the proposed ECC
793    cipher suites must be negotiated only if the server can successfully
794    complete the handshake while using the curves and point formats
795    supported by the client (cf. Section 5.3 and Section 5.4).
797    NOTE: A server participating in an ECDHE-ECDSA key exchange may use
798    different curves for (i) the ECDSA key in its certificate, and (ii)
799    the ephemeral ECDH key in the ServerKeyExchange message.  The server
800    must consider the "elliptic_curves" extension in selecting both of
801    these curves.
803    If a server does not understand the "elliptic_curves" extension or is
804    unable to complete the ECC handshake while restricting itself to the
805    enumerated curves, it MUST NOT negotiate the use of an ECC cipher
806    suite.  Depending on what other cipher suites are proposed by the
807    client and supported by the server, this may result in a fatal
808    handshake failure alert due to the lack of common cipher suites.
810 5.2  Server Hello Extension
812    This section specifies a TLS extension that can be included with the
813    ServerHello message as described in [3], the Supported Point Formats
814    Extension.
816    When this extension is sent:
818    The Supported Point Formats Extension is included in a ServerHello
819    message in response to a ClientHello message containing the Supported
820    Point Formats Extension when negotiating an ECC cipher suite.
822    Meaning of this extensions:
824    This extension allows a server to enumerate the point formats it can
825    parse (for the curve that will appear in its ServerKeyExchange
826    message when using the ECDHE_ECDSA, ECDHE_RSA, or ECDH_anon key
827    exchange algorithm, or for the curve that is used in the server's
828    public key that will appear in its Certificate message when using the
829    ECDH_ECDSA or ECDH_RSA key exchange algorithm).
831    Structure of this extension:
833    The server's Supported Point Formats Extension has the same structure
834    as the client's Supported Point Formats Extension.  Items in
835    elliptic_curve_list here are ordered according to the server's
839 Gupta, et al.           Expires December 2, 2005               [Page 15]
841 Internet-Draft          ECC Cipher Suites for TLS               May 2005
844    preference (favorite choice first).  Note that the server may include
845    items that were not found in the client's list (e.g., the server may
846    prefer to receive points in compressed format even when a client
847    cannot parse this format: the same client may nevertheless be capable
848    to output points in compressed format).
850    Actions of the sender:
852    A server that selects an ECC cipher suite in response to a
853    ClientHello message including a Supported Point Formats Extension
854    appends this extension (along with others) to its ServerHello
855    message, enumerating the point formats it can parse.  The Supported
856    Point Formats Extension, when used, MUST contain the value 0
857    (uncompressed) as one of the items in the list of point formats.
859    Actions of the receiver:
861    A client that receives a ServerHello message containing a Supported
862    Point Formats Extension MUST respect the server's choice of point
863    formats during the handshake (cf. Section 5.6 and Section 5.7).  If
864    no Supported Point Formats Extension is received with the
865    ServerHello, this is equivalent to an extension allowing only the
866    uncompressed point format.
868 5.3  Server Certificate
870    When this message is sent:
872    This message is sent in all non-anonymous ECC-based key exchange
873    algorithms.
875    Meaning of this message:
877    This message is used to authentically convey the server's static
878    public key to the client.  The following table shows the server
879    certificate type appropriate for each key exchange algorithm.  ECC
880    public keys must be encoded in certificates as described in
881    Section 5.9.
883    NOTE: The server's Certificate message is capable of carrying a chain
884    of certificates.  The restrictions mentioned in Table 3 apply only to
885    the server's certificate (first in the chain).
895 Gupta, et al.           Expires December 2, 2005               [Page 16]
897 Internet-Draft          ECC Cipher Suites for TLS               May 2005
900           Key Exchange Algorithm  Server Certificate Type
901           ----------------------  -----------------------
903           ECDH_ECDSA              Certificate must contain an
904                                   ECDH-capable public key. It
905                                   must be signed with ECDSA.
907           ECDHE_ECDSA             Certificate must contain an
908                                   ECDSA-capable public key. It
909                                   must be signed with ECDSA.
911           ECDH_RSA                Certificate must contain an
912                                   ECDH-capable public key. It
913                                   must be signed with RSA.
915           ECDHE_RSA               Certificate must contain an
916                                   RSA public key authorized for
917                                   use in digital signatures. It
918                                   must be signed with RSA.
920                     Table 3: Server certificate types
923    Structure of this message:
925    Identical to the TLS Certificate format.
927    Actions of the sender:
929    The server constructs an appropriate certificate chain and conveys it
930    to the client in the Certificate message.  If the client has used a
931    Supported Elliptic Curves Extension, the public key in the server's
932    certificate MUST respect the client's choice of elliptic curves; in
933    particular, the public key MUST employ a named curve (not the same
934    curve as an explicit curve) unless the client has indicated support
935    for explicit curves of the appropriate type.  If the client has used
936    a Supported Point Formats Extension, both the server's public key
937    point and (in the case of an explicit curve) the curve's base point
938    MUST respect the client's choice of point formats.  (A server that
939    cannot satisfy these requirements must not choose an ECC cipher suite
940    in its ServerHello message.)
942    Actions of the receiver:
944    The client validates the certificate chain, extracts the server's
945    public key, and checks that the key type is appropriate for the
946    negotiated key exchange algorithm.
951 Gupta, et al.           Expires December 2, 2005               [Page 17]
953 Internet-Draft          ECC Cipher Suites for TLS               May 2005
956 5.4  Server Key Exchange
958    When this message is sent:
960    This message is sent when using the ECDHE_ECDSA, ECDHE_RSA and
961    ECDH_anon key exchange algorithms.
963    Meaning of this message:
965    This message is used to convey the server's ephemeral ECDH public key
966    (and the corresponding elliptic curve domain parameters) to the
967    client.
969    Structure of this message:
971         enum { explicit_prime (1), explicit_char2 (2),
972                named_curve (3), reserved(4 .. 255) } ECCurveType;
974    explicit_prime:  Indicates the elliptic curve domain parameters are
975       conveyed verbosely, and the underlying finite field is a prime
976       field.
978    explicit_char2:  Indicates the elliptic curve domain parameters are
979       conveyed verbosely, and the underlying finite field is a
980       characteristic-2 field.
982    named_curve:  Indicates that a named curve is used.  This option
983       SHOULD be used when applicable.
985    Values 248 through 255 are reserved for private use.
987         struct {
988             opaque a <1..2^8-1>;
989             opaque b <1..2^8-1>;
990         } ECCurve;
992    a, b:  These parameters specify the coefficients of the elliptic
993       curve.  Each value contains the byte string representation of a
994       field element following the conversion routine in Section 4.3.3 of
995       ANSI X9.62 [6].
998         struct {
999             opaque point <1..2^8-1>;
1000         } ECPoint;
1007 Gupta, et al.           Expires December 2, 2005               [Page 18]
1009 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1012    point:  This is the byte string representation of an elliptic curve
1013       point following the conversion routine in Section 4.3.6 of ANSI
1014       X9.62 [6].  This byte string may represent an elliptic curve point
1015       in uncompressed, or compressed format; it MUST conform to what the
1016       client has requested through a Supported Point Formats Extension
1017       if this extension was used.
1020         enum { ec_basis_trinomial, ec_basis_pentanomial } ECBasisType;
1022    ec_basis_trinomial:  Indicates representation of a characteristic-2
1023       field using a trinomial basis.
1025    ec_basis_pentanomial:  Indicates representation of a characteristic-2
1026       field using a pentanomial basis.
1029         struct {
1030             ECCurveType    curve_type;
1031             select (curve_type) {
1032                 case explicit_prime:
1033                     opaque      prime_p <1..2^8-1>;
1034                     ECCurve     curve;
1035                     ECPoint     base;
1036                     opaque      order <1..2^8-1>;
1037                     opaque      cofactor <1..2^8-1>;
1038                 case explicit_char2:
1039                     uint16      m;
1040                     ECBasisType basis;
1041                     select (basis) {
1042                         case ec_trinomial:
1043                             opaque  k <1..2^8-1>;
1044                         case ec_pentanomial:
1045                             opaque  k1 <1..2^8-1>;
1046                             opaque  k2 <1..2^8-1>;
1047                             opaque  k3 <1..2^8-1>;
1048                     };
1049                     ECCurve     curve;
1050                     ECPoint     base;
1051                     opaque      order <1..2^8-1>;
1052                     opaque      cofactor <1..2^8-1>;
1053                 case named_curve:
1054                     NamedCurve namedcurve;
1055             };
1056         } ECParameters;
1063 Gupta, et al.           Expires December 2, 2005               [Page 19]
1065 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1068    curve_type:  This identifies the type of the elliptic curve domain
1069       parameters.
1071    prime_p:  This is the odd prime defining the field Fp.
1073    curve:  Specifies the coefficients a and b of the elliptic curve E.
1075    base:  Specifies the base point G on the elliptic curve.
1077    order:  Specifies the order n of the base point.
1079    cofactor:  Specifies the cofactor h = #E(Fq)/n, where #E(Fq)
1080       represents the number of points on the elliptic curve E defined
1081       over the field Fq (either Fp or F2^m).
1083    m:  This is the degree of the characteristic-2 field F2^m.
1085    k:  The exponent k for the trinomial basis representation x^m + x^k
1086       +1.
1088    k1, k2, k3:  The exponents for the pentanomial representation x^m +
1089       x^k3 + x^k2 + x^k1 + 1 (such that k3 > k2 > k1).
1091    namedcurve:  Specifies a recommended set of elliptic curve domain
1092       parameters.  All enum values of NamedCurve are allowed except for
1093       arbitrary_explicit_prime_curves(253) and
1094       arbitrary_explicit_char2_curves(254).  These two values are only
1095       allowed in the ClientHello extension.
1098         struct {
1099             ECParameters    curve_params;
1100             ECPoint         public;
1101         } ServerECDHParams;
1103    curve_params:  Specifies the elliptic curve domain parameters
1104       associated with the ECDH public key.
1106    public:  The ephemeral ECDH public key.
1108    The ServerKeyExchange message is extended as follows.
1110         enum { ec_diffie_hellman } KeyExchangeAlgorithm;
1119 Gupta, et al.           Expires December 2, 2005               [Page 20]
1121 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1124    ec_diffie_hellman:  Indicates the ServerKeyExchange message contains
1125       an ECDH public key.
1128         select (KeyExchangeAlgorithm) {
1129             case ec_diffie_hellman:
1130                 ServerECDHParams    params;
1131                 Signature           signed_params;
1132         } ServerKeyExchange;
1134    params:  Specifies the ECDH public key and associated domain
1135       parameters.
1137    signed_params:  A hash of the params, with the signature appropriate
1138       to that hash applied.  The private key corresponding to the
1139       certified public key in the server's Certificate message is used
1140       for signing.
1143           enum { ecdsa } SignatureAlgorithm;
1146           select (SignatureAlgorithm) {
1147               case ecdsa:
1148                   digitally-signed struct {
1149                       opaque sha_hash[sha_size];
1150                   };
1151           } Signature;
1153    NOTE: SignatureAlgorithm is "rsa" for the ECDHE_RSA key exchange
1154    algorithm and "anonymous" for ECDH_anon.  These cases are defined in
1155    TLS [2].  SignatureAlgorithm is "ecdsa" for ECDHE_ECDSA.  ECDSA
1156    signatures are generated and verified as described in Section 5.10.
1157    As per ANSI X9.62, an ECDSA signature consists of a pair of integers
1158    r and s.  These integers are both converted into byte strings of the
1159    same length as the curve order n using the conversion routine
1160    specified in Section 4.3.1 of [6].  The two byte strings are
1161    concatenated, and the result is placed in the signature field.
1163    Actions of the sender:
1165    The server selects elliptic curve domain parameters and an ephemeral
1166    ECDH public key corresponding to these parameters according to the
1167    ECKAS-DH1 scheme from IEEE 1363 [5].  It conveys this information to
1168    the client in the ServerKeyExchange message using the format defined
1169    above.
1171    Actions of the recipient:
1175 Gupta, et al.           Expires December 2, 2005               [Page 21]
1177 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1180    The client verifies the signature (when present) and retrieves the
1181    server's elliptic curve domain parameters and ephemeral ECDH public
1182    key from the ServerKeyExchange message.
1184 5.5  Certificate Request
1186    When this message is sent:
1188    This message is sent when requesting client authentication.
1190    Meaning of this message:
1192    The server uses this message to suggest acceptable client
1193    authentication methods.
1195    Structure of this message:
1197    The TLS CertificateRequest message is extended as follows.
1199         enum {
1200             ecdsa_sign(??), rsa_fixed_ecdh(??),
1201             ecdsa_fixed_ecdh(??), (255)
1202         } ClientCertificateType;
1204    ecdsa_sign, etc Indicates that the server would like to use the
1205       corresponding client authentication method specified in Section 3.
1207       [[ EDITOR: The values used for ecdsa_sign, rsa_fixed_ecdh, and
1208       ecdsa_fixed_ecdh have been left as ??.  These values will be
1209       assigned when this draft progresses to RFC.  Earlier versions of
1210       this draft used the values 5, 6, and 7 - however these values have
1211       been removed since they are used differently by SSL 3.0 [14] and
1212       their use by TLS is being deprecated. ]]
1214    Actions of the sender:
1216    The server decides which client authentication methods it would like
1217    to use, and conveys this information to the client using the format
1218    defined above.
1220    Actions of the receiver:
1222    The client determines whether it has a suitable certificate for use
1223    with any of the requested methods, and decides whether or not to
1224    proceed with client authentication.
1231 Gupta, et al.           Expires December 2, 2005               [Page 22]
1233 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1236 5.6  Client Certificate
1238    When this message is sent:
1240    This message is sent in response to a CertificateRequest when a
1241    client has a suitable certificate and has decided to proceed with
1242    client authentication.  (Note that if the server has used a Supported
1243    Point Formats Extension, a certificate can only be considered
1244    suitable for use with the ECDSA_sign, RSA_fixed_ECDH, and
1245    ECDSA_fixed_ECDH authentication methods if the public key point
1246    specified in it respects the server's choice of point formats.  If no
1247    Supported Point Formats Extension has been used, a certificate can
1248    only be considered suitable for use with these authentication methods
1249    if the point is represented in uncompressed point format.)
1251    Meaning of this message:
1253    This message is used to authentically convey the client's static
1254    public key to the server.  The following table summarizes what client
1255    certificate types are appropriate for the ECC-based client
1256    authentication mechanisms described in Section 3.  ECC public keys
1257    must be encoded in certificates as described in Section 5.9.
1259    NOTE: The client's Certificate message is capable of carrying a chain
1260    of certificates.  The restrictions mentioned in Table 4 apply only to
1261    the client's certificate (first in the chain).
1264           Client
1265           Authentication Method   Client Certificate Type
1266           ---------------------   -----------------------
1268           ECDSA_sign              Certificate MUST contain an
1269                                   ECDSA-capable public key and
1270                                   be signed with ECDSA.
1272           ECDSA_fixed_ECDH        Certificate MUST contain an
1273                                   ECDH-capable public key on the
1274                                   same elliptic curve as the server's
1275                                   long-term ECDH key. This certificate
1276                                   MUST be signed with ECDSA.
1278           RSA_fixed_ECDH          Certificate MUST contain an
1279                                   ECDH-capable public key on the
1280                                   same elliptic curve as the server's
1281                                   long-term ECDH key. This certificate
1282                                   MUST be signed with RSA.
1287 Gupta, et al.           Expires December 2, 2005               [Page 23]
1289 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1292                      Table 4: Client certificate types
1295    Structure of this message:
1297    Identical to the TLS client Certificate format.
1299    Actions of the sender:
1301    The client constructs an appropriate certificate chain, and conveys
1302    it to the server in the Certificate message.
1304    Actions of the receiver:
1306    The TLS server validates the certificate chain, extracts the client's
1307    public key, and checks that the key type is appropriate for the
1308    client authentication method.
1310 5.7  Client Key Exchange
1312    When this message is sent:
1314    This message is sent in all key exchange algorithms.  If client
1315    authentication with ECDSA_fixed_ECDH or RSA_fixed_ECDH is used, this
1316    message is empty.  Otherwise, it contains the client's ephemeral ECDH
1317    public key.
1319    Meaning of the message:
1321    This message is used to convey ephemeral data relating to the key
1322    exchange belonging to the client (such as its ephemeral ECDH public
1323    key).
1325    Structure of this message:
1327    The TLS ClientKeyExchange message is extended as follows.
1329         enum { implicit, explicit } PublicValueEncoding;
1331    implicit, explicit:  For ECC cipher suites, this indicates whether
1332       the client's ECDH public key is in the client's certificate
1333       ("implicit") or is provided, as an ephemeral ECDH public key, in
1334       the ClientKeyExchange message ("explicit").  (This is "explicit"
1335       in ECC cipher suites except when the client uses the
1336       ECDSA_fixed_ECDH or RSA_fixed_ECDH client authentication
1337       mechanism.)
1343 Gupta, et al.           Expires December 2, 2005               [Page 24]
1345 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1348         struct {
1349             select (PublicValueEncoding) {
1350                 case implicit: struct { };
1351                 case explicit: ECPoint ecdh_Yc;
1352             } ecdh_public;
1353         } ClientECDiffieHellmanPublic;
1355    ecdh_Yc:  Contains the client's ephemeral ECDH public key as a byte
1356       string ECPoint.point, which may represent an elliptic curve point
1357       in uncompressed or compressed format.  Here the format MUST
1358       conform to what the server has requested through a Supported Point
1359       Formats Extension if this extension was used, and MUST be
1360       uncompressed if this extension was not used.
1363         struct {
1364             select (KeyExchangeAlgorithm) {
1365                 case ec_diffie_hellman: ClientECDiffieHellmanPublic;
1366             } exchange_keys;
1367         } ClientKeyExchange;
1369    Actions of the sender:
1371    The client selects an ephemeral ECDH public key corresponding to the
1372    parameters it received from the server according to the ECKAS-DH1
1373    scheme from IEEE 1363 [5].  It conveys this information to the client
1374    in the ClientKeyExchange message using the format defined above.
1376    Actions of the recipient:
1378    The server retrieves the client's ephemeral ECDH public key from the
1379    ClientKeyExchange message and checks that it is on the same elliptic
1380    curve as the server's ECDH key.
1382 5.8  Certificate Verify
1384    When this message is sent:
1386    This message is sent when the client sends a client certificate
1387    containing a public key usable for digital signatures, e.g. when the
1388    client is authenticated using the ECDSA_sign mechanism.
1390    Meaning of the message:
1392    This message contains a signature that proves possession of the
1393    private key corresponding to the public key in the client's
1394    Certificate message.
1399 Gupta, et al.           Expires December 2, 2005               [Page 25]
1401 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1404    Structure of this message:
1406    The TLS CertificateVerify message is extended as follows.
1408         enum { ecdsa } SignatureAlgorithm;
1410         select (SignatureAlgorithm) {
1411             case ecdsa:
1412                 digitally-signed struct {
1413                     opaque sha_hash[sha_size];
1414                 };
1415         } Signature;
1417    For the ecdsa case, the signature field in the CertificateVerify
1418    message contains an ECDSA signature computed over handshake messages
1419    exchanged so far.  ECDSA signatures are computed as described in
1420    Section 5.10.  As per ANSI X9.62, an ECDSA signature consists of a
1421    pair of integers r and s.  These integers are both converted into
1422    byte strings of the same length as the curve order n using the
1423    conversion routine specified in Section 4.3.1 of [6].  The two byte
1424    strings are concatenated, and the result is placed in the signature
1425    field.
1427    Actions of the sender:
1429    The client computes its signature over all handshake messages sent or
1430    received starting at client hello up to but not including this
1431    message.  It uses the private key corresponding to its certified
1432    public key to compute the signature which is conveyed in the format
1433    defined above.
1435    Actions of the receiver:
1437    The server extracts the client's signature from the CertificateVerify
1438    message, and verifies the signature using the public key it received
1439    in the client's Certificate message.
1441 5.9  Elliptic Curve Certificates
1443    X509 certificates containing ECC public keys or signed using ECDSA
1444    MUST comply with [11] or another RFC that replaces or extends it.
1445    Clients SHOULD use the elliptic curve domain parameters recommended
1446    in ANSI X9.62 [6], FIPS 186-2 [8], and SEC 2 [10].
1448 5.10  ECDH, ECDSA and RSA Computations
1450    All ECDH calculations (including parameter and key generation as well
1451    as the shared secret calculation) are performed according to [5]
1455 Gupta, et al.           Expires December 2, 2005               [Page 26]
1457 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1460    using the ECKAS-DH1 scheme with the identity map as key derivation
1461    function, so that the premaster secret is the x-coordinate of the
1462    ECDH shared secret elliptic curve point represented as an octet
1463    string.  Note that this octet string (Z in IEEE 1363 terminology) as
1464    output by FE2OSP, the Field Element to Octet String Conversion
1465    Primitive, has constant length for any given field; leading zeros
1466    found in this octet string MUST NOT be truncated.
1468    Note that a new extension may be introduced in the future to allow
1469    the use of a different KDF during computation of the premaster
1470    secret.  In this event, the new KDF would be used in place of the
1471    process detailed above.  This may be desirable, for example, to
1472    support compatibility with the planned NIST key agreement standard.
1474    All ECDSA computations MUST be performed according to ANSI X9.62 [6]
1475    or its successors.  Data to be signed/verified is hashed and the
1476    result run directly through the ECDSA algorithm with no additional
1477    hashing.  The default hash function is SHA-1 [7] and sha_size (see
1478    Section 5.4 and Section 5.8) is 20.  However, an alternative hash
1479    function, such as one of the new SHA hash functions specified in FIPS
1480    180-2 [7], may be used instead if the certificate containing the EC
1481    public key explicitly requires use of another hash function.  (The
1482    mechanism for specifying the required hash function has not been
1483    standardized but this provision anticipates such standardization and
1484    obviates the need to update this document in response.  Future PKIX
1485    RFCs may choose, for example, to specify the hash function to be used
1486    with a public key in the parameters field of subjectPublicKeyInfo.)
1488    All RSA signatures must be generated and verified according to PKCS#1
1489    [9] block type 1.
1511 Gupta, et al.           Expires December 2, 2005               [Page 27]
1513 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1516 6.  Cipher Suites
1518    The table below defines new ECC cipher suites that use the key
1519    exchange algorithms specified in Section 2.
1521      CipherSuite TLS_ECDH_ECDSA_WITH_NULL_SHA           = { 0x00, 0x?? }
1522      CipherSuite TLS_ECDH_ECDSA_WITH_RC4_128_SHA        = { 0x00, 0x?? }
1523      CipherSuite TLS_ECDH_ECDSA_WITH_DES_CBC_SHA        = { 0x00, 0x?? }
1524      CipherSuite TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA   = { 0x00, 0x?? }
1525      CipherSuite TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA    = { 0x00, 0x?? }
1526      CipherSuite TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA    = { 0x00, 0x?? }
1528      CipherSuite TLS_ECDHE_ECDSA_WITH_NULL_SHA          = { 0x00, 0x?? }
1529      CipherSuite TLS_ECDHE_ECDSA_WITH_RC4_128_SHA       = { 0x00, 0x?? }
1530      CipherSuite TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA  = { 0x00, 0x?? }
1531      CipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA   = { 0x00, 0x?? }
1532      CipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA   = { 0x00, 0x?? }
1534      CipherSuite TLS_ECDH_RSA_WITH_NULL_SHA             = { 0x00, 0x?? }
1535      CipherSuite TLS_ECDH_RSA_WITH_RC4_128_SHA          = { 0x00, 0x?? }
1536      CipherSuite TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA     = { 0x00, 0x?? }
1537      CipherSuite TLS_ECDH_RSA_WITH_AES_128_CBC_SHA      = { 0x00, 0x?? }
1538      CipherSuite TLS_ECDH_RSA_WITH_AES_256_CBC_SHA      = { 0x00, 0x?? }
1540      CipherSuite TLS_ECDHE_RSA_WITH_NULL_SHA            = { 0x00, 0x?? }
1541      CipherSuite TLS_ECDHE_RSA_WITH_RC4_128_SHA         = { 0x00, 0x?? }
1542      CipherSuite TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA    = { 0x00, 0x?? }
1543      CipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA     = { 0x00, 0x?? }
1544      CipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA     = { 0x00, 0x?? }
1546      CipherSuite TLS_ECDH_anon_NULL_WITH_SHA            = { 0x00, 0x?? }
1547      CipherSuite TLS_ECDH_anon_WITH_RC4_128_SHA         = { 0x00, 0x?? }
1548      CipherSuite TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA    = { 0x00, 0x?? }
1549      CipherSuite TLS_ECDH_anon_WITH_AES_128_CBC_SHA     = { 0x00, 0x?? }
1550      CipherSuite TLS_ECDH_anon_WITH_AES_256_CBC_SHA     = { 0x00, 0x?? }
1552                         Table 5: TLS ECC cipher suites
1555    [[ EDITOR: The actual cipher suite numbers will be assigned when this
1556    draft progresses to RFC. ]]
1558    The key exchange method, cipher, and hash algorithm for each of these
1559    cipher suites are easily determined by examining the name.  Ciphers
1560    other than AES ciphers, and hash algorithms are defined in [2].  AES
1561    ciphers are defined in [15].
1563    Server implementations SHOULD support all of the following cipher
1567 Gupta, et al.           Expires December 2, 2005               [Page 28]
1569 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1572    suites, and client implementations SHOULD support at least one of
1573    them: TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
1574    TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
1575    TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, and
1576    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA.
1623 Gupta, et al.           Expires December 2, 2005               [Page 29]
1625 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1628 7.  Security Considerations
1630    This document is based on [2], [5], [6] and [15].  The appropriate
1631    security considerations of those documents apply.
1633    One important issue that implementors and users must consider is
1634    elliptic curve selection.  Guidance on selecting an appropriate
1635    elliptic curve size is given in Table 1.
1637    Beyond elliptic curve size, the main issue is elliptic curve
1638    structure.  As a general principle, it is more conservative to use
1639    elliptic curves with as little algebraic structure as possible - thus
1640    random curves are more conservative than special curves such as
1641    Koblitz curves, and curves over F_p with p random are more
1642    conservative than curves over F_p with p of a special form (and
1643    curves over F_p with p random might be considered more conservative
1644    than curves over F_2^m as there is no choice between multiple fields
1645    of similar size for characteristic 2).  Note, however, that algebraic
1646    structure can also lead to implementation efficiencies and
1647    implementors and users may, therefore, need to balance conservatism
1648    against a need for efficiency.  Concrete attacks are known against
1649    only very few special classes of curves, such as supersingular
1650    curves, and these classes are excluded from the ECC standards that
1651    this document references [5], [6].
1653    Another issue is the potential for catastrophic failures when a
1654    single elliptic curve is widely used.  In this case, an attack on the
1655    elliptic curve might result in the compromise of a large number of
1656    keys.  Again, this concern may need to be balanced against efficiency
1657    and interoperability improvements associated with widely-used curves.
1658    Substantial additional information on elliptic curve choice can be
1659    found in [4], [5], [6], [8].
1661    Implementors and users must also consider whether they need forward
1662    secrecy.  Forward secrecy refers to the property that session keys
1663    are not compromised if the static, certified keys belonging to the
1664    server and client are compromised.  The ECDHE_ECDSA and ECDHE_RSA key
1665    exchange algorithms provide forward secrecy protection in the event
1666    of server key compromise, while ECDH_ECDSA and ECDH_RSA do not.
1667    Similarly if the client is providing a static, certified key,
1668    ECDSA_sign client authentication provides forward secrecy protection
1669    in the event of client key compromise, while ECDSA_fixed_ECDH and
1670    RSA_fixed_ECDH do not.  Thus to obtain complete forward secrecy
1671    protection, ECDHE_ECDSA or ECDHE_RSA must be used for key exchange,
1672    with ECDSA_sign used for client authentication if necessary.  Here
1673    again the security benefits of forward secrecy may need to be
1674    balanced against the improved efficiency offered by other options.
1679 Gupta, et al.           Expires December 2, 2005               [Page 30]
1681 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1684 8.  Acknowledgments
1686    The authors wish to thank Bill Anderson and Tim Dierks.
1735 Gupta, et al.           Expires December 2, 2005               [Page 31]
1737 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1740 9.  References
1742 9.1  Normative References
1744    [1]   Bradner, S., "Key Words for Use in RFCs to Indicate Requirement
1745          Levels", RFC 2119, March 1997.
1747    [2]   Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
1748          RFC 2246, January 1999.
1750    [3]   Blake-Wilson, S., Nystrom, M., Hopwood, D., Mikkelsen, J., and
1751          T. Wright, "Transport Layer Security (TLS) Extensions",
1752          draft-ietf-tls-rfc3546bis-01.txt (work in progress), May 2005.
1754    [4]   SECG, "Elliptic Curve Cryptography", SEC 1, 2000,
1755          <http://www.secg.org/>.
1757    [5]   IEEE, "Standard Specifications for Public Key Cryptography",
1758          IEEE 1363, 2000.
1760    [6]   ANSI, "Public Key Cryptography For The Financial Services
1761          Industry: The Elliptic Curve Digital Signature Algorithm
1762          (ECDSA)", ANSI X9.62, 1998.
1764    [7]   NIST, "Secure Hash Standard", FIPS 180-2, 2002.
1766    [8]   NIST, "Digital Signature Standard", FIPS 186-2, 2000.
1768    [9]   RSA Laboratories, "PKCS#1: RSA Encryption Standard version
1769          1.5", PKCS 1, November 1993.
1771    [10]  SECG, "Recommended Elliptic Curve Domain Parameters", SEC 2,
1772          2000, <http://www.secg.org/>.
1774    [11]  Polk, T., Housley, R., and L. Bassham, "Algorithms and
1775          Identifiers for the Internet X.509 Public Key Infrastructure
1776          Certificate and Certificate Revocation List (CRL) Profile",
1777          RFC 3279, April 2002.
1779 9.2  Informative References
1781    [12]  Harper, G., Menezes, A., and S. Vanstone, "Public-Key
1782          Cryptosystems with Very Small Key Lengths", Advances in
1783          Cryptology -- EUROCRYPT '92, LNCS 658, 1993.
1785    [13]  Lenstra, A. and E. Verheul, "Selecting Cryptographic Key
1786          Sizes", Journal of Cryptology 14 (2001) 255-293,
1787          <http://www.cryptosavvy.com/>.
1791 Gupta, et al.           Expires December 2, 2005               [Page 32]
1793 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1796    [14]  Freier, A., Karlton, P., and P. Kocher, "The SSL Protocol
1797          Version 3.0", November 1996,
1798          <http://wp.netscape.com/eng/ssl3/draft302.txt>.
1800    [15]  Chown, P., "Advanced Encryption Standard (AES) Ciphersuites for
1801          Transport Layer Security (TLS)", RFC 3268, June 2002.
1804 Authors' Addresses
1806    Vipul Gupta
1807    Sun Microsystems Laboratories
1808    16 Network Circle
1809    MS UMPK16-160
1810    Menlo Park, CA  94025
1811    US
1813    Phone: +1 650 786 7551
1814    Email: vipul.gupta@sun.com
1817    Simon Blake-Wilson
1818    Basic Commerce & Industries, Inc.
1819    96 Spandia Ave
1820    Unit 606
1821    Toronto, ON  M6G 2T6
1822    CA
1824    Phone: +1 416 214 5961
1825    Email: sblakewilson@bcisse.com
1828    Bodo Moeller
1829    University of Calgary
1830    Dept of Math & Stats
1831    2500 University Dr NW
1832    Calgary, AB  T2N 1N4
1833    CA
1835    Phone: +1 403 220 5735
1836    Email: bodo@openssl.org
1839    Chris Hawk
1840    Corriente Networks
1842    Email: chris@corriente.net
1847 Gupta, et al.           Expires December 2, 2005               [Page 33]
1849 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1852    Nelson Bolyard
1854    Email: nelson@bolyard.com
1903 Gupta, et al.           Expires December 2, 2005               [Page 34]
1905 Internet-Draft          ECC Cipher Suites for TLS               May 2005
1908 Intellectual Property Statement
1910    The IETF takes no position regarding the validity or scope of any
1911    Intellectual Property Rights or other rights that might be claimed to
1912    pertain to the implementation or use of the technology described in
1913    this document or the extent to which any license under such rights
1914    might or might not be available; nor does it represent that it has
1915    made any independent effort to identify any such rights.  Information
1916    on the procedures with respect to rights in RFC documents can be
1917    found in BCP 78 and BCP 79.
1919    Copies of IPR disclosures made to the IETF Secretariat and any
1920    assurances of licenses to be made available, or the result of an
1921    attempt made to obtain a general license or permission for the use of
1922    such proprietary rights by implementers or users of this
1923    specification can be obtained from the IETF on-line IPR repository at
1924    http://www.ietf.org/ipr.
1926    The IETF invites any interested party to bring to its attention any
1927    copyrights, patents or patent applications, or other proprietary
1928    rights that may cover technology that may be required to implement
1929    this standard.  Please address the information to the IETF at
1930    ietf-ipr@ietf.org.
1933 Disclaimer of Validity
1935    This document and the information contained herein are provided on an
1936    "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
1937    OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
1938    ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
1939    INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
1940    INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
1941    WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
1944 Copyright Statement
1946    Copyright (C) The Internet Society (2005).  This document is subject
1947    to the rights, licenses and restrictions contained in BCP 78, and
1948    except as set forth therein, the authors retain all their rights.
1951 Acknowledgment
1953    Funding for the RFC Editor function is currently provided by the
1954    Internet Society.
1959 Gupta, et al.           Expires December 2, 2005               [Page 35]