idnits 2.17.00 (12 Aug 2021) /tmp/idnits40757/draft-housley-cms-mts-hash-sig-00.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 == Line 199 has weird spacing: '...e value conta...' -- The document date (26 August 2013) is 3189 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) == Unused Reference: 'PQC' is defined on line 323, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'ASN1-02' -- Possible downref: Non-RFC (?) normative reference: ref. 'HASHSIG' -- Possible downref: Non-RFC (?) normative reference: ref. 'SHS' Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT R. Housley 3 Intended Status: Proposed Standard Vigil Security 4 Expires: 27 February 2014 26 August 2013 6 Use of the Hash-based Merkle Tree Signature (MTS) Algorithm 7 in the Cryptographic Message Syntax (CMS) 8 10 Abstract 12 This document specifies the conventions for using the Merkle Tree 13 Signatures (MTS) digital signature algorithm with the Cryptographic 14 Message Syntax (CMS). The MTS algorithm is one form of hash-based 15 digital signature. 17 Status of this Memo 19 This Internet-Draft is submitted to IETF in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as Internet- 25 Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/1id-abstracts.html 35 The list of Internet-Draft Shadow Directories can be accessed at 36 http://www.ietf.org/shadow.html 38 Copyright and License Notice 40 Copyright (c) 2013 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 (http://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. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 1.1. MTS Digital Signature Algorithm . . . . . . . . . . . . . 3 57 1.2. LDWM One-time Signature Algorithm . . . . . . . . . . . . 4 58 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 5 59 2. Algorithm Identifiers and Parameters . . . . . . . . . . . . . 5 60 3. Signed-data Conventions . . . . . . . . . . . . . . . . . . . 6 61 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 62 4.1. Implementation Security Considerations . . . . . . . . . . 6 63 4.2. Algorithm Security Considerations . . . . . . . . . . . . 6 64 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 65 6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 7 66 6.1. Normative References . . . . . . . . . . . . . . . . . . . 7 67 6.2. Informative References . . . . . . . . . . . . . . . . . . 8 68 Appendix: ASN.1 Module . . . . . . . . . . . . . . . . . . . . . . 8 69 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 9 71 1. Introduction 73 This document specifies the conventions for using the for using the 74 Merkle Tree Signatures (MTS) digital signature algorithm with the 75 Cryptographic Message Syntax (CMS) [CMS] signed-data content type. 76 The MTS algorithm is one form of hash-based digital signature that 77 can only be used for a specific number of signatures. The MTS 78 algorithm is described in [HASHSIG]. The MTS algorithm uses small 79 private and public keys, and it has low computational cost; however, 80 the signatures are quite large. 82 CMS values are generated using ASN.1 [ASN1-02], using the Basic 83 Encoding Rules (BER) and the Distinguished Encoding Rules (DER). 85 1.1. MTS Digital Signature Algorithm 87 Merkle Tree Signatures (MTS) are a method for signing a large but 88 fixed number of messages. An MTS system uses two cryptographic 89 components: a one-time signature method and a collision-resistant 90 hash function. Each MTS public/private key pair is associated with a 91 k-way tree with each node containing an n-byte value. Each leaf of 92 the tree contains the value of the public key of an Lamport, Diffie, 93 Winternitz, and Merkle (LDWM) public/private key pair [HASHSIG]. The 94 LDWM algorithm requires a robust one-way function to underpin the 95 signature generation and verification. The algorithms in this 96 document all make use of the SHA-256 [SHS] one-way hash function, 97 which produces a 32 byte result. 99 The value at the root of the tree is the MTS public key. Each 100 interior node is computed by applying the hash function to the 101 concatenation of the values of its children nodes. Once again, the 102 algorithms in this document all make use of the SHA-256 [SHS] one-way 103 hash function. 105 An MTS signature consists of an LDWM signature, a node number that 106 identifies the leaf node associated with the signature, and an array 107 of values associated with the path through the tree from the LDWM 108 signature leaf to the root. The array of values contains contains 109 the siblings of the nodes on the path from the leaf to the root but 110 does not contain the nodes on the path itself. The array for a tree 111 with branching number k and height h will have (k-1)*h values. The 112 first (k-1) values are the siblings of the leaf, the next (k-1) 113 values are the siblings of the parent of the leaf, and so on. 115 Four tree sizes are specified in [HASHSIG]: 117 MTS_SHA256_K2_H20: 118 o k = 2 (2 child nodes for each interior node), 119 o h = 20 (20 levels in the tree), 120 o n = 32 (32 bytes associated with each node), and 121 o mts_algorithm_type = 0x00000001. 123 MTS_SHA256_K4_H10: 124 o k = 4 (4 child nodes for each interior node), 125 o h = 10 (10 levels in the tree), 126 o n = 32 (32 bytes associated with each node), and 127 o mts_algorithm_type = 0x00000002. 129 MTS_SHA256_K8_H7: 130 o n = 8 (8 child nodes for each interior node), 131 o h = 7 (7 levels in the tree), and 132 o n = 32 (32 bytes associated with each node), and 133 o mts_algorithm_type = 0x00000003. 135 MTS_SHA256_K16_H5: 136 o k = 16 (16 child nodes for each interior node), 137 o h = 5 (5 levels in the tree), 138 o n = 32 (32 bytes associated with each node), and 139 o mts_algorithm_type = 0x00000004. 141 There are k^h leaves in the tree. 143 1.2. LDWM One-time Signature Algorithm 145 Merkle Tree Signatures (MTS) depend on a LDWM one-time signature 146 method. The four variants described in [HASHSIG] depend on SHA-256 147 [SHS] and SHA-256-20, which is the same as SHA-256, except that the 148 hash result is truncated to 20 bytes. 150 Four LDWN one-time signature algorithms are defined in [HASHSIG]: 152 LDWM_SHA256_M20_W1: 153 o ldwm_algorithm_type = 0x00000001; and 154 o the signature value is the 4-byte ldwm_algorithm_type 155 followed by 265 20-byte values. 157 LDWM_SHA256_M20_W2: 158 o ldwm_algorithm_type = 0x00000002; and 159 o the signature value is the 4-byte ldwm_algorithm_type 160 followed by 133 20-byte values. 162 LDWM_SHA256_M20_W4: 163 o ldwm_algorithm_type = 0x00000003; and 164 o the signature value is the 4-byte ldwm_algorithm_type 165 followed by 67 20-byte values. 167 LDWM_SHA256_M20_W8: 168 o ldwm_algorithm_type = 0x00000004; and 169 o the signature value is the 4-byte ldwm_algorithm_type 170 followed by 32 20-byte values. 172 1.3. Terminology 174 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 175 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 176 document are to be interpreted as described in RFC 2119 [KEYWORDS]. 178 2. Algorithm Identifiers and Parameters 180 The algorithm identifier for an MTS signature is id-alg-mts-hashsig: 182 id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) 183 us(840) rsadsi(113549) pkcs(1) pkcs9(9) 16 } 185 id-alg OBJECT IDENTIFIER ::= { id-smime 3 } 187 id-alg-mts-hashsig OBJECT IDENTIFIER ::= { id-alg 17 } 189 When the id-alg-mts-hashsig algorithm identifier is used for a 190 signature, the AlgorithmIdentifier parameters field MUST be absent. 192 The first 4 bytes of the signature value contains the 193 mts_algorithm_type as defined in Section 4.5 of [HASHSIG]. For 194 convenience, these values are repeated in above in Section 1.1 of 195 this document. This value tells how to parse the remaining parts of 196 the signature value, which is composed of an LDWM signature value, a 197 4-byte signature leaf number, and the MTS path. 199 The first 4 bytes of the LDWM signature value contains the 200 ldwm_algorithm_type as defined in Section 3.10 of [HASHSIG]. For 201 convenience, these values are repeated in above in Section 1.2 of 202 this document. 204 The signature format is designed for easy parsing. Each format 205 starts with a 4-byte enumeration value that indicates all of the 206 details of the signature algorithm, indirectly providing all of the 207 information that is needed to parse the value during signature 208 validation. 210 3. Signed-data Conventions 212 digestAlgorithms SHOULD contain the one-way hash function used to 213 compute the message digest on the eContent value. Since the hash- 214 based signature algorithms all depend on SHA-256, it is strongly 215 RECOMMENDED that SHA-256 also be used to compute the message digest 216 on the content. 218 Further, the same one-way hash function SHOULD be used to compute the 219 message digest on both the eContent and the signedAttributes value if 220 signedAttributes exist. Again, since the hash-based signature 221 algorithms all depend on SHA-256, it is strongly RECOMMENDED that 222 SHA-256 be used. 224 signatureAlgorithm MUST contain id-alg-mts-hashsig. The algorithm 225 parameters field MUST be absent. 227 signature contains the single value resulting from the signing 228 operation. 230 4. Security Considerations 232 4.1. Implementation Security Considerations 234 Implementations must protect the private keys. Compromise of the 235 private keys may result in the ability to forge signatures. Further, 236 a LDWM private key MUST be used only one time, and the LDWM private 237 key MUST NOT be used for any other purpose. 239 The generation of private keys relies on random numbers. The use of 240 inadequate pseudo-random number generators (PRNGs) to generate these 241 values can result in little or no security. An attacker may find it 242 much easier to reproduce the PRNG environment that produced the keys, 243 searching the resulting small set of possibilities, rather than brute 244 force searching the whole key space. The generation of quality 245 random numbers is difficult. RFC 4086 [RANDOM] offers important 246 guidance in this area. 248 When computing signatures, the same hash function SHOULD be used for 249 all operations. This reduces the number of failure points in the 250 signature process. 252 4.2. Algorithm Security Considerations 254 At Black Hat USA 2013, some researchers gave a presentation on the 255 current sate of public key cryptography. They said: "Current 256 cryptosystems depend on discrete logarithm and factoring which has 257 seen some major new developments in the past 6 months" [BH2013]. 259 They encouraged preparation for a day when RSA and DSA cannot be 260 depended upon. 262 A post-quantum cryptosystem is a system that is secure against 263 quantum computers that have more than a trivial number of quantum 264 bits. It is open to conjecture whether it is feasible to build such 265 a machine. RSA, DSA, and ECDSA are not post-quantum secure. 267 The LDWM one-time signature and MTS system do not depend on discrete 268 logarithm or factoring, and these algorithms are considered to be 269 post-quantum secure. 271 Today, RSA is often used to digitally sign software updates. This 272 means that the distribution of software updates could be compromised 273 if a significant advance is made in factoring or a quantum computer 274 is invented. The use of MTS signatures to protect software update 275 distribution, perhaps using the format described in [FWPROT], will 276 allow the deployment of software that implements new cryptosystems. 278 5. IANA Considerations 280 {{ RFC Editor: Please remove this section prior to publication. }} 282 This document has no actions for IANA. 284 6. References 286 6.1. Normative References 288 [ASN1-02] ITU-T, "ITU-T Recommendation X.680, X.681, X.682, and 289 X.683", ITU-T X.680, X.681, X.682, and X.683, 2002. 291 [CMS] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 292 RFC 5652, September 2009. 294 [HASHSIG] McGrew, D., and M. Curcio, "Hash-Based Signatures", Work 295 in progress. 297 [KEYWORDS] Bradner, S., "Key words for use in RFCs to Indicate 298 Requirement Levels", BCP 14, RFC 2119, March 1997. 300 [SHS] National Institute of Standards and Technology (NIST), 301 FIPS Publication 180-3: Secure Hash Standard, October 302 2008. 304 6.2. Informative References 306 [BH2013] Ptacek, T., T. Ritter, J. Samuel, and A. Stamos, "The 307 Factoring Dead: Preparing for the Cryptopocalypse", August 308 2013. 309 [https://media.blackhat.com/us-13/us-13-Stamos-The- 310 Factoring-Dead.pdf] 312 [CMSASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for 313 Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911, 314 June 2010. 316 [FWPROT] Housley, R., "Using Cryptographic Message Syntax (CMS) to 317 Protect Firmware Packages", RFC 4108, August 2005. 319 [PKIXASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the 320 Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, 321 June 2010. 323 [PQC] Bernstein, D., "Introduction to post-quantum 324 cryptography", 2009. 325 [http://www.pqcrypto.org/www.springer.com/cda/content/ 326 document/cda_downloaddocument/9783540887010-c1.pdf] 328 [RANDOM] Eastlake 3rd, D., Schiller, J., and S. Crocker, 329 "Randomness Requirements for Security", BCP 106, RFC 4086, 330 June 2005. 332 Appendix: ASN.1 Module 334 MTS-HashSig-2013 335 { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9) 336 id-smime(16) id-mod(0) id-mod-mts-hashsig-2013(64) } 338 DEFINITIONS EXPLICIT TAGS ::= BEGIN 340 EXPORTS ALL; 341 IMPORTS 342 SIGNATURE-ALGORITHM PUBLIC-KEY 343 FROM AlgorithmInformation-2009 -- RFC 5911 [CMSASN1] 344 { iso(1) identified-organization(3) dod(6) internet(1) 345 security(5) mechanisms(5) pkix(7) id-mod(0) 346 id-mod-algorithmInformation-02(58) } 348 mda-sha256 349 FROM PKIX1-PSS-OAEP-Algorithms-2009 -- RFC 5912 [PKIXASN1] 350 { iso(1) identified-organization(3) dod(6) 351 internet(1) security(5) mechanisms(5) pkix(7) id-mod(0) 352 id-mod-pkix1-rsa-pkalgs-02(54) } ; 354 -- 355 -- Object Identifiers 356 -- 358 id-smime OBJECT IDENTIFIER ::= { iso(1) member-body(2) 359 us(840) rsadsi(113549) pkcs(1) pkcs9(9) 16 } 361 id-alg OBJECT IDENTIFIER ::= { id-smime 3 } 363 id-alg-mts-hashsig OBJECT IDENTIFIER ::= { id-alg 17 } 365 -- 366 -- Signature Algorithm and Public Key 367 -- 369 sa-MTS-HashSig SIGNATURE-ALGORITHM ::= { 370 IDENTIFIER id-alg-mts-hashsig 371 HASHES { mda-sha256, ... } 372 PUBLIC-KEYS { pk-MTS-HashSig } } 374 pk-MTS-HashSig PUBLIC-KEY ::= { 375 IDENTIFIER id-alg-mts-hashsig 376 KEY MTS-HashSig-PublicKey } 378 MTS-HashSig-PublicKey ::= OCTET STRING 380 HashSignatureAlgs SIGNATURE-ALGORITHM ::= { 381 sa-MTS-HashSig, ... } 383 END 385 Author's Address 387 Russ Housley 388 Vigil Security, LLC 389 918 Spring Knoll Drive 390 Herndon, VA 20170 391 USA 393 EMail: housley@vigilsec.com