RFC 8692: Internet X.509 Public Key Infrastructure: Additional Algorithm Identifiers for RSASSA-PSS and ECDSA Using SHAKEs
- P. Kampanakis,
- Q. Dang
Abstract
Digital signatures are used to sign messages, X.509 certificates, and Certificate Revocation Lists (CRLs). This document updates the "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile" (RFC 3279) and describes the conventions for using the SHAKE function family in Internet X.509 certificates and revocation lists as one-way hash functions with the RSA Probabilistic signature and Elliptic Curve Digital Signature Algorithm (ECDSA) signature algorithms. The conventions for the associated subject public keys are also described.¶
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) 2019 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
[RFC3279] defines cryptographic algorithm identifiers for the "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile" [RFC5280]. This document updates RFC 3279 and defines identifiers for several cryptographic algorithms that use variable-length output SHAKE functions introduced in [SHA3] which can be used with RFC 5280.¶
In the SHA-3 family, two extendable
A SHAKE can be used as the message digest function (to hash the message to be signed) in RSA Probabilistic Signature Scheme (RSASSA-PSS) [RFC8017] and ECDSA [X9.62] and as the hash in the mask generation function (MGF) in RSASSA-PSS.¶
2. Terminology
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.¶
3. Identifiers
This section defines four new object identifiers (OIDs), for RSASSA-PSS and ECDSA with each of SHAKE128 and SHAKE256. The same algorithm identifiers can be used for identifying a public key in RSASSA-PSS.¶
The new identifiers for RSASSA-PSS signatures using SHAKEs are below.¶
The new algorithm identifiers of ECDSA signatures using SHAKEs are below.¶
The parameters for the four identifiers above MUST be absent. That is, the identifier SHALL be a SEQUENCE of one component: the OID.¶
Sections 4.1.1 and 4.1.2 specify the required output length
for each use of SHAKE128 or SHAKE256 in RSASSA-PSS and ECDSA. In summary, when hashing messages
to be signed, output lengths of SHAKE128 and SHAKE256 are 256 and 512 bits, respectively.
When the SHAKEs are used as MGFs in RSASSA-PSS, their output length is
4. Use in PKIX
4.1. Signatures
Signatures are used in a number of different ASN.1 structures.
As shown in the ASN.1 representation from [RFC5280]
below, in an X.509 certificate, a signature is encoded with an
algorithm identifier in the signature
The identifiers defined in Section 3 can be used
as the Algorithm
Conforming Certification Authority (CA) implementations MUST specify the algorithms explicitly by using the OIDs specified in Section 3 when encoding RSASSA-PSS or ECDSA with SHAKE signatures in certificates and CRLs. Conforming client implementations that process certificates and CRLs using RSASSA-PSS or ECDSA with SHAKE MUST recognize the corresponding OIDs. Encoding rules for RSASSA-PSS and ECDSA signature values are specified in [RFC4055] and [RFC5480], respectively.¶
When using RSASSA-PSS or ECDSA with SHAKEs, the RSA modulus and ECDSA curve order SHOULD be chosen in line with the SHAKE output length. Refer to Section 6 for more details.¶
4.1.1. RSASSA-PSS Signatures
The RSASSA-PSS algorithm is defined in [RFC8017].
When id
The hash algorithm to hash a message being signed and the hash algorithm used as the MGF in RSASSA-PSS MUST be the same: both SHAKE128 or both SHAKE256. The output length of the hash algorithm that hashes the message SHALL be 32 bytes (for SHAKE128) or 64 bytes (for SHAKE256).¶
The MGF takes an octet string of variable length and
a desired output length as input and outputs an octet
string of the desired length. In RSASSA-PSS with SHAKEs, the SHAKEs MUST be
used natively as the MGF, instead of the MGF1 algorithm that uses
the hash function in multiple iterations, as specified in
Appendix B.2.1 of [RFC8017]. In other words, the MGF is defined as
the SHAKE128 or SHAKE256 output of the mgfSeed for id
The RSASSA-PSS saltLength MUST be 32 bytes for id
4.1.2. ECDSA Signatures
The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined in
[X9.62]. When the id
For simplicity and compliance with the ECDSA standard specification [X9.62], the output length of the hash function must be explicitly determined. The output length, d, for SHAKE128 or SHAKE256 used in ECDSA MUST be 256 or 512 bits, respectively.¶
Conforming CA implementations that generate ECDSA with SHAKE signatures
in certificates or CRLs SHOULD generate such signatures with a
deterministical
4.2. Public Keys
Certificates conforming to [RFC5280] can convey a public key for any public key algorithm. The certificate indicates the public key algorithm through an algorithm identifier. This algorithm identifier is an OID with optionally associated parameters. The conventions and encoding for RSASSA-PSS and ECDSA public key algorithm identifiers are as specified in Sections 2.3.1 and 2.3.5 of [RFC3279], Section 3.1 of [RFC4055] and Section 2.1 of [RFC5480].¶
Traditionally, the rsaEncryption object identifier is used to
identify RSA public keys. The rsaEncryption object identifier
continues to identify the subject public key when the RSA private
key owner does not wish to limit the use of the public key
exclusively to RSASSA-PSS with SHAKEs. When the RSA private
key owner wishes to limit the use of the public key exclusively
to RSASSA-PSS with SHAKEs, the Algorithm
Conforming CA implementations MUST specify the X.509 public key algorithm explicitly by using the OIDs specified in Section 3 when encoding ECDSA with SHAKE public keys in certificates and CRLs. Conforming client implementations that process ECDSA with SHAKE public keys when processing certificates and CRLs MUST recognize the corresponding OIDs.¶
The identifier parameters, as explained in Section 3, MUST be absent.¶
5. IANA Considerations
One object identifier for the ASN.1 module in Appendix A
has been assigned in the "SMI Security for PKIX Module Identifier"
IANA has updated the
"SMI Security for PKIX Algorithms"
IANA has updated the "Hash Function Textual Names" registry [Hash-Texts] with two additional entries for SHAKE128 and SHAKE256:¶
6. Security Considerations
This document updates [RFC3279]. The Security Considerations section of that document applies to this specification as well.¶
NIST has defined appropriate use of the hash functions in terms of the algorithm strengths and expected time frames for secure use in Special Publications (SPs) [SP800-78-4] and [SP800-107]. These documents can be used as guides to choose appropriate key sizes for various security scenarios.¶
SHAKE128 with output length of 256 bits offers 128 bits of collision and preimage resistance. Thus, SHAKE128 OIDs in this specification are RECOMMENDED with 2048- (112-bit security) or 3072-bit (128-bit security) RSA modulus or curves with group order of 256 bits (128-bit security). SHAKE256 with a 512-bit output length offers 256 bits of collision and preimage resistance. Thus, the SHAKE256 OIDs in this specification are RECOMMENDED with 4096-bit RSA modulus or higher or curves with a group order of at least 512 bits, such as the NIST Curve P-521 (256-bit security). Note that we recommended a 4096-bit RSA because we would need a 15360-bit modulus for 256 bits of security, which is impractical for today's technology.¶
7. References
7.1. Normative References
- [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 - [RFC3279]
-
Bassham, L., Polk, W., and R. Housley, "Algorithms and Identifiers for the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 3279, DOI 10
.17487 , , <https:///RFC3279 www >..rfc -editor .org /info /rfc3279 - [RFC4055]
-
Schaad, J., Kaliski, B., and R. Housley, "Additional Algorithms and Identifiers for RSA Cryptography for use in the Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 4055, DOI 10
.17487 , , <https:///RFC4055 www >..rfc -editor .org /info /rfc4055 - [RFC5280]
-
Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10
.17487 , , <https:///RFC5280 www >..rfc -editor .org /info /rfc5280 - [RFC5480]
-
Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, "Elliptic Curve Cryptography Subject Public Key Information", RFC 5480, DOI 10
.17487 , , <https:///RFC5480 www >..rfc -editor .org /info /rfc5480 - [RFC8017]
-
Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, "PKCS #1: RSA Cryptography Specifications Version 2.2", RFC 8017, DOI 10
.17487 , , <https:///RFC8017 www >..rfc -editor .org /info /rfc8017 - [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 - [SHA3]
-
National Institute of Standards and Technology, "SHA-3 Standard: Permutation
-Based Hash and Extendable , DOI 10-Output Functions" .6028 , FIPS PUB 202, , <https:///NIST .FIPS .202 doi >..org /10 .6028 /NIST .FIPS .202
7.2. Informative References
- [Hash-Texts]
-
IANA, "Hash Function Textual Names", , <https://
www >..iana .org /assignments /hash -function -text -names / - [RFC5912]
-
Hoffman, P. and J. Schaad, "New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, DOI 10
.17487 , , <https:///RFC5912 www >..rfc -editor .org /info /rfc5912 - [RFC6979]
-
Pornin, T., "Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)", RFC 6979, DOI 10
.17487 , , <https:///RFC6979 www >..rfc -editor .org /info /rfc6979 - [SEC1]
-
Standards for Efficient Cryptography Group, "SEC 1: Elliptic Curve Cryptography", , <http://
www >..secg .org /sec1 -v2 .pdf - [SMI-PKIX]
-
IANA, "SMI Security for PKIX Algorithms", , <https://
www >..iana .org /assignments /smi -numbers - [SP800-107]
-
National Institute of Standards and Technology (NIST), "Recommendation for Applications Using Approved Hash Algorithms", DOI 10
.6028 , Revision 1, NIST Special Publication (SP) 800-107, , <http:///NIST .SP .800 -107r1 dx >..doi .org /10 .6028 /NIST .SP .800 -107r1 - [SP800-78-4]
-
National Institute of Standards and Technology (NIST), "Cryptographic Algorithms and Key Sizes for Personal Identity Verification", DOI 10
.6028 , NIST Special Publication (SP) 800-78-4, , <http:///NIST .SP .800 -78 -4 dx >..doi .org /10 .6028 /NIST .SP .800 -78 -4 - [X9.62]
- ANSI, "Public Key Cryptography for the Financial Services Industry: the Elliptic Curve Digital Signature Algorithm (ECDSA)", ANSI X9.62, .
Appendix A. ASN.1 Module
This appendix includes the ASN.1 module for SHAKEs in X.509. This module does not come from any previously existing RFC. This module references [RFC5912].¶
Acknowledgements
We would like to thank Sean Turner, Jim Schaad, and Eric Rescorla for their valuable contributions to this document.¶
The authors would like to thank Russ Housley for his guidance and very valuable contributions with the ASN.1 module.¶