8268
PROPOSED STANDARD
More Modular Exponentiation (MODP) Diffie-Hellman (DH) Key Exchange (KEX) Groups for Secure Shell (SSH)
Authors: M. Baushke
Date: December 2017
Area: sec
Working Group: curdle
Stream: IETF
Updates:
RFC 4250
Abstract
This document defines added Modular Exponentiation (MODP) groups for the Secure Shell (SSH) protocol using SHA-2 hashes. This document updates RFC 4250. This document updates RFC 4253 by correcting an error regarding checking the Peer's DH Public Key.
RFC 8268
PROPOSED STANDARD
Internet Engineering Task Force (IETF) M. Baushke
Request for Comments: 8268 Juniper Networks, Inc.
Updates: <a href="./rfc4250">4250</a>, <a href="./rfc4253">4253</a> December 2017
Category: Standards Track
ISSN: 2070-1721
<span class="h1">More Modular Exponentiation (MODP) Diffie-Hellman (DH)</span>
<span class="h1">Key Exchange (KEX) Groups for Secure Shell (SSH)</span>
Abstract
This document defines added Modular Exponentiation (MODP) groups for
the Secure Shell (SSH) protocol using SHA-2 hashes. This document
updates <a href="./rfc4250">RFC 4250</a>. This document updates <a href="./rfc4253">RFC 4253</a> by correcting an
error regarding checking the Peer's DH Public Key.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc8268">https://www.rfc-editor.org/info/rfc8268</a>.
Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
<span class="grey">Baushke Standards Track [Page 1]</span>
<span id="page-2" ></span>
<span class="grey"><a href="./rfc8268">RFC 8268</a> More MODP DH KEX Groups for SSH December 2017</span>
Table of Contents
<a href="#section-1">1</a>. Overview and Rationale . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Requirements Language . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3">3</a>. Key Exchange Algorithms . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4">4</a>. Checking the Peer's DH Public Key . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-5">5</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-6">6</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-7">7</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-7.1">7.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-7.2">7.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Overview and Rationale</span>
Secure Shell (SSH) is a common protocol for secure communication on
the Internet. Security protocols and primitives are an active area
for research and help to suggest updates to SSH.
<a href="./rfc4253#section-8">Section 8 of [RFC4253]</a> contains a small error in point 3 regarding
checking the Peer's DH Public Key. <a href="#section-4">Section 4</a> of this document
provides the correction.
Due to security concerns with SHA-1 [<a href="./rfc6194" title=""Security Considerations for the SHA-0 and SHA-1 Message-Digest Algorithms"">RFC6194</a>] and with MODP groups
with less than 2048 bits [<a href="#ref-NIST-SP-800-131Ar1">NIST-SP-800-131Ar1</a>], implementers and users
should request support for larger Diffie-Hellman (DH) MODP group
sizes with data-integrity verification by using the SHA-2 family of
secure hash algorithms and by having MODP groups provide more
security. The use of larger MODP groups and the move to the SHA-2
family of hashes are important features to strengthen the key
exchange algorithms available to the SSH client and server.
DH primes being adopted by this document are all "safe primes" such
that p = 2q + 1 where q is also a prime. New MODP groups are being
introduced starting with the MODP 3072-bit group15. All use SHA512
as the hash algorithm.
The DH 2048-bit MODP group14 is already present in most SSH
implementations and most implementations already have a SHA256
implementation, so "diffie-hellman-group14-sha256" is provided as
easy to implement.
It is intended that these new MODP groups with SHA-2-based hashes
update <a href="./rfc4253#section-6.4">Section 6.4 of [RFC4253]</a> and <a href="./rfc4250#section-4.10">Section 4.10 of [RFC4250]</a>.
<span class="grey">Baushke Standards Track [Page 2]</span>
<span id="page-3" ></span>
<span class="grey"><a href="./rfc8268">RFC 8268</a> More MODP DH KEX Groups for SSH December 2017</span>
The United States Information Assurance Directorate (IAD) at the
National Security Agency (NSA) has published "Commercial National
Security Algorithm Suite and Quantum Computing Frequently Asked
Questions". [<a href="#ref-MFQ-U-OO-815099-15">MFQ-U-OO-815099-15</a>] is addressed to organizations that
run classified or unclassified national security systems (NSS) and
vendors that build products used in NSS.
This FAQ document indicates that NSS should no longer use:
o Elliptic Curve Diffie-Hellman (ECDH) and Elliptic Curve Digital
Signature Algorithm (ECDSA) with NIST P-256. (For SSH, this would
suggest avoiding [<a href="./rfc5656" title=""Elliptic Curve Algorithm Integration in the Secure Shell Transport Layer"">RFC5656</a>] Key Exchange Algorithm
"ecdh-sha2-nistp256" and Public Key Algorithm
"ecdsa-sha2-nistp256".)
o SHA-256 (For SSH, this would suggest avoiding any Key Exchange
Method using SHA1, SHA224, or SHA256 in favor of using SHA384 or
SHA512.)
o AES-128 (For SSH, this would suggest avoiding Encryption
Algorithms [<a href="./rfc4253" title=""The Secure Shell (SSH) Transport Layer Protocol"">RFC4253</a>] "aes128-cbc" and [<a href="./rfc4344" title=""The Secure Shell (SSH) Transport Layer Encryption Modes"">RFC4344</a>] "aes128-ctr".)
o RSA with 2048-bit keys (For SSH, this would suggest avoiding
[<a href="./rfc4253" title=""The Secure Shell (SSH) Transport Layer Protocol"">RFC4253</a>] "ssh-rsa" using RSA with SHA1 as well as [<a href="./rfc6187" title=""X.509v3 Certificates for Secure Shell Authentication"">RFC6187</a>]
"x509v3-rsa2048-sha256" as well as any other RSA key that has a
length less than 3072-bits or uses a hash less than SHA384.)
o Diffie-Hellman with 2048-bit keys (For SSH, this would suggest
avoiding use of [<a href="./rfc4253" title=""The Secure Shell (SSH) Transport Layer Protocol"">RFC4253</a>] both of "diffie-hellman-group1-sha1" and
"diffie-hellman-group14-sha1" as well as avoiding
"diffie-hellman-group14-sha256" added by this document.)
The FAQ also states that NSS users should select DH groups based upon
well-established and validated parameter sets that comply with the
minimum required sizes. Some specific examples include:
o Elliptic Curves are currently restricted to the NIST P-384 group
only for both ECDH and ECDSA, in accordance with existing NIST and
National Information Assurance Partnership (NIAP) standards. (For
SSH, this means using [<a href="./rfc5656" title=""Elliptic Curve Algorithm Integration in the Secure Shell Transport Layer"">RFC5656</a>] "ecdh-sha2-nistp384" for key
exchange and "ecdsa-sha2-nistp384" for Public Key Algorithm
Names.)
o RSA moduli should have a minimum size of 3072 bits (other than the
noted PKI exception), and keys should be generated in accordance
with all relevant NIST standards.
<span class="grey">Baushke Standards Track [Page 3]</span>
<span id="page-4" ></span>
<span class="grey"><a href="./rfc8268">RFC 8268</a> More MODP DH KEX Groups for SSH December 2017</span>
o For Diffie-Hellman, use a Diffie-Hellman prime modulus of at least
3072 bits. (For bit sizes as specified in [<a href="./rfc3526" title=""More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)"">RFC3526</a>], this would
allow for any of group15, group16, group17, group18 to be used.)
Although SSH may not always be used to protect Top Secret
communications, this document adopts the use of the DH groups
provided as an example in the FAQ as well as the use of SHA512 rather
than SHA256 for the new DH groups.
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Requirements Language</span>
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
<a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>] [<a href="./rfc8174" title=""Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"">RFC8174</a>] when, and only when, they appear in all
capitals, as shown here.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Key Exchange Algorithms</span>
This document adds some new Key Exchange Algorithm Method Names to
what originally appeared in [<a href="./rfc4253" title=""The Secure Shell (SSH) Transport Layer Protocol"">RFC4253</a>] and [<a href="./rfc4250" title=""The Secure Shell (SSH) Protocol Assigned Numbers"">RFC4250</a>].
This document adopts the style and conventions of [<a href="./rfc4253" title=""The Secure Shell (SSH) Transport Layer Protocol"">RFC4253</a>] in
specifying how the use of new data key exchange is indicated in SSH.
The following new key exchange method algorithms are defined:
o diffie-hellman-group14-sha256
o diffie-hellman-group15-sha512
o diffie-hellman-group16-sha512
o diffie-hellman-group17-sha512
o diffie-hellman-group18-sha512
The SHA-2 family of secure hash algorithms is defined in [<a href="./rfc6234" title=""US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)"">RFC6234</a>].
The method of key exchange used for the name "diffie-hellman-
group14-sha256" is the same as that for "diffie-hellman-group14-sha1"
except that the SHA256 hash algorithm is used. It is recommended
that "diffie-hellman-group14-sha256" SHOULD be supported to smooth
the transition to newer group sizes.
The group15 through group18 names are the same as those specified in
[<a href="./rfc3526" title=""More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)"">RFC3526</a>]: 3072-bit MODP group15, 4096-bit MODP group16, 6144-bit
MODP group17, and 8192-bit MODP group18.
<span class="grey">Baushke Standards Track [Page 4]</span>
<span id="page-5" ></span>
<span class="grey"><a href="./rfc8268">RFC 8268</a> More MODP DH KEX Groups for SSH December 2017</span>
The SHA512 algorithm is to be used when "sha512" is specified as a
part of the key exchange method name.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Checking the Peer's DH Public Key</span>
<a href="./rfc4253#section-8">Section 8 of [RFC4253]</a> contains a small error in point 3. When
checking e (client Public Key) and f (server Public Key) values, an
incorrect range is provided. The erroneous text is:
Values of 'e' or 'f' that are not in the range [1, p-1] MUST NOT
be sent or accepted by either side. If this condition is
violated, the key exchange fails.
The problem is that the range should have been an open interval
excluding the endpoint values. (i.e., "(1, p-1)"). This document
amends that document text as follows:
DH Public Key values MUST be checked and both conditions:
1 < e < p-1
1 < f < p-1
MUST be true. Values not within these bounds MUST NOT be sent or
accepted by either side. If either one of these conditions is
violated, then the key exchange fails.
This simple check ensures that:
o The remote peer behaves properly.
o The local system is not forced into the two-element subgroup.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
IANA has added the following entries to the "Key Exchange Method
Names" registry [<a href="#ref-IANA-KEX" title=""Secure Shell (SSH) Protocol Parameters"">IANA-KEX</a>]:
Method Name Reference
----------------------------- ---------
diffie-hellman-group14-sha256 <a href="./rfc8268">RFC 8268</a>
diffie-hellman-group15-sha512 <a href="./rfc8268">RFC 8268</a>
diffie-hellman-group16-sha512 <a href="./rfc8268">RFC 8268</a>
diffie-hellman-group17-sha512 <a href="./rfc8268">RFC 8268</a>
diffie-hellman-group18-sha512 <a href="./rfc8268">RFC 8268</a>
<span class="grey">Baushke Standards Track [Page 5]</span>
<span id="page-6" ></span>
<span class="grey"><a href="./rfc8268">RFC 8268</a> More MODP DH KEX Groups for SSH December 2017</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
The security considerations of [<a href="./rfc4253" title=""The Secure Shell (SSH) Transport Layer Protocol"">RFC4253</a>] apply to this document.
The security considerations of [<a href="./rfc3526" title=""More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)"">RFC3526</a>] suggest that MODP group14
through group18 have security strengths that range between 110 bits
of security through 310 bits of security. They are based on
"Determining Strengths For Public Keys Used For Exchanging Symmetric
Keys" [<a href="./rfc3766" title=""Determining Strengths For Public Keys Used For Exchanging Symmetric Keys"">RFC3766</a>]. Care should be taken to use sufficient entropy and/
or deterministic random-bit generator (DRBG) algorithms to maximize
the true security strength of the key exchange and ciphers selected.
Using a fixed set of Diffie-Hellman parameters makes them a high
value target for pre-computation. Generating additional sets of
primes to be used, or moving to larger values mitigates this issue.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. References</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC3526">RFC3526</a>] Kivinen, T. and M. Kojo, "More Modular Exponential (MODP)
Diffie-Hellman groups for Internet Key Exchange (IKE)",
<a href="./rfc3526">RFC 3526</a>, DOI 10.17487/RFC3526, May 2003,
<<a href="https://www.rfc-editor.org/info/rfc3526">https://www.rfc-editor.org/info/rfc3526</a>>.
[<a id="ref-RFC4250">RFC4250</a>] Lehtinen, S. and C. Lonvick, Ed., "The Secure Shell (SSH)
Protocol Assigned Numbers", <a href="./rfc4250">RFC 4250</a>,
DOI 10.17487/RFC4250, January 2006,
<<a href="https://www.rfc-editor.org/info/rfc4250">https://www.rfc-editor.org/info/rfc4250</a>>.
[<a id="ref-RFC4253">RFC4253</a>] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
Transport Layer Protocol", <a href="./rfc4253">RFC 4253</a>, DOI 10.17487/RFC4253,
January 2006, <<a href="https://www.rfc-editor.org/info/rfc4253">https://www.rfc-editor.org/info/rfc4253</a>>.
[<a id="ref-RFC6234">RFC6234</a>] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms
(SHA and SHA-based HMAC and HKDF)", <a href="./rfc6234">RFC 6234</a>,
DOI 10.17487/RFC6234, May 2011,
<<a href="https://www.rfc-editor.org/info/rfc6234">https://www.rfc-editor.org/info/rfc6234</a>>.
[<a id="ref-RFC8174">RFC8174</a>] Leiba, B., "Ambiguity of Uppercase vs Lowercase in <a href="./rfc2119">RFC</a>
<a href="./rfc2119">2119</a> Key Words", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc8174">RFC 8174</a>, DOI 10.17487/RFC8174,
May 2017, <<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>>.
<span class="grey">Baushke Standards Track [Page 6]</span>
<span id="page-7" ></span>
<span class="grey"><a href="./rfc8268">RFC 8268</a> More MODP DH KEX Groups for SSH December 2017</span>
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Informative References</span>
[<a id="ref-IANA-KEX">IANA-KEX</a>] IANA, "Secure Shell (SSH) Protocol Parameters",
<<a href="http://www.iana.org/assignments/ssh-parameters/">http://www.iana.org/assignments/ssh-parameters/</a>>
[<a id="ref-MFQ-U-OO-815099-15">MFQ-U-OO-815099-15</a>]
National Security Agency / Central Security Service,
"Commerical National Security Algorithm Suite and Quantum
Computing FAQ", MFQ U/OO/815099-15 , January 2016,
<<a href="https://www.iad.gov/iad/library/ia-guidance/">https://www.iad.gov/iad/library/ia-guidance/</a>
ia-solutions-for-classified/algorithm-
guidance/assets/public/upload/
CNSA-Suite-and-Quantum-Computing-FAQ.pdf>.
[<a id="ref-NIST-SP-800-131Ar1">NIST-SP-800-131Ar1</a>]
Barker and Roginsky, "Transitions: Recommendation for the
Transitioning of the Use of Cryptographic Algorithms and
Key Lengths", NIST Special Publication 800-131A,
Revision 1, DOI 10.6028/NIST.SP.800-131Ar1, November 2015,
<<a href="https://dx.doi.org/10.6028/NIST.SP.800-131Ar1">http://dx.doi.org/10.6028/NIST.SP.800-131Ar1</a>>.
[<a id="ref-RFC3766">RFC3766</a>] Orman, H. and P. Hoffman, "Determining Strengths For
Public Keys Used For Exchanging Symmetric Keys", <a href="https://www.rfc-editor.org/bcp/bcp86">BCP 86</a>,
<a href="./rfc3766">RFC 3766</a>, DOI 10.17487/RFC3766, April 2004,
<<a href="https://www.rfc-editor.org/info/rfc3766">https://www.rfc-editor.org/info/rfc3766</a>>.
[<a id="ref-RFC4344">RFC4344</a>] Bellare, M., Kohno, T., and C. Namprempre, "The Secure
Shell (SSH) Transport Layer Encryption Modes", <a href="./rfc4344">RFC 4344</a>,
DOI 10.17487/RFC4344, January 2006,
<<a href="https://www.rfc-editor.org/info/rfc4344">https://www.rfc-editor.org/info/rfc4344</a>>.
[<a id="ref-RFC5656">RFC5656</a>] Stebila, D. and J. Green, "Elliptic Curve Algorithm
Integration in the Secure Shell Transport Layer",
<a href="./rfc5656">RFC 5656</a>, DOI 10.17487/RFC5656, December 2009,
<<a href="https://www.rfc-editor.org/info/rfc5656">https://www.rfc-editor.org/info/rfc5656</a>>.
[<a id="ref-RFC6187">RFC6187</a>] Igoe, K. and D. Stebila, "X.509v3 Certificates for Secure
Shell Authentication", <a href="./rfc6187">RFC 6187</a>, DOI 10.17487/RFC6187,
March 2011, <<a href="https://www.rfc-editor.org/info/rfc6187">https://www.rfc-editor.org/info/rfc6187</a>>.
[<a id="ref-RFC6194">RFC6194</a>] Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security
Considerations for the SHA-0 and SHA-1 Message-Digest
Algorithms", <a href="./rfc6194">RFC 6194</a>, DOI 10.17487/RFC6194, March 2011,
<<a href="https://www.rfc-editor.org/info/rfc6194">https://www.rfc-editor.org/info/rfc6194</a>>.
<span class="grey">Baushke Standards Track [Page 7]</span>
<span id="page-8" ></span>
<span class="grey"><a href="./rfc8268">RFC 8268</a> More MODP DH KEX Groups for SSH December 2017</span>
Acknowledgements
Thanks to the following people for review and comments: Denis Bider,
Peter Gutmann, Damien Miller, Niels Moller, Matt Johnston, Iwamoto
Kouichi, Dave Dugal, Daniel Migault, Anna Johnston, Ron Frederick,
Rich Salz, Travis Finkenauer, and Eric Rescorla.
Author's Address
Mark D. Baushke
Juniper Networks, Inc.
1133 Innovation Way
Sunnyvale, CA 94089-1228
United States of America
Phone: +1 408 745 2952
Email: [email protected]
URI: <a href="http://www.juniper.net/">http://www.juniper.net/</a>
Baushke Standards Track [Page 8]
Annotations
Select text to annotate