Internet Engineering Task Force (IETF) J. Merkle Request for Comments: 6954 secunet Security Networks Category: Informational M. Lochter ISSN: 2070-1721 BSI July 2013
Using the Elliptic Curve Cryptography (ECC) Brainpool Curves for the Internet Key Exchange Protocol Version 2 (IKEv2)
Abstract
This document specifies use of the Elliptic Curve Cryptography (ECC) Brainpool elliptic curve groups for key exchange in the Internet Key Exchange Protocol version 2 (IKEv2).
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6954.
Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
Merkle & Lochter Informational [Page 1]
RFC 6954 Brainpool Curves for IKEv2 Key Exchange July 2013
Table of Contents
1. Introduction ....................................................2 1.1. Requirements Language ......................................2 2. IKEv2 Key Exchange Using the ECC Brainpool Curves ...............3 2.1. Diffie-Hellman Group Transform IDs .........................3 2.2. Using the Twisted Brainpool Curves Internally ..............3 2.3. Key Exchange Payload and Shared Secret .....................3 3. Security Considerations .........................................4 4. IANA Considerations .............................................5 5. References ......................................................5 5.1. Normative References .......................................5 5.2. Informative References .....................................6 Appendix A. Test Vectors ...........................................8 A.1. 224-Bit Curve ...............................................8 A.2. 256-Bit Curve ...............................................9 A.3. 384-Bit Curve ...............................................9 A.4. 512-Bit Curve ..............................................10
[RFC5639] specified a new set of elliptic curve groups over finite prime fields for use in cryptographic applications. These groups, denoted as ECC Brainpool curves, were generated in a verifiably pseudo-random way and comply with the security requirements of relevant standards from ISO [ISO1] [ISO2], ANSI [ANSI1], NIST [FIPS], and the Standards for Efficient Cryptography Group [SEC2].
While the ASN.1 object identifiers defined in RFC 5639 allow usage of the ECC Brainpool curves in certificates and certificate revocation lists, their utilization for key exchange in IKEv2 [RFC5996] requires the definition and assignment of additional Diffie-Hellman Group Transform IDs in the respective IANA registry. This document specifies transform IDs for four curves from RFC 5639, as well as the encoding of the key exchange payload and derivation of the shared secret when using one of these curves.
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 [RFC2119].
Merkle & Lochter Informational [Page 2]
RFC 6954 Brainpool Curves for IKEv2 Key Exchange July 2013
2. IKEv2 Key Exchange Using the ECC Brainpool Curves
In order to use the ECC Brainpool curves for key exchange within IKEv2, the Diffie-Hellman Group Transform IDs (Transform Type 4) listed in the following table have been registered with IANA [IANA-IKE2]. The parameters associated with these curves are defined in RFC 5639 [RFC5639].
Test vectors for the groups defined by the ECC Brainpool curves are provided in Appendix A.
2.2. Using the Twisted Brainpool Curves Internally
In [RFC5639], for each random curve, a "twisted curve" (defined by a quadratic twist; see [HMV]) is defined that offers the same level of security but potentially allows more efficient arithmetic due to the curve parameter A = -3. The transform IDs listed in Table 1 also allow using the twisted curve corresponding to the specified random curve: points (x,y) of any of the listed curves can be efficiently transformed to the corresponding point (x',y') on the twisted curve of the same bit length -- and vice versa -- by setting (x',y') = (x*Z^2, y*Z^3) with the coefficient Z specified for that curve [RFC5639].
For the encoding of the key exchange payload and the derivation of the shared secret, the methods specified in [RFC5903] are adopted.
In an Elliptic Curve Group over GF[P] (ECP) key exchange in IKEv2, the Diffie-Hellman public value passed in a key establishment (KE) payload consists of two components, x and y, corresponding to the coordinates of an elliptic curve point. Each component MUST be computed from the corresponding coordinate using the FieldElement-to- OctetString conversion method specified in [SEC1] and MUST have a bit
Merkle & Lochter Informational [Page 3]
RFC 6954 Brainpool Curves for IKEv2 Key Exchange July 2013
length as indicated in Table 2. This length is enforced by the FieldElement-to-OctetString conversion method, if necessary, by prepending the value with zeros.
Note: The FieldElement-to-OctetString conversion method specified in [SEC1] is equivalent to applying the conversion between integers and octet strings (as described in Section 6 of [RFC6090]) after representing the field element as an integer in the interval [0, p-1].
+---------------------+-----------------------+---------------------+ | Curves | Bit length of each | Bit length of key | | | component (x or y) | exchange payload | +---------------------+-----------------------+---------------------+ | brainpoolP224r1 | 224 | 448 | | brainpoolP256r1 | 256 | 512 | | brainpoolP384r1 | 384 | 768 | | brainpoolP512r1 | 512 | 1024 | +---------------------+-----------------------+---------------------+
Table 2
From these components, the key exchange payload MUST be computed as the concatenation of the x- and y-coordinates. Hence, the key exchange payload has the bit length indicated in Table 2.
The Diffie-Hellman shared secret value consists only of the x value. In particular, the shared secret value MUST be computed from the x-coordinate of the Diffie-Hellman common value using the FieldElement-to-OctetString conversion method specified in [SEC1] and MUST have bit length as indicated in Table 2.
The security considerations of [RFC5996] apply accordingly.
In order to thwart certain active attacks, the validity of the other peer's public Diffie-Hellman value (x,y) recovered from the received key exchange payload needs to be verified. In particular, it MUST be verified that the x- and y-coordinates of the public value satisfy the curve equation. For additional information, we refer the reader to [RFC6989].
The confidentiality, authenticity, and integrity of a secure communication based on IKEv2 are limited by the weakest cryptographic primitive applied. In order to achieve a maximum security level when
Merkle & Lochter Informational [Page 4]
RFC 6954 Brainpool Curves for IKEv2 Key Exchange July 2013
using one of the elliptic curves from Table 1 for key exchange, the following should be chosen according to the recommendations of [NIST800-57] and [RFC5639]:
o key derivation function
o algorithms and key lengths of symmetric encryption and message authentication
o algorithm, bit length, and hash function used for signature generation
Furthermore, the private Diffie-Hellman keys should be selected with the same bit length as the order of the group generated by the base point G and with approximately maximum entropy.
Implementations of elliptic curve cryptography for IKEv2 could be susceptible to side-channel attacks. Particular care should be taken for implementations that internally use the corresponding twisted curve to take advantage of an efficient arithmetic for the special parameters (A = -3): although the twisted curve itself offers the same level of security as the corresponding random curve (through mathematical equivalence), an arithmetic based on small curve parameters could be harder to protect against side-channel attacks. General guidance on resistance of elliptic curve cryptography implementations against side-channel attacks is given in [BSI1] and [HMV].
[RFC5903] Fu, D. and J. Solinas, "Elliptic Curve Groups modulo a Prime (ECP Groups) for IKE and IKEv2", RFC 5903, June 2010.
[RFC6090] McGrew, D., Igoe, K., and M. Salter, "Fundamental Elliptic Curve Cryptography Algorithms", RFC 6090, February 2011.
[ANSI1] American National Standards Institute, "Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)", ANSI X9.62, 2005.
[BSI1] Bundesamt fuer Sicherheit in der Informationstechnik, "Minimum Requirements for Evaluating Side-Channel Attack Resistance of Elliptic Curve Implementations", July 2011.
[FIPS] National Institute of Standards and Technology, "Digital Signature Standard (DSS)", FIPS PUB 186-2, December 1998.
[HMV] Hankerson, D., Menezes, A., and S. Vanstone, "Guide to Elliptic Curve Cryptography", Springer-Verlag, 2004.
[ISO1] International Organization for Standardization, "Information Technology -- Security Techniques -- Digital Signatures with Appendix - Part 3: Discrete Logarithm Based Mechanisms", ISO/IEC 14888-3, 2006.
[ISO2] International Organization for Standardization, "Information Technology -- Security Techniques -- Cryptographic Techniques Based on Elliptic Curves - Part 2: Digital signatures", ISO/IEC 15946-2, 2002.
Merkle & Lochter Informational [Page 6]
RFC 6954 Brainpool Curves for IKEv2 Key Exchange July 2013
[NIST800-57] National Institute of Standards and Technology, "Recommendation for Key Management -- Part 1: General (Revised)", NIST Special Publication 800-57, March 2007.
[SEC2] Certicom Research, "Recommended Elliptic Curve Domain Parameters", Standards for Efficient Cryptography (SEC) 2, September 2000.
Merkle & Lochter Informational [Page 7]
RFC 6954 Brainpool Curves for IKEv2 Key Exchange July 2013
This section provides some test vectors, for example, Diffie-Hellman key exchanges using each of the curves defined in Section 2. The following notation is used in the subsequent subsections:
d_A: the secret key of party A
x_qA: the x-coordinate of the public key of party A
y_qA: the y-coordinate of the public key of party A
d_B: the secret key of party B
x_qB: the x-coordinate of the public key of party B
y_qB: the y-coordinate of the public key of party B
x_Z: the x-coordinate of the shared secret that results from completion of the Diffie-Hellman computation
y_Z: the y-coordinate of the shared secret that results from completion of the Diffie-Hellman computation
The field elements x_qA, y_qA, x_qB, y_qB, x_Z, and y_Z are represented as hexadecimal values using the FieldElement-to- OctetString conversion method specified in [SEC1].