RFC 9044: Using the AES-GMAC Algorithm with the Cryptographic Message Syntax (CMS)
- R. Housley
Abstract
This document specifies the conventions for using the AES-GMAC Message Authentication Code algorithm with the Cryptographic Message Syntax (CMS) as specified in RFC 5652.¶
Status of This Memo
This is an Internet Standards Track document.¶
This document 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). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
This document specifies the conventions for using the AES-GMAC [AES] [GCM] Message Authentication Code (MAC) algorithm with the Cryptographic Message Syntax (CMS) [RFC5652].¶
2. Terminology
The key words "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. Message Authentication Code Algorithms
This section specifies the conventions employed by CMS [RFC5652] implementations that support the AES-GMAC [AES] [GCM] Message Authentication Code (MAC) algorithm.¶
MAC algorithm identifiers are located in the Authenticated
MAC values are located in the Authenticated
3.1. AES-GMAC
The AES-GMAC [AES] [GCM] Message Authentication Code (MAC) algorithm
uses one of the following algorithm identifiers in the Authenticated
For all three of these algorithm identifier values, the
Algorithm
The GMACParameters nonce field 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
content
The GMACParameters length field tells the size of the message
authentication code. It MUST match the size in octets of the value
in the Authenticated
4. Implementation Considerations
An implementation of the Advanced Encryption Standard (AES)
Galois/Counter Mode (GCM) authenticated encryption algorithm is specified
in [GCM]. An implementation of AES-GCM can be used to compute the GMAC
message authentication code by providing the content
The DEFAULT and RECOMMENDED values in GMACParameters were selected to align with the parameters defined for AES-GCM in Section 3.2 of [RFC5084].¶
5. ASN.1 Module
The following ASN.1 module uses the definition for MAC-ALGORITHM from [RFC5912].¶
6. IANA Considerations
IANA has registered the object identifier shown in Table 1 in the "SMI Security for S/MIME
Module Identifier
7. Security Considerations
The CMS provides a method for authenticating data. This document identifies the conventions for using the AES-GMAC algorithm with the CMS.¶
The key management technique employed to distribute message
When more than two parties share the same message
Within the scope of any content
Within the scope of any content
If AES-GMAC is used as a building block in another algorithm (e.g., as a pseudorandom function), AES-GMAC MUST be used only one time by that algorithm. For instance, AES-GMAC MUST NOT be used as the pseudorandom function for PBKDF2.¶
When initialization vector (IV) lengths other than 96 bits are used, the GHASH function is used to
process the provided IV, which introduces a potential for IV collisions.
However, IV collisions are not a concern with CMS Authenticated
The probability of a successful forgery is close to 2^(-t), where t is the
number of bits in the authentication tag length (MACLength*8). This nearly
ideal authentication protection is achieved for CMS Authenticated
Implementations must randomly generate message
Implementers should be aware that cryptographic algorithms become weaker
with time. As new cryptanalysis techniques are developed and computing
performance improves, the work factor to break a particular cryptographic
algorithm will reduce. Therefore, cryptographic algorithm implementations
should be modular, allowing new algorithms to be readily inserted. That is,
implementers should be prepared to regularly update the set of algorithms
in their implementations
8. References
8.1. Normative References
- [AES]
-
National Institute of Standards and Technology, "Advanced Encryption Standard (AES)", FIPS PUB 197, DOI 10
.6028 , , <https:///NIST .FIPS .197 doi >..org /10 .6028 /NIST .FIPS .197 - [GCM]
-
Dworkin, M., "Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", NIST Special Publication 800-38D, DOI 10
.6028 , , <https:///NIST .SP .800 -38D doi >..org /10 .6028 /NIST .SP .800 -38D - [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 www >..rfc -editor .org /info /rfc2119 - [RFC5652]
-
Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, DOI 10
.17487 , , <https:///RFC5652 www >..rfc -editor .org /info /rfc5652 - [RFC5912]
-
Hoffman, P. and J. Schaad, "New ASN.1 Modules for the Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, DOI 10
.17487 , , <https:///RFC5912 www >..rfc -editor .org /info /rfc5912 - [RFC8174]
-
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10
.17487 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174
8.2. Informative References
- [F2005]
-
Ferguson, N., "Authentication weaknesses in GCM", , <https://
csrc >..nist .gov /csrc /media /projects /block -cipher -techniques /documents /bcm /comments /cwc -gcm /ferguson2 .pdf - [MV2005]
-
McGrew, D. and J. Viega, "GCM Update", , <https://
csrc >..nist .gov /CSRC /media /Projects /Block -Cipher -Techniques /documents /BCM /Comments /CWC -GCM /gcm -update .pdf - [RFC4086]
-
Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10
.17487 , , <https:///RFC4086 www >..rfc -editor .org /info /rfc4086 - [RFC5084]
-
Housley, R., "Using AES-CCM and AES-GCM Authenticated Encryption in the Cryptographic Message Syntax (CMS)", RFC 5084, DOI 10
.17487 , , <https:///RFC5084 www >..rfc -editor .org /info /rfc5084 - [RFC7696]
-
Housley, R., "Guidelines for Cryptographic Algorithm Agility and Selecting Mandatory
-to , BCP 201, RFC 7696, DOI 10-Implement Algorithms" .17487 , , <https:///RFC7696 www >..rfc -editor .org /info /rfc7696
Acknowledgements
Many thanks to Hans Aschauer, Hendrik Brockhaus, Quynh Dang, Roman Danyliw, Tim Hollebeek, Ben Kaduk, Mike Ounsworth, and Magnus Westerlund for their careful review and thoughtful improvements.¶