idnits 2.17.1 draft-ietf-lamps-cms-aes-gmac-alg-03.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (27 January 2021) is 1185 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. 'GCM' Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 3 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 Intended status: Standards Track 27 January 2021 5 Expires: 31 July 2021 7 Using the AES-GMAC Algorithm with the Cryptographic Message Syntax (CMS) 8 draft-ietf-lamps-cms-aes-gmac-alg-03 10 Abstract 12 This document specifies the conventions for using the AES-GMAC 13 Message Authentication Code algorithms with the Cryptographic Message 14 Syntax (CMS) as specified in RFC 5652. 16 Status of This Memo 18 This Internet-Draft is submitted in full conformance with the 19 provisions of BCP 78 and BCP 79. 21 Internet-Drafts are working documents of the Internet Engineering 22 Task Force (IETF). Note that other groups may also distribute 23 working documents as Internet-Drafts. The list of current Internet- 24 Drafts is at https://datatracker.ietf.org/drafts/current/. 26 Internet-Drafts are draft documents valid for a maximum of six months 27 and may be updated, replaced, or obsoleted by other documents at any 28 time. It is inappropriate to use Internet-Drafts as reference 29 material or to cite them other than as "work in progress." 31 This Internet-Draft will expire on 31 July 2021. 33 Copyright Notice 35 Copyright (c) 2021 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 40 license-info) in effect on the date of publication of this document. 41 Please review these documents carefully, as they describe your rights 42 and restrictions with respect to this document. Code Components 43 extracted from this document must include Simplified BSD License text 44 as described in Section 4.e of the Trust Legal Provisions and are 45 provided without warranty as described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 51 3. Message Authentication Code Algorithms . . . . . . . . . . . 2 52 3.1. AES-GMAC . . . . . . . . . . . . . . . . . . . . . . . . 2 53 4. Implementation Considerations . . . . . . . . . . . . . . . . 3 54 5. ASN.1 Module . . . . . . . . . . . . . . . . . . . . . . . . 4 55 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 56 7. Security Considerations . . . . . . . . . . . . . . . . . . . 5 57 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 58 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 59 8.2. Informative References . . . . . . . . . . . . . . . . . 6 60 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 62 1. Introduction 64 This document specifies the conventions for using the AES-GMAC 65 [AES][GCM] Message Authentication Code (MAC) algorithm with the 66 Cryptographic Message Syntax (CMS) [RFC5652]. 68 2. Terminology 70 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 71 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 72 "OPTIONAL" in this document are to be interpreted as described in 73 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 74 capitals, as shown here. 76 3. Message Authentication Code Algorithms 78 This section specifies the conventions employed by CMS [RFC5652] 79 implementations that support the AES-GMAC [AES][GCM] Message 80 Authentication Code (MAC) algorithm. 82 MAC algorithm identifiers are located in the AuthenticatedData 83 macAlgorithm field. 85 MAC values are located in the AuthenticatedData mac field. 87 3.1. AES-GMAC 89 The AES-GMAC [AES][GCM] Message Authentication Code (MAC) algorithm 90 uses one of the following algorithm identifiers in the 91 AuthenticatedData macAlgorithm field; the choice depends on the size 92 of the AES key, which is either 128 bits, 192 bits, or 256 bits: 94 aes OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) 95 organization(1) gov(101) csor(3) nistAlgorithm(4) 1 } 97 id-aes128-GMAC OBJECT IDENTIFIER ::= { aes 9 } 99 id-aes192-GMAC OBJECT IDENTIFIER ::= { aes 29 } 101 id-aes256-GMAC OBJECT IDENTIFIER ::= { aes 49 } 103 For all three of these algorithm identifier values, the 104 AlgorithmIdentifier parameters field MUST be present, and the 105 parameters MUST contain GMACParameters: 107 GMACParameters ::= SEQUENCE { 108 nonce OCTET STRING, -- recommended size is 12 octets 109 length MACLength DEFAULT 12 } 111 MACLength ::= INTEGER (12 | 13 | 14 | 15 | 16) 113 The GMACParameters nonce field is the GMAC initialization vector. 114 The nonce may have any number of bits between 8 and (2^64)-1, but it 115 MUST be a multiple of 8 bits. Within the scope of any content- 116 authentication key, the nonce value MUST be unique. A nonce value of 117 12 octets can be processed more efficiently, so that length for the 118 nonce value is RECOMMENDED. 120 The GMACParameters length field tells the size of the message 121 authentication code. It MUST match the size in octets of the value 122 in the AuthenticatedData mac field. A length of 12 octets is 123 RECOMMENDED. 125 4. Implementation Considerations 127 An implementation of the Advanced Encryption Standard (AES) Galois/ 128 Counter Mode (GCM) authenticated encryption algorithm is specified in 129 [GCM]. An implementation of AES-GCM can be used to compute the GMAC 130 message authentication code by providing the content-authentication 131 key as the AES key, the nonce as the initialization vector, a zero- 132 length plaintext content, and the content to be authenticated as the 133 additional authenticated data (AAD). The result of the AES-GCM 134 invocation is the AES-GMAC authentication code, which is called the 135 authentication tag in some implementations. In AES-GCM, the 136 encryption step is skipped when no input plaintext is provided, and 137 therefore, no ciphertext is produced. 139 The DEFAULT and RECOMMENDED values in GMACParameters were selected to 140 align with the parameters defined for AES-GCM in Section 3.2 of 141 [RFC5084]. 143 5. ASN.1 Module 145 The following ASN.1 module uses the definition for MAC-ALGORITHM from 146 [RFC5912]. 148 CryptographicMessageSyntaxGMACAlgorithms 149 { iso(1) member-body(2) us(840) rsadsi(113549) 150 pkcs(1) pkcs-9(9) smime(16) modules(0) 151 id-mod-aes-gmac-alg-2020(TBD) } 153 DEFINITIONS IMPLICIT TAGS ::= 154 BEGIN 156 -- EXPORTS All 158 IMPORTS 159 AlgorithmIdentifier{}, MAC-ALGORITHM 160 FROM AlgorithmInformation-2009 -- from [RFC5912] 161 { iso(1) identified-organization(3) dod(6) internet(1) 162 security(5) mechanisms(5) pkix(7) id-mod(0) 163 id-mod-algorithmInformation-02(58)} ; 165 -- Object Identifiers 167 aes OBJECT IDENTIFIER ::= { joint-iso-itu-t(2) country(16) us(840) 168 organization(1) gov(101) csor(3) nistAlgorithm(4) 1 } 170 id-aes128-GMAC OBJECT IDENTIFIER ::= { aes 9 } 172 id-aes192-GMAC OBJECT IDENTIFIER ::= { aes 29 } 174 id-aes256-GMAC OBJECT IDENTIFIER ::= { aes 49 } 176 -- GMAC Parameters 178 GMACParameters ::= SEQUENCE { 179 nonce OCTET STRING, -- recommended size is 12 octets 180 length MACLength DEFAULT 12 } 182 MACLength ::= INTEGER (12 | 13 | 14 | 15 | 16) 184 -- Algorithm Identifiers 186 maca-aes128-GMAC MAC-ALGORITHM ::= { 187 IDENTIFIER id-aes128-GMAC 188 PARAMS TYPE GMACParameters ARE required 189 IS-KEYED-MAC TRUE } 191 maca-aes192-GMAC MAC-ALGORITHM ::= { 192 IDENTIFIER id-aes192-GMAC 193 PARAMS TYPE GMACParameters ARE required 194 IS-KEYED-MAC TRUE } 196 maca-aes256-GMAC MAC-ALGORITHM ::= { 197 IDENTIFIER id-aes256-GMAC 198 PARAMS TYPE GMACParameters ARE required 199 IS-KEYED-MAC TRUE } 201 END -- of CryptographicMessageSyntaxGMACAlgorithms 203 6. IANA Considerations 205 IANA is asked to register object identifiers for one module 206 identifier in the "SMI Security for S/MIME Module Identifier 207 (1.2.840.113549.1.9.16.0)" registry for id-mod-aes-gmac-alg-2020. 209 7. Security Considerations 211 The CMS provides a method for authenticating data. This document 212 identifies the conventions for using the AES-GMAC algorithm with the 213 CMS. 215 The key management technique employed to distribute message- 216 authentication keys must itself provide authentication, otherwise the 217 content is delivered with integrity from an unknown source. 219 When more than two parties share the same message-authentication key, 220 data origin authentication is not provided. Any party that knows the 221 message-authentication key can compute a valid MAC, therefore the 222 content could originate from any one of the parties. 224 Within the scope of any content-authentication key, the AES-GMAC 225 nonce value MUST be unique. Use of a nonce value more than once 226 allows an attacker to generate valid AES-GMAC authentication codes 227 for arbitrary messages, resulting in the loss of authentication as 228 described in Appendix A of [GCM]. 230 Implementations must randomly generate message-authentication keys. 231 The use of inadequate pseudo-random number generators (PRNGs) to 232 generate keys can result in little or no security. An attacker may 233 find it much easier to reproduce the PRNG environment that produced 234 the keys, searching the resulting small set of possibilities, rather 235 than brute force searching the whole key space. The generation of 236 quality random numbers is difficult. [RFC4086] offers important 237 guidance in this area. 239 Implementers should be aware that cryptographic algorithms become 240 weaker with time. As new cryptanalysis techniques are developed and 241 computing performance improves, the work factor to break a particular 242 cryptographic algorithm will reduce. Therefore, cryptographic 243 algorithm implementations should be modular allowing new algorithms 244 to be readily inserted. That is, implementers should be prepared to 245 regularly update the set of algorithms in their implementations. 247 8. References 249 8.1. Normative References 251 [AES] National Institute of Standards and Technology (NIST), 252 "Advanced Encryption Standard (AES)", FIPS 253 Publication 197, November 2001. 255 [GCM] Dworkin, M., "Recommendation for Block Cipher Modes of 256 Operation: Galois/Counter Mode (GCM) and GMAC", NIST 257 Special Publication 800-38D, November 2007. 259 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 260 Requirement Levels", BCP 14, RFC 2119, 261 DOI 10.17487/RFC2119, March 1997, 262 . 264 [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, 265 RFC 5652, DOI 10.17487/RFC5652, September 2009, 266 . 268 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 269 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 270 May 2017, . 272 8.2. Informative References 274 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 275 "Randomness Requirements for Security", BCP 106, RFC 4086, 276 DOI 10.17487/RFC4086, June 2005, 277 . 279 [RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated 280 Encryption in the Cryptographic Message Syntax (CMS)", 281 RFC 5084, DOI 10.17487/RFC5084, November 2007, 282 . 284 [RFC5912] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the 285 Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, 286 DOI 10.17487/RFC5912, June 2010, 287 . 289 Author's Address 291 Russ Housley 292 Vigil Security, LLC 293 516 Dranesville Road 294 Herndon, VA, 20170 295 United States of America 297 Email: housley@vigilsec.com