```
' and
'
``````
' lines.
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: 'RFC2119' is mentioned on line 98, but not defined
-- Looks like a reference, but probably isn't: '1' on line 195
-- Looks like a reference, but probably isn't: '2' on line 143
== Missing Reference: 'Nspk-1' is mentioned on line 145, but not defined
== Missing Reference: 'Nspk' is mentioned on line 146, but not defined
-- Looks like a reference, but probably isn't: '0' on line 237
== Missing Reference: 'RFC4086' is mentioned on line 323, but not defined
== Unused Reference: 'RFC2219' is defined on line 384, but no explicit
reference was found in the text
== Unused Reference: 'PQC' is defined on line 444, but no explicit
reference was found in the text
-- Possible downref: Non-RFC (?) normative reference: ref. 'ASN1-B'
-- Possible downref: Non-RFC (?) normative reference: ref. 'ASN1-E'
-- Possible downref: Non-RFC (?) normative reference: ref. 'HASHSIG'
-- Possible downref: Non-RFC (?) normative reference: ref. 'SHS'
Summary: 1 error (**), 0 flaws (~~), 8 warnings (==), 9 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: 1 January 2019 1 July 2018
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) 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 (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. ASN.1 . . . . . . . . . . . . . . . . . . . . . . . . . . 3
57 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
58 2. MTS Digital Signature Algorithm Overview . . . . . . . . . . . 3
59 2.1. Hierarchical Signature System (HSS) . . . . . . . . . . . 3
60 2.2. Leighton-Micali Signature (LMS) . . . . . . . . . . . . . 4
61 2.3. Leighton-Micali One-time Signature Algorithm (LM-OTS) . . 5
62 3. Algorithm Identifiers and Parameters . . . . . . . . . . . . . 6
63 4. Signed-data Conventions . . . . . . . . . . . . . . . . . . . 6
64 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7
65 5.1. Implementation Security Considerations . . . . . . . . . . 7
66 5.2. Algorithm Security Considerations . . . . . . . . . . . . 8
67 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9
68 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 9
69 8. Normative References . . . . . . . . . . . . . . . . . . . . . 9
70 9. Informative References . . . . . . . . . . . . . . . . . . . . 9
71 Appendix: ASN.1 Module . . . . . . . . . . . . . . . . . . . . . . 11
72 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 12
74 1. Introduction
76 This document specifies the conventions for using the Merkle Tree
77 Signatures (MTS) digital signature algorithm with the Cryptographic
78 Message Syntax (CMS) [CMS] signed-data content type. The MTS
79 algorithm is one form of hash-based digital signature that can only
80 be used for a fixed number of signatures. The MTS algorithm is
81 described in [HASHSIG]. The MTS algorithm uses small private and
82 public keys, and it has low computational cost; however, the
83 signatures are quite large.
85 1.1. ASN.1
87 CMS values are generated using ASN.1 [ASN1-B], using the Basic
88 Encoding Rules (BER) and the Distinguished Encoding Rules (DER)
89 [ASN1-E].
91 1.2. Terminology
93 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
94 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
95 "OPTIONAL" in this document are to be interpreted as described in
96 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
97 capitals, as shown here.
99 2. MTS Digital Signature Algorithm Overview
101 Merkle Tree Signatures (MTS) are a method for signing a large but
102 fixed number of messages. An MTS system depends on a one-time
103 signature method and a collision-resistant hash function.
105 This specification makes use of the MTS algorithm specified in
106 [HASHSIG], which is the Leighton and Micali adaptation [LM] of the
107 original Lamport-Diffie-Winternitz-Merkle one-time signature system
108 [M1979][M1987][M1989a][M1989b].
110 As implied by the name, the hash-based signature algorithm depends on
111 a collision-resistant hash function. The hash-based signature
112 algorithm specified in [HASHSIG] currently uses only the SHA-256 one-
113 way hash function [SHS], but it also establishes an IANA registry to
114 permit the registration of additional one-way hash functions in the
115 future.
117 2.1. Hierarchical Signature System (HSS)
119 The MTS system specified in [HASHSIG] uses a hierarchy of trees. The
120 Hierarchical N-time Signature System (HSS) allows subordinate trees
121 to be generated when needed by the signer. Otherwise, generation of
122 the entire tree might take weeks or longer.
124 An HSS signature as specified in specified in [HASHSIG] carries the
125 number of signed public keys (Nspk), followed by that number of
126 signed public keys, followed by the LMS signature as described in
127 Section 2.2. Each signed public key is represented by the hash value
128 at the root of the tree, and it also contains information about the
129 tree structure. The signature over the public key is an LMS
130 signature as described in Section 2.2.
132 The elements of the HSS signature value for a stand-alone tree can be
133 summarized as:
135 u32str(0) ||
136 lms_signature /* signature of message */
138 The elements of the HSS signature value for a tree with Nspk levels
139 can be summarized as:
141 u32str(Nspk) ||
142 signed_public_key[1] ||
143 signed_public_key[2] ||
144 ...
145 sigend_public_key[Nspk-1] ||
146 signed_public_key[Nspk] ||
147 lms_signature_on_message
149 where, as defined in Section 7 of [HASHSIG], a signed_public_key is
150 the lms_signature over the public key followed by the public key
151 itself.
153 2.2. Leighton-Micali Signature (LMS)
155 Each tree in the system specified in [HASHSIG] uses the Leighton-
156 Micali Signature (LMS) system. LMS systems have two parameters. The
157 first parameter is the height of the tree, h, which is the number of
158 levels in the tree minus one. The [HASHSIG] specification supports
159 five values for this parameter: h=5; h=10; h=15; h=20; and h=25.
160 Note that there are 2^h leaves in the tree. The second parameter is
161 the number of bytes output by the hash function, m, which the amount
162 of data associated with each node in the tree. The [HASHSIG]
163 specification supports only the SHA-256 hash function [SHS], with
164 m=32.
166 Currently, the hash-based signature algorithm supports five tree
167 sizes:
169 LMS_SHA256_M32_H5;
170 LMS_SHA256_M32_H10;
171 LMS_SHA256_M32_H15;
172 LMS_SHA256_M32_H20; and
173 LMS_SHA256_M32_H25.
175 The [HASHSIG] specification establishes an IANA registry to permit
176 the registration of additional tree sizes in the future.
178 An LMS signature consists of four elements: the number of the leaf
179 associated with the LM-OTS signature, an LM-OTS signature as
180 described in Section 2.3, a typecode indicating the particular LMS
181 algorithm, and an array of values that is associated with the path
182 through the tree from the leaf associated with the LM-OTS signature
183 to the root. The array of values contains the siblings of the nodes
184 on the path from the leaf to the root but does not contain the nodes
185 on the path itself. The array for a tree with height h will have h
186 values. The first value is the sibling of the leaf, the next value
187 is the sibling of the parent of the leaf, and so on up the path to
188 the root.
190 The four elements of the LMS signature value can be summarized as:
192 u32str(q) ||
193 ots_signature ||
194 u32str(type) ||
195 path[0] || path[1] || ... || path[h-1]
197 2.3. Leighton-Micali One-time Signature Algorithm (LM-OTS)
199 Merkle Tree Signatures (MTS) depend on a one-time signature method.
200 [HASHSIG] specifies the use of the LM-OTS. An LM-OTS has five
201 parameters.
203 n - The number of bytes associated with the hash function.
204 [HASHSIG] supports only SHA-256 [SHS], with n=32.
206 H - A preimage-resistant hash function that accepts byte strings
207 of any length, and returns an n-byte string.
209 w - The width in bits of the Winternitz coefficients. [HASHSIG]
210 supports four values for this parameter: w=1; w=2; w=4; and
211 w=8.
213 p - The number of n-byte string elements that make up the LM-OTS
214 signature.
216 ls - The number of left-shift bits used in the checksum function,
217 which is defined in Section 4.5 of [HASHSIG].
219 The values of p and ls are dependent on the choices of the parameters
220 n and w, as described in Appendix A of [HASHSIG].
222 Currently, the hash-based signature algorithm supports four LM-OTS
223 variants:
225 LMOTS_SHA256_N32_W1;
226 LMOTS_SHA256_N32_W2;
227 LMOTS_SHA256_N32_W4; and
228 LMOTS_SHA256_N32_W8.
230 The [HASHSIG] specification establishes an IANA registry to permit
231 the registration of additional variants in the future.
233 Signing involves the generation of C, an n-byte random value.
235 The LM-OTS signature value can be summarized as:
237 u32str(otstype) || C || y[0] || ... || y[p-1]
239 3. Algorithm Identifiers and Parameters
241 The algorithm identifier for an MTS signature is id-alg-mts-hashsig:
243 id-alg-mts-hashsig OBJECT IDENTIFIER ::= { iso(1) member-body(2)
244 us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) alg(3) 17 }
246 When the id-alg-mts-hashsig algorithm identifier is used for a
247 signature, the AlgorithmIdentifier parameters field MUST be absent
248 (that is, the parameters are not present; the parameters are not set
249 to NULL).
251 The signature values is a large OCTET STRING. The signature format
252 is designed for easy parsing. Each format includes a counter and
253 type codes that indirectly providing all of the information that is
254 needed to parse the value during signature validation.
256 4. Signed-data Conventions
258 As specified in [CMS], the digital signature is produced from the
259 message digest and the signer's private key. If signed attributes
260 are absent, then the message digest is the hash of the content. If
261 signed attributes are present, then the hash of the content is placed
262 in the message-digest attribute, the set of signed attributes is DER
263 encoded, and the message digest is the hash of the encoded
264 attributes. In summary:
266 IF (signed attributes are absent)
267 THEN md = Hash(content)
268 ELSE message-digest attribute = Hash(content);
269 md = Hash(DER(SignedAttributes))
271 Sign(md)
273 When using [HASHSIG], the fields in the SignerInfo are used as
274 follows:
276 digestAlgorithms SHOULD contain the one-way hash function used to
277 compute the message digest on the eContent value. Since the
278 hash-based signature algorithms all depend on SHA-256, it is
279 strongly RECOMMENDED that SHA-256 also be used to compute the
280 message digest on the content.
282 Further, the same one-way hash function SHOULD be used to
283 compute the message digest on both the eContent and the
284 signedAttributes value if signedAttributes are present. Again,
285 since the hash-based signature algorithms all depend on
286 SHA-256, it is strongly RECOMMENDED that SHA-256 be used.
288 signatureAlgorithm MUST contain id-alg-mts-hashsig. The algorithm
289 parameters field MUST be absent.
291 signature contains the single HSS signature value resulting from
292 the signing operation as specified in [HASHSIG].
294 5. Security Considerations
296 5.1. Implementation Security Considerations
298 Implementations must protect the private keys. Compromise of the
299 private keys may result in the ability to forge signatures. Along
300 with the private key, the implementation must keep track of which
301 leaf nodes in the tree have been used. Loss of integrity of this
302 tracking data can cause an one-time key to be used more than once.
303 As a result, when a private key and the tracking data are stored on
304 non-volatile media or stored in a virtual machine environment, care
305 must be taken to preserve confidentiality and integrity.
307 An implementation must ensure that a LM-OTS private key is used to
308 generate a signature only one time, and ensure that it cannot be used
309 for any other purpose.
311 The generation of private keys relies on random numbers. The use of
312 inadequate pseudo-random number generators (PRNGs) to generate these
313 values can result in little or no security. An attacker may find it
314 much easier to reproduce the PRNG environment that produced the keys,
315 searching the resulting small set of possibilities, rather than brute
316 force searching the whole key space. The generation of quality
317 random numbers is difficult. RFC 4086 [RANDOM] offers important
318 guidance in this area.
320 The generation of hash-based signatures also depends on random
321 numbers. While the consequences of an inadequate pseudo-random
322 number generator (PRNGs) to generate these values is much less severe
323 than the generation of private keys, the guidance in [RFC4086]
324 remains important.
326 When computing signatures, the same hash function SHOULD be used for
327 all operations. In this specification, only SHA-256 is used. Using
328 only SHA-256 reduces the number of possible failure points in the
329 signature process.
331 5.2. Algorithm Security Considerations
333 At Black Hat USA 2013, some researchers gave a presentation on the
334 current sate of public key cryptography. They said: "Current
335 cryptosystems depend on discrete logarithm and factoring which has
336 seen some major new developments in the past 6 months" [BH2013].
337 They encouraged preparation for a day when RSA and DSA cannot be
338 depended upon.
340 A post-quantum cryptosystem is a system that is secure against
341 quantum computers that have more than a trivial number of quantum
342 bits. It is open to conjecture when it will be feasible to build
343 such a machine. RSA, DSA, and ECDSA are not post-quantum secure.
345 The LM-OTP one-time signature, LMS, and HSS do not depend on discrete
346 logarithm or factoring, as a result these algorithms are considered
347 to be post-quantum secure.
349 Today, RSA is often used to digitally sign software updates. This
350 means that the distribution of software updates could be compromised
351 if a significant advance is made in factoring or a quantum computer
352 is invented. The use of MTS signatures to protect software update
353 distribution, perhaps using the format described in [FWPROT], will
354 allow the deployment of software that implements new cryptosystems.
356 6. IANA Considerations
358 This document has no actions for IANA.
360 7. Acknowledgements
362 Many thanks to Panos Kampanakis, Jim Schaad, and Sean Turner for
363 their careful review and comments.
365 8. Normative References
367 [ASN1-B] ITU-T, "Information technology -- Abstract Syntax Notation
368 One (ASN.1): Specification of basic notation", ITU-T
369 Recommendation X.680, 2015.
371 [ASN1-E] ITU-T, "Information technology -- ASN.1 encoding rules:
372 Specification of Basic Encoding Rules (BER), Canonical
373 Encoding Rules (CER) and Distinguished Encoding Rules
374 (DER)", ITU-T Recommendation X.690, 2015.
376 [CMS] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70,
377 RFC 5652, DOI 10.17487/RFC5652, September 2009,
378 .
380 [HASHSIG] McGrew, D., M. Curcio, and S. Fluhrer, "Hash-Based
381 Signatures", Work in progress.
384 [RFC2219] Bradner, S., "Key words for use in RFCs to Indicate
385 Requirement Levels", BCP 14, RFC 2119, DOI
386 10.17487/RFC2119, March 1997, .
389 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in
390 RFC 2119 Key Words", BCP 14, RFC 8174, DOI
391 10.17487/RFC8174, May 2017, .
394 [SHS] National Institute of Standards and Technology (NIST),
395 FIPS Publication 180-3: Secure Hash Standard, October
396 2008.
398 9. Informative References
400 [BH2013] Ptacek, T., T. Ritter, J. Samuel, and A. Stamos, "The
401 Factoring Dead: Preparing for the Cryptopocalypse", August
402 2013.
405 [CMSASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for
406 Cryptographic Message Syntax (CMS) and S/MIME", RFC 5911,
407 DOI 10.17487/RFC5911, June 2010, .
410 [CMSASN1U] Schaad, J. and S. Turner, "Additional New ASN.1 Modules
411 for the Cryptographic Message Syntax (CMS) and the Public
412 Key Infrastructure Using X.509 (PKIX)", RFC 6268, DOI
413 10.17487/RFC6268, July 2011, .
416 [FWPROT] Housley, R., "Using Cryptographic Message Syntax (CMS) to
417 Protect Firmware Packages", RFC 4108, DOI
418 10.17487/RFC4108, August 2005, .
421 [LM] Leighton, T. and S. Micali, "Large provably fast and
422 secure digital signature schemes from secure hash
423 functions", U.S. Patent 5,432,852, July 1995.
425 [M1979] Merkle, R., "Secrecy, Authentication, and Public Key
426 Systems", Stanford University Information Systems
427 Laboratory Technical Report 1979-1, 1979.
429 [M1987] Merkle, R., "A Digital Signature Based on a Conventional
430 Encryption Function", Lecture Notes in Computer Science
431 crypto87, 1988.
433 [M1989a] Merkle, R., "A Certified Digital Signature", Lecture Notes
434 in Computer Science crypto89, 1990.
436 [M1989b] Merkle, R., "One Way Hash Functions and DES", Lecture Notes
437 in Computer Science crypto89, 1990.
439 [PKIXASN1] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the
440 Public Key Infrastructure Using X.509 (PKIX)", RFC 5912,
441 DOI 10.17487/RFC5912, June 2010, .
444 [PQC] Bernstein, D., "Introduction to post-quantum
445 cryptography", 2009.
446
449 [RANDOM] Eastlake 3rd, D., Schiller, J., and S. Crocker,
450 "Randomness Requirements for Security", BCP 106, RFC 4086,
451 DOI 10.17487/RFC4086, June 2005, .
454 Appendix: ASN.1 Module
456 MTS-HashSig-2013
457 { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs9(9)
458 id-smime(16) id-mod(0) id-mod-mts-hashsig-2013(64) }
460 DEFINITIONS IMPLICIT TAGS ::= BEGIN
462 EXPORTS ALL;
464 IMPORTS
465 PUBLIC-KEY, SIGNATURE-ALGORITHM, SMIME-CAPS
466 FROM AlgorithmInformation-2009 -- RFC 5911 [CMSASN1]
467 { iso(1) identified-organization(3) dod(6) internet(1)
468 security(5) mechanisms(5) pkix(7) id-mod(0)
469 id-mod-algorithmInformation-02(58) }
470 mda-sha256
471 FROM PKIX1-PSS-OAEP-Algorithms-2009 -- RFC 5912 [PKIXASN1]
472 { iso(1) identified-organization(3) dod(6)
473 internet(1) security(5) mechanisms(5) pkix(7) id-mod(0)
474 id-mod-pkix1-rsa-pkalgs-02(54) } ;
476 --
477 -- Object Identifiers
478 --
480 id-alg-mts-hashsig OBJECT IDENTIFIER ::= { iso(1) member-body(2)
481 us(840) rsadsi(113549) pkcs(1) pkcs9(9) smime(16) alg(3) 17 }
483 --
484 -- Signature Algorithm and Public Key
485 --
487 sa-MTS-HashSig SIGNATURE-ALGORITHM ::= {
488 IDENTIFIER id-alg-mts-hashsig
489 PARAMS ARE absent
490 HASHES { mda-sha256 }
491 PUBLIC-KEYS { pk-MTS-HashSig }
492 SMIME-CAPS { IDENTIFIED BY id-alg-mts-hashsig } }
494 pk-MTS-HashSig PUBLIC-KEY ::= {
495 IDENTIFIER id-alg-mts-hashsig
496 KEY MTS-HashSig-PublicKey
497 PARAMS ARE absent
498 CERT-KEY-USAGE
499 { digitalSignature, nonRepudiation, keyCertSign, cRLSign } }
501 MTS-HashSig-PublicKey ::= OCTET STRING
502 --
503 -- Expand the signature algorithm set used by CMS [CMSASN1U]
504 --
506 SignatureAlgorithmSet SIGNATURE-ALGORITHM ::=
507 { sa-MTS-HashSig, ... }
509 --
510 -- Expand the S/MIME capabilities set used by CMS [CMSASN1]
511 --
513 SMimeCaps SMIME-CAPS ::= { sa-MTS-HashSig.&smimeCaps, ... }
515 END
517 Author's Address
519 Russ Housley
520 Vigil Security, LLC
521 918 Spring Knoll Drive
522 Herndon, VA 20170
523 USA
525 EMail: housley@vigilsec.com