--- 1/draft-ietf-lamps-pkix-shake-04.txt 2018-11-29 09:13:35.696345415 -0800 +++ 2/draft-ietf-lamps-pkix-shake-05.txt 2018-11-29 09:13:35.732346283 -0800 @@ -1,20 +1,20 @@ LAMPS WG P. Kampanakis Internet-Draft Cisco Systems Intended status: Standards Track Q. Dang -Expires: May 29, 2019 NIST - November 25, 2018 +Expires: June 2, 2019 NIST + November 29, 2018 Internet X.509 Public Key Infrastructure: Additional Algorithm Identifiers for RSASSA-PSS and ECDSA using SHAKEs - draft-ietf-lamps-pkix-shake-04 + draft-ietf-lamps-pkix-shake-05 Abstract Digital signatures are used to sign messages, X.509 certificates and CRLs (Certificate Revocation Lists). This document describes the conventions for using the SHAKE function family in Internet X.509 certificates and CRLs as one-way hash functions with the RSA Probabilistic signature and ECDSA signature algorithms. The conventions for the associated subject public keys are also described. @@ -27,21 +27,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on May 29, 2019. + This Internet-Draft will expire on June 2, 2019. Copyright Notice Copyright (c) 2018 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://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -52,38 +52,46 @@ described in the Simplified BSD License. Table of Contents 1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 4. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 4 5. Use in PKIX . . . . . . . . . . . . . . . . . . . . . . . . . 5 5.1. Signatures . . . . . . . . . . . . . . . . . . . . . . . 5 - 5.1.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 5 + 5.1.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 6 5.1.2. Deterministic ECDSA Signatures . . . . . . . . . . . 6 5.2. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 7 - 5.2.1. RSASSA-PSS Public Keys . . . . . . . . . . . . . . . 7 - 5.2.2. ECDSA Public Keys . . . . . . . . . . . . . . . . . . 8 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 - 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 - 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 9 - 9.1. Normative References . . . . . . . . . . . . . . . . . . 9 - 9.2. Informative References . . . . . . . . . . . . . . . . . 10 + 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 8 + 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 9.1. Normative References . . . . . . . . . . . . . . . . . . 8 + 9.2. Informative References . . . . . . . . . . . . . . . . . 9 Appendix A. ASN.1 module . . . . . . . . . . . . . . . . . . . . 10 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 1. Change Log [ EDNOTE: Remove this section before publication. ] + o draft-ietf-lamps-pkix-shake-05: + + * Added RFC8174 reference and text. + + * Explicitly explained why RSASSA-PSS-params are omitted in + section 5.1.1. + + * Simplified Public Keys section by removing redundand info from + RFCs. + o draft-ietf-lamps-pkix-shake-04: * Removed paragraph suggesting KMAC to be used in generating k in Deterministric ECDSA. That should be RFC6979-bis. * Removed paragraph from Security Considerations that talks about randomness of k because we are using deterministric ECDSA. * Various ASN.1 fixes. @@ -149,46 +157,48 @@ min(d/2,256) and min(d,256) bits respectively. A SHAKE can be used as the message digest function (to hash the message to be signed) in RSASSA-PSS and ECDSA and as the hash in the mask generating function in RSASSA-PSS. This specification describes the identifiers for SHAKEs to be used in X.509 and their meaning. 3. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", - "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this - document are to be interpreted as described in [RFC2119]. + "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. Identifiers This section defines four new OIDs for RSASSA-PSS and ECDSA when SHAKE128 and SHAKE256 are used. The same algorithm identifiers are used for identifying a public key in RSASSA-PSS. The new identifiers for RSASSA-PSS signatures using SHAKEs are below. id-RSASSA-PSS-SHAKE128 OBJECT IDENTIFIER ::= { TBD } id-RSASSA-PSS-SHAKE256 OBJECT IDENTIFIER ::= { TBD } [ EDNOTE: "TBD" will be specified by NIST later. ] The new algorithm identifiers of ECDSA signatures using SHAKEs are below. - id-ecdsa-with-shake128 OBJECT IDENTIFIER ::= { joint-iso-ccitt(2) + id-ecdsa-with-shake128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) algorithms(4) id-ecdsa-with-shake(3) TBD } - id-ecdsa-with-shake256 OBJECT IDENTIFIER ::= { joint-iso-ccitt(2) + id-ecdsa-with-shake256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) organization(1) gov(101) csor(3) algorithms(4) id-ecdsa-with-shake(3) TBD } [ EDNOTE: "TBD" will be specified by NIST later. ] The parameters for the four identifiers above MUST be absent. That is, the identifier SHALL be a SEQUENCE of one component, the OID. Section 5.1.1 and Section 5.1.2 specify the required output length @@ -226,21 +236,25 @@ corresponding OIDs. Encoding rules for RSASSA-PSS and ECDSA signature values are specified in [RFC4055] and [RFC5480] respectively. 5.1.1. RSASSA-PSS Signatures The RSASSA-PSS algorithm is defined in [RFC8017]. When id-RSASSA- PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 specified in Section 4 is used, the encoding MUST omit the parameters field. That is, the AlgorithmIdentifier SHALL be a SEQUENCE of one component, id-RSASSA- - PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256. + PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256. [RFC4055] defines RSASSA- + PSS-params that are used to define the algorithms and inputs to the + algorithm. This specification does not use parameters because the + hash and mask generating algorithsm and trailer and salt are embedded + in the OID definition. The hash algorithm to hash a message being signed and the hash algorithm as the mask generation function used in RSASSA-PSS MUST be the same, SHAKE128 or SHAKE256 respectively. The output-length of the hash algorithm which hashes the message SHALL be 32 or 64 bytes respectively. The mask generation function 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 @@ -283,95 +297,41 @@ [SEC1] if they have a stated policy that requires conformance to these standards. These standards may have not specified SHAKE128 and SHAKE256 as hash algorithm options. However, SHAKE128 and SHAKE256 with output length being 32 and 64 octets respectively are subtitutions for 256 and 512-bit output hash algorithms such as SHA256 and SHA512 used in the standards. 5.2. Public Keys Certificates conforming to [RFC5280] can convey a public key for any - public key algorithm. The certificate indicates the algorithm - through an algorithm identifier. This algorithm identifier is an OID - and optionally associated parameters. - - In the X.509 certificate, the subjectPublicKeyInfo field has the - SubjectPublicKeyInfo type, which has the following ASN.1 syntax: - - SubjectPublicKeyInfo ::= SEQUENCE { - algorithm AlgorithmIdentifier, - subjectPublicKey BIT STRING - } - - The fields in SubjectPublicKeyInfo have the following meanings: - - o algorithm is the algorithm identifier and parameters for the - public key. - - o subjectPublicKey contains the byte stream of the public key. The - algorithms defined in this document always encode the public key - as an exact multiple of 8-bits. - - Conforming CA implementations MUST specify the algorithms explicitly - by using the OIDs specified in Section 4 when encoding RSASSA-PSS or - ECDSA with SHAKE public keys in certificates and CRLs. Conforming - client implementations that process RSASSA-PSS or ECDSA with SHAKE - public key when processing certificates and CRLs MUST recognize the - corresponding OIDs. The conventions for RSASSA-PSS and ECDSA public - keys algorithm identifiers are as specified in [RFC3279], [RFC4055] - and [RFC5480] , but we include them below for convenience. - -5.2.1. RSASSA-PSS Public Keys - - [RFC3279] defines the following OID for RSA AlgorithmIdentifier in - the SubjectPublicKeyInfo with NULL parameters. - - rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1} - - Additionally, when the RSA private key owner wishes to limit the use - of the public key exclusively to RSASSA-PSS, the AlgorithmIdentifiers - for RSASSA-PSS defined in Section 4 can be used as the algorithm - field in the SubjectPublicKeyInfo sequence [RFC5280]. The identifier - parameters, as explained in section Section 4, MUST be absent. - - Regardless of what public key algorithm identifier is used, the RSA - public key, which is composed of a modulus and a public exponent, - MUST be encoded using the RSAPublicKey type [RFC4055]. The output of - this encoding is carried in the certificate subjectPublicKey. - - RSAPublicKey ::= SEQUENCE { - modulus INTEGER, -- n - publicExponent INTEGER -- e - } - -5.2.2. ECDSA Public Keys - - For ECDSA, the public key identifier defined in [RFC5480] is - - id-ecPublicKey OBJECT IDENTIFIER ::= { - iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 } - - Additionally, the mandatory EC SubjectPublicKey is defined in - Section 2.1.1 and its syntax is in Section 2.2 of [RFC5480]. We also - include them here for convenience: - - The id-ecPublicKey parameters MUST be absent or present and are - defined as + public key algorithm. The certificate indicates the public key + algorithm through an algorithm identifier. This algorithm identifier + is an OID and optionally associated parameters. - ECParameters ::= CHOICE { - namedCurve OBJECT IDENTIFIER - -- implicitCurve NULL - -- specifiedCurve SpecifiedECDomain - } + Conforming CA implementations MUST specify the X.509 public key + algorithm explicitly by using the OIDs specified in Section 4 when + encoding RSASSA-PSS or ECDSA with SHAKE public keys in certificates + and CRLs. Conforming client implementations that process RSASSA-PSS + or ECDSA with SHAKE public key when processing certificates and CRLs + MUST recognize the corresponding OIDs. The conventions and encoding + for RSASSA-PSS and ECDSA public keys algorithm identifiers are as + specified in Section 2.3 of [RFC3279], Section 3.1 of [RFC4055] and + Section 2.1 of [RFC5480]. - The ECParameters associated with the ECDSA public key in the signer's - certificate SHALL apply to the verification of the signature. + When the RSA private key owner wishes to limit the use of the public + key exclusively to RSASSA-PSS, the AlgorithmIdentifiers for RSASSA- + PSS defined in Section 4 can be used as the algorithm field in the + SubjectPublicKeyInfo sequence [RFC5280]. The identifier parameters, + as explained in section Section 4, MUST be absent. The RSASSA-PSS + algorithm functions and output lengths are the same as defined in + Section 5.1.1. 6. IANA Considerations [ EDNOTE: Update here only if there are OID allocations by IANA. ] This document has no IANA actions. 7. Security Considerations The SHAKEs are deterministic functions. Like any other deterministic @@ -431,20 +391,24 @@ [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 2013, . [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, "PKCS #1: RSA Cryptography Specifications Version 2.2", RFC 8017, DOI 10.17487/RFC8017, November 2016, . + [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC + 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, + May 2017, . + [SHA3] National Institute of Standards and Technology, "SHA-3 Standard - Permutation-Based Hash and Extendable-Output Functions FIPS PUB 202", August 2015, . 9.2. Informative References [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and Identifiers for the Internet X.509 Public Key