Section 4.4 of
RFC 4211 specifies a Password-Based MAC that relies on a one-way function to compute a symmetric key from the password and a MAC algorithm. This section specifies algorithm requirements for the one-way function and the MAC algorithm.
Add guidance about limiting the use of the password as follows:
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.
Change the paragraph describing the "owf" as follows:
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].
Update the guidance on appropriate iteration count values as follows:
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.
Change the paragraph describing the "mac" as follows:
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 [
RFC 4231]:
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 present, the parameters
MUST contain a type of NULL as specified in [
RFC 4231].
The ASN.1 algorithm identifier for AES-GMAC [
AES] [
GMAC] with a 128-bit key is defined in [
RFC 9044]:
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 field tells 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.