RFC 9045
Algorithm Requirements Update to the Internet X.509 Public Key Infrastructure Certificate Request Message Format (CRMF)
RFC 9045 π Algorithm Requirements Update to the Internet X.509 Public Key Infrastructure Certificate Request Message Format (CRMF) π
okay bestie, here's the whole RFC 9045 breakdown β¨ it's an IETF Standards Track doc, so it has real weight π
- Request for Comments: 9045
- Author: R. Housley, Vigil Security π¦
- Updates: RFC 4211 (it's an update to CRMF's algorithm requirements, so basically a glow-up for 4211 πΈ)
- Obsoletes: nothing listed
- Date: June 2021
- Category: Standards Track
- ISSN: 2070-1721
Abstract β¨
this doc updates the cryptographic algorithm requirements for the Password-Based Message Authentication Code in the Internet X.509 Public Key Infrastructure Certificate Request Message Format (CRMF) specified in RFC 4211 π
Status of This Memo π
this is an Internet Standards Track document π
this doc is a product of the Internet Engineering Task Force (IETF). it represents the consensus of the IETF community. it has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). for more info on Internet Standards, check Section 2 of RFC 7841.
for the current status of this document, any errata, and how to give feedback, go to https://www.rfc-editor.org/info/rfc9045 π
Copyright Notice β
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.
this doc is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stand on the publication date. please actually read these, because they describe your rights and restrictions for this doc π«Ά any Code Components pulled out of this document must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as the Simplified BSD License describes.
this doc may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. the person(s) controlling the copyright in some of that material may not have granted the IETF Trust the right to allow modifications outside the IETF Standards Process. unless you get an adequate license from those copyright holders, this doc can't be modified outside the IETF Standards Process, and derivative works can't be created outside it either. the one exceptions are formatting it for publication as an RFC or translating it into languages other than English πΈ
Table of Contents π§
1. Introduction
2. Terminology
3. Signature Key POP
4. Password-Based Message Authentication Code
4.1. Introduction Paragraph
4.2. One-Way Function
4.3. Iteration Count
4.4. MAC Algorithm
5. IANA Considerations
6. Security Considerations
7. References
7.1. Normative References
7.2. Informative References
Acknowledgements
Author's Address
1. Introduction π¦
okay so this doc updates the cryptographic algorithm requirements for the Password-Based Message Authentication Code (MAC) in CRMF [RFC4211] π the algorithms in [RFC4211] were appropriate in 2005, but they're no longer considered the best choices, and honestly it's giving retirement π
- HMAC-SHA1 [HMAC] [SHS] is not broken yet, but there are much stronger alternatives [RFC6194] π₯Ί
- DES-MAC [PKCS11] provides 56 bits of security, which is no longer considered secure [WITHDRAW] π
- Triple-DES-MAC [PKCS11] provides 112 bits of security, which is now deprecated [TRANSIT] π
this update specifies algorithms that are more appropriate today β¨ also, CRMF is defined using Abstract Syntax Notation One (ASN.1) [X680] π
2. Terminology π
here's the key words bit, and it matters. when these words show up in all capitals, they're interpreted as described in BCP 14 [RFC2119] [RFC8174], and only then:
"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
3. Signature Key POP π
Section 4.1 of [RFC4211] covers the proof-of-possession (POP) processing π§ this section updates it so PBMAC1 from Section 7.1 of [RFC8018] is explicitly allowed. here's the before and after, copied exactly because the wording really matters:
OLD:
| algId identifies the algorithm used to compute the MAC value. All
| implementations MUST support id-PasswordBasedMAC. The details on
| this algorithm are presented in section 4.4.
NEW:
| algId identifies the algorithm used to compute the MAC value. All
| implementations MUST support id-PasswordBasedMAC as presented in
| Section 4.4 of [RFC4211]. Implementations MAY also support PBMAC1
| as presented in Section 7.1 of [RFC8018].
4. Password-Based Message Authentication Code πΈ
Section 4.4 of [RFC4211] describes a Password-Based MAC. it uses a one-way function to derive a symmetric key from the password and a MAC algorithm. this section sets the algorithm requirements for both the one-way function and the MAC algorithm π«§
4.1. Introduction Paragraph π
this part adds guidance on limiting how the password gets used:
OLD:
| This MAC algorithm was designed to take a shared secret (a
| password) and use it to compute a check value over a piece of
| information. The assumption is that, without the password, the
| correct check value cannot be computed. The algorithm computes
| the one-way function multiple times in order to slow down any
| dictionary attacks against the password value.
NEW:
| This MAC algorithm was designed to take a shared secret (a
| password) and use it to compute a check value over a piece of
| information. The assumption is that, without the password, the
| correct check value cannot be computed. The algorithm computes
| the one-way function multiple times in order to slow down any
| dictionary attacks against the password value. The password used
| to compute this MAC SHOULD NOT be used for any other purpose.
4.2. One-Way Function π§
this one's about the "owf" paragraph:
OLD:
| owf identifies the algorithm and associated parameters used to
| compute the key used in the MAC process. All implementations MUST
| support SHA-1.
NEW:
| owf identifies the algorithm and associated parameters used to
| compute the key used in the MAC process. All implementations MUST
| support SHA-256 [SHS].
4.3. Iteration Count π
the iteration count guidance gets a major glow-up here π₯
OLD:
| iterationCount identifies the number of times the hash is applied
| during the key computation process. The iterationCount MUST be a
| minimum of 100. Many people suggest using values as high as 1000
| iterations as the minimum value. The trade off here is between
| protection of the password from attacks and the time spent by the
| server processing all of the different iterations in deriving
| passwords. Hashing is generally considered a cheap operation but
| this may not be true with all hash functions in the future.
NEW:
| iterationCount identifies the number of times the hash is applied
| during the key computation process. The iterationCount MUST be a
| minimum of 100; however, the iterationCount SHOULD be as large as
| server performance will allow, typically at least 10,000 [DIGALM].
| There is a trade-off between protection of the password from
| attacks and the time spent by the server processing the
| iterations. As part of that trade-off, an iteration count smaller
| than 10,000 can be used when automated generation produces shared
| secrets with high entropy.
4.4. MAC Algorithm π
the "mac" paragraph is getting an upgrade too π
OLD:
| mac identifies the algorithm and associated parameters of the MAC
| function to be used. All implementations MUST support HMAC-SHA1
| [HMAC]. All implementations SHOULD support DES-MAC and Triple-
| DES-MAC [PKCS11].
NEW:
| mac identifies the algorithm and associated parameters of the MAC
| function to be used. All implementations MUST support HMAC-SHA256
| [HMAC]. All implementations SHOULD support AES-GMAC [AES] [GMAC]
| with a 128-bit key.
for convenience, the identifiers for these two algorithms are repeated here π
the ASN.1 algorithm identifier for HMAC-SHA256 is defined in [RFC4231]:
id-hmacWithSHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
us(840) rsadsi(113549) digestAlgorithm(2) 9 }
when this object identifier is used in the ASN.1 algorithm identifier, the parameters SHOULD be present. when they're present, the parameters MUST contain a type of NULL, as specified in [RFC4231] π«Ά
the ASN.1 algorithm identifier for AES-GMAC [AES] [GMAC] with a 128-bit key is defined in [RFC9044]:
id-aes128-GMAC OBJECT IDENTIFIER ::= { joint-iso-itu-t(2)
country(16) us(840) organization(1) gov(101) csor(3)
nistAlgorithm(4) aes(1) 9 }
when this object identifier is used in the ASN.1 algorithm identifier, the parameters MUST be present, and the parameters MUST contain the GMACParameters structure as follows:
GMACParameters ::= SEQUENCE {
nonce OCTET STRING,
length MACLength DEFAULT 12 }
MACLength ::= INTEGER (12 | 13 | 14 | 15 | 16)
the GMACParameters nonce parameter is the GMAC initialization vector π the nonce may have any number of bits between 8 and (2^64)-1, but it MUST be a multiple of 8 bits. within the scope of any GMAC key, the nonce value MUST be unique. a nonce value of 12 octets can be processed more efficiently, so that length for the nonce value is RECOMMENDED π§
the GMACParameters length parameter tells you the size of the message authentication code in octets. GMAC supports lengths between 12 and 16 octets, inclusive. however, for use with CRMF, the maximum length of 16 octets MUST be used π
5. IANA Considerations π·
this document has no IANA actions β¨
6. Security Considerations β¨
okay bestie, this section is SERIOUS ππ the whole password-based MAC is only as strong as two things: how many times the hash gets run (that's iterationCount) and how unguessable the password is. π
Hardware that calculates hashes is super cheap now [PHS], so a big iterationCount doesn't protect you as much as you'd hope π. That's why the entropy of the password is everything. Researchers in 2010 found that about half the real-world passwords in a leaked corpus could be cracked in under 150 million tries [DMR]. That's a median of only 27 bits of entropy. Literally tragic π
The fix is randomly generated strings π Say you use an alphabet of 60 characters. A random 10-character password gives you 59 bits of entropy, and a random 20-character one gives you 118 bits. Iconic glow-up β¨
Using a one-time password helps too π¦ It makes the MAC tougher, as long as the protected transaction finishes before an attacker can work out the password with an offline attack.
For more on PBMAC1, check [RFC8018] π
For HMAC-SHA256, check [HMAC] and [SHS] π
For AES-GMAC, check [AES] and [GMAC] π§
Okay, real talk: cryptographic algorithms age like milk π₯ They get weaker over time. As new cryptanalysis techniques show up and computers get faster, breaking an algorithm takes less work, so more attackers can actually pull it off. We don't know how attacks will evolve, or how much better they'll get, or when the big jumps will happen. But they WILL get better π€ That's exactly why this specification updates the algorithm requirements for CRMF.
When a Password-Based MAC is used, implementations must protect the password and the MAC key. If an attacker compromises either the password or the MAC key, they may be able to undermine authentication. Guard both like your life depends on it ππ
7. References π
7.1. Normative References
[AES] National Institute of Standards and Technology, "Advanced
Encryption Standard (AES)", FIPS PUB 197,
DOI 10.6028/NIST.FIPS.197, November 2001,
<https://doi.org/10.6028/NIST.FIPS.197>.
[GMAC] Dworkin, M., "Recommendation for Block Cipher Modes of
Operation: Galois/Counter Mode (GCM) and GMAC", NIST
Special Publication 800-38D, DOI 10.6028/NIST.SP.800-38D,
November 2007, <https://doi.org/10.6028/NIST.SP.800-38D>.
[HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104,
DOI 10.17487/RFC2104, February 1997,
<https://www.rfc-editor.org/info/rfc2104>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC4211] Schaad, J., "Internet X.509 Public Key Infrastructure
Certificate Request Message Format (CRMF)", RFC 4211,
DOI 10.17487/RFC4211, September 2005,
<https://www.rfc-editor.org/info/rfc4211>.
[RFC8018] Moriarty, K., Ed., Kaliski, B., and A. Rusch, "PKCS #5:
Password-Based Cryptography Specification Version 2.1",
RFC 8018, DOI 10.17487/RFC8018, January 2017,
<https://www.rfc-editor.org/info/rfc8018>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC9044] Housley, R., "Using the AES-GMAC Algorithm with the
Cryptographic Message Syntax (CMS)", RFC 9044,
DOI 10.17487/RFC9044, May 2021,
<https://www.rfc-editor.org/info/rfc9044>.
[SHS] National Institute of Standards and Technology, "Secure
Hash Standard (SHS)", FIPS PUB 180-4,
DOI 10.6028/NIST.FIPS.180-4, August 2015,
<https://doi.org/10.6028/NIST.FIPS.180-4>.
[X680] ITU-T, "Information technology -- Abstract Syntax Notation
One (ASN.1): Specification of basic notation", ITU-T
Recommendation X.680, August 2015.
7.2. Informative References
[DIGALM] National Institute of Standards and Technology, "Digital
Identity Guidelines: Authentication and Lifecycle
Management", NIST Special Publication 800-63B,
DOI 10.6028/NIST.SP.800-63B, June 2017,
<https://doi.org/10.6028/NIST.SP.800-63B>.
[DMR] Dell'Amico, M., Michiardi, P., and Y. Roudier, "Password
Strength: An Empirical Analysis",
DOI 10.1109/INFCOM.2010.5461951, March 2010,
<https://doi.org/10.1109/INFCOM.2010.5461951>.
[PHS] Pathirana, A., Halgamuge, M., and A. Syed, "Energy
Efficient Bitcoin Mining to Maximize the Mining Profit:
Using Data from 119 Bitcoin Mining Hardware Setups",
International Conference on Advances in Business
Management and Information Technology, pp. 1-14, November
2019.
[PKCS11] RSA Laboratories, "PKCS #11 v2.11: Cryptographic Token
Interface Standard", November 2001.
[RFC4231] Nystrom, M., "Identifiers and Test Vectors for HMAC-SHA-
224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512",
RFC 4231, DOI 10.17487/RFC4231, December 2005,
<https://www.rfc-editor.org/info/rfc4231>.
[RFC6194] Polk, T., Chen, L., Turner, S., and P. Hoffman, "Security
Considerations for the SHA-0 and SHA-1 Message-Digest
Algorithms", RFC 6194, DOI 10.17487/RFC6194, March 2011,
<https://www.rfc-editor.org/info/rfc6194>.
[TRANSIT] National Institute of Standards and Technology,
"Transitioning the Use of Cryptographic Algorithms and Key
Lengths", NIST Special Publication 800-131Ar2,
DOI 10.6028/NIST.SP.800-131Ar2, March 2019,
<https://doi.org/10.6028/NIST.SP.800-131Ar2>.
[WITHDRAW] National Institute of Standards and Technology, "NIST
Withdraws Outdated Data Encryption Standard", June 2005,
<https://www.nist.gov/news-events/news/2005/06/nist-
withdraws-outdated-data-encryption-standard>.
Acknowledgements π«Ά
Huge thank-yous to Hans Aschauer, Hendrik Brockhaus, Quynh Dang, Roman Danyliw, Lars Eggert, Tomas Gustavsson, Jonathan Hammell, Tim Hollebeek, Ben Kaduk, Erik Kline, Lijun Liao, Mike Ounsworth, Francesca Palombini, Tim Polk, Ines Robles, Mike StJohns, and Sean Turner for their careful review and improvements. You all are absolutely iconic ππ
Author's Address π¦
Russ Housley
Vigil Security, LLC
516 Dranesville Road
Herndon, VA 20170
United States of America
Email: housley@vigilsec.com
π¦ where this page comes from
- ietf: rfc9045 2021-06
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms