idnits 2.17.1 draft-ietf-ipsecme-safecurves-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 8, 2015) is 3146 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-11) exists of draft-irtf-cfrg-curves-06 ** Downref: Normative reference to an Informational draft: draft-irtf-cfrg-curves (ref. 'CFRG-Curves') -- Obsolete informational reference (is this intentional?): RFC 4753 (Obsoleted by RFC 5903) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Y. Nir 3 Internet-Draft Check Point 4 Intended status: Standards Track S. Josefsson 5 Expires: March 11, 2016 SJD 6 September 8, 2015 8 Curve25519 and Curve448 for IKEv2 Key Agreement 9 draft-ietf-ipsecme-safecurves-00 11 Abstract 13 This document describes the use of Curve25519 and Curve448 for 14 ephemeral key exchange in the Internet Key Exchange (IKEv2) protocol. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at http://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on March 11, 2016. 33 Copyright Notice 35 Copyright (c) 2015 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. Code Components extracted from this document must 44 include Simplified BSD License text as described in Section 4.e of 45 the Trust Legal Provisions and are provided without warranty as 46 described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 1.1. Conventions Used in This Document . . . . . . . . . . . . 2 52 2. Curve25519 & Curve448 . . . . . . . . . . . . . . . . . . . . 2 53 3. Use and Negotiation in IKEv2 . . . . . . . . . . . . . . . . 3 54 3.1. Key Exchange Payload . . . . . . . . . . . . . . . . . . 3 55 3.2. Recipient Tests . . . . . . . . . . . . . . . . . . . . . 4 56 4. Security Considerations . . . . . . . . . . . . . . . . . . . 4 57 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 58 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 59 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 7.1. Normative References . . . . . . . . . . . . . . . . . . 5 61 7.2. Informative References . . . . . . . . . . . . . . . . . 5 62 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 64 1. Introduction 66 [CFRG-Curves] describes the two elliptic curves Curve25519 and 67 Curve448 and the X25519 and X448 functions for performing Diffie- 68 Hellman operations on the curves. The curves and functions are 69 designed with performance and security in mind. 71 Almost ten years ago [RFC4753] specified the first elliptic curve 72 Diffie-Hellman groups for the Internet Key Exchange protocol (IKEv2 - 73 [RFC7296]). These were the so-called NIST curves. The state of the 74 art has advanced since then. More modern curves allow faster 75 implementations while making it much easier to write constant-time 76 implementations free from side-channel attacks. This document 77 defines such a curve for use in IKE. See [Curve25519] for details 78 about the speed and security of the Curve25519 function. 80 1.1. Conventions Used in This Document 82 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 83 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 84 document are to be interpreted as described in [RFC2119]. 86 2. Curve25519 & Curve448 88 All cryptographic computations are done using the X25519 and X448 89 functions defined in [CFRG-Curves]. All related parameters (for 90 example, the base point) and the encoding (in particular, pruning the 91 least/most significant bits and use of little-endian encoding) are 92 inherited from [CFRG-Curves]. 94 An ephemeral Diffie-Hellman key exchange using Curve25519 or Curve448 95 goes as follows: Each party picks a secret key d uniformly at random 96 and computes the corresponding public key. "X" is used below to 97 denote either X25519 or X448: 99 x_mine = X(d, G) 101 Parties exchange their public keys (see Section 3.1) and compute a 102 shared secret: 104 SHARED_SECRET = X(d, x_peer). 106 This shared secret is used directly as the value denoted g^ir in 107 section 2.14 of RFC 7296. It is 32 octets when Curve25519 is used, 108 and 56 octets when Curve448 is used. 110 3. Use and Negotiation in IKEv2 112 The use of Curve25519 and Curve448 in IKEv2 is negotiated using a 113 Transform Type 4 (Diffie-Hellman group) in the SA payload of either 114 an IKE_SA_INIT or a CREATE_CHILD_SA exchange. 116 3.1. Key Exchange Payload 118 The diagram for the Key Exchange Payload from section 3.4 of RFC 7296 119 is copied below for convenience: 121 1 2 3 122 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 123 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 124 | Next Payload |C| RESERVED | Payload Length | 125 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 126 | Diffie-Hellman Group Num | RESERVED | 127 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 128 | | 129 ~ Key Exchange Data ~ 130 | | 131 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 133 o Payload Length - For Curve25519 the public key is 32 octets, so 134 the Payload Length field will be 40, and for Curve448 the public 135 key is 56 octets, so the Payload Length field will be 64. 136 o The Diffie-Hellman Group Num is xx for Curve25519, or yy for 137 Curve448 (both TBA by IANA). 138 o The Key Exchange Data is the 32 or 56 octets as described in 139 section 6 of [CFRG-Curves] 141 3.2. Recipient Tests 143 This document match the discussion in [CFRG-Curves] related to 144 receiving and accepting incompatible point formats. In particular, 145 receiving entities MUST mask the most-significant bit in the final 146 byte for X25519 (but not X448), and implementations MUST accept non- 147 canonical values. See section 5 of [CFRG-Curves] for further 148 discussion. 150 4. Security Considerations 152 Curve25519 and Curve448 are designed to facilitate the production of 153 high-performance constant-time implementations. Implementors are 154 encouraged to use a constant-time implementation of the functions. 155 This point is of crucial importance if the implementation chooses to 156 reuse its supposedly ephemeral key pair for many key exchanges, which 157 some implementations do in order to improve performance. 159 Curve25519 is intended for the ~128-bit security level, comparable to 160 the 256-bit random ECP group (group 19) defined in RFC 4753, also 161 known as NIST P-256 or secp256r1. Curve448 is intended for the 162 ~224-bit security level. 164 While the NIST curves are advertised as being chosen verifiably at 165 random, there is no explanation for the seeds used to generate them. 166 In contrast, the process used to pick these curves is fully 167 documented and rigid enough so that independent verification has been 168 done. This is widely seen as a security advantage, since it prevents 169 the generating party from maliciously manipulating the parameters. 171 Another family of curves available in IKE, generated in a fully 172 verifiable way, is the Brainpool curves [RFC6954]. For example, 173 brainpoolP256 (group 28) is expected to provide a level of security 174 comparable to Curve25519 and NIST P-256. However, due to the use of 175 pseudo-random prime, it is significantly slower than NIST P-256, 176 which is itself slower than Curve25519. 178 5. IANA Considerations 180 IANA is requested to assign two values from the IKEv2 "Transform Type 181 4 - Diffie-Hellman Group Transform IDs" registry, with names 182 "Curve25519" and "Curve448" and this document as reference. The 183 Recipient Tests field should also point to this document. 185 6. Acknowledgements 187 Curve25519 was designed by D. J. Bernstein and Curve448 188 ("Goldilocks") is by Mike Hamburg. The specification of algorithms, 189 wire format and other considerations are due to the CFRG document. 191 7. References 193 7.1. Normative References 195 [CFRG-Curves] 196 Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 197 for Security", draft-irtf-cfrg-curves-06 (work in 198 progress), August 2015. 200 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 201 Requirement Levels", BCP 14, RFC 2119, March 1997. 203 [RFC7296] Kivinen, T., Kaufman, C., Hoffman, P., Nir, Y., and P. 204 Eronen, "Internet Key Exchange Protocol Version 2 205 (IKEv2)", RFC 7296, October 2014. 207 7.2. Informative References 209 [Curve25519] 210 Bernstein, J., "Curve25519: New Diffie-Hellman Speed 211 Records", LNCS 3958, February 2006, 212 . 214 [RFC4753] Fu, D. and J. Solinas, "ECP Groups For IKE and IKEv2", RFC 215 4753, January 2007. 217 [RFC6954] Merkle, J. and M. Lochter, "Using the Elliptic Curve 218 Cryptography (ECC) Brainpool Curves for the Internet Key 219 Exchange Protocol Version 2 (IKEv2)", RFC 6954, July 2013. 221 Authors' Addresses 223 Yoav Nir 224 Check Point Software Technologies Ltd. 225 5 Hasolelim st. 226 Tel Aviv 6789735 227 Israel 229 Email: ynir.ietf@gmail.com 230 Simon Josefsson 231 SJD AB 233 Email: simon@josefsson.org