idnits 2.17.00 (12 Aug 2021) /tmp/idnits31628/draft-ietf-ipsecme-safecurves-01.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 (February 2, 2016) is 2300 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) ** Downref: Normative reference to an Informational RFC: RFC 7748 -- Obsolete informational reference (is this intentional?): RFC 4753 (Obsoleted by RFC 5903) Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 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: August 5, 2016 SJD 6 February 2, 2016 8 Curve25519 and Curve448 for IKEv2 Key Agreement 9 draft-ietf-ipsecme-safecurves-01 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 August 5, 2016. 33 Copyright Notice 35 Copyright (c) 2016 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 . . . . . . . . . . . . . . . . . . . . . . 4 59 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 7.1. Normative References . . . . . . . . . . . . . . . . . . 5 61 7.2. Informative References . . . . . . . . . . . . . . . . . 5 62 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 5 64 1. Introduction 66 [RFC7748] describes two elliptic curves: Curve25519 and Curve448, as 67 well as the X25519 and X448 functions for performing key agreement 68 (Diffie-Hellman) operations with these curves. The curves and 69 functions are designed for both performance and security. 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 time-based side-channel attacks. This 77 document defines two such curves for use in IKE. See [Curve25519] 78 for details 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 [RFC7748]. All related parameters (for example, 90 the base point) and the encoding (in particular, pruning the least/ 91 most significant bits and use of little-endian encoding) are 92 inherited from [RFC7748]. 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, and "G" is used to denote the 98 corresponding base point: 100 pub_mine = X(d, G) 102 Parties exchange their public keys (see Section 3.1) and compute a 103 shared secret: 105 SHARED_SECRET = X(d, pub_peer). 107 This shared secret is used directly as the value denoted g^ir in 108 section 2.14 of RFC 7296. It is 32 octets when Curve25519 is used, 109 and 56 octets when Curve448 is used. 111 3. Use and Negotiation in IKEv2 113 The use of Curve25519 and Curve448 in IKEv2 is negotiated using a 114 Transform Type 4 (Diffie-Hellman group) in the SA payload of either 115 an IKE_SA_INIT or a CREATE_CHILD_SA exchange. The value xx is used 116 for the group defined by Curve25519 and yy is used for the group 117 defined by Curve448. Both are TBA by IANA. 119 3.1. Key Exchange Payload 121 The diagram for the Key Exchange Payload from section 3.4 of RFC 7296 122 is copied below for convenience: 124 1 2 3 125 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 126 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 127 | Next Payload |C| RESERVED | Payload Length | 128 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 129 | Diffie-Hellman Group Num | RESERVED | 130 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 131 | | 132 ~ Key Exchange Data ~ 133 | | 134 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 136 o Payload Length - For Curve25519 the public key is 32 octets, so 137 the Payload Length field will be 40, and for Curve448 the public 138 key is 56 octets, so the Payload Length field will be 64. 139 o The Diffie-Hellman Group Num is xx for Curve25519, or yy for 140 Curve448 (both TBA by IANA). 141 o The Key Exchange Data is the 32 or 56 octets as described in 142 section 6 of [RFC7748] 144 3.2. Recipient Tests 146 This document matches the discussion in [RFC7748] related to 147 receiving and accepting incompatible point formats. In particular, 148 receiving entities MUST mask the most-significant bit in the final 149 byte for X25519 (but not X448), and implementations MUST accept non- 150 canonical values. See section 5 of [RFC7748] for further discussion. 152 4. Security Considerations 154 Curve25519 and Curve448 are designed to facilitate the production of 155 high-performance constant-time implementations. Implementors are 156 encouraged to use a constant-time implementation of the functions. 157 This point is of crucial importance if the implementation chooses to 158 reuse its supposedly ephemeral key pair for many key exchanges, which 159 some implementations do in order to improve performance. 161 Curve25519 is intended for the ~128-bit security level, comparable to 162 the 256-bit random ECP group (group 19) defined in RFC 4753, also 163 known as NIST P-256 or secp256r1. Curve448 is intended for the 164 ~224-bit security level. 166 While the NIST curves are advertised as being chosen verifiably at 167 random, there is no explanation for the seeds used to generate them. 168 In contrast, the process used to pick these curves is fully 169 documented and rigid enough so that independent verification has been 170 done. This is widely seen as a security advantage, since it prevents 171 the generating party from maliciously manipulating the parameters. 173 Another family of curves available in IKE, generated in a fully 174 verifiable way, is the Brainpool curves [RFC6954]. For example, 175 brainpoolP256 (group 28) is expected to provide a level of security 176 comparable to Curve25519 and NIST P-256. However, due to the use of 177 pseudo-random prime, it is significantly slower than NIST P-256, 178 which is itself slower than Curve25519. 180 5. IANA Considerations 182 IANA is requested to assign two values from the IKEv2 "Transform Type 183 4 - Diffie-Hellman Group Transform IDs" registry, with names 184 "Curve25519" and "Curve448" and this document as reference. The 185 Recipient Tests field should also point to this document. 187 6. Acknowledgements 189 Curve25519 was designed by D. J. Bernstein and the parameters for 190 Curve448 ("Goldilocks") is by Mike Hamburg. The specification of 191 algorithms, wire format and other considerations are in RFC 7748 by 192 Adam Langley, Mike Hamburg, and Sean Turner. 194 7. References 196 7.1. Normative References 198 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 199 Requirement Levels", BCP 14, RFC 2119, March 1997. 201 [RFC7296] Kivinen, T., Kaufman, C., Hoffman, P., Nir, Y., and P. 202 Eronen, "Internet Key Exchange Protocol Version 2 203 (IKEv2)", RFC 7296, October 2014. 205 [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves 206 for Security", RFC 7748, January 2016. 208 7.2. Informative References 210 [Curve25519] 211 Bernstein, J., "Curve25519: New Diffie-Hellman Speed 212 Records", LNCS 3958, February 2006, 213 . 215 [RFC4753] Fu, D. and J. Solinas, "ECP Groups For IKE and IKEv2", 216 RFC 4753, January 2007. 218 [RFC6954] Merkle, J. and M. Lochter, "Using the Elliptic Curve 219 Cryptography (ECC) Brainpool Curves for the Internet Key 220 Exchange Protocol Version 2 (IKEv2)", RFC 6954, July 2013. 222 Authors' Addresses 224 Yoav Nir 225 Check Point Software Technologies Ltd. 226 5 Hasolelim st. 227 Tel Aviv 6789735 228 Israel 230 Email: ynir.ietf@gmail.com 232 Simon Josefsson 233 SJD AB 235 Email: simon@josefsson.org