 1/draftietfipsecmesafecurves04.txt 20161011 13:15:59.386269175 0700
+++ 2/draftietfipsecmesafecurves05.txt 20161011 13:15:59.406269684 0700
@@ 1,19 +1,19 @@
Network Working Group Y. Nir
InternetDraft Check Point
Intended status: Standards Track S. Josefsson
Expires: March 3, 2017 SJD
 August 30, 2016
+Expires: April 14, 2017 SJD
+ October 11, 2016
Curve25519 and Curve448 for IKEv2 Key Agreement
 draftietfipsecmesafecurves04
+ draftietfipsecmesafecurves05
Abstract
This document describes the use of Curve25519 and Curve448 for
ephemeral key exchange in the Internet Key Exchange (IKEv2) protocol.
Status of This Memo
This InternetDraft is submitted in full conformance with the
provisions of BCP 78 and BCP 79.
@@ 21,21 +21,21 @@
InternetDrafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute
working documents as InternetDrafts. The list of current Internet
Drafts is at http://datatracker.ietf.org/drafts/current/.
InternetDrafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use InternetDrafts as reference
material or to cite them other than as "work in progress."
 This InternetDraft will expire on March 3, 2017.
+ This InternetDraft will expire on April 14, 2017.
Copyright Notice
Copyright (c) 2016 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/licenseinfo) in effect on the date of
publication of this document. Please review these documents
@@ 59,51 +59,53 @@
7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5
7.1. Normative References . . . . . . . . . . . . . . . . . . 5
7.2. Informative References . . . . . . . . . . . . . . . . . 5
Appendix A. Numerical Example for Curve25519 . . . . . . . . . . 6
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7
1. Introduction
The "Elliptic Curves for Security" document [RFC7748] describes two
elliptic curves: Curve25519 and Curve448, as well as the X25519 and
 X448 functions for performing key agreement (DiffieHellman)
+ X448 functions for performing key agreement using DiffieHellman
operations with these curves. The curves and functions are designed
for both performance and security.
Elliptic curve DiffieHellman [RFC5903] has been specified for the
 Internet Key Exchange (IKEv2  [RFC7296]) for almost ten years. That
 document specified the socalled NIST curves. The state of the art
 has advanced since then. More modern curves allow faster
 implementations while making it much easier to write constanttime
 implementations free from timebased sidechannel attacks. This
 document defines two such curves for use in IKE. See [Curve25519]
 for details about the speed and security of the Curve25519 function.
+ Internet Key Exchange (IKEv2  [RFC7296]) for almost ten years. RFC
+ 5903 and its predecessor specified the socalled NIST curves. The
+ state of the art has advanced since then. More modern curves allow
+ faster implementations while making it much easier to write constant
+ time implementations resilient to timebased sidechannel attacks.
+ This document defines two such curves for use in IKE. See
+ [Curve25519] for details about the speed and security of the
+ Curve25519 function.
1.1. Conventions Used in This Document
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].
2. Curve25519 & Curve448
 All cryptographic computations are done using the X25519 and X448
 functions defined in [RFC7748]. All related parameters (for example,
 the base point) and the encoding (in particular, pruning the least/
 most significant bits and use of littleendian encoding) are
 inherited from [RFC7748].
+ Implementations of Curve25519 and Curve448 in IKEv2 SHALL follow the
+ steps described in this section. All cryptographic computations are
+ done using the X25519 and X448 functions defined in [RFC7748]. All
+ related parameters (for example, the base point) and the encoding (in
+ particular, pruning the least/most significant bits and use of
+ littleendian encoding) are compliant with [RFC7748].
An ephemeral DiffieHellman key exchange using Curve25519 or Curve448
 goes as follows: Each party picks a secret key d uniformly at random
 and computes the corresponding public key. "X" is used below to
 denote either X25519 or X448, and "G" is used to denote the
+ is performed as follows: Each party picks a secret key d uniformly at
+ random and computes the corresponding public key. "X" is used below
+ to denote either X25519 or X448, and "G" is used to denote the
corresponding base point:
pub_mine = X(d, G)
Parties exchange their public keys (see Section 3.1) and compute a
shared secret:
SHARED_SECRET = X(d, pub_peer).
This shared secret is used directly as the value denoted g^ir in
@@ 131,84 +133,86 @@
 DiffieHellman Group Num  RESERVED 
+++++++++++++++++++++++++++++++++
 
~ Key Exchange Data ~
 
+++++++++++++++++++++++++++++++++
o Payload Length  For Curve25519 the public key is 32 octets, so
the Payload Length field will be 40, and for Curve448 the public
key is 56 octets, so the Payload Length field will be 64.
+
o The DiffieHellman Group Num is TBA1 for Curve25519, or TBA2 for
Curve448.

o The Key Exchange Data is the 32 or 56 octets as described in
section 6 of [RFC7748]
3.2. Recipient Tests
 This document matches the discussion in [RFC7748] related to
 receiving and accepting incompatible point formats. In particular,
+ Receiving and handling of incompatible point formats MUST follow the
+ considerations described in section 5 of [RFC7748]. In particular,
receiving entities MUST mask the mostsignificant bit in the final
byte for X25519 (but not X448), and implementations MUST accept non
 canonical values. See section 5 of [RFC7748] for further discussion.
+ canonical values.
4. Security Considerations
Curve25519 and Curve448 are designed to facilitate the production of
highperformance constanttime implementations. Implementors are
encouraged to use a constanttime implementation of the functions.
 This point is of crucial importance if the implementation chooses to
 reuse its supposedly ephemeral key pair for many key exchanges, which
 some implementations do in order to improve performance.
+ This point is of crucial importance especially if the implementation
+ chooses to reuse its ephemeral key pair in many key exchanges for
+ performance reasons.
Curve25519 is intended for the ~128bit security level, comparable to
the 256bit random ECP group (group 19) defined in RFC 5903, also
known as NIST P256 or secp256r1. Curve448 is intended for the
~224bit security level.
While the NIST curves are advertised as being chosen verifiably at
random, there is no explanation for the seeds used to generate them.
 In contrast, the process used to pick these curves is fully
 documented and rigid enough so that independent verification has been
 done. This is widely seen as a security advantage, since it prevents
 the generating party from maliciously manipulating the parameters.
+ In contrast, the process used to pick Curve25519 and Curve448 is
+ fully documented and rigid enough so that independent verification
+ can and has been done. This is widely seen as a security advantage,
+ since it prevents the generating party from maliciously manipulating
+ the parameters.
 Another family of curves available in IKE, generated in a fully
 verifiable way, is the Brainpool curves [RFC6954]. For example,
 brainpoolP256 (group 28) is expected to provide a level of security
 comparable to Curve25519 and NIST P256. However, due to the use of
 pseudorandom prime, it is significantly slower than NIST P256,
 which is itself slower than Curve25519.
+ Another family of curves available in IKE that were generated in a
+ fully verifiable way, is the Brainpool curves [RFC6954]. For
+ example, brainpoolP256 (group 28) is expected to provide a level of
+ security comparable to Curve25519 and NIST P256. However, due to
+ the use of pseudorandom prime, it is significantly slower than NIST
+ P256, which is itself slower than Curve25519.
5. IANA Considerations
IANA is requested to assign two values from the IKEv2 "Transform Type
4  DiffieHellman Group Transform IDs" registry, with names
"Curve25519" and "Curve448" and this document as reference. The
Recipient Tests field should also point to this document:
+++++
 Number  Name  Recipient Tests  Reference 
+++++
 TBA1  Curve25519  RFCxxxx Section 3.2  RFCxxxx 
 TBA2  Curve448  RFCxxxx Section 3.2  RFCxxxx 
+++++
Table 1: New Transform Type 4 Values
6. Acknowledgements
Curve25519 was designed by D. J. Bernstein and the parameters for
 Curve448 ("Goldilocks") is by Mike Hamburg. The specification of
 algorithms, wire format and other considerations are in RFC 7748 by
 Adam Langley, Mike Hamburg, and Sean Turner.
+ Curve448 ("Goldilocks") were defined by Mike Hamburg. The
+ specification of algorithms, wire format and other considerations are
+ documented in RFC 7748 by Adam Langley, Mike Hamburg, and Sean
+ Turner.
The example in Appendix A was calculated using the master version of
OpenSSL, retrieved on August 4th, 2016.
7. References
7.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.