<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2409 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2409.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3174.xml">
<!ENTITY RFC3526 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3526.xml">
<!ENTITY RFC3766 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3766.xml">
<!ENTITY RFC4253 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4253.xml">
<!ENTITY RFC4419 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4419.xml">
<!ENTITY RFC4432 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4432.xml">
<!ENTITY RFC4462 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4462.xml">
<!ENTITY RFC5656 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5656.xml">
<!ENTITY RFC6194 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6194.xml">
<!ENTITY NEWMODP PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-curdle-ssh-modp-dh-sha2-00.xml'>
<!ENTITY SSHCURVES PUBLIC '' 'http://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.draft-ietf-curdle-ssh-curves-00.xml'>
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="no"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc category="std"
     docName="draft-ietf-curdle-ssh-kex-sha2-06"
     updates="4253, 4419, 4432, 4462, 5656"
     ipr="trust200902">
 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the
        full title is longer than 39 characters -->

   <title abbrev="KEX Method Updates/Recommendations for SSH">
     Key Exchange (KEX) Method Updates and Recommendations for Secure
     Shell (SSH)</title>
    <author initials="M. D." surname="Baushke" fullname="Mark D.
    Baushke">
      <organization>Juniper Networks, Inc.</organization>
      <address>
        <postal>
          <street>1133 Innovation Way</street>
          <city>Sunnyvale</city>
          <region>CA</region>
          <code>94089-1228</code>
          <country>US</country>
        </postal>
        <phone>+1 408 745 2952</phone>
        <email>mdb@juniper.net</email>
        <uri>http://www.juniper.net/</uri>
      </address>
    </author>
   <date year="2016" />

   <workgroup>Internet Engineering Task Force</workgroup>
   <abstract>
     <t>This document adds recommendations for adoption of ssh-curves
     from the <xref target="I-D.ietf-curdle-ssh-curves"/> and new-modp
     from the <xref target="I-D.ietf-curdle-ssh-modp-dh-sha2"/>, and
     deprecates some previously specified Key Exchange Method
     algorithm names for the Secure Shell (SSH) protocol. It also
     updates <xref target="RFC4253"/>, <xref target="RFC4419"/>, <xref
     target="RFC4462"/>, and <xref target="RFC5656"/> by specifying
     the set key exchange algorithms that currently exist and which
     ones MUST, SHOULD, MAY, and SHOULD NOT be implemented. New key
     exchange methods use the SHA-2 family of hashes.</t>
   </abstract>
 </front>

 <middle>
   <section title="Overview and Rationale">
     <t>Secure Shell (SSH) is a common protocol for secure
     communication on the Internet. In <xref target="RFC4253"/>, SSH
     originally defined the Key Exchange Method Name
     diffie-hellman-group1-sha1 which used <xref target="RFC2409"/>
     Oakley Group 2 (a 1024-bit MODP group) and SHA-1 <xref
     target="RFC3174"/>. Due to recent security concerns with SHA-1
     <xref target="RFC6194"/> and with MODP groups with less than 2048
     bits <xref target="NIST-SP-800-131Ar1"/> implementer and users
     request support for larger MODP group sizes with data integrity
     verification using the SHA-2 family of secure hash algorithms as
     well as MODP groups providing more security.</t>

     <t>The United States Information Assurance Directorate (IAD) at the
     National Security Agency (NSA) has published a FAQ <xref
     target="MFQ-U-OO-815099-15"/> suggesting that the use of Elliptic
     Curve Diffie-Hellman (ECDH) using the nistp256 curve and SHA-2
     based hashes less than SHA2-384 are no longer sufficient for
     transport of Top Secret information. It is for this reason that
     this draft moves ecdh-sha2-nistp256 from a REQUIRED to OPTIONAL
     as a key exchange method. This is the same reason that the
     stronger MODP groups being adopted. As the MODP group14 is
     already present in most SSH implementations and most
     implementations already have a SHA2-256 implementation, so
     diffie-hellman-group14-sha256 is provided as an easy to implement
     and faster to use key exchange. Small embedded applications may
     find this KEX desirable to use.</t>

     <t>The NSA Information Assurance Directorate (IAD) has also
     published the <xref target="CNSA-SUITE">Commercial National
     Security Algorithm Suite (CNSA Suite)</xref> in which the
     3072-bit MODP Group 15 in RFC 3526 is explicitly mentioned as the
     minimum modulus to protect Top Secret communications.</t>

     <t>It has been observed in <xref target="safe-curves"/> that the
     NIST recommended Elliptic Curve Prime Curves (P-256, P-384, and
     P-521) are perhaps not the best available for Elliptic Curve
     Cryptography (ECC) Security. For this reason, none of the <xref
     target="RFC5656"/> curves are marked as a MUST implement.
     However, the requirement that "every compliant SSH ECC
     implementation MUST implement ECDH key exchange" is now taken to
     mean that if ecdsa-sha2-[identifier] is implemented, then
     ecdh-sha2-[identifier] MUST be implemented.</t>

     <t>Please send comments on this draft to curdle@ietf.org.</t>
   </section>

   <section title="Requirements Language">
     <t>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 <xref
     target="RFC2119"/>.</t>
   </section>

   <section title="Key Exchange Algorithms">
     <t>This memo adopts the style and conventions of
     <xref target="RFC4253"/> in specifying how the use of new
     data key exchange is indicated in SSH.</t>

     <t>A new set of Elliptic Curve Diffie-Hellman ssh-curves exist.
     The curve25519-sha256 MUST be adopted where possible.</t>

     <t>As a hedge against uncertainty raised by the NSA IAD FAQ
     publication, new MODP Diffie-Hellman based key exchanges
     are proposed for inclusion in the set of key exchange method names
     as well as the curve448-sha512 curve.</t>

     <t>The following new key exchange algorithms are defined:</t>

     <texttable style="headers">
       <ttcol>Key Exchange Method Name</ttcol><ttcol>Note</ttcol>
       <c>curve25519-sha256</c><c>MUST/REQUIRED</c>
       <c>curve448-sha512</c><c>MAY/OPTIONAL</c>
       <c>diffie-hellman-group14-sha256</c><c>MUST/REQUIRED</c>
       <c>diffie-hellman-group15-sha512</c><c>MAY/OPTIONAL</c>
       <c>diffie-hellman-group16-sha512</c><c>SHOULD/RECOMMENDED</c>
       <c>diffie-hellman-group17-sha512</c><c>MAY/OPTIONAL</c>
       <c>diffie-hellman-group18-sha512</c><c>MAY/OPTIONAL</c>
       <c>gss-group14-sha256-*</c><c>SHOULD/RECOMMENDED</c>
       <c>gss-group15-sha512-*</c><c>MAY/OPTIONAL</c>
       <c>gss-group16-sha512-*</c><c>SHOULD/RECOMMENDED</c>
       <c>gss-group17-sha512-*</c><c>MAY/OPTIONAL</c>
       <c>gss-group18-sha512-*</c><c>MAY/OPTIONAL</c>
     </texttable>
     <t>The SHA-2 family of secure hash algorithms are defined in
     <xref target="FIPS-180-4"/>.</t>
   </section>

   <section title="IANA Considerations">
     <t>This RFC augments the Key Exchange Method Names in <xref
     target="RFC4253"/>. It downgrades the use of SHA-1 hashing for
     key exchange methods in <xref target="RFC4419"/>, <xref
     target="RFC4432"/>, and <xref target="RFC4462"/>. It also moves
     from MUST to SHOULD the ecdh-sha2-nistp256 given in <xref
     target="RFC5656"/>.</t>

     <t>It adds a new set of named "gss-*" methods to <xref
     target="RFC4462"/> with a MAY recommendation.</t>

     <t>It is desirable to also include the new-modp from the
     <xref target="I-D.ietf-curdle-ssh-modp-dh-sha2"/> in this list.</t>

     <t>It is desirable to also include the ssh-curves from the <xref
     target="I-D.ietf-curdle-ssh-curves"/> in this list. The
     "curve25519-sha256" is currently available in some Secure Shell
     implementations under the name "curve25519-sha256@libssh.org" and
     is the best candidate for a fast, safe, and secure key exchange
     method.</t>

     <t>IANA is requested to update the SSH algorithm registry to
     ensure that all of the listed Key Exchange Method Name and
     References exist in the following table. However, the Implement
     column is just the current recommendations of this RFC.</t>
     
     <texttable style="headers">
       <ttcol>Key Exchange Method Name</ttcol><ttcol>Reference</ttcol><ttcol>Implement</ttcol>
       <c>curve25519-sha256</c><c>ssh-curves</c><c>MUST</c>
       <c>curve448-sha512</c><c>ssh-curves</c><c>MAY</c>
       <c>diffie-hellman-group-exchange-sha1</c><c>RFC4419</c><c>SHOULD NOT</c>
       <c>diffie-hellman-group-exchange-sha256</c><c>RFC4419</c><c>MAY</c>
       <c>diffie-hellman-group1-sha1</c><c>RFC4253</c><c>SHOULD NOT</c>
       <c>diffie-hellman-group14-sha1</c><c>RFC4253</c><c>SHOULD</c>
       <c>diffie-hellman-group14-sha256</c><c>new-modp</c><c>MUST</c>
       <c>diffie-hellman-group15-sha512</c><c>new-modp</c><c>MAY</c>
       <c>diffie-hellman-group16-sha512</c><c>new-modp</c><c>SHOULD</c>
       <c>diffie-hellman-group17-sha512</c><c>new-modp</c><c>MAY</c>
       <c>diffie-hellman-group18-sha512</c><c>new-modp</c><c>MAY</c>
       <c>ecdh-sha2-nistp256</c><c>RFC5656</c><c>SHOULD</c>
       <c>ecdh-sha2-nistp384</c><c>RFC5656</c><c>SHOULD</c>
       <c>ecdh-sha2-nistp521</c><c>RFC5656</c><c>SHOULD</c>
       <c>ecdh-sha2-*</c><c>RFC5656</c><c>MAY</c>
       <c>ecmqv-sha2</c><c>RFC5656</c><c>SHOULD NOT</c>
       <c>gss-gex-sha1-*</c><c>RFC4462</c><c>SHOULD NOT</c>
       <c>gss-group1-sha1-*</c><c>RFC4462</c><c>SHOULD NOT</c>
       <c>gss-group14-sha1-*</c><c>RFC4462</c><c>SHOULD</c>
       <c>gss-group14-sha256-*</c><c>new-modp</c><c>SHOULD</c>
       <c>gss-group15-sha512-*</c><c>new-modp</c><c>MAY</c>
       <c>gss-group16-sha512-*</c><c>new-modp</c><c>SHOULD</c>
       <c>gss-group17-sha512-*</c><c>new-modp</c><c>MAY</c>
       <c>gss-group18-sha512-*</c><c>new-modp</c><c>MAY</c>
       <c>gss-*</c><c>RFC4462</c><c>MAY</c>
       <c>rsa1024-sha1</c><c>RFC4432</c><c>SHOULD NOT</c>
       <c>rsa2048-sha256</c><c>RFC4432</c><c>MAY</c>
     </texttable>
     <t>The Implement column in the above table is a
     suggestion/recommendation for the listed key exchange method to
     be implemented in the default list of key exchange methods. It is
     up to the end-user as to what algorithms they choose to be able
     to negotiate, so the KEX algorithms should be configurable by the
     administrator of the server as well as the user of the client.
     This RFC is intended to provide IANA defined names for these
     groups for interoperability. The Note column of the IANA table
     should probably continue to point to the implementation detail
     sections of the Reference RFCs where appropriate.</t>

     <t>The guidance of his RFC is that the SHA-1 algorithm hashing
     SHOULD NOT be used. If it is used, it should only be provided for
     backwards compatibility, should not be used in new designs, and
     should be phased out of existing key exchanges as quickly as
     possible because of its known weaknesses. Any key exchange using
     SHA-1 SHOULD NOT be in a default key exchange list if at all
     possible. If they are needed for backward compatibility, they
     SHOULD be listed after all of the SHA-2 based key exchanges.</t>

     <t>The RFC4253 REQUIRED diffie-hellman-group14-sha1 method SHOULD
     be retained for compatibility with older Secure Shell
     implementations. It is intended that this key exchange method be
     phased out as soon as possible.</t>

     <t>It is believed that all current SSH implementations should be
     able to achieve an implementation of the
     "diffie-hellman-group14-sha256" method. To that end, this is one
     method that MUST be implemented.</t>

     <t>If GSS-API methods are available, then the RFC4462 REQUIRED
     gss-group14-sha1-* method SHOULD be retained for compatibility
     with older Secure Shell implementations and the
     gss-groups14-sha256-* method SHOULD be added as for "sha1".</t>

     <t>[TO BE REMOVED: This registration should take place at the
     following location:
     &lt;http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-16>]</t>
   </section>

   <section title="Acknowledgements">
     <t>Thanks to the following people for review and comments: Denis
     Bider, Peter Gutmann, Damien Miller, Niels Moeller, Matt
     Johnston, Iwamoto Kouichi, Simon Josefsson, Dave Dugal, Daniel
     Migault.</t>

     <t>Thanks to the following people for code to implement
     interoperable exchanges using some of these groups as found in an
     this draft: Darren Tucker for OpenSSH and Matt Johnston for
     Dropbear. And thanks to Iwamoto Kouichi for information about
     RLogin, Tera Term (ttssh) and Poderosa implementations also
     adopting new Diffie-Hellman groups based on this draft.</t>
   </section>
   <section title="Security Considerations">
     <t>The security considerations of <xref target="RFC4253"/> apply
     to this RFC.</t>

     <t>The security considerations of <xref target="RFC3526"/>
     suggest that these MODP groups have security strengths given in
     this table. They are based on <xref target="RFC3766"/>
     Determining Strengths For Public Keys Used For Exchanging
     Symmetric Keys.</t>

     <figure anchor="figure.strength">
       <preamble>Group modulus security strength estimates (RFC3526)</preamble>
       <artwork>
+--------+----------+---------------------+---------------------+
| Group  | Modulus  | Strength Estimate 1 | Strength Estimate 2 |
|        |          +----------+----------+----------+----------+
|        |          |          | exponent |          | exponent |
|        |          | in bits  | size     | in bits  | size     |
+--------+----------+----------+----------+----------+----------+
|  14    | 2048-bit |      110 |     220- |      160 |     320- |
|  15    | 3072-bit |      130 |     260- |      210 |     420- |
|  16    | 4096-bit |      150 |     300- |      240 |     480- |
|  17    | 6144-bit |      170 |     340- |      270 |     540- |
|  18    | 8192-bit |      190 |     380- |      310 |     620- |
+--------+----------+---------------------+---------------------+
       </artwork>
     </figure>

     <t>Many users seem to be interested in the perceived safety of
     using larger MODP groups and hashing with SHA2-based algorithms.</t>
   </section>

 </middle>

 <back>

   <references title="Normative References">
     &RFC2119;

     &RFC3526;

     &RFC4253;

     <reference
         anchor="FIPS-180-4"
         target="http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf">
       <front>
         <title>Secure Hash Standard (SHS)</title>
         <author>
           <organization>National Institute of Standards and Technology
           </organization>
         </author>
         <date month="August" year="2015"/>
       </front>
       <seriesInfo name="FIPS PUB" value="180-4"/>
     </reference>

   </references>

   <references title="Informative References">
     <!-- Here we use entities that we defined at the beginning. -->

     &RFC2409;

     &RFC3174;

     &RFC3766;

     &RFC4419;

     &RFC4432;

     &RFC4462;

     &RFC5656;

     &RFC6194;

     &NEWMODP;

     &SSHCURVES;

     <reference
         anchor="NIST-SP-800-131Ar1"
         target="http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar1.pdf">
       <front>
         <title>Transitions: Recommendation for the Transitioning of
         the Use of Cryptographic Algorithms and Key Lengths</title>
         <author surname="Barker" fullname="Elaine Barker"/>
         <author surname="Roginsky" fullname="Allen Roginsky"/>
         <date month="November" year="2015"/>
       </front>
       <seriesInfo
           name="NIST Special Publication" value="800-131A Revision 1"/>
     </reference>

     <reference
         anchor="MFQ-U-OO-815099-15"
         target="https://www.iad.gov/iad/library/ia-guidance/ia-solutions-for-classified/algorithm-guidance/cnsa-suite-and-quantum-computing-faq.cfm">
       <front>
         <title>CNSA Suite and Quantum Computing FAQ</title>
         <author fullname="NSA/CSS">
           <organization abbrev="NSA/CSS">"National Security Agency/Central Security Service"</organization>
         </author>
         <date month="January" year="2016"/>
       </front>
     </reference>

     <reference
	 anchor="CNSA-SUITE"
	 target="https://www.iad.gov/iad/programs/iad-initiatives/cnsa-suite.cfm">
       <front>
	 <title>Commercial National Security Algorithm Suite</title>
	 <author fullname="NSA/IAD">
	   <organization abbrev="NSA/IAD">"Information Assurance by the National Security Agency"</organization>
	 </author>
	 <date month="September" year="2016"/>
       </front>
     </reference>

     <reference
	 anchor="safe-curves"
	 target="https://safecurves.cr.yp.to/">
       <front>
       <title>SafeCurves: choosing safe curves for elliptic-curve
       cryptography.</title>
       <author surname="Bernstein" fullname="Daniel J. Bernstein"/>
       <author surname="Lange" fullname="Tanja Lange"/>
       <date month="February" year="2016"/>
       </front>
     </reference>

   </references>

   <!-- Change Log

v00 2015-12-10  MDB   Initial version

v01 2015-12-10  MDB   Fix SHA1 -> SHA-1 for the name of the algorithm.
                      Add recommendation that DH-group14-sha256 be
                      in the negotiation list before DH-group14-sha1.

v02 2016-02-12  MDB   List all of the key exchange methods currently
                      listed in the IANA registry for Secure Shell.
                      Update the rationale.

v03 2016-02-13  MDB   Adopt some feedback from the list.

v04 2016-02-14  MDB   Update Title to include the text 'Secure Shell'
                      Drop references to group15 and group17. Fix text
                      to use group16 and group18.

v05 2016-02-19  MDB   Demote ecdh-sha2-nistp384 to SHOULD from MUST.
                      Reference safecurves.cr.yp.to as justification.

v06 2016-03-01  MDB   Clarify RFC5656 SSH ECC MUST requirements.
                      Update to I-D.draft-josefsson-ssh-curves-04.
		      Add acknowledgements section.
v00 2016-03-07  MDB   Rename as draft-ietf-curdle-ssh-kex-sha2-00
                      from draft-baushke-ssh-dh-group-sha2-06
v01 2016-03-08  MDB   Reference new draft-ietf-curdle-ssh-curves-00.xml
                      instead of draft-josefsson-ssh-curves-04.xml
v02 2016-03-08  MDB   Problems with the -01 upload occurred.

v03 2015-03-14  MDB   Clear up abstract and implementation text on
                      advice of Daniel Migault. Use new title too.

v04 2016-09-05  MDB   Peter Gutman suggests that the embedded world
                      needs DH-2048+SHA-256 for performance issues.
                      denis bider requests that entries be made for
                      both Group 15 and Group 17. Group 15 is also
		      explicitly referenced in the CNSA Suite.

v05 2016-09-12  MDB   Split the MODP implementation to
                      draft-ietf-curdle-ssh-modp-dh-sha2 and add gss-*
                      entries to the table.

v06 2016-09-20  MDB   Use 'SHOULD NOT' for 'ecmqv-sha2' per suggestion
                      by Damien Miller. Add clarity to GSS-API SHOULD
                      requirements. Adjust texttable entries.
   -->
 </back>
</rfc>
