--- 1/draft-ietf-lamps-cms-aes-gmac-alg-03.txt 2021-03-22 13:42:53.385894274 -0700 +++ 2/draft-ietf-lamps-cms-aes-gmac-alg-04.txt 2021-03-22 13:42:53.405894771 -0700 @@ -1,18 +1,18 @@ Network Working Group R. Housley Internet-Draft Vigil Security -Intended status: Standards Track 27 January 2021 -Expires: 31 July 2021 +Intended status: Standards Track 8 March 2021 +Expires: 9 September 2021 Using the AES-GMAC Algorithm with the Cryptographic Message Syntax (CMS) - draft-ietf-lamps-cms-aes-gmac-alg-03 + draft-ietf-lamps-cms-aes-gmac-alg-04 Abstract This document specifies the conventions for using the AES-GMAC Message Authentication Code algorithms with the Cryptographic Message Syntax (CMS) as specified in RFC 5652. Status of This Memo This Internet-Draft is submitted in full conformance with the @@ -21,21 +21,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on 31 July 2021. + This Internet-Draft will expire on 9 September 2021. 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://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights @@ -47,23 +47,24 @@ Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 3. Message Authentication Code Algorithms . . . . . . . . . . . 2 3.1. AES-GMAC . . . . . . . . . . . . . . . . . . . . . . . . 2 4. Implementation Considerations . . . . . . . . . . . . . . . . 3 5. ASN.1 Module . . . . . . . . . . . . . . . . . . . . . . . . 4 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 7. Security Considerations . . . . . . . . . . . . . . . . . . . 5 - 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 - 8.2. Informative References . . . . . . . . . . . . . . . . . 6 + 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 + 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 + 9.1. Normative References . . . . . . . . . . . . . . . . . . 6 + 9.2. Informative References . . . . . . . . . . . . . . . . . 7 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7 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 @@ -220,78 +221,118 @@ data origin authentication is not provided. Any party that knows the message-authentication key can compute a valid MAC, therefore the content could originate from any one of the parties. Within the scope of any content-authentication key, the AES-GMAC nonce value MUST be unique. Use of a nonce value more than once allows an attacker to generate valid AES-GMAC authentication codes for arbitrary messages, resulting in the loss of authentication as described in Appendix A of [GCM]. + Within the scope of any content-authentication key, the + authentication tag length (MACLength) MUST be fixed. + + When IV lengths other than 96 bits are used, the GHASH function is + used to process the provided IV, which introduces a potential of IV + collisions. However, IV collisions are not a concern with CMS + AuthenticatedData because a fresh content-authentication key is + usually generated for each message. + + 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 + AuthenticatedData when a fresh content-authentication key is + generated for each message. However, the strength of GMAC degrades + slightly as a function of the length of the message being + authenticated [F2005][MV2005]. Implementations SHOULD use 16-octet + authentication tags for messages over 2^64 octets. + Implementations must randomly generate message-authentication keys. The use of inadequate pseudo-random number generators (PRNGs) to generate keys can result in little or no security. An attacker may find it much easier to reproduce the PRNG environment that produced the keys, searching the resulting small set of possibilities, rather than brute force searching the whole key space. The generation of quality random numbers is difficult. [RFC4086] offers important guidance in this area. 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. + More information is available in BCP 201 [RFC7696]. -8. References +8. Acknowledgements -8.1. Normative References + Many thanks to Quynh Dang, Roman Danyliw, Tim Hollebeek, Ben Kaduk, + Mike Ounsworth, and Magnus Westerlund for their careful review and + thoughtful improvements. + +9. References + +9.1. Normative References [AES] National Institute of Standards and Technology (NIST), "Advanced Encryption Standard (AES)", FIPS Publication 197, November 2001. [GCM] Dworkin, M., "Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", NIST Special Publication 800-38D, November 2007. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, DOI 10.17487/RFC5652, September 2009, . + [RFC5912] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the + Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, + DOI 10.17487/RFC5912, June 2010, + . + [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . -8.2. Informative References +9.2. Informative References + + [F2005] Ferguson, N., "Authentication weaknesses in GCM", 20 May + 2005, . Comments to the NIST Modes of Operation + process. + + [MV2005] McGrew, D. and J. Viega, "GCM Update", 31 May 2005, + . + Comments to the NIST Modes of Operation process. [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10.17487/RFC4086, June 2005, . [RFC5084] Housley, R., "Using AES-CCM and AES-GCM Authenticated Encryption in the Cryptographic Message Syntax (CMS)", RFC 5084, DOI 10.17487/RFC5084, November 2007, . - [RFC5912] Hoffman, P. and J. Schaad, "New ASN.1 Modules for the - Public Key Infrastructure Using X.509 (PKIX)", RFC 5912, - DOI 10.17487/RFC5912, June 2010, - . + [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm + Agility and Selecting Mandatory-to-Implement Algorithms", + BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, + . Author's Address - Russ Housley Vigil Security, LLC 516 Dranesville Road Herndon, VA, 20170 United States of America Email: housley@vigilsec.com