--- 1/draft-ietf-lamps-cms-shakes-12.txt 2019-07-21 21:13:29.297792237 -0700 +++ 2/draft-ietf-lamps-cms-shakes-13.txt 2019-07-21 21:13:29.341793353 -0700 @@ -1,46 +1,46 @@ LAMPS WG P. Kampanakis Internet-Draft Cisco Systems Updates: 3370 (if approved) Q. Dang Intended status: Standards Track NIST -Expires: January 1, 2020 June 30, 2019 +Expires: January 22, 2020 July 21, 2019 Use of the SHAKE One-way Hash Functions in the Cryptographic Message Syntax (CMS) - draft-ietf-lamps-cms-shakes-12 + draft-ietf-lamps-cms-shakes-13 Abstract - This document updates [RFC3370] and describes the conventions for - using the SHAKE family of hash functions with the Cryptographic - Message Syntax (CMS) as one-way hash functions with the RSA - Probabilistic signature and ECDSA signature algorithms, as message - digests and message authentication codes. The conventions for the - associated signer public keys in CMS are also described. + This document updates the "Cryptographic Message Syntax Algorithms" + (RFC3370) and describes the conventions for using the SHAKE family of + hash functions in the Cryptographic Message Syntax as one-way hash + functions with the RSA Probabilistic signature and ECDSA signature + algorithms. The conventions for the associated signer public keys in + CMS are also described. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. 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 January 1, 2020. + This Internet-Draft will expire on January 22, 2020. 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://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents @@ -52,37 +52,44 @@ Table of Contents 1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Use in CMS . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.1. Message Digests . . . . . . . . . . . . . . . . . . . . . 7 4.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 7 - 4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 7 + 4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 8 4.2.2. ECDSA Signatures . . . . . . . . . . . . . . . . . . 8 4.3. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 9 - 4.4. Message Authentication Codes . . . . . . . . . . . . . . 9 + 4.4. Message Authentication Codes . . . . . . . . . . . . . . 10 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 - 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 10 + 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 8.1. Normative References . . . . . . . . . . . . . . . . . . 11 8.2. Informative References . . . . . . . . . . . . . . . . . 12 - Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 13 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 17 + Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 14 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 1. Change Log [ EDNOTE: Remove this section before publication. ] + o draft-ietf-lamps-cms-shake-13: + + * Addressing comments from Dan M.'s secdir review. + + * Addressing comment from Scott B.'s opsdir review about + references in the abstract. + o draft-ietf-lamps-cms-shake-12: * Nits identified by Roman, Barry L. in ballot position review. o draft-ietf-lamps-cms-shake-11: * Minor nits. * Nits identified by Roman in AD Review. @@ -169,39 +176,43 @@ * Various updates to title and section names. * Content changes filling in text and references. o draft-dang-lamps-cms-shakes-hash-00: * Initial version 2. Introduction - The Cryptographic Message Syntax (CMS) [RFC5652] is used to digitally - sign, digest, authenticate, or encrypt arbitrary message contents. - This specification describes the use of the SHAKE128 and SHAKE256 - specified in [SHA3] as new hash functions in CMS. In addition, it - describes the use of these functions with the RSASSA-PSS signature - algorithm [RFC8017] and the Elliptic Curve Digital Signature - Algorithm (ECDSA) [X9.62] with the CMS signed-data content type. + The "Cryptographic Message Syntax (CMS)" [RFC5652] is used to + digitally sign, digest, authenticate, or encrypt arbitrary message + contents. "Cryptographic Message Syntax (CMS) Algorithms" [RFC3370] + defines the use of common cryptographic algorithms with CMS. This + specification updates RFC3370 and describes the use of the SHAKE128 + and SHAKE256 specified in [SHA3] as new hash functions in CMS. In + addition, it describes the use of these functions with the RSASSA-PSS + signature algorithm [RFC8017] and the Elliptic Curve Digital + Signature Algorithm (ECDSA) [X9.62] with the CMS signed-data content + type. In the SHA-3 family, two extendable-output functions (SHAKEs), SHAKE128 and SHAKE256, are defined. Four other hash function instances, SHA3-224, SHA3-256, SHA3-384, and SHA3-512, are also defined but are out of scope for this document. A SHAKE is a variable length hash function defined as SHAKE(M, d) where the output is a d-bits-long digest of message M. The corresponding collision and second-preimage-resistance strengths for SHAKE128 are min(d/2,128) and min(d,128) bits, respectively (Appendix A.1 [SHA3]). And the corresponding collision and second-preimage-resistance strengths for SHAKE256 are min(d/2,256) and min(d,256) bits, - respectively. + respectively. In this specification we use d=256 (for SHAKE128) and + d=512 (for SHAKE256). A SHAKE can be used in CMS as the message digest function (to hash the message to be signed) in RSASSA-PSS and ECDSA, message authentication code and as the mask generation function (MGF) in RSASSA-PSS. This specification describes the identifiers for SHAKEs to be used in CMS and their meaning. 2.1. Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", @@ -285,48 +296,45 @@ required output length for each use of SHAKE128 or SHAKE256 in message digests, RSASSA-PSS, ECDSA and KMAC. 4. Use in CMS 4.1. Message Digests The id-shake128 and id-shake256 OIDs (Section 3) can be used as the digest algorithm identifiers located in the SignedData, SignerInfo, DigestedData, and the AuthenticatedData digestAlgorithm fields in CMS - [RFC5652]. The encoding MUST omit the parameters field and the - output size, d, for the SHAKE128 or SHAKE256 message digest MUST be - 256 or 512 bits, respectively. + [RFC5652]. The OID encoding MUST omit the parameters field and the + output length of SHA256 or SHAKE256 as the message digest MUST be 256 + or 512 bits, respectively. The digest values are located in the DigestedData field and the Message Digest authenticated attribute included in the signedAttributes of the SignedData signerInfo. In addition, digest values are input to signature algorithms. The digest algorithm MUST be the same as the message hash algorithms used in signatures. 4.2. Signatures In CMS, signature algorithm identifiers are located in the SignerInfo signatureAlgorithm field of SignedData content type and countersignature attribute. Signature values are located in the SignerInfo signature field of SignedData content type and countersignature attribute. Conforming implementations that process RSASSA-PSS and ECDSA with SHAKE signatures when processing CMS data MUST recognize the corresponding OIDs specified in Section 3. - When using RSASSA-PSS or ECDSA with SHAKEs, the RSA modulus and ECDSA + When using RSASSA-PSS or ECDSA with SHAKEs, the RSA modulus or ECDSA curve order SHOULD be chosen in line with the SHAKE output length. - In the context of this document SHAKE128 OIDs are RECOMMENDED for - 2048 or 3072-bit RSA modulus or curves with group order of 256-bits. - SHAKE256 OIDs are RECOMMENDED for 4096-bit RSA modulus and higher or - curves with group order of 384-bits and higher. + Refer to Section 6 for more details. 4.2.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 3 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. [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 @@ -368,24 +376,23 @@ The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined in [X9.62]. When the id-ecdsa-with-shake128 or id-ecdsa-with-shake256 (specified in Section 3) algorithm identifier appears, the respective SHAKE function is used as the hash. The encoding MUST omit the parameters field. That is, the AlgorithmIdentifier SHALL be a SEQUENCE of one component, the OID id-ecdsa-with-shake128 or id- ecdsa-with-shake256. For simplicity and compliance with the ECDSA standard specification, - the output size of the hash function must be explicitly determined. - - The output size, d, for SHAKE128 or SHAKE256 used in ECDSA MUST be - 256 or 512 bits, respectively. + the output length of the hash function must be explicitly determined. + The output length 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 deterministically generated, non-random k in accordance with all the requirements specified in [RFC6979]. They MAY also generate such signatures in accordance with all other recommendations in [X9.62] or [SEC1] if they have a stated policy that requires conformance to those standards. Those standards have not specified SHAKE128 and SHAKE256 as hash algorithm options. However, SHAKE128 and SHAKE256 with output length being 32 and 64 octets, respectively @@ -455,20 +462,32 @@ This document updates [RFC3370]. 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 256-bits of 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 512-bits output length + offers 256-bits of collision and 512-bits of preimage resistance. + Thus, the SHAKE256 OIDs in this specification are RECOMMENDED with + 4096-bit RSA modulus or higher or curves with group order of 384-bits + (256-bit security) or higher. Note that we recommended 4096-bit RSA + because we would need 15360-bit modulus for 256-bits of security + which is impractical for today's technology. + When more than two parties share the same message-authentication key, data origin authentication is not provided. Any party that knows the message-authentication key can compute a valid MAC, therefore the content could originate from any one of the parties. 7. Acknowledgements This document is based on Russ Housley's draft [I-D.housley-lamps-cms-sha3-hash]. It replaces SHA3 hash functions by SHAKE128 and SHAKE256 as the LAMPS WG agreed. @@ -531,21 +550,21 @@ [I-D.housley-lamps-cms-sha3-hash] Housley, R., "Use of the SHA3 One-way Hash Functions in the Cryptographic Message Syntax (CMS)", draft-housley- lamps-cms-sha3-hash-00 (work in progress), March 2017. [I-D.ietf-lamps-pkix-shake] Kampanakis, P. and Q. Dang, "Internet X.509 Public Key Infrastructure: Additional Algorithm Identifiers for RSASSA-PSS and ECDSA using SHAKEs", draft-ietf-lamps-pkix- - shake-11 (work in progress), June 2019. + shake-12 (work in progress), June 2019. [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/RFC3279, April 2002, . [RFC5753] Turner, S. and D. Brown, "Use of Elliptic Curve Cryptography (ECC) Algorithms in Cryptographic Message Syntax (CMS)", RFC 5753, DOI 10.17487/RFC5753, January