<?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 RFC4419 SYSTEM
"http://xml.resource.org/public/rfc/bibxml/reference.RFC.4419.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc number="8270" category="std"
     updates="4419"
     ipr="trust200902" submissionType="IETF" consensus="yes">
 <front>

   <title abbrev="Recommended Minimum Modulus Size">
     Increase the Secure Shell Minimum Recommended Diffie&nbhy;Hellman&nbsp;Modulus&nbsp;Size to 2048 Bits
   </title>

   <author fullname="Loganaden Velvindron" initials="L.V."
           surname="Velvindron">
     <organization>Hackers.mu </organization>
     <address>
       <postal>
         <street>88, Avenue De Plevitz</street>
         <city>Roches Brunes</city>
         <region></region>
         <code></code>
         <country>Mauritius</country>
       </postal>
       <phone>+230 59762817</phone>
       <email>logan@hackers.mu</email>
     </address>
   </author>
   <author initials="M. D." surname="Baushke" fullname="Mark D. Baushke">
     <organization>Juniper Networks, Inc.</organization>
     <address>
       <email>mdb@juniper.net</email>
     </address>
   </author>

   <date month="December" year="2017" />

   <abstract>
     <t>
       The Diffie-Hellman (DH) Group Exchange for the Secure Shell
       (SSH) transport-layer protocol specifies that servers and
       clients should support groups with a minimum modulus group size
       of 1024 bits. Recent security research has shown that the
       minimum value of 1024 bits is insufficient to protect against
       state-sponsored actors and any organization with enough
       computing resources. 
      This RFC updates RFC 4419, which allowed
      for DH moduli less than 2048 bits; now, 2048 bits is the
      minimum acceptable group size.
     </t>
   </abstract>
 </front>

 <middle>
   <section title="Introduction">
     <t>
       <xref target="RFC4419"/> specifies a recommended minimum DH
       modulus group size of 1024 bits. It also suggests that in all
       cases, the size of the group needs to be at least 1024 bits.

       This document updates <xref target="RFC4419"/> so that the
       minimum recommended size is 2048 bits. This recommendation is
       based on recent research <xref target="LOGJAM"/> on DH group
       weaknesses.

   This minimum DH group size may need to be increased 
   to 3072 for forward-looking users.
     </t>
   </section>

   <section title="Requirements Language">
     <t>
       The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
       NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
       "MAY", and "OPTIONAL" in this document are to be interpreted as
       described in BCP&nbsp;14 <xref target="RFC2119"/> <xref
       target="RFC8174"/> when, and only when, they appear in all
       capitals, as shown here.
     </t>
   </section>

   <section title="2048-Bit DH Group">
     <t>
       Recent research <xref target="LOGJAM"/> strongly suggests that
       DH groups that are 1024 bits can be broken by state-sponsored
       actors and any organization with enough computing resources.
       The authors show how they are able to break 768-bit DH groups
       and extrapolate the attack to 1024-bit DH groups. In their
       analysis, they show that breaking 1024 bits can be done with
       sufficient computing resources.

       This document provides the following recommendation: SSH
       servers and SSH clients SHOULD support groups with a minimum
       aceptable group size of 2048 bits for the "min" value of the
       SSH_MSG_KEY_DH_GEX_REQUEST client message given in <xref
       target="RFC4419"/>. Further, SSH clients SHOULD be able to send
       a value of 3072 bits for the preferred acceptable group size
       "n" in the SSH_MSG_KEY_DH_GEX_REQUEST message.
     </t>

     <t>
       <xref target="RFC4419"/> specifies a recommended minimum size
       of 1024 bits for k, which is the modulus length of the DH
       group. It also suggests that, in all cases, the size of the
       group needs be at least 1024 bits. This document updates <xref
       target="RFC4419"/> as described below:
       <list style="symbols">
         <t>
           Section 3, paragraph 9:
           <vspace blankLines="0"/>

           Servers and clients SHOULD support groups with a modulus
           length of k bits where 2048 &lt;= k &lt;= 8192. The
           recommended minimum values for min and max are 2048 and
           8192, respectively. &nbsp;Setting k to 3072 SHOULD be
           possible, as the need may arise in the coming years.
         </t>

         <t>
           Section 3, paragraph 11:
           <vspace blankLines="0"/>

           In all cases, the size of the group SHOULD be at least 2048
           bits. Setting the group size to 3072 SHOULD be possible, as
           the need may arise in the coming years.
         </t>
       </list>
     </t>
   </section>

   <section title="Interoperability">
     <t>
       This document keeps the following requirement from <xref
       target="RFC4419"/>:
       <list>
         <t>
           The server should return the smallest group it knows that
           is larger than the size the client requested. If the server
           does not know a group that is larger than the client
           request, then it SHOULD return the largest group it knows.
         </t>
       </list>
     </t>

     <t>
       Also, it updates the subsequent sentence as follows:
       <list>
         <t>
           In all cases, the size of the returned group SHOULD be at
           least 2048 bits. Setting the group size to 3072 SHOULD be
           possible, as the need may arise in the coming years.
         </t>
       </list>
     </t>
   </section>

   <section anchor="Security" title="Security Considerations">
     <t>
       This document discusses security issues of DH groups that are
       1024 bits in size, and formally updates the minimum size of DH
       groups to be 2048 bits.

       A hostile or "owned" SSH server implementation could
       potentially use backdoored DH primes using the methods
       described in <xref target="Backdoor-DH"/> to provide the g and
       p values to be used. Or, it could just send the calculated
       secret through a covert channel of some sort to a passive
       listener.
     </t>
     <t>
        A malicious client could cause a Denial of Service by
        intentionally making multiple connections that are less than
        2048 bits in size. Therefore, operating systems SHOULD NOT log
        DH groups that are less than 2048 bits in size, as it would
        create an additional attack surface.
      </t>
   </section>

   <section title="IANA Considerations" anchor="sec-iana">
     <t>
       This document does not require any IANA actions.
     </t>
   </section>

 </middle>

 <back>

   <references title="Normative References">
     &RFC2119;
     &RFC4419;
     &RFC8174;
   </references>

   <references title="Informative References">
     <reference
         anchor="LOGJAM"
         target="https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf">
       <front>
         <title>
           Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice
         </title>
         <author surname="Adrian" initials="D." fullname="David Adrian">
           <organization>Univeristy of Michigan</organization>
         </author>
         <author surname="Bhargavan" initials="K."
                 fullname="Karthikeyan Bhargavan">
           <organization>INRIA Paris-Rocquencourt</organization>
         </author>
         <author surname="Durumeric" initials="Z." fullname="Zakir Durumeric">
           <organization>Univeristy of Michigan</organization>
         </author>
         <author surname="Gaudry" initials="P." fullname="Pierrick Gaudry">
           <organization>
             INRIA Nancy-Grand Est, CNRS, and Universite de Lorraine
           </organization>
         </author>
         <author surname="Green" initials="M." fullname="Matthew Green">
           <organization>Johns Hopkins</organization>
         </author>
         <author surname="Halderman" initials="J. A."
                 fullname="J. Alex Halderman">
           <organization>Univeristy of Michigan</organization>
         </author>
         <author surname="Heninger" initials="N." fullname="Nadia Heninger">
           <organization> University of Pennsylvania</organization>
         </author>
         <author surname="Springall" initials="D." fullname="Drew Springall">
           <organization>Univeristy of Michigan</organization>
         </author>
         <author surname="Thome" initials="E." fullname="Emmanuel Thome">
           <organization>
             INRIA Nancy-Grand Est, CNRS, and Universite de Lorraine
           </organization>
         </author>
         <author surname="Valenta" initials="L." fullname="Luke Valenta">
           <organization> University of Pennsylvania</organization>
         </author>
         <author surname="VanderSloot" initials="B."
                 fullname="Benjamin VanderSloot">
           <organization>Univeristy of Michigan</organization>
         </author>
         <author surname="Wustrow" initials="E." fullname="Eric Wustrow">
           <organization>Univeristy of Michigan</organization>
         </author>
         <author surname="Zanella-Beguelin" initials="S."
                 fullname="Santiago Zanella-Beguelin">
           <organization>Microsoft Research</organization>
         </author>
         <author surname="Zimmermann" initials="P."
                 fullname="Paul Zimmermann">
           <organization>Univeristy of Michigan</organization>
         </author>
         <date year="2015"/>
       </front>
       <seriesInfo
           name="ACM Conference on Computer and Communications Security (CCS)"
           value="2015" />
       <seriesInfo name="DOI" value="10.1145/2810103.2813707"/>
     </reference>

     <reference
         anchor="Backdoor-DH"
         target="http://eprint.iacr.org/2016/644.pdf">
       <front>
         <title>How to Backdoor Diffie-Hellman</title>
         <author surname="Wong" initials="D." fullname="David Wong">
         </author>
         <date month="June" year="2016"/>
       </front>
       <seriesInfo name="Cryptology ePrint Archive" value="Report 2016/644"/>
     </reference>
   </references>


 </back>
</rfc>
