idnits 2.17.1 draft-ietf-lamps-crmf-update-algs-04.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 RFC4211, but the abstract doesn't seem to directly say this. It does mention RFC4211 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 RFC4211, updated by this document, for RFC5378 checks: 2000-11-29) -- 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 (19 February 2021) is 1159 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) -- Possible downref: Non-RFC (?) normative reference: ref. 'AES' -- Possible downref: Non-RFC (?) normative reference: ref. 'GMAC' ** Downref: Normative reference to an Informational RFC: RFC 2104 (ref. 'HMAC') ** Downref: Normative reference to an Informational RFC: RFC 8018 -- Possible downref: Non-RFC (?) normative reference: ref. 'SHS' == Outdated reference: A later version (-05) exists of draft-ietf-lamps-cms-aes-gmac-alg-02 Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group R. Housley 3 Internet-Draft Vigil Security 4 Updates: 4211 (if approved) 19 February 2021 5 Intended status: Standards Track 6 Expires: 23 August 2021 8 Algorithm Requirements Update to the Internet X.509 Public Key 9 Infrastructure Certificate Request Message Format (CRMF) 10 draft-ietf-lamps-crmf-update-algs-04 12 Abstract 14 This document updates the cryptographic algorithm requirements for 15 the Password-Based Message Authentication Code in the Internet X.509 16 Public Key Infrastructure Certificate Request Message Format (CRMF) 17 specified in RFC 4211. 19 Status of This Memo 21 This Internet-Draft is submitted in full conformance with the 22 provisions of BCP 78 and BCP 79. 24 Internet-Drafts are working documents of the Internet Engineering 25 Task Force (IETF). Note that other groups may also distribute 26 working documents as Internet-Drafts. The list of current Internet- 27 Drafts is at https://datatracker.ietf.org/drafts/current/. 29 Internet-Drafts are draft documents valid for a maximum of six months 30 and may be updated, replaced, or obsoleted by other documents at any 31 time. It is inappropriate to use Internet-Drafts as reference 32 material or to cite them other than as "work in progress." 34 This Internet-Draft will expire on 23 August 2021. 36 Copyright Notice 38 Copyright (c) 2021 IETF Trust and the persons identified as the 39 document authors. All rights reserved. 41 This document is subject to BCP 78 and the IETF Trust's Legal 42 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 43 license-info) in effect on the date of publication of this document. 44 Please review these documents carefully, as they describe your rights 45 and restrictions with respect to this document. Code Components 46 extracted from this document must include Simplified BSD License text 47 as described in Section 4.e of the Trust Legal Provisions and are 48 provided without warranty as described in the Simplified BSD License. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 53 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 54 3. Signature Key POP . . . . . . . . . . . . . . . . . . . . . . 2 55 4. Password-Based Message Authentication Code . . . . . . . . . 3 56 4.1. Introduction Paragraph . . . . . . . . . . . . . . . . . 3 57 4.2. One-Way Function . . . . . . . . . . . . . . . . . . . . 3 58 4.3. Iteration Count . . . . . . . . . . . . . . . . . . . . . 4 59 4.4. MAC Algorithm . . . . . . . . . . . . . . . . . . . . . . 4 60 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 61 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 62 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 63 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 64 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 65 8.2. Informative References . . . . . . . . . . . . . . . . . 7 66 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 8 68 1. Introduction 70 This document updates the cryptographic algorithm requirements for 71 the Password-Based Message Authentication Code (MAC) in the Internet 72 X.509 Public Key Infrastructure Certificate Request Message Format 73 (CRMF) [RFC4211]. The algorithms specified in [RFC4211] were 74 appropriate in 2005; however, these algorithms are no longer 75 considered the best choices. This update specifies algorithms that 76 are more appropriate today. 78 2. Terminology 80 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 81 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 82 "OPTIONAL" in this document are to be interpreted as described in 83 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 84 capitals, as shown here. 86 3. Signature Key POP 88 Section 4.1 of [RFC4211] specifies the Proof-of-Possession (POP) 89 processing. This section is updated to explicitly allow the use of 90 the PBMAC1 algorithm presented in Section 7.1 of [RFC8018]. 92 OLD: 94 algId identifies the algorithm used to compute the MAC value. All 95 implementations MUST support id-PasswordBasedMAC. The details on 96 this algorithm are presented in section 4.4 98 NEW: 100 algId identifies the algorithm used to compute the MAC value. All 101 implementations MUST support id-PasswordBasedMAC as presented in 102 Section 4.4 of this document. Implementations MAY also support 103 PBMAC1 presented in Section 7.1 of [RFC8018]. 105 4. Password-Based Message Authentication Code 107 Section 4.4 of [RFC4211] specifies a Password-Based MAC that relies 108 on a one-way function to compute a symmetric key from the password 109 and a MAC algorithm. This section specifies algorithm requirements 110 for the one-way function and the MAC algorithm. 112 4.1. Introduction Paragraph 114 Add guidance about limiting the use of the password. 116 OLD: 118 This MAC algorithm was designed to take a shared secret (a 119 password) and use it to compute a check value over a piece of 120 information. The assumption is that, without the password, the 121 correct check value cannot be computed. The algorithm computes 122 the one-way function multiple times in order to slow down any 123 dictionary attacks against the password value. 125 NEW: 127 This MAC algorithm was designed to take a shared secret (a 128 password) and use it to compute a check value over a piece of 129 information. The assumption is that, without the password, the 130 correct check value cannot be computed. The algorithm computes 131 the one-way function multiple times in order to slow down any 132 dictionary attacks against the password value. The password used 133 to compute this MAC SHOULD NOT be used for any other purpose. 135 4.2. One-Way Function 137 Change the paragraph describing the "owf" as follows: 139 OLD: 141 owf identifies the algorithm and associated parameters used to 142 compute the key used in the MAC process. All implementations MUST 143 support SHA-1. 145 NEW: 147 owf identifies the algorithm and associated parameters used to 148 compute the key used in the MAC process. All implementations MUST 149 support SHA-256 [SHS]. 151 4.3. Iteration Count 153 Update the guidance on appropriate iteration count values. 155 OLD: 157 iterationCount identifies the number of times the hash is applied 158 during the key computation process. The iterationCount MUST be a 159 minimum of 100. Many people suggest using values as high as 1000 160 iterations as the minimum value. The trade off here is between 161 protection of the password from attacks and the time spent by the 162 server processing all of the different iterations in deriving 163 passwords. Hashing is generally considered a cheap operation but 164 this may not be true with all hash functions in the future. 166 NEW: 168 iterationCount identifies the number of times the hash is applied 169 during the key computation process. The iterationCount MUST be a 170 minimum of 100; however, the iterationCount SHOULD be as large as 171 server performance will allow, typically at least 10,000 [DIGALM]. 172 There is a trade off between protection of the password from 173 attacks and the time spent by the server processing the 174 iterations. As part of that tradeoff, an iteration count smaller 175 than 10,000 can be used when automated generation produces shared 176 secrets with high entropy. 178 4.4. MAC Algorithm 180 Change the paragraph describing the "mac" as follows: 182 OLD: 184 mac identifies the algorithm and associated parameters of the MAC 185 function to be used. All implementations MUST support HMAC-SHA1 186 [HMAC]. All implementations SHOULD support DES-MAC and Triple- 187 DES-MAC [PKCS11]. 189 NEW: 191 mac identifies the algorithm and associated parameters of the MAC 192 function to be used. All implementations MUST support HMAC-SHA256 193 [HMAC]. All implementations SHOULD support AES-GMAC AES [GMAC] 194 with a 128 bit key. 196 For convenience, the identifiers for these two algorithms are 197 repeated here. 199 The algorithm identifier for HMAC-SHA256 is defined in [RFC4231]: 201 id-hmacWithSHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) 202 us(840) rsadsi(113549) digestAlgorithm(2) 9 } 204 When this algorithm identifier is used, the parameters SHOULD be 205 present. When present, the parameters MUST contain a type of NULL. 207 The algorithm identifier for AES-GMAC [AES][GMAC] with a 128-bit key 208 is defined in [I-D.ietf-lamps-cms-aes-gmac-alg]: 210 id-aes128-GMAC OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) 211 country(16) us(840) organization(1) gov(101) csor(3) 212 nistAlgorithm(4) aes(1) 9 } 214 When this algorithm identifier is used, the parameters MUST be 215 present, and the parameters MUST contain the GMACParameters structure 216 as follows: 218 GMACParameters ::= SEQUENCE { 219 nonce OCTET STRING, 220 length MACLength DEFAULT 12 } 222 MACLength ::= INTEGER (12 | 13 | 14 | 15 | 16) 224 The GMACParameters nonce parameter is the GMAC initialization vector. 225 The nonce may have any number of bits between 8 and (2^64)-1, but it 226 MUST be a multiple of 8 bits. Within the scope of any GMAC key, the 227 nonce value MUST be unique. A nonce value of 12 octets can be 228 processed more efficiently, so that length for the nonce value is 229 RECOMMENDED. 231 The GMACParameters length parameter field tells the size of the 232 message authentication code in octets. GMAC supports lengths between 233 12 and 16 octets, inclusive. However, for use with CRMF, the maximum 234 length of 16 octets MUST be used. 236 5. IANA Considerations 238 This document makes no requests of the IANA. 240 6. Security Considerations 242 The security of the password-based MAC relies on the number of times 243 the hash function is applied as well as the entropy of the shared 244 secret (the password). Hardware support for hash calculation is 245 available at very low cost [PHS], which reduces the protection 246 provided by a high iterationCount value. Therefore, the entropy of 247 the password is crucial for the security of the password-based MAC 248 function. In 2010, researchers showed that about half of the real- 249 world passwords can be broken with less than 150 million trials, 250 indicating a median entropy of only 27 bits [DMR]. Higher entropy 251 can be achieved by using randomly generated strings. For example, 252 assuming an alphabet of 60 characters a randomly chosen password with 253 10 characters offers 59 bits a entropy, and 20 characters offers 118 254 bits of entropy. Using a one-time password also increases the 255 security of the MAC, assuming that the integrity-protected 256 transaction will complete before the attacker is able to learn the 257 password with an offline attack. 259 Cryptographic algorithms age; they become weaker with time. As new 260 cryptanalysis techniques are developed and computing capabilities 261 improve, the work required to break a particular cryptographic 262 algorithm will reduce, making an attack on the algorithm more 263 feasible for more attackers. While it is unknown how cryptoanalytic 264 attacks will evolve, it is certain that they will get better. It is 265 unknown how much better they will become or when the advances will 266 happen. For this reason, the algorithm requirements for CRMF are 267 updated by this specification. 269 When a Password-Based MAC is used, implementations must protect the 270 password and the MAC key. Compromise of either the password or the 271 MAC key may result in the ability of an attacker to undermine 272 authentication. 274 7. Acknowledgements 276 Many thanks to Hans Aschauer, Hendrik Brockhaus, Quynh Dang, Roman 277 Danyliw, Tomas Gustavsson, Jonathan Hammell, Tim Hollebeek, Lijun 278 Liao, Mike Ounsworth, Tim Polk, Mike StJohns, and Sean Turner for 279 their careful review and improvements. 281 8. References 283 8.1. Normative References 285 [AES] National Institute of Standards and Technology, "Advanced 286 encryption standard (AES)", DOI 10.6028/nist.fips.197, 287 November 2001, . 289 [GMAC] National Institute of Standards and Technology, 290 "Recommendation for block cipher modes of operation: 291 Galois Counter Mode (GCM) and GMAC", 292 DOI 10.6028/nist.sp.800-38d, 2007, 293 . 295 [HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 296 Hashing for Message Authentication", RFC 2104, 297 DOI 10.17487/RFC2104, February 1997, 298 . 300 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 301 Requirement Levels", BCP 14, RFC 2119, 302 DOI 10.17487/RFC2119, March 1997, 303 . 305 [RFC4211] Schaad, J., "Internet X.509 Public Key Infrastructure 306 Certificate Request Message Format (CRMF)", RFC 4211, 307 DOI 10.17487/RFC4211, September 2005, 308 . 310 [RFC8018] Moriarty, K., Ed., Kaliski, B., and A. Rusch, "PKCS #5: 311 Password-Based Cryptography Specification Version 2.1", 312 RFC 8018, DOI 10.17487/RFC8018, January 2017, 313 . 315 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 316 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 317 May 2017, . 319 [SHS] National Institute of Standards and Technology, "Secure 320 Hash Standard", DOI 10.6028/nist.fips.180-4, July 2015, 321 . 323 8.2. Informative References 325 [DIGALM] National Institute of Standards and Technology, "Digital 326 identity guidelines: authentication and lifecycle 327 management", DOI 10.6028/nist.sp.800-63b, June 2017, 328 . 330 [DMR] Dell'Amico, M., Michiardi, P., and Y. Roudier, "Password 331 Strength: An Empirical Analysis", 332 DOI 10.1109/INFCOM.2010.5461951, March 2010, 333 . 335 [I-D.ietf-lamps-cms-aes-gmac-alg] 336 Housley, R., "Using the AES-GMAC Algorithm with the 337 Cryptographic Message Syntax (CMS)", Work in Progress, 338 Internet-Draft, draft-ietf-lamps-cms-aes-gmac-alg-02, 30 339 December 2020, . 342 [PHS] Pathirana, A., Halgamuge, M., and A. Syed, "Energy 343 efficient bitcoin mining to maximize the mining profit: 344 Using data from 119 bitcoin mining hardware setups", 345 International Conference on Advances in Business 346 Management and Information Technology, pp 1-14, November 347 2019. 349 [PKCS11] RSA Laboratories, "The Public-Key Cryptography Standards - 350 PKCS #11 v2.11: Cryptographic Token Interface Standard", 351 June 2001. 353 [RFC4231] Nystrom, M., "Identifiers and Test Vectors for HMAC-SHA- 354 224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512", 355 RFC 4231, DOI 10.17487/RFC4231, December 2005, 356 . 358 Author's Address 360 Russ Housley 361 Vigil Security, LLC 362 516 Dranesville Road 363 Herndon, VA, 20170 364 United States of America 366 Email: housley@vigilsec.com