RFC 8732: Generic Security Service Application Program Interface (GSS-API) Key Exchange with SHA-2
- S. Sorce,
- H. Kario
Abstract
This document specifies additions and amendments to RFC 4462. It defines a new key exchange method that uses SHA-2 for integrity and deprecates weak Diffie-Hellman (DH) groups. The purpose of this specification is to modernize the cryptographic primitives used by Generic Security Service (GSS) key exchanges.¶
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 Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2020 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
(https://
1. Introduction
Secure Shell (SSH) Generic Security Service Application Program Interface (GSS-API) methods [RFC4462] allow the use of GSS-API [RFC2743] for authentication and key exchange in SSH. [RFC4462] defines three exchange methods all based on DH groups and SHA-1. This document updates [RFC4462] with new methods intended to support environments that desire to use the SHA-2 cryptographic hash functions.¶
2. Rationale
Due to security concerns with SHA-1 [RFC6194] and with modular exponentiation (MODP) groups with less than 2048 bits [NIST
3. Document Conventions
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 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
4. New Diffie-Hellman Key Exchange Methods
This document adopts the same naming convention defined in [RFC4462] to define families of methods that cover any GSS-API mechanism used with a specific Diffie-Hellman group and SHA-2 hash combination.¶
Each key exchange method prefix is registered by this document. The IESG is the change controller of all these key exchange methods; this does NOT imply that the IESG is considered to be in control of the corresponding GSS-API mechanism.¶
Each method in any family of methods (Table 2)
specifies GSS
5. New Elliptic Curve Diffie-Hellman Key Exchange Methods
In [RFC5656], new SSH key exchange algorithms based on
elliptic curve cryptography are introduced. We reuse much of
Section 4 of [RFC5656]
to define GSS
Additionally, we also utilize the curves defined in [RFC8731] to complement the three classic NIST-defined curves required by [RFC5656].¶
5.1. Generic GSS-API Key Exchange with ECDH
This section reuses much of the scheme defined in Section 2.1 of [RFC4462] and combines it with the scheme defined in Section 4 of [RFC5656]; in particular, all checks and verification steps prescribed in Section 4 of [RFC5656] apply here as well.¶
The key-agreement schemes "ECDHE
This section defers to [RFC7546] as the source of information on GSS-API context establishment operations, Section 3 being the most relevant. All security considerations described in [RFC7546] apply here, too.¶
The parties each generate an ephemeral key pair, according to Section 3.2.1 of [SEC1v2]. Keys are verified upon receipt by the parties according to Section 3.2.3.1 of [SEC1v2].¶
For NIST curves, the keys use the uncompressed point representation and MUST be converted using the algorithm in Section 2.3.4 of [SEC1v2]. If the conversion fails or the point is transmitted using the compressed representation, the key exchange MUST fail.¶
A GSS context is established according to
Section 4 of [RFC5656]; the client initiates the establishment
using GSS
The client MUST include its public key with the first message it sends to the server during this process; if the server receives more than one key or none at all, the key exchange MUST fail.¶
During GSS context establishment, multiple tokens may be exchanged
by the client and the server. When the GSS context is established
(major_status is GSS
Once a party receives the peer's public key, it proceeds to compute a shared secret K. For NIST curves, the computation is done according to Section 3.3.1 of [SEC1v2], and the resulting value z is converted to the octet string K using the conversion defined in Section 2.3.5 of [SEC1v2]. For curve25519 and curve448, the algorithms in Section 6 of [RFC7748] are used instead.¶
To verify the integrity of the handshake, peers use the hash function defined by the selected key exchange method to calculate H:¶
H = hash(V_C || V_S || I_C || I_S || K_S || Q_C || Q_S || K).¶
The server uses the GSS_GetMIC() call with H as the payload to generate a Message Integrity Code (MIC). The GSS_VerifyMIC() call is used by the client to verify the MIC.¶
If any GSS
The following is an overview of the key exchange process:¶
This is implemented with the following messages:¶
The client sends:¶
The server may respond with:¶
The server sends:¶
Each time the client receives the message described above, it makes
another call to GSS
The client sends:¶
As the final message, the server sends the following if an output_token is produced:¶
If no output_token is produced, the server sends:¶
The hash H is computed as the HASH hash of the concatenation of the following:¶
This value is called the "exchange hash", and it is used to
authenticate the key exchange. The exchange hash SHOULD be kept
secret. If no SSH
Since this key exchange method does not require the host key to
be used for any encryption operations, the SSH
If the client receives an SSH
If the client receives an SSH
5.2. ECDH Key Exchange Methods
Each key exchange method prefix is registered by this document. The IESG is the change controller of all these key exchange methods; this does NOT imply that the IESG is considered to be in control of the corresponding GSS-API mechanism.¶
Each method in any family of methods (Table 4)
specifies GSS
6. Deprecated Algorithms
Because they have small key lengths and are no longer strong in the face of brute-force attacks, the algorithms in the following table are considered deprecated and SHOULD NOT be used.¶
7. IANA Considerations
This document augments the SSH key exchange message names that were defined in [RFC4462] (see and Section 6); IANA has listed this document as reference for those entries in the "SSH Protocol Parameters" [IANA-KEX-NAMES] registry.¶
In addition, IANA has updated the registry to include the SSH key exchange message names described in Sections 4 and 5.¶
8. Security Considerations
8.1. New Finite Field DH Mechanisms
Except for the use of a different secure hash function and larger DH groups, no significant changes have been made to the protocol described by [RFC4462]; therefore, all the original security considerations apply.¶
8.2. New Elliptic Curve DH Mechanisms
Although a new cryptographic primitive is used with these methods, the actual key exchange closely follows the key exchange defined in [RFC5656]; therefore, all the original security considerations, as well as those expressed in [RFC5656], apply.¶
8.3. GSS-API Delegation
Some GSS-API mechanisms can act on a request to delegate credentials
to the target host when the deleg_req_flag is set. In this case, extra
care must be taken to ensure that the acceptor being authenticated
matches the target the user intended. Some mechanism implementations
(such as commonly used krb5 libraries) may use insecure DNS resolution to
canonicalize the target name; in these cases, spoofing a DNS response
that points to an attacker
9. References
9.1. Normative References
- [RFC1321]
-
Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, DOI 10
.17487 , , <https:///RFC1321 www >..rfc -editor .org /info /rfc1321 - [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC2743]
-
Linn, J., "Generic Security Service Application Program Interface Version 2, Update 1", RFC 2743, DOI 10
.17487 , , <https:///RFC2743 www >..rfc -editor .org /info /rfc2743 - [RFC3526]
-
Kivinen, T. and M. Kojo, "More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)", RFC 3526, DOI 10
.17487 , , <https:///RFC3526 www >..rfc -editor .org /info /rfc3526 - [RFC4462]
-
Hutzelman, J., Salowey, J., Galbraith, J., and V. Welch, "Generic Security Service Application Program Interface (GSS-API) Authentication and Key Exchange for the Secure Shell (SSH) Protocol", RFC 4462, DOI 10
.17487 , , <https:///RFC4462 www >..rfc -editor .org /info /rfc4462 - [RFC4648]
-
Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10
.17487 , , <https:///RFC4648 www >..rfc -editor .org /info /rfc4648 - [RFC5656]
-
Stebila, D. and J. Green, "Elliptic Curve Algorithm Integration in the Secure Shell Transport Layer", RFC 5656, DOI 10
.17487 , , <https:///RFC5656 www >..rfc -editor .org /info /rfc5656 - [RFC7546]
-
Kaduk, B., "Structure of the Generic Security Service (GSS) Negotiation Loop", RFC 7546, DOI 10
.17487 , , <https:///RFC7546 www >..rfc -editor .org /info /rfc7546 - [RFC7748]
-
Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves for Security", RFC 7748, DOI 10
.17487 , , <https:///RFC7748 www >..rfc -editor .org /info /rfc7748 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC8731]
-
Adamantiadis, A., Josefsson, S., and M. Baushke, "Secure Shell (SSH) Key Exchange Method Using Curve25519 and Curve448", RFC 8731, DOI 10
.17487 , , <https:///RFC8731 www >..rfc -editor .org /info /rfc8731 - [SEC1v2]
- Standards for Efficient Cryptography Group, "SEC 1: Elliptic Curve Cryptography", Version 2.0, .
- [SEC2v2]
- Standards for Elliptic Cryptography Group, "SEC 2: Recommended Elliptic Curve Domain Parameters", Version 2.0, .
9.2. Informative References
- [IANA-KEX-NAMES]
-
IANA, "Secure Shell (SSH) Protocol Parameters: Key Exchange Method Names", <https://
www >..iana .org /assignments /ssh -parameters / - [ISO-IEC-8825-1]
-
ITU-T, "Information technology -- ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)", ISO/IEC 8825-1:2015, ITU-T Recommendation X.690, , <http://
standards >..iso .org /ittf /Publicly Available Standards /c068345 _ISO _IEC _8825 -1 _2015 .zip - [NIST
-SP -800 -131Ar2] -
NIST, "Transitioning of the Use of Cryptographic Algorithms and Key Lengths", DOI 10
.6028 , NIST Special Publication 800-131A Revision 2, , <https:///NIST .SP .800 -131Ar2 nvlpubs >..nist .gov /nistpubs /Special Publications /NIST .SP .800 -131Ar2 .pdf - [RFC6194]
-
Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security Considerations for the SHA-0 and SHA-1 Message-Digest Algorithms", RFC 6194, DOI 10
.17487 , , <https:///RFC6194 www >..rfc -editor .org /info /rfc6194 - [RFC6234]
-
Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10
.17487 , , <https:///RFC6234 www >..rfc -editor .org /info /rfc6234 - [RFC8268]
-
Baushke, M., "More Modular Exponentiation (MODP) Diffie-Hellman (DH) Key Exchange (KEX) Groups for Secure Shell (SSH)", RFC 8268, DOI 10
.17487 , , <https:///RFC8268 www >..rfc -editor .org /info /rfc8268