draft-ietf-curdle-rsa-sha2-04.txt   draft-ietf-curdle-rsa-sha2-05.txt 
Internet-Draft D. Bider Internet-Draft D. Bider
Updates: 4252, 4253 (if approved) Bitvise Limited Updates: 4252, 4253 (if approved) Bitvise Limited
Intended status: Standards Track March 29, 2017 Intended status: Standards Track April 9, 2017
Expires: September 29, 2017 Expires: October 9, 2017
Use of RSA Keys with SHA-2 256 and 512 in Secure Shell (SSH) Use of RSA Keys with SHA-2 256 and 512 in Secure Shell (SSH)
draft-ietf-curdle-rsa-sha2-04.txt draft-ietf-curdle-rsa-sha2-05.txt
Abstract Abstract
This memo defines an algorithm name, public key format, and signature This memo updates [RFC4252] and [RFC4253] to define an algorithm name,
format for use of RSA keys with SHA-2 hashing for server and client public key format, and signature format for use of RSA keys with SHA-2
authentication in SSH connections. hashing for server and client authentication in SSH connections.
Status Status
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Internet-Drafts are working documents of the Internet Engineering Task
Force (IETF), its areas, and its working groups. Note that other Force (IETF), its areas, and its working groups. Note that other
groups may also distribute working documents as Internet-Drafts. groups may also distribute working documents as Internet-Drafts.
skipping to change at page 2, line 5 skipping to change at page 2, line 5
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November 10,
2008. The person(s) controlling the copyright in some of this material
may not have granted the IETF Trust the right to allow modifications
of such material outside the IETF Standards Process. Without obtaining
an adequate license from the person(s) controlling the copyright in
such materials, this document may not be modified outside the IETF
Standards Process, and derivative works of it may not be created
outside the IETF Standards Process, except to format it for
publication as an RFC or to translate it into languages other than
English.
1. Overview and Rationale 1. Overview and Rationale
Secure Shell (SSH) is a common protocol for secure communication on Secure Shell (SSH) is a common protocol for secure communication on
the Internet. In [RFC4253], SSH originally defined the signature the Internet. In [RFC4253], SSH originally defined the signature
methods "ssh-rsa" for server and client authentication using RSA with methods "ssh-rsa" for server and client authentication using RSA with
SHA-1, and "ssh-dss" using 1024-bit DSA and SHA-1. SHA-1, and "ssh-dss" using 1024-bit DSA and SHA-1.
A decade later, these signature methods are considered deficient. A decade later, these signature methods are considered deficient.
For US government use, NIST has disallowed 1024-bit RSA and DSA, and For US government use, NIST has disallowed 1024-bit RSA and DSA, and
use of SHA-1 for signing [800-131A]. use of SHA-1 for signing [800-131A].
skipping to change at page 3, line 53 skipping to change at page 4, line 15
string "ssh-rsa" string "ssh-rsa"
mpint e mpint e
mpint n mpint n
All aspects of the "ssh-rsa" format are kept, including the encoded All aspects of the "ssh-rsa" format are kept, including the encoded
string "ssh-rsa". This allows existing RSA keys to be used with the string "ssh-rsa". This allows existing RSA keys to be used with the
new signature formats, without requiring re-encoding, or affecting new signature formats, without requiring re-encoding, or affecting
already trusted key fingerprints. already trusted key fingerprints.
Signing and verifying using these algorithms is performed according to Signing and verifying using these algorithms is performed according to
the RSASSA-PKCS1-v1_5 scheme in [RFC3447] using SHA-2 [FIPS-180-4] as the RSASSA-PKCS1-v1_5 scheme in [RFC8017] using SHA-2 [SHS] as hash;
hash; MGF1 as mask function; and salt length equal to hash size. MGF1 as mask function; and salt length equal to hash size.
For the algorithm "rsa-sha2-256", the hash used is SHA-2 256. For the algorithm "rsa-sha2-256", the hash used is SHA-2 256.
For the algorithm "rsa-sha2-512", the hash used is SHA-2 512. For the algorithm "rsa-sha2-512", the hash used is SHA-2 512.
The resulting signature is encoded as follows: The resulting signature is encoded as follows:
string "rsa-sha2-256" / "rsa-sha2-512" string "rsa-sha2-256" / "rsa-sha2-512"
string rsa_signature_blob string rsa_signature_blob
The value for 'rsa_signature_blob' is encoded as a string containing The value for 'rsa_signature_blob' is encoded as a string containing
skipping to change at page 5, line 13 skipping to change at page 5, line 27
string rsa_signature_blob string rsa_signature_blob
3.3. Discovery of signature algorithms supported by servers 3.3. Discovery of signature algorithms supported by servers
Implementation experience has shown that there are servers which apply Implementation experience has shown that there are servers which apply
authentication penalties to clients attempting signature algorithms authentication penalties to clients attempting signature algorithms
which the SSH server does not support. which the SSH server does not support.
Servers that accept rsa-sha2-* signatures for client authentication Servers that accept rsa-sha2-* signatures for client authentication
SHOULD implement the extension negotiation mechanism defined in SHOULD implement the extension negotiation mechanism defined in
[SSH-EXT-INFO], including especially the "server-sig-algs" extension. [EXT-INFO], including especially the "server-sig-algs" extension.
When authenticating with an RSA key against a server that does not When authenticating with an RSA key against a server that does not
implement the "server-sig-algs" extension, clients MAY default to an implement the "server-sig-algs" extension, clients MAY default to an
ssh-rsa signature to avoid authentication penalties. "ssh-rsa" signature to avoid authentication penalties. When the new
rsa-sha2-* algorithms have been sufficiently widely adopted to warrant
disabling "ssh-rsa", clients MAY default to one of the new algorithms.
4. IANA Considerations 4. IANA Considerations
IANA is requested to update the "Secure Shell (SSH) Protocol IANA is requested to update the "Secure Shell (SSH) Protocol
Parameters" registry, to extend the table Public Key Algorithm Names: Parameters" registry established with [RFC4250], to extend the table
Public Key Algorithm Names [IANA-PKA]:
- To the immediate right of the column Public Key Algorithm Name, - To the immediate right of the column Public Key Algorithm Name,
a new column is to be added, titled Signature Algorithm Name. For a new column is to be added, titled Signature Algorithm Name. For
existing entries, the column Signature Algorithm Name should be existing entries, the column Signature Algorithm Name should be
assigned the same value found under Public Key Algorithm Name. assigned the same value found under Public Key Algorithm Name.
- Immediately following the existing entry for "ssh-rsa", two sibling - Immediately following the existing entry for "ssh-rsa", two sibling
entries are to be added: entries are to be added:
P. K. Alg. Name Sig. Alg. Name Reference Note P. K. Alg. Name Sig. Alg. Name Reference Note
ssh-rsa rsa-sha2-256 [this document] Section 3 ssh-rsa rsa-sha2-256 [this document] Section 3
ssh-rsa rsa-sha2-512 [this document] Section 3 ssh-rsa rsa-sha2-512 [this document] Section 3
5. Security Considerations 5. Security Considerations
The security considerations of [RFC4251] apply to this document. The security considerations of [RFC4251] apply to this document.
5.1. Key Size and Signature Hash
The National Institute of Standards and Technology (NIST) Special The National Institute of Standards and Technology (NIST) Special
Publication 800-131A [800-131A] disallows the use of RSA and DSA keys Publication 800-131A [800-131A] disallows the use of RSA and DSA keys
shorter than 2048 bits for US government use after 2013. The same shorter than 2048 bits for US government use after 2013. The same
document disallows the SHA-1 hash function, as used in the "ssh-rsa" document disallows the SHA-1 hash function, as used in the "ssh-rsa"
and "ssh-dss" algorithms, for digital signature generation after 2013. and "ssh-dss" algorithms, for digital signature generation after 2013.
5.2. Transition
This document is based on the premise that RSA is used in environments This document is based on the premise that RSA is used in environments
where a gradual, compatible transition to improved algorithms will be where a gradual, compatible transition to improved algorithms will be
better received than one that is abrupt and incompatible. It advises better received than one that is abrupt and incompatible. It advises
that SSH implementations add support for new RSA signature algorithms that SSH implementations add support for new RSA signature algorithms
along with SSH_MSG_EXT_INFO and the "server-sig-algs" extension to along with SSH_MSG_EXT_INFO and the "server-sig-algs" extension to
allow coexistence of new deployments with older versions that support allow coexistence of new deployments with older versions that support
only "ssh-rsa". Nevertheless, implementations SHOULD start to disable only "ssh-rsa". Nevertheless, implementations SHOULD start to disable
"ssh-rsa" in their default configurations as soon as they have reason "ssh-rsa" in their default configurations as soon as they have reason
to believe that new RSA signature algorithms have been widely adopted. to believe that new RSA signature algorithms have been widely adopted.
5.3. PKCS#1 v1.5 Padding and Signature Verification
This document prescribes use of PKCS#1 v1.5 signature padding because:
(1) PSS is not universally available to all SSH implementations;
(2) PKCS#1 v1.5 is widely supported in existing SSH implementations;
(3) PKCS#1 v1.5 is not known to be insecure for use in this scheme,
assuming reasonable implementation.
Implementers are advised that a signature with PKCS#1 v1.5 padding
MUST NOT be verified by applying the RSA key to the signature, and
then parsing the output to extract the hash. This may give an attacker
opportunities to exploit flaws in the parsing and vary the encoding.
Implementations SHOULD apply PKCS#1 v1.5 padding to the expected hash,
THEN compare the encoded bytes with the output of the RSA operation.
6. Why no DSA? 6. Why no DSA?
A draft version of this memo also defined an algorithm name for use of A draft version of this memo also defined an algorithm name for use of
2048-bit and 3072-bit DSA keys with a 256-bit subgroup and SHA-2 256 2048-bit and 3072-bit DSA keys with a 256-bit subgroup and SHA-2 256
hashing. It is possible to implement DSA securely by generating "k" hashing. It is possible to implement DSA securely by generating "k"
deterministically as per [RFC6979]. However, a plurality of reviewers deterministically as per [RFC6979]. However, a plurality of reviewers
were concerned that implementers would continue to use libraries that were concerned that implementers would continue to use libraries that
generate "k" randomly. This is vulnerable to biased "k" generation, generate "k" randomly. This is vulnerable to biased "k" generation,
and extremely vulnerable to "k" reuse. This document therefore and extremely vulnerable to "k" reuse. This document therefore
disrecommends DSA, in favor of RSA and elliptic curve cryptography. disrecommends DSA, in favor of RSA and elliptic curve cryptography.
7. References 7. References
7.1. Normative References 7.1. Normative References
[FIPS-180-4] [SHS] National Institute of Standards and Technology (NIST),
National Institute of Standards and Technology (NIST),
United States of America, "Secure Hash Standard (SHS)", United States of America, "Secure Hash Standard (SHS)",
FIPS Publication 180-4, August 2015, FIPS Publication 180-4, August 2015,
<http://dx.doi.org/10.6028/NIST.FIPS.180-4>. <http://dx.doi.org/10.6028/NIST.FIPS.180-4>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3447] Jonsson, J. and B. Kaliski, "Public-Key Cryptography [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
Standards (PKCS) #1: RSA Cryptography Specifications 10646", STD 63, RFC 3629, November 2003.
Version 2.1", RFC 3447, February 2003.
[RFC4251] Lehtinen, S. and C. Lonvick, Ed., "The Secure Shell (SSH) [RFC4251] Lehtinen, S. and C. Lonvick, Ed., "The Secure Shell (SSH)
Protocol Architecture", RFC 4251, January 2006. Protocol Architecture", RFC 4251, January 2006.
[RFC4252] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) [RFC4252] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
Authentication Protocol", RFC 4252, January 2006. Authentication Protocol", RFC 4252, January 2006.
[RFC4253] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH) [RFC4253] Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
Transport Layer Protocol", RFC 4253, January 2006. Transport Layer Protocol", RFC 4253, January 2006.
[RFC8017] Moriarty, K., Kaliski, B., Jonsson, J. and Rusch, A.,
"PKCS #1: RSA Cryptography Specifications Version 2.2",
RFC 8017, November 2016.
7.2. Informative References 7.2. Informative References
[800-131A] National Institute of Standards and Technology (NIST), [800-131A] National Institute of Standards and Technology (NIST),
"Transitions: Recommendation for Transitioning the Use of "Transitions: Recommendation for Transitioning the Use of
Cryptographic Algorithms and Key Lengths", NIST Special Cryptographic Algorithms and Key Lengths", NIST Special
Publication 800-131A, January 2011, <http://csrc.nist.gov/ Publication 800-131A, January 2011, <http://csrc.nist.gov/
publications/nistpubs/800-131A/sp800-131A.pdf>. publications/nistpubs/800-131A/sp800-131A.pdf>.
[RFC4250] Lehtinen, S. and C. Lonvick, Ed., "The Secure Shell (SSH) [RFC4250] Lehtinen, S. and C. Lonvick, Ed., "The Secure Shell (SSH)
Protocol Assigned Numbers", RFC 4250, January 2006. Protocol Assigned Numbers", RFC 4250, January 2006.
[RFC6979] Pornin, T., "Deterministic Usage of the Digital [RFC6979] Pornin, T., "Deterministic Usage of the Digital
Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (DSA) and Elliptic Curve Digital
Signature Algorithm (ECDSA)", RFC 6979, August 2013. Signature Algorithm (ECDSA)", RFC 6979, August 2013.
[SSH-EXT-INFO] [EXT-INFO] Bider, D., "Extension Negotiation in Secure Shell (SSH)",
Bider, D., "Extension Negotiation in Secure Shell (SSH)", draft-ietf-curdle-ssh-ext-info-04.txt, April 2017,
draft-ietf-curdle-ssh-ext-info-03.txt, March 2017,
<https://tools.ietf.org/html/ <https://tools.ietf.org/html/
draft-ietf-curdle-ssh-ext-info-03>. draft-ietf-curdle-ssh-ext-info-04>.
[IANA-PKA] "Secure Shell (SSH) Protocol Parameters",
<https://www.iana.org/assignments/ssh-parameters/
ssh-parameters.xhtml#ssh-parameters-19>.
Author's Address Author's Address
Denis Bider Denis Bider
Bitvise Limited Bitvise Limited
Suites 41/42, Victoria House Suites 41/42, Victoria House
26 Main Street 26 Main Street
GI GI
Phone: +506 8315 6519 Phone: +506 8315 6519
 End of changes. 16 change blocks. 
20 lines changed or deleted 60 lines changed or added

This html diff was produced by rfcdiff 1.45. The latest version is available from http://tools.ietf.org/tools/rfcdiff/