idnits 2.17.1 draft-ietf-lamps-cms-shakes-13.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The draft header indicates that this document updates RFC3370, but the abstract doesn't seem to directly say this. It does mention RFC3370 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year (Using the creation date from RFC3370, updated by this document, for RFC5378 checks: 2001-04-25) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 21, 2019) is 1739 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 8017 -- Possible downref: Non-RFC (?) normative reference: ref. 'SHA3' -- Possible downref: Non-RFC (?) normative reference: ref. 'SP800-185' == Outdated reference: A later version (-02) exists of draft-housley-lamps-cms-sha3-hash-00 == Outdated reference: A later version (-15) exists of draft-ietf-lamps-pkix-shake-12 Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 LAMPS WG P. Kampanakis 3 Internet-Draft Cisco Systems 4 Updates: 3370 (if approved) Q. Dang 5 Intended status: Standards Track NIST 6 Expires: January 22, 2020 July 21, 2019 8 Use of the SHAKE One-way Hash Functions in the Cryptographic Message 9 Syntax (CMS) 10 draft-ietf-lamps-cms-shakes-13 12 Abstract 14 This document updates the "Cryptographic Message Syntax Algorithms" 15 (RFC3370) and describes the conventions for using the SHAKE family of 16 hash functions in the Cryptographic Message Syntax as one-way hash 17 functions with the RSA Probabilistic signature and ECDSA signature 18 algorithms. The conventions for the associated signer public keys in 19 CMS are also described. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on January 22, 2020. 38 Copyright Notice 40 Copyright (c) 2019 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (https://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 57 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 58 3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 5 59 4. Use in CMS . . . . . . . . . . . . . . . . . . . . . . . . . 7 60 4.1. Message Digests . . . . . . . . . . . . . . . . . . . . . 7 61 4.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 7 62 4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 8 63 4.2.2. ECDSA Signatures . . . . . . . . . . . . . . . . . . 8 64 4.3. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 9 65 4.4. Message Authentication Codes . . . . . . . . . . . . . . 10 66 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 67 6. Security Considerations . . . . . . . . . . . . . . . . . . . 10 68 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 69 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 70 8.1. Normative References . . . . . . . . . . . . . . . . . . 11 71 8.2. Informative References . . . . . . . . . . . . . . . . . 12 72 Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 14 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 75 1. Change Log 77 [ EDNOTE: Remove this section before publication. ] 79 o draft-ietf-lamps-cms-shake-13: 81 * Addressing comments from Dan M.'s secdir review. 83 * Addressing comment from Scott B.'s opsdir review about 84 references in the abstract. 86 o draft-ietf-lamps-cms-shake-12: 88 * Nits identified by Roman, Barry L. in ballot position review. 90 o draft-ietf-lamps-cms-shake-11: 92 * Minor nits. 94 * Nits identified by Roman in AD Review. 96 o draft-ietf-lamps-cms-shake-10: 98 * Updated IANA considerations section to request for OID 99 assignments. 101 o draft-ietf-lamps-cms-shake-09: 103 * Fixed minor text nit. 105 * Updates in Sec Considerations section. 107 o draft-ietf-lamps-cms-shake-08: 109 * id-shake128-len and id-shake256-len were replaced with id- 110 sha128 with 32 bytes output length and id-shake256 with 64 111 bytes output length. 113 * Fixed a discrepancy between section 3 and 4.4 about the KMAC 114 OIDs that have parameters as optional. 116 o draft-ietf-lamps-cms-shake-07: 118 * Small nit from Russ while in WGLC. 120 o draft-ietf-lamps-cms-shake-06: 122 * Incorporated Eric's suggestion from WGLC. 124 o draft-ietf-lamps-cms-shake-05: 126 * Added informative references. 128 * Updated ASN.1 so it compiles. 130 * Updated IANA considerations. 132 o draft-ietf-lamps-cms-shake-04: 134 * Added RFC8174 reference and text. 136 * Explicitly explained why RSASSA-PSS-params are omitted in 137 section 4.2.1. 139 * Simplified Public Keys section by removing redundant info from 140 RFCs. 142 o draft-ietf-lamps-cms-shake-03: 144 * Removed paragraph suggesting KMAC to be used in generating k in 145 Deterministic ECDSA. That should be RFC6979-bis. 147 * Removed paragraph from Security Considerations that talks about 148 randomness of k because we are using deterministic ECDSA. 150 * Completed ASN.1 module and fixed KMAC ASN.1 based on Jim's 151 feedback. 153 * Text fixes. 155 o draft-ietf-lamps-cms-shake-02: 157 * Updates based on suggestions and clarifications by Jim. 159 * Started ASN.1 module. 161 o draft-ietf-lamps-cms-shake-01: 163 * Significant reorganization of the sections to simplify the 164 introduction, the new OIDs and their use in CMS. 166 * Added new OIDs for RSASSA-PSS that hardcodes hash, salt and 167 MGF, according the WG consensus. 169 * Updated Public Key section to use the new RSASSA-PSS OIDs and 170 clarify the algorithm identifier usage. 172 * Removed the no longer used SHAKE OIDs from section 3.1. 174 o draft-ietf-lamps-cms-shake-00: 176 * Various updates to title and section names. 178 * Content changes filling in text and references. 180 o draft-dang-lamps-cms-shakes-hash-00: 182 * Initial version 184 2. Introduction 186 The "Cryptographic Message Syntax (CMS)" [RFC5652] is used to 187 digitally sign, digest, authenticate, or encrypt arbitrary message 188 contents. "Cryptographic Message Syntax (CMS) Algorithms" [RFC3370] 189 defines the use of common cryptographic algorithms with CMS. This 190 specification updates RFC3370 and describes the use of the SHAKE128 191 and SHAKE256 specified in [SHA3] as new hash functions in CMS. In 192 addition, it describes the use of these functions with the RSASSA-PSS 193 signature algorithm [RFC8017] and the Elliptic Curve Digital 194 Signature Algorithm (ECDSA) [X9.62] with the CMS signed-data content 195 type. 197 In the SHA-3 family, two extendable-output functions (SHAKEs), 198 SHAKE128 and SHAKE256, are defined. Four other hash function 199 instances, SHA3-224, SHA3-256, SHA3-384, and SHA3-512, are also 200 defined but are out of scope for this document. A SHAKE is a 201 variable length hash function defined as SHAKE(M, d) where the output 202 is a d-bits-long digest of message M. The corresponding collision 203 and second-preimage-resistance strengths for SHAKE128 are 204 min(d/2,128) and min(d,128) bits, respectively (Appendix A.1 [SHA3]). 205 And the corresponding collision and second-preimage-resistance 206 strengths for SHAKE256 are min(d/2,256) and min(d,256) bits, 207 respectively. In this specification we use d=256 (for SHAKE128) and 208 d=512 (for SHAKE256). 210 A SHAKE can be used in CMS as the message digest function (to hash 211 the message to be signed) in RSASSA-PSS and ECDSA, message 212 authentication code and as the mask generation function (MGF) in 213 RSASSA-PSS. This specification describes the identifiers for SHAKEs 214 to be used in CMS and their meaning. 216 2.1. Terminology 218 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 219 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 220 "OPTIONAL" in this document are to be interpreted as described in BCP 221 14 [RFC2119] [RFC8174] when, and only when, they appear in all 222 capitals, as shown here. 224 3. Identifiers 226 This section identifies eight new object identifiers (OIDs) for using 227 SHAKE128 and SHAKE256 in CMS. 229 Two object identifiers for SHAKE128 and SHAKE256 hash functions are 230 defined in [shake-nist-oids] and we include them here for 231 convenience. 233 id-shake128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 234 country(16) us(840) organization(1) gov(101) csor(3) 235 nistAlgorithm(4) 2 11 } 237 id-shake256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 238 country(16) us(840) organization(1) gov(101) csor(3) 239 nistAlgorithm(4) 2 12 } 241 In this specification, when using the id-shake128 or id-shake256 242 algorithm identifiers, the parameters MUST be absent. That is, the 243 identifier SHALL be a SEQUENCE of one component, the OID. 245 [I-D.ietf-lamps-pkix-shake] [ EDNOTE: Update reference with the RFC 246 when it is ready ] defines two identifiers for RSASSA-PSS signatures 247 using SHAKEs which we include here for convenience. 249 id-RSASSA-PSS-SHAKE128 OBJECT IDENTIFIER ::= { iso(1) 250 identified-organization(3) dod(6) internet(1) 251 security(5) mechanisms(5) pkix(7) algorithms(6) 252 TBD1 } 254 id-RSASSA-PSS-SHAKE256 OBJECT IDENTIFIER ::= { iso(1) 255 identified-organization(3) dod(6) internet(1) 256 security(5) mechanisms(5) pkix(7) algorithms(6) 257 TBD2 } 259 The same RSASSA-PSS algorithm identifiers can be used for identifying 260 public keys and signatures. 262 [I-D.ietf-lamps-pkix-shake] [ EDNOTE: Update reference with the RFC 263 when it is ready ] also defines two algorithm identifiers of ECDSA 264 signatures using SHAKEs which we include here for convenience. 266 id-ecdsa-with-shake128 OBJECT IDENTIFIER ::= { iso(1) 267 identified-organization(3) dod(6) internet(1) 268 security(5) mechanisms(5) pkix(7) algorithms(6) 269 TBD3 } 271 id-ecdsa-with-shake256 OBJECT IDENTIFIER ::= { iso(1) 272 identified-organization(3) dod(6) internet(1) 273 security(5) mechanisms(5) pkix(7) algorithms(6) 274 TBD4 } 276 The parameters for the four RSASSA-PSS and ECDSA identifiers MUST be 277 absent. That is, each identifier SHALL be a SEQUENCE of one 278 component, the OID. 280 Two object identifiers for KMACs using SHAKE128 and SHAKE256 as 281 defined in by the National Institute of Standards and Technology 282 (NIST) in [shake-nist-oids] and we include them here for convenience. 284 id-KmacWithSHAKE128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 285 country(16) us(840) organization(1) gov(101) csor(3) 286 nistAlgorithm(4) 2 19 } 288 id-KmacWithSHAKE256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 289 country(16) us(840) organization(1) gov(101) csor(3) 290 nistAlgorithm(4) 2 20 } 292 The parameters for id-KmacWithSHAKE128 and id-KmacWithSHAKE256 are 293 OPTIONAL. 295 Section 4.1, Section 4.2.1, Section 4.2.2 and Section 4.4 specify the 296 required output length for each use of SHAKE128 or SHAKE256 in 297 message digests, RSASSA-PSS, ECDSA and KMAC. 299 4. Use in CMS 301 4.1. Message Digests 303 The id-shake128 and id-shake256 OIDs (Section 3) can be used as the 304 digest algorithm identifiers located in the SignedData, SignerInfo, 305 DigestedData, and the AuthenticatedData digestAlgorithm fields in CMS 306 [RFC5652]. The OID encoding MUST omit the parameters field and the 307 output length of SHA256 or SHAKE256 as the message digest MUST be 256 308 or 512 bits, respectively. 310 The digest values are located in the DigestedData field and the 311 Message Digest authenticated attribute included in the 312 signedAttributes of the SignedData signerInfo. In addition, digest 313 values are input to signature algorithms. The digest algorithm MUST 314 be the same as the message hash algorithms used in signatures. 316 4.2. Signatures 318 In CMS, signature algorithm identifiers are located in the SignerInfo 319 signatureAlgorithm field of SignedData content type and 320 countersignature attribute. Signature values are located in the 321 SignerInfo signature field of SignedData content type and 322 countersignature attribute. 324 Conforming implementations that process RSASSA-PSS and ECDSA with 325 SHAKE signatures when processing CMS data MUST recognize the 326 corresponding OIDs specified in Section 3. 328 When using RSASSA-PSS or ECDSA with SHAKEs, the RSA modulus or ECDSA 329 curve order SHOULD be chosen in line with the SHAKE output length. 330 Refer to Section 6 for more details. 332 4.2.1. RSASSA-PSS Signatures 334 The RSASSA-PSS algorithm is defined in [RFC8017]. When id-RSASSA- 335 PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 specified in Section 3 is 336 used, the encoding MUST omit the parameters field. That is, the 337 AlgorithmIdentifier SHALL be a SEQUENCE of one component, id-RSASSA- 338 PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256. [RFC4055] defines RSASSA- 339 PSS-params that are used to define the algorithms and inputs to the 340 algorithm. This specification does not use parameters because the 341 hash, mask generation algorithm, trailer and salt are embedded in the 342 OID definition. 344 The hash algorithm to hash a message being signed and the hash 345 algorithm as the mask generation function used in RSASSA-PSS MUST be 346 the same: both SHAKE128 or both SHAKE256. The output length of the 347 hash algorithm which hashes the message SHALL be 32 (for SHAKE128) or 348 64 bytes (for SHAKE256). 350 The mask generation function takes an octet string of variable length 351 and a desired output length as input, and outputs an octet string of 352 the desired length. In RSASSA-PSS with SHAKEs, the SHAKEs MUST be 353 used natively as the MGF function, instead of the MGF1 algorithm that 354 uses the hash function in multiple iterations as specified in 355 Section B.2.1 of [RFC8017]. In other words, the MGF is defined as 356 the SHAKE128 or SHAKE256 output of the mgfSeed for id-RSASSA-PSS- 357 SHAKE128 and id-RSASSA-PSS-SHAKE256, respectively. The mgfSeed is 358 the seed from which mask is generated, an octet string [RFC8017]. As 359 explained in Step 9 of section 9.1.1 of [RFC8017], the output length 360 of the MGF is emLen - hLen - 1 bytes. emLen is the maximum message 361 length ceil((n-1)/8), where n is the RSA modulus in bits. hLen is 32 362 and 64-bytes for id-RSASSA-PSS-SHAKE128 and id-RSASSA-PSS-SHAKE256, 363 respectively. Thus when SHAKE is used as the MGF, the SHAKE output 364 length maskLen is (8*emLen - 264) or (8*emLen - 520) bits, 365 respectively. For example, when RSA modulus n is 2048, the output 366 length of SHAKE128 or SHAKE256 as the MGF will be 1784 or 1528-bits 367 when id-RSASSA-PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 is used, 368 respectively. 370 The RSASSA-PSS saltLength MUST be 32 bytes for id-RSASSA-PSS-SHAKE128 371 or 64 bytes for id-RSASSA-PSS-SHAKE256. Finally, the trailerField 372 MUST be 1, which represents the trailer field with hexadecimal value 373 0xBC [RFC8017]. 375 4.2.2. ECDSA Signatures 377 The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined in 378 [X9.62]. When the id-ecdsa-with-shake128 or id-ecdsa-with-shake256 379 (specified in Section 3) algorithm identifier appears, the respective 380 SHAKE function is used as the hash. The encoding MUST omit the 381 parameters field. That is, the AlgorithmIdentifier SHALL be a 382 SEQUENCE of one component, the OID id-ecdsa-with-shake128 or id- 383 ecdsa-with-shake256. 385 For simplicity and compliance with the ECDSA standard specification, 386 the output length of the hash function must be explicitly determined. 387 The output length for SHAKE128 or SHAKE256 used in ECDSA MUST be 256 388 or 512 bits, respectively. 390 Conforming CA implementations that generate ECDSA with SHAKE 391 signatures in certificates or CRLs SHOULD generate such signatures 392 with a deterministically generated, non-random k in accordance with 393 all the requirements specified in [RFC6979]. They MAY also generate 394 such signatures in accordance with all other recommendations in 395 [X9.62] or [SEC1] if they have a stated policy that requires 396 conformance to those standards. Those standards have not specified 397 SHAKE128 and SHAKE256 as hash algorithm options. However, SHAKE128 398 and SHAKE256 with output length being 32 and 64 octets, respectively 399 can be used instead of 256 and 512-bit output hash algorithms such as 400 SHA256 and SHA512. 402 4.3. Public Keys 404 In CMS, the signer's public key algorithm identifiers are located in 405 the OriginatorPublicKey's algorithm attribute. The conventions and 406 encoding for RSASSA-PSS and ECDSA public keys algorithm identifiers 407 are as specified in Section 2.3 of [RFC3279], Section 3.1 of 408 [RFC4055] and Section 2.1 of [RFC5480]. 410 Traditionally, the rsaEncryption object identifier is used to 411 identify RSA public keys. The rsaEncryption object identifier 412 continues to identify the public key when the RSA private key owner 413 does not wish to limit the use of the public key exclusively to 414 RSASSA-PSS with SHAKEs. When the RSA private key owner wishes to 415 limit the use of the public key exclusively to RSASSA-PSS, the 416 AlgorithmIdentifier for RSASSA-PSS defined in Section 3 SHOULD be 417 used as the algorithm attribute in the OriginatorPublicKey sequence. 418 Conforming client implementations that process RSASSA-PSS with SHAKE 419 public keys in CMS message MUST recognize the corresponding OIDs in 420 Section 3. 422 Conforming implementations MUST specify and process the algorithms 423 explicitly by using the OIDs specified in Section 3 when encoding 424 ECDSA with SHAKE public keys in CMS messages. 426 The identifier parameters, as explained in Section 3, MUST be absent. 428 4.4. Message Authentication Codes 430 KMAC message authentication code (KMAC) is specified in [SP800-185]. 431 In CMS, KMAC algorithm identifiers are located in the 432 AuthenticatedData macAlgorithm field. The KMAC values are located in 433 the AuthenticatedData mac field. 435 When the id-KmacWithSHAKE128 or id-KmacWithSHAKE256 OID is used as 436 the MAC algorithm identifier, the parameters field is optional 437 (absent or present). If absent, the SHAKE256 output length used in 438 KMAC is 256 or 512 bits, respectively, and the customization string 439 is an empty string by default. 441 Conforming implementations that process KMACs with the SHAKEs when 442 processing CMS data MUST recognize these identifiers. 444 When calculating the KMAC output, the variable N is 0xD2B282C2, S is 445 an empty string, and L, the integer representing the requested output 446 length in bits, is 256 or 512 for KmacWithSHAKE128 or 447 KmacWithSHAKE256, respectively, in this specification. 449 5. IANA Considerations 451 One object identifier for the ASN.1 module in Appendix A was 452 requested for the SMI Security for S/MIME Module Identifiers 453 (1.2.840.113549.1.9.16.0) registry: 455 +---------+----------------------+--------------------+ 456 | Decimal | Description | References | 457 +---------+----------------------+--------------------+ 458 | TBD | CMSAlgsForSHAKE-2019 | [EDNOTE: THIS RFC] | 459 +---------+----------------------+--------------------+ 461 6. Security Considerations 463 This document updates [RFC3370]. The security considerations section 464 of that document applies to this specification as well. 466 NIST has defined appropriate use of the hash functions in terms of 467 the algorithm strengths and expected time frames for secure use in 468 Special Publications (SPs) [SP800-78-4] and [SP800-107]. These 469 documents can be used as guides to choose appropriate key sizes for 470 various security scenarios. 472 SHAKE128 with output length of 256-bits offers 128-bits of collision 473 and 256-bits of preimage resistance. Thus, SHAKE128 OIDs in this 474 specification are RECOMMENDED with 2048 (112-bit security) or 475 3072-bit (128-bit security) RSA modulus or curves with group order of 476 256-bits (128-bit security). SHAKE256 with 512-bits output length 477 offers 256-bits of collision and 512-bits of preimage resistance. 478 Thus, the SHAKE256 OIDs in this specification are RECOMMENDED with 479 4096-bit RSA modulus or higher or curves with group order of 384-bits 480 (256-bit security) or higher. Note that we recommended 4096-bit RSA 481 because we would need 15360-bit modulus for 256-bits of security 482 which is impractical for today's technology. 484 When more than two parties share the same message-authentication key, 485 data origin authentication is not provided. Any party that knows the 486 message-authentication key can compute a valid MAC, therefore the 487 content could originate from any one of the parties. 489 7. Acknowledgements 491 This document is based on Russ Housley's draft 492 [I-D.housley-lamps-cms-sha3-hash]. It replaces SHA3 hash functions 493 by SHAKE128 and SHAKE256 as the LAMPS WG agreed. 495 The authors would like to thank Russ Housley for his guidance and 496 very valuable contributions with the ASN.1 module. Valuable feedback 497 was also provided by Eric Rescorla. 499 8. References 501 8.1. Normative References 503 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 504 Requirement Levels", BCP 14, RFC 2119, 505 DOI 10.17487/RFC2119, March 1997, 506 . 508 [RFC3370] Housley, R., "Cryptographic Message Syntax (CMS) 509 Algorithms", RFC 3370, DOI 10.17487/RFC3370, August 2002, 510 . 512 [RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional 513 Algorithms and Identifiers for RSA Cryptography for use in 514 the Internet X.509 Public Key Infrastructure Certificate 515 and Certificate Revocation List (CRL) Profile", RFC 4055, 516 DOI 10.17487/RFC4055, June 2005, 517 . 519 [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, 520 "Elliptic Curve Cryptography Subject Public Key 521 Information", RFC 5480, DOI 10.17487/RFC5480, March 2009, 522 . 524 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 525 RFC 5652, DOI 10.17487/RFC5652, September 2009, 526 . 528 [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, 529 "PKCS #1: RSA Cryptography Specifications Version 2.2", 530 RFC 8017, DOI 10.17487/RFC8017, November 2016, 531 . 533 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 534 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 535 May 2017, . 537 [SHA3] National Institute of Standards and Technology, U.S. 538 Department of Commerce, "SHA-3 Standard - Permutation- 539 Based Hash and Extendable-Output Functions", FIPS PUB 202, 540 August 2015. 542 [SP800-185] 543 National Institute of Standards and Technology, "SHA-3 544 Derived Functions: cSHAKE, KMAC, TupleHash and 545 ParallelHash. NIST SP 800-185", December 2016, 546 . 549 8.2. Informative References 551 [I-D.housley-lamps-cms-sha3-hash] 552 Housley, R., "Use of the SHA3 One-way Hash Functions in 553 the Cryptographic Message Syntax (CMS)", draft-housley- 554 lamps-cms-sha3-hash-00 (work in progress), March 2017. 556 [I-D.ietf-lamps-pkix-shake] 557 Kampanakis, P. and Q. Dang, "Internet X.509 Public Key 558 Infrastructure: Additional Algorithm Identifiers for 559 RSASSA-PSS and ECDSA using SHAKEs", draft-ietf-lamps-pkix- 560 shake-12 (work in progress), June 2019. 562 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 563 Identifiers for the Internet X.509 Public Key 564 Infrastructure Certificate and Certificate Revocation List 565 (CRL) Profile", RFC 3279, DOI 10.17487/RFC3279, April 566 2002, . 568 [RFC5753] Turner, S. and D. Brown, "Use of Elliptic Curve 569 Cryptography (ECC) Algorithms in Cryptographic Message 570 Syntax (CMS)", RFC 5753, DOI 10.17487/RFC5753, January 571 2010, . 573 [RFC5911] Hoffman, P. and J. Schaad, "New ASN.1 Modules for 574 Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911, 575 DOI 10.17487/RFC5911, June 2010, 576 . 578 [RFC6268] Schaad, J. and S. Turner, "Additional New ASN.1 Modules 579 for the Cryptographic Message Syntax (CMS) and the Public 580 Key Infrastructure Using X.509 (PKIX)", RFC 6268, 581 DOI 10.17487/RFC6268, July 2011, 582 . 584 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 585 Algorithm (DSA) and Elliptic Curve Digital Signature 586 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 587 2013, . 589 [SEC1] Standards for Efficient Cryptography Group, "SEC 1: 590 Elliptic Curve Cryptography", May 2009, 591 . 593 [shake-nist-oids] 594 National Institute of Standards and Technology, "Computer 595 Security Objects Register", October 2017, 596 . 599 [SP800-107] 600 National Institute of Standards and Technology (NIST), 601 "SP800-107: Recommendation for Applications Using Approved 602 Hash Algorithms", May 2014, 603 . 606 [SP800-78-4] 607 National Institute of Standards and Technology (NIST), 608 "SP800-78-4: Cryptographic Algorithms and Key Sizes for 609 Personal Identity Verification", May 2014, 610 . 613 [X9.62] American National Standard for Financial Services (ANSI), 614 "X9.62-2005 Public Key Cryptography for the Financial 615 Services Industry: The Elliptic Curve Digital Signature 616 Standard (ECDSA)", November 2005. 618 Appendix A. ASN.1 Module 620 This appendix includes the ASN.1 modules for SHAKEs in CMS. This 621 module includes some ASN.1 from other standards for reference. 623 CMSAlgsForSHAKE-2019 { iso(1) member-body(2) us(840) 624 rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) 625 id-mod-cms-shakes-2019(TBD) } 627 DEFINITIONS EXPLICIT TAGS ::= 629 BEGIN 631 -- EXPORTS ALL; 633 IMPORTS 635 DIGEST-ALGORITHM, MAC-ALGORITHM, SMIME-CAPS 636 FROM AlgorithmInformation-2009 637 { iso(1) identified-organization(3) dod(6) internet(1) security(5) 638 mechanisms(5) pkix(7) id-mod(0) 639 id-mod-algorithmInformation-02(58) } 641 RSAPublicKey, rsaEncryption, id-ecPublicKey 642 FROM PKIXAlgs-2009 { iso(1) identified-organization(3) dod(6) 643 internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) 644 id-mod-pkix1-algorithms2008-02(56) } ; 646 -- 647 -- Message Digest Algorithms (mda-) 648 -- used in SignedData, SignerInfo, DigestedData, 649 -- and the AuthenticatedData digestAlgorithm 650 -- fields in CMS 651 -- 652 MessageDigestAlgs DIGEST-ALGORITHM ::= { 653 -- This expands MessageAuthAlgs from [RFC5652] 654 -- and MessageDigestAlgs in [RFC5753] 655 mda-shake128 | 656 mda-shake256, 657 ... 658 } 660 -- 661 -- One-Way Hash Functions 662 -- SHAKE128 663 mda-shake128 DIGEST-ALGORITHM ::= { 664 IDENTIFIER id-shake128 -- with output length 32 bytes. 665 } 666 id-shake128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) 667 us(840) organization(1) gov(101) 668 csor(3) nistAlgorithm(4) 669 hashAlgs(2) 11 } 671 -- SHAKE256 672 mda-shake256 DIGEST-ALGORITHM ::= { 673 IDENTIFIER id-shake256 -- with output length 64 bytes. 674 } 675 id-shake256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) 676 us(840) organization(1) gov(101) 677 csor(3) nistAlgorithm(4) 678 hashAlgs(2) 12 } 680 -- 681 -- Public key algorithm identifiers located in the 682 -- OriginatorPublicKey's algorithm attribute in CMS. 683 -- And Signature identifiers used in SignerInfo 684 -- signatureAlgorithm field of SignedData content 685 -- type and countersignature attribute in CMS. 686 -- 687 -- From RFC5280, for reference. 688 -- rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } 689 -- When the rsaEncryption algorithm identifier is used 690 -- for a public key, the AlgorithmIdentifier parameters 691 -- field MUST contain NULL. 692 -- 693 id-RSASSA-PSS-SHAKE128 OBJECT IDENTIFIER ::= { iso(1) 694 identified-organization(3) dod(6) internet(1) 695 security(5) mechanisms(5) pkix(7) algorithms(6) 696 TBD1 } 697 id-RSASSA-PSS-SHAKE256 OBJECT IDENTIFIER ::= { iso(1) 698 identified-organization(3) dod(6) internet(1) 699 security(5) mechanisms(5) pkix(7) algorithms(6) 700 TBD2 } 701 -- When the id-RSASSA-PSS-* algorithm identifiers are used 702 -- for a public key or signature in CMS, the AlgorithmIdentifier 703 -- parameters field MUST be absent. The message digest algorithm 704 -- used in RSASSA-PSS MUST be SHAKE128 or SHAKE256 with a 32 or 705 -- 64 byte outout length, respectively. The mask generation 706 -- function MUST be SHAKE128 or SHAKE256 with an output length 707 -- of (8*ceil((n-1)/8) - 264) or (8*ceil((n-1)/8) - 520) bits, 708 -- respectively, where n is the RSA modulus in bits. 709 -- The RSASSA-PSS saltLength MUST be 32 or 64 bytes, respectively. 710 -- The trailerField MUST be 1, which represents the trailer 711 -- field with hexadecimal value 0xBC. Regardless of 712 -- id-RSASSA-PSS-* or rsaEncryption being used as the 713 -- AlgorithmIdentifier of the OriginatorPublicKey, the RSA 714 -- public key MUST be encoded using the RSAPublicKey type. 716 -- From RFC4055, for reference. 717 -- RSAPublicKey ::= SEQUENCE { 718 -- modulus INTEGER, -- -- n 719 -- publicExponent INTEGER } -- -- e 721 id-ecdsa-with-shake128 OBJECT IDENTIFIER ::= { iso(1) 722 identified-organization(3) dod(6) internet(1) 723 security(5) mechanisms(5) pkix(7) algorithms(6) 724 TBD3 } 725 id-ecdsa-with-shake256 OBJECT IDENTIFIER ::= { iso(1) 726 identified-organization(3) dod(6) internet(1) 727 security(5) mechanisms(5) pkix(7) algorithms(6) 728 TBD4 } 729 -- When the id-ecdsa-with-shake* algorithm identifiers are 730 -- used in CMS, the AlgorithmIdentifier parameters field 731 -- MUST be absent and the signature algorithm should be 732 -- deterministic ECDSA [RFC6979]. The message digest MUST 733 -- be SHAKE128 or SHAKE256 with a 32 or 64 byte outout 734 -- length, respectively. In both cases, the ECDSA public key, 735 -- MUST be encoded using the id-ecPublicKey type. 737 -- From RFC5480, for reference. 738 -- id-ecPublicKey OBJECT IDENTIFIER ::= { 739 -- iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 } 740 -- The id-ecPublicKey parameters must be absent or present 741 -- and are defined as 742 -- ECParameters ::= CHOICE { 743 -- namedCurve OBJECT IDENTIFIER 744 -- -- -- implicitCurve NULL 745 -- -- -- specifiedCurve SpecifiedECDomain 746 -- } 748 -- 749 -- Message Authentication (maca-) Algorithms 750 -- used in AuthenticatedData macAlgorithm in CMS 751 -- 752 MessageAuthAlgs MAC-ALGORITHM ::= { 753 -- This expands MessageAuthAlgs from [RFC5652] and [RFC6268] 754 maca-KMACwithSHAKE128 | 755 maca-KMACwithSHAKE256, 756 ... 757 } 759 SMimeCaps SMIME-CAPS ::= { 760 -- The expands SMimeCaps from [RFC5911] 761 maca-KMACwithSHAKE128.&smimeCaps | 762 maca-KMACwithSHAKE256.&smimeCaps, 763 ... 764 } 766 -- 767 -- KMAC with SHAKE128 768 maca-KMACwithSHAKE128 MAC-ALGORITHM ::= { 769 IDENTIFIER id-KMACWithSHAKE128 770 PARAMS TYPE KMACwithSHAKE128-params ARE optional 771 -- If KMACwithSHAKE128-params parameters are absent 772 -- the SHAKE128 output length used in KMAC is 256 bits 773 -- and the customization string is an empty string. 774 IS-KEYED-MAC TRUE 775 SMIME-CAPS {IDENTIFIED BY id-KMACWithSHAKE128} 776 } 777 id-KMACWithSHAKE128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 778 country(16) us(840) organization(1) 779 gov(101) csor(3) nistAlgorithm(4) 780 hashAlgs(2) 19 } 781 KMACwithSHAKE128-params ::= SEQUENCE { 782 kMACOutputLength INTEGER DEFAULT 256, -- Output length in bits 783 customizationString OCTET STRING DEFAULT ''H 784 } 786 -- KMAC with SHAKE256 787 maca-KMACwithSHAKE256 MAC-ALGORITHM ::= { 788 IDENTIFIER id-KMACWithSHAKE256 789 PARAMS TYPE KMACwithSHAKE256-params ARE optional 790 -- If KMACwithSHAKE256-params parameters are absent 791 -- the SHAKE256 output length used in KMAC is 512 bits 792 -- and the customization string is an empty string. 793 IS-KEYED-MAC TRUE 794 SMIME-CAPS {IDENTIFIED BY id-KMACWithSHAKE256} 795 } 796 id-KMACWithSHAKE256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 797 country(16) us(840) organization(1) 798 gov(101) csor(3) nistAlgorithm(4) 799 hashAlgs(2) 20 } 800 KMACwithSHAKE256-params ::= SEQUENCE { 801 kMACOutputLength INTEGER DEFAULT 512, -- Output length in bits 802 customizationString OCTET STRING DEFAULT ''H 803 } 805 END 807 Authors' Addresses 809 Panos Kampanakis 810 Cisco Systems 812 Email: pkampana@cisco.com 814 Quynh Dang 815 NIST 816 100 Bureau Drive 817 Gaithersburg, MD 20899 819 Email: quynh.Dang@nist.gov