idnits 2.17.1 draft-ietf-lamps-cms-shakes-03.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (November 25, 2018) is 1978 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) == Missing Reference: 'RFC5753' is mentioned on line 541, but not defined == Missing Reference: 'RFC6268' is mentioned on line 629, but not defined == Missing Reference: 'RFC5911' is mentioned on line 636, but not defined ** 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 Summary: 1 error (**), 0 flaws (~~), 5 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 LAMPS WG Q. Dang 3 Internet-Draft NIST 4 Intended status: Standards Track P. Kampanakis 5 Expires: May 29, 2019 Cisco Systems 6 November 25, 2018 8 Use of the SHAKE One-way Hash Functions in the Cryptographic Message 9 Syntax (CMS) 10 draft-ietf-lamps-cms-shakes-03 12 Abstract 14 This document describes the conventions for using the SHAKE family of 15 hash functions with the Cryptographic Message Syntax (CMS) as one-way 16 hash functions with the RSA Probabilistic signature and ECDSA 17 signature algorithms, as message digests and message authentication 18 codes. The conventions for the associated signer public keys in CMS 19 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 May 29, 2019. 38 Copyright Notice 40 Copyright (c) 2018 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 . . . . . . . . . . . . . . . . . . . . . . . . 3 57 2.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 58 3. Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 4. Use in CMS . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 4.1. Message Digests . . . . . . . . . . . . . . . . . . . . . 5 61 4.2. Signatures . . . . . . . . . . . . . . . . . . . . . . . 6 62 4.2.1. RSASSA-PSS Signatures . . . . . . . . . . . . . . . . 6 63 4.2.2. Deterministic ECDSA Signatures . . . . . . . . . . . 7 64 4.3. Public Keys . . . . . . . . . . . . . . . . . . . . . . . 7 65 4.3.1. RSASSA-PSS Public Keys . . . . . . . . . . . . . . . 7 66 4.3.2. ECDSA Public Keys . . . . . . . . . . . . . . . . . . 8 67 4.4. Message Authentication Codes . . . . . . . . . . . . . . 8 68 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 69 6. Security Considerations . . . . . . . . . . . . . . . . . . . 9 70 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 71 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 72 8.1. Normative References . . . . . . . . . . . . . . . . . . 10 73 8.2. Informative References . . . . . . . . . . . . . . . . . 10 74 Appendix A. ASN.1 Module . . . . . . . . . . . . . . . . . . . . 11 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15 77 1. Change Log 79 [ EDNOTE: Remove this section before publication. ] 81 o draft-ietf-lamps-cms-shake-03: 83 * Removed paragraph suggesting KMAC to be used in generating k in 84 Deterministric ECDSA. That should be RFC6979-bis. 86 * Removed paragraph from Security Considerations that talks about 87 randomness of k because we are using deterministric ECDSA. 89 * Completed ASN.1 module and fixed KMAC ASN.1 based on Jim's 90 feedback. 92 * Text fixes. 94 o draft-ietf-lamps-cms-shake-02: 96 * Updates based on suggestions and clarifications by Jim. 98 * Started ASN.1 module. 100 o draft-ietf-lamps-cms-shake-01: 102 * Significant reorganization of the sections to simplify the 103 introduction, the new OIDs and their use in CMS. 105 * Added new OIDs for RSASSA-PSS that hardcodes hash, salt and 106 MGF, according the WG consensus. 108 * Updated Public Key section to use the new RSASSA-PSS OIDs and 109 clarify the algorithm identifier usage. 111 * Removed the no longer used SHAKE OIDs from section 3.1. 113 o draft-ietf-lamps-cms-shake-00: 115 * Various updates to title and section names. 117 * Content changes filling in text and references. 119 o draft-dang-lamps-cms-shakes-hash-00: 121 * Initial version 123 2. Introduction 125 The Cryptographic Message Syntax (CMS) [RFC5652] is used to digitally 126 sign, digest, authenticate, or encrypt arbitrary message contents. 127 This specification describes the use of the SHAKE128 and SHAKE256 128 specified in [SHA3] as new hash functions in CMS. In addition, it 129 describes the use of these functions with the RSASSA-PSS signature 130 algorithm [RFC8017] and the Elliptic Curve Digital Signature 131 Algorithm (ECDSA) [X9.62] with the CMS signed-data content type. 133 In the SHA-3 family, two extendable-output functions (SHAKEs), 134 SHAKE128 and SHAKE256, are defined. Four other hash function 135 instances, SHA3-224, SHA3-256, SHA3-384, and SHA3-512 are also 136 defined but are out of scope for this document. A SHAKE is a 137 variable length hash function. The output length, in bits, of a 138 SHAKE is defined by the d parameter. The corresponding collision and 139 second preimage resistance strengths for SHAKE128 are min(d/2,128) 140 and min(d,128) bits respectively. And, the corresponding collision 141 and second preimage resistance strengths for SHAKE256 are 142 min(d/2,256) and min(d,256) bits respectively. 144 A SHAKE can be used in CMS as the message digest function (to hash 145 the message to be signed) in RSASSA-PSS and deterministic ECDSA, 146 message authentication code and as the mask generating function in 147 RSASSA-PSS. This specification describes the identifiers for SHAKEs 148 to be used in CMS and their meaning. 150 2.1. Terminology 152 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 153 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 154 document are to be interpreted as described in [RFC2119]. 156 3. Identifiers 158 This section defines six new OIDs for using SHAKE128 and SHAKE256 in 159 CMS. 161 EDNOTE: If PKIX draft is standardized first maybe we should not say 162 the identifiers are new for the RSASSA-PSS and ECDSA. 164 Two object identifiers for SHAKE128 and SHAKE256 hash functions are 165 defined in [shake-nist-oids] and we include them here for 166 convenience. 168 id-shake128-len OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 169 country(16) us(840) organization(1) gov(101) csor(3) 170 nistAlgorithm(4) 2 17 } 172 id-shake256-len OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 173 country(16) us(840) organization(1) gov(101) csor(3) 174 nistAlgorithm(4) 2 18 } 176 In this specification, when using the id-shake128-len or id- 177 shake256-len algorithm identifiers, the parameters MUST be absent. 178 That is, the identifier SHALL be a SEQUENCE of one component, the 179 OID. 181 We define two new identifiers for RSASSA-PSS signatures using SHAKEs. 183 id-RSASSA-PSS-SHAKE128 OBJECT IDENTIFIER ::= { TBD } 185 id-RSASSA-PSS-SHAKE256 OBJECT IDENTIFIER ::= { TBD } 187 [ EDNOTE: "TBD" will be specified by NIST later. ] 189 The same RSASSA-PSS algorithm identifiers can be used for identifying 190 public keys and signatures. 192 We define two new algorithm identifiers of ECDSA signatures using 193 SHAKEs. 195 id-ecdsa-with-SHAKE128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 196 country(16) us(840) organization(1) gov(101) csor(3) 197 nistAlgorithm(4) 3 TBD } 199 id-ecdsa-with-SHAKE256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 200 country(16) us(840) organization(1) gov(101) csor(3) 201 nistAlgorithm(4) 3 TBD } 203 [ EDNOTE: "TBD" will be specified by NIST. ] 205 The parameters for the four RSASSA-PSS and deterministic ECDSA 206 identifiers MUST be absent. That is, each identifier SHALL be a 207 SEQUENCE of one component, the OID. 209 Two new object identifiers for KMACs using SHAKE128 and SHAKE256 are 210 define elow. 212 id-KmacWithSHAKE128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 213 country(16) us(840) organization(1) gov(101) csor(3) 214 nistAlgorithm(4) 2 19 } 216 id-KmacWithSHAKE256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 217 country(16) us(840) organization(1) gov(101) csor(3) 218 nistAlgorithm(4) 2 20 } 220 The parameters for id-KmacWithSHAKE128 and id-KmacWithSHAKE256 MUST 221 be absent. That is, each identifier SHALL be a SEQUENCE of one 222 component, the OID. 224 Section 4.1, Section 4.2.1, Section 4.2.2 and Section 4.4 specify the 225 required output length for each use of SHAKE128 or SHAKE256 in 226 message digests, RSASSA-PSS, determinstic ECDSA and KMAC. 228 4. Use in CMS 230 4.1. Message Digests 232 The id-shake128-len and id-shake256-len OIDs (Section 3) can be used 233 as the digest algorithm identifiers located in the SignedData, 234 SignerInfo, DigestedData, and the AuthenticatedData digestAlgorithm 235 fields in CMS [RFC5652]. The encoding MUST omit the parameters field 236 and the output size, d, for the SHAKE128 or SHAKE256 message digest 237 MUST be 256 or 512 bits respectively. 239 The digest values are located in the DigestedData field and the 240 Message Digest authenticated attribute included in the 241 signedAttributes of the SignedData signerInfo. In addition, digest 242 values are input to signature algorithms. The digest algorithm MUST 243 be the same as the message hash algorithms used in signatures. 245 4.2. Signatures 247 In CMS, signature algorithm identifiers are located in the SignerInfo 248 signatureAlgorithm field of SignedData content type and 249 countersignature attribute. Signature values are located in the 250 SignerInfo signature field of SignedData and countersignature. 252 Conforming implementations that process RSASSA-PSS and deterministic 253 ECDSA with SHAKE signatures when processing CMS data MUST recognize 254 the corresponding OIDs specified in Section 3. 256 4.2.1. RSASSA-PSS Signatures 258 The RSASSA-PSS algorithm is defined in [RFC8017]. When id-RSASSA- 259 PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 specified in Section 3 is 260 used, the encoding MUST omit the parameters field. That is, the 261 AlgorithmIdentifier SHALL be a SEQUENCE of one component, id-RSASSA- 262 PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256. 264 The hash algorithm to hash a message being signed and the hash and 265 the hash algorithm as the mask generation function used in RSASSA-PSS 266 MUST be the same, SHAKE128 or SHAKE256 respectively. The output- 267 length of the hash algorithm which hashes the message SHALL be 32 or 268 64 bytes respectively. 270 The mask generation function takes an octet string of variable length 271 and a desired output length as input, and outputs an octet string of 272 the desired length. In RSASSA-PSS with SHAKES, the SHAKEs MUST be 273 used natively as the MGF function, instead of the MGF1 algorithm that 274 uses the hash function in multiple iterations as specified in 275 Section B.2.1 of [RFC8017]. In other words, the MGF is defined as 276 the SHAKE128 or SHAKE256 output of the mgfSeed for id-RSASSA-PSS- 277 SHAKE128 and id-RSASSA-PSS-SHAKE256 respectively. The mgfSeed is the 278 seed from which mask is generated, an octet string [RFC8017]. The 279 output length is (n - 264)/8 or (n - 520)/8 bytes respectively, where 280 n is the RSA modulus in bits. For example, when RSA modulus n is 281 2048, the output length of SHAKE128 or SHAKE256 as the MGF will be 282 223 or 191-bits when id-RSASSA-PSS-SHAKE128 or id-RSASSA-PSS-SHAKE256 283 is used respectively. 285 The RSASSA-PSS saltLength MUST be 32 or 64 bytes respectively. 286 Finally, the trailerField MUST be 1, which represents the trailer 287 field with hexadecimal value 0xBC [RFC8017]. 289 4.2.2. Deterministic ECDSA Signatures 291 The Elliptic Curve Digital Signature Algorithm (ECDSA) is defined in 292 [X9.62]. When the id-ecdsa-with-SHAKE128 or id-ecdsa-with-SHAKE256 293 (specified in Section 3) algorithm identifier appears, the respective 294 SHAKE function is used as the hash. The encoding MUST omit the 295 parameters field. That is, the AlgorithmIdentifier SHALL be a 296 SEQUENCE of one component, the OID id-ecdsa-with-SHAKE128 or id- 297 ecdsa-with-SHAKE256. 299 For simplicity and compliance with the ECDSA standard specification, 300 the output size of the hash function must be explicitly determined. 301 The output size, d, for SHAKE128 or SHAKE256 used in ECDSA MUST be 302 256 or 512 bits respectively. 304 Conforming implementations that generate ECDSA with SHAKE signatures 305 in CMS MUST generate such signatures with a deterministicly 306 generated, non-random k in accordance with all the requirements 307 specified in [RFC6979]. They MAY also generate such signatures in 308 accordance with all other recommendations in [X9.62] or [SEC1] if 309 they have a stated policy that requires conformance to these 310 standards. 312 4.3. Public Keys 314 In CMS, the signer's public key algorithm identifiers are located in 315 the OriginatorPublicKey's algorithm attribute. 317 Conforming implementations MUST specify the algorithms explicitly by 318 using the OIDs specified in Section 3 when encoding RSASSA-PSS and 319 ECDSA with SHAKE public keys in CMS messages. The conventions for 320 RSASSA-PSS and ECDSA public keys algorithm identifiers are as 321 specified in [RFC3279], [RFC4055] and [RFC5480] , but we include them 322 below for convenience. 324 4.3.1. RSASSA-PSS Public Keys 326 [RFC3279] defines the following OID for RSA AlgorithmIdentifier in 327 the SubjectPublicKeyInfo with NULL parameters. 329 rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1} 331 Additionally, when the RSA private key owner wishes to limit the use 332 of the public key exclusively to RSASSA-PSS, the AlgorithmIdentifier 333 for RSASSA-PSS defined in Section 3 can be used as the algorithm 334 attribute in the OriginatorPublicKey sequence. The identifier 335 parameters, as explained in Section 3, MUST be absent. The RSASSA- 336 PSS algorithm functions and output lengths are the same as defined in 337 Section 4.2.1. 339 Regardless of what public key algorithm identifier is used, the RSA 340 public key, which is composed of a modulus and a public exponent, 341 MUST be encoded using the RSAPublicKey type [RFC4055]. The output of 342 this encoding is carried in the CMS publicKey bit string. 344 RSAPublicKey ::= SEQUENCE { 345 modulus INTEGER, -- n 346 publicExponent INTEGER -- e 347 } 349 4.3.2. ECDSA Public Keys 351 For ECDSA, the mandatory EC SubjectPublicKey is defined in 352 Section 2.1.1 and its syntax in Section 2.2 of [RFC5480]. We also 353 include them here for convenience: 355 id-ecPublicKey OBJECT IDENTIFIER ::= { 356 iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 } 358 ECParameters ::= CHOICE { 359 namedCurve OBJECT IDENTIFIER 360 -- implicitCurve NULL 361 -- specifiedCurve SpecifiedECDomain 362 } 364 The ECParameters associated with the ECDSA public key in the signers 365 certificate SHALL apply to the verification of the signature. 367 4.4. Message Authentication Codes 369 KMAC message authentication code (KMAC) is specified in [SP800-185]. 370 In CMS, KMAC algorithm identifiers are located in the 371 AuthenticatedData macAlgorithm field. The KMAC values are located in 372 the AuthenticatedData mac field. 374 When the id-KmacWithSHAKE128 or id-KmacWithSHAKE256 algorithm 375 identifier is used as the MAC algorithm identifier, the parameters 376 field is optional (absent or present). If absent, the SHAKE256 377 output length used in KMAC is 256 or 512 bits respectively and the 378 customization string is an empty string by default. 380 Conforming implementations that process KMACs with the SHAKEs when 381 processing CMS data MUST recognize these identifiers. 383 When calculating the KMAC output, the variable N is 0xD2B282C2, S is 384 an empty string, and L, the integer representing the requested output 385 length in bits, is 256 or 512 for KmacWithSHAKE128 or 386 KmacWithSHAKE256 respectively in this specification. 388 5. IANA Considerations 390 [ EDNOTE: Update here only if there are OID allocations by IANA. ] 392 This document has no IANA actions. 394 6. Security Considerations 396 The SHAKEs are deterministic functions. Like any other deterministic 397 function, executing each function with the same input multiple times 398 will produce the same output. Therefore, users should not expect 399 unrelated outputs (with the same or different output lengths) from 400 excuting a SHAKE function with the same input multiple times. The 401 shorter one of any 2 outputs produced from a SHAKE with the same 402 input is a prefix of the longer one. It is a similar situation as 403 truncating a 512-bit output of SHA-512 by taking its 256 left-most 404 bits. These 256 left-most bits are a prefix of the 512-bit output. 406 Implementations must protect the signer's private key. Compromise of 407 the signer's private key permits masquerade. 409 When more than two parties share the same message-authentication key, 410 data origin authentication is not provided. Any party that knows the 411 message-authentication key can compute a valid MAC, therefore the 412 content could originate from any one of the parties. 414 Implementers should be aware that cryptographic algorithms may become 415 weaker with time. As new cryptanalysis techniques are developed and 416 computing power increases, the work factor or time required to break 417 a particular cryptographic algorithm may decrease. Therefore, 418 cryptographic algorithm implementations should be modular allowing 419 new algorithms to be readily inserted. That is, implementers should 420 be prepared to regularly update the set of algorithms in their 421 implementations. 423 7. Acknowledgements 425 This document is based on Russ Housley's draft 426 [I-D.housley-lamps-cms-sha3-hash] It replaces SHA3 hash functions by 427 SHAKE128 and SHAKE256 as the LAMPS WG agreed. 429 8. References 431 8.1. Normative References 433 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 434 Requirement Levels", BCP 14, RFC 2119, 435 DOI 10.17487/RFC2119, March 1997, 436 . 438 [RFC4055] Schaad, J., Kaliski, B., and R. Housley, "Additional 439 Algorithms and Identifiers for RSA Cryptography for use in 440 the Internet X.509 Public Key Infrastructure Certificate 441 and Certificate Revocation List (CRL) Profile", RFC 4055, 442 DOI 10.17487/RFC4055, June 2005, 443 . 445 [RFC5480] Turner, S., Brown, D., Yiu, K., Housley, R., and T. Polk, 446 "Elliptic Curve Cryptography Subject Public Key 447 Information", RFC 5480, DOI 10.17487/RFC5480, March 2009, 448 . 450 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 451 RFC 5652, DOI 10.17487/RFC5652, September 2009, 452 . 454 [RFC8017] Moriarty, K., Ed., Kaliski, B., Jonsson, J., and A. Rusch, 455 "PKCS #1: RSA Cryptography Specifications Version 2.2", 456 RFC 8017, DOI 10.17487/RFC8017, November 2016, 457 . 459 [SHA3] National Institute of Standards and Technology, U.S. 460 Department of Commerce, "SHA-3 Standard - Permutation- 461 Based Hash and Extendable-Output Functions", FIPS PUB 202, 462 August 2015. 464 [SP800-185] 465 National Institute of Standards and Technology, "SHA-3 466 Derived Functions: cSHAKE, KMAC, TupleHash and 467 ParallelHash. NIST SP 800-185", December 2016, 468 . 471 8.2. Informative References 473 [I-D.housley-lamps-cms-sha3-hash] 474 Housley, R., "Use of the SHA3 One-way Hash Functions in 475 the Cryptographic Message Syntax (CMS)", draft-housley- 476 lamps-cms-sha3-hash-00 (work in progress), March 2017. 478 [RFC3279] Bassham, L., Polk, W., and R. Housley, "Algorithms and 479 Identifiers for the Internet X.509 Public Key 480 Infrastructure Certificate and Certificate Revocation List 481 (CRL) Profile", RFC 3279, DOI 10.17487/RFC3279, April 482 2002, . 484 [RFC6979] Pornin, T., "Deterministic Usage of the Digital Signature 485 Algorithm (DSA) and Elliptic Curve Digital Signature 486 Algorithm (ECDSA)", RFC 6979, DOI 10.17487/RFC6979, August 487 2013, . 489 [SEC1] Standards for Efficient Cryptography Group, "SEC 1: 490 Elliptic Curve Cryptography", May 2009, 491 . 493 [shake-nist-oids] 494 National Institute of Standards and Technology, "Computer 495 Security Objects Register", October 2017, 496 . 499 [X9.62] American National Standard for Financial Services (ANSI), 500 "X9.62-2005 Public Key Cryptography for the Financial 501 Services Industry: The Elliptic Curve Digital Signature 502 Standard (ECDSA)", November 2005. 504 Appendix A. ASN.1 Module 506 This appendix includes the ASN.1 modules for SHAKEs in CMS. This 507 module includes some ASN.1 from other standards for reference. 509 CMSAlgsForSHAKE-2018 { { iso(1) member-body(2) us(840) 510 rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) 511 id-mod-cms-shakes(TBD) } 513 DEFINITIONS EXPLICIT TAGS ::= 515 BEGIN 517 -- EXPORTS ALL; 519 IMPORTS 521 DIGEST-ALGORITHM, MAC-ALGORITHM, SMIME-CAPS 522 FROM AlgorithmInformation-2009 523 { iso(1) identified-organization(3) dod(6) internet(1) security(5) 524 mechanisms(5) pkix(7) id-mod(0) 525 id-mod-algorithmInformation-02(58) } 527 RSAPublicKey, rsaEncryption, id-ecPublicKey 528 FROM PKIXAlgs-2009 { iso(1) identified-organization(3) dod(6) 529 internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) 530 id-mod-pkix1-algorithms2008-02(56) } 532 -- 533 -- Message Digest Algorithms (mda-) 534 -- used in SignedData, SignerInfo, DigestedData, 535 -- and the AuthenticatedData digestAlgorithm 536 -- fields in CMS 537 -- 538 digestAlgorithms DIGEST-ALGORITHM ::= { 539 ... 540 -- This expands MessageAuthAlgs from [RFC5652] 541 -- and MessageDigestAlgs in [RFC5753] 542 mda-shake128 | 543 mda-shake256, 544 ... 545 } 547 -- 548 -- One-Way Hash Functions 549 -- SHAKE128 550 mda-shake128 DIGEST-ALGORITHM ::= { 551 IDENTIFIER id-shake128 -- with output length 32 bytes. 552 } 553 id-shake128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) 554 us(840) organization(1) gov(101) 555 csor(3) nistAlgorithm(4) 556 hashAlgs(2) 11 } 558 -- SHAKE-256 559 mda-shake256 DIGEST-ALGORITHM ::= { 560 IDENTIFIER id-shake256 -- with output length 64 bytes. 561 } 562 id-shake256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) 563 us(840) organization(1) gov(101) 564 csor(3) nistAlgorithm(4) 565 hashAlgs(2) 12 } 567 -- 568 -- Public key algorithm identifiers located in the 569 -- OriginatorPublicKey's algorithm attribute in CMS. 570 -- And Signature identifiers used in SignerInfo 571 -- signatureAlgorithm field of SignedData content 572 -- type and countersignature attribute in CMS. 573 -- 574 -- From RFC5280, for reference. 576 -- rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } 577 -- When the rsaEncryption algorithm identifier is used 578 -- for a public key, the AlgorithmIdentifier parameters 579 -- field MUST contain NULL. 580 -- 581 id-RSASSA-PSS-SHAKE128 OBJECT IDENTIFIER ::= { TBD } 582 id-RSASSA-PSS-SHAKE256 OBJECT IDENTIFIER ::= { TBD } 583 -- When the id-RSASSA-PSS-* algorithm identifiers are used 584 -- for a public key or a signature in CMS, the AlgorithmIdentifier 585 -- parameters field MUST be absent. The message digest algorithm 586 -- used in RSASSA-PSS MUST be SHAKE128 or SHAKE256 with a 32 or 587 -- 64 byte outout length respectively. The mask generating 588 -- function MUST be SHAKE128 or SHAKE256 with an output length 589 -- of (n - 264)/8 or (n - 520)/8 bytes respectively, where n 590 -- is the RSA modulus in bits. The RSASSA-PSS saltLength MUST 591 -- be 32 or 64 bytes respectively. In both cases, the RSA 592 -- public key, MUST be encoded using the RSAPublicKey type. 593 -- From RFC4055, for reference. 594 -- RSAPublicKey ::= SEQUENCE { 595 -- modulus INTEGER, -- n 596 -- publicExponent INTEGER } -- e 598 id-ecdsa-with-shake128 ::= { joint-iso-itu-t(2) country(16) 599 us(840) organization(1) gov(101) 600 csor(3) nistAlgorithm(4) 601 sigAlgs(3) TBD } 602 id-ecdsa-with-shake256 ::= { joint-iso-itu-t(2) country(16) 603 us(840) organization(1) gov(101) 604 csor(3) nistAlgorithm(4) 605 sigAlgs(3) TBD } 606 -- When the id-ecdsa-with-shake* algorithm identifiers are 607 -- used in CMS, the AlgorithmIdentifier parameters field 608 -- MUST be absent and the signature algorithm should 609 -- Deterministric ECDSA [RFC6979]. The message digest MUST 610 -- be SHAKE128 or SHAKE256 with a 32 or 64 byte outout 611 -- length respectively. In both cases, the ECDSA public key, 612 -- MUST be encoded using the id-ecPublicKey type. 613 -- From RFC5480, for reference. 614 -- id-ecPublicKey OBJECT IDENTIFIER ::= { 615 -- iso(1) member-body(2) us(840) ansi-X9-62(10045) keyType(2) 1 } 616 -- The id-ecPublicKey parameters must be absent or present 617 -- and are defined as 618 -- ECParameters ::= CHOICE { 619 -- namedCurve OBJECT IDENTIFIER 620 -- -- implicitCurve NULL 621 -- -- specifiedCurve SpecifiedECDomain 622 -- } 623 -- 624 -- Message Authentication (maca-) Algorithms 625 -- used in AuthenticatedData macAlgorithm in CMS 626 -- 627 MessageAuthAlgs MAC-ALGORITHM ::= { 628 ... 629 -- This expands MessageAuthAlgs from [RFC5652] and [RFC6268] 630 maca-KMACwithSHAKE128 | 631 maca-KMACwithSHAKE256 632 } 634 SMimeCaps SMIME-CAPS ::= { 635 ... 636 -- The expands SMimeCaps from [RFC5911] 637 maca-KMACwithSHAKE128 | 638 maca-KMACwithSHAKE256 639 } 641 -- 642 -- KMAC with SHAKE128 643 maca-KMACwithSHAKE128 MAC-ALGORITHM ::= { 644 IDENTIFIER id-KMACWithSHAKE128 645 PARAMS TYPE KMACwithSHAKE128-params ARE optional 646 -- If KMACwithSHAKE128-params parameters are absent 647 -- the SHAKE128 output length used in KMAC is 256 bits 648 -- and the customization string is an empty string. 649 SMIME-CAPS {IDENTIFIED BY id-KMACWithSHAKE128} 650 } 651 id-KMACWithSHAKE128 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 652 country(16) us(840) organization(1) 653 gov(101) csor(3) nistAlgorithm(4) 654 hashAlgs(2) 19 } 655 KMACwithSHAKE128-params ::= SEQUENCE { 656 KMACOutputLength INTEGER DEFAULT 256, -- Output length in bits 657 customizationString OCTET STRING DEFAULT ''H 658 } 660 -- KMAC with SHAKE256 661 maca-KMACwithSHAKE256 MAC-ALGORITHM ::= { 662 IDENTIFIER id-KMACWithSHAKE256 663 PARAMS TYPE KMACwithSHAKE256-params ARE optional 664 -- If KMACwithSHAKE256-params parameters are absent 665 -- the SHAKE256 output length used in KMAC is 512 bits 666 -- and the customization string is an empty string. 667 SMIME-CAPS {IDENTIFIED BY id-KMACWithSHAKE256} 668 } 669 id-KMACWithSHAKE256 OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 670 country(16) us(840) organization(1) 671 gov(101) csor(3) nistAlgorithm(4) 672 hashAlgs(2) 20 } 673 KMACwithSHAKE256-params ::= SEQUENCE { 674 KMACOutputLength INTEGER DEFAULT 512, -- Output length in bits 675 customizationString OCTET STRING DEFAULT ''H 676 } 678 END 680 Authors' Addresses 682 Quynh Dang 683 NIST 684 100 Bureau Drive 685 Gaithersburg, MD 20899 687 Email: quynh.Dang@nist.gov 689 Panos Kampanakis 690 Cisco Systems 692 Email: pkampana@cisco.com