RFC 4494
The AES-CMAC-96 Algorithm and Its Use with IPsec
RFC 4494: The AES-CMAC-96 Algorithm and Its Use with IPsec π
Okay bestie, this one is a Standards Track doc from the Network Working Group, dated June 2006 π . It was written by JH. Song (Junhyuk Song), R. Poovendran (Radha Poovendran) and J. Lee (Jicheol Lee) π . Song and Poovendran are from the University of Washington, and Song and Lee are from Samsung Electronics. Its title block doesn't list anything it obsoletes or updates, so it's a fresh standard πΈ.
Status of This Memo β¨
This doc specifies an Internet standards track protocol for the Internet community, and it wants discussion and suggestions for improvements π¬. Check the current edition of the "Internet Official Protocol Standards" (STD 1) for where this protocol stands. Distribution of this memo is unlimited π¦.
Copyright Notice π
Copyright (C) The Internet Society (2006).
Abstract π
Okay so NIST just specified the Cipher-based Message Authentication Code (CMAC) π. It's the same thing as OMAC1, which Iwata and Kurosawa submitted, and OMAC1 is a glow-up of XCBC that shrinks the key size π . This memo says how to use CMAC for authentication in IPsec's Encapsulating Security Payload (ESP) and Authentication Header (AH) protocols π. The new algorithm is called AES-CMAC-96 and it is literally iconic π.
1. Introduction β¨
NIST has recently specified CMAC π. CMAC [NIST-CMAC] is a message authentication code built on a symmetric key block cipher like the Advanced Encryption Standard [NIST-AES]. It's equivalent to the One-Key CBC MAC1 (OMAC1) that Iwata and Kurosawa submitted [OMAC1a, OMAC1b]. OMAC1 improves on the eXtended Cipher Block Chaining mode (XCBC) that Black and Rogaway submitted [XCBCa, XCBCb], and XCBC was itself an upgrade on the basic CBC-MAC π. XCBC fixes the security problems of CBC-MAC, and OMAC1 cuts down the key size of XCBC. Literally a whole arc π«Ά.
This memo describes how to use CMAC for authentication in the IPsec Encapsulating Security Payload [ESP] and Authentication Header [AH] protocols π§. The new algorithm is called AES-CMAC-96. For more on AH and ESP, check [AH] and [ROADMAP] π.
2. Basic Definitions π
Here's the glossary, bestie. Everything is in the table below π.
CBC Cipher Block Chaining mode of operation for message
authentication code.
MAC Message Authentication Code.
A bit string of a fixed length, computed by the MAC
generation algorithm, that is used to establish the
authority and, hence, the integrity of a message.
CMAC Cipher-based MAC based on an approved symmetric key
block cipher, such as the Advanced Encryption
Standard.
Key (K) 128-bit (16-octet) key for AES-128 cipher block.
Denoted by K.
Message (M) Message to be authenticated.
Denoted by M.
Length (len) The length of message M in octets.
Denoted by len.
The minimum value is 0. The maximum value is not
specified in this document.
truncate(T,l) Truncate T (MAC) in most-significant-bit-first
(MSB-first) order to a length of l octets.
T The output of AES-CMAC.
Truncated T The truncated output of AES-CMAC-128 in MSB-first
order.
AES-CMAC CMAC generation function based on AES block cipher
with 128-bit key.
AES-CMAC-96 IPsec AH and ESP MAC generation function based on
AES-CMAC, which truncates the 96 most significant
bits of the 128-bit output.
3. AES-CMAC π¦
AES-CMAC-96 runs on the AES-CMAC [AES-CMAC] core πΈ. Under the hood, AES-CMAC uses the Advanced Encryption Standard cipher block [NIST-AES] and the newish CMAC mode of operation [NIST-CMAC]. It gives you way stronger data integrity than a checksum or an error detecting code, which only catch accidental changes to your data π. CMAC is built to catch intentional, unauthorized changes too, not just accidental ones π‘οΈ. The AES-CMAC output can validate the input message, and that gives you assurance of integrity and authenticity from the source π . According to [NIST-CMAC], at least 64 bits should be used against guessing attacks π. AES-CMAC hits a similar security goal to HMAC [RFC-HMAC]. The difference is that AES-CMAC is built on a symmetric key block cipher (AES), while HMAC is built on a hash function (like SHA-1). So AES-CMAC is a great fit for systems where AES is easier to get than a hash function π₯. More details are in [AES-CMAC] and [NIST-CMAC] π.
4. AES-CMAC-96 π
For IPsec message authentication on AH and ESP, AES-CMAC-96 should be used π. It's AES-CMAC with the output truncated to 96 bits in MSB-first order. The result is a 96-bit MAC that meets the default authenticator length in [AH], and the truncation keeps the most significant bits first. For more on AES-CMAC, refer to [AES-CMAC] and [NIST-CMAC] π§.
Figure 1 shows the AES-CMAC-96 algorithm π:
In step 1, AES-CMAC is applied to the message M of length len with key K β¨.
In step 2, the output block T is truncated to 12 octets in MSB-first order, and the result, Truncated T (TT), is returned π .
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Algorithm AES-CMAC-96 +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ +
+ Input : K (128-bit Key described in Section 4.1) +
+ : M (message to be authenticated) +
+ : len (length of message in octets) +
+ Output : Truncated T (truncated output to length 12 octets) +
+ +
+-------------------------------------------------------------------+
+ +
+ Step 1. T := AES-CMAC (K,M,len); +
+ Step 2. TT := truncate (T, 12); +
+ return TT; +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Figure 1: Algorithm AES-CMAC-96
5. Test Vectors π§ͺ
These test cases match the ones in [NIST-CMAC], except that the output is truncated to 96 bits π.
--------------------------------------------------
K 2b7e1516 28aed2a6 abf71588 09cf4f3c
Subkey Generation
AES_128(key,0) 7df76b0c 1ab899b3 3e42f047 b91b546f
K1 fbeed618 35713366 7c85e08f 7236a8de
K2 f7ddac30 6ae266cc f90bc11e e46d513b
Test Case 1: len = 0
M <empty string>
AES_CMAC_96 bb1d6929 e9593728 7fa37d12
Test Case 2: len = 16
M 6bc1bee2 2e409f96 e93d7e11 7393172a
AES_CMAC_96 070a16b4 6b4d4144 f79bdd9d
Test Case 3: len = 40
M 6bc1bee2 2e409f96 e93d7e11 7393172a
ae2d8a57 1e03ac9c 9eb76fac 45af8e51
30c81c46 a35ce411
AES_CMAC_96 dfa66747 de9ae630 30ca3261
Test Case 4: len = 64
M 6bc1bee2 2e409f96 e93d7e11 7393172a
ae2d8a57 1e03ac9c 9eb76fac 45af8e51
30c81c46 a35ce411 e5fbc119 1a0a52ef
f69f2445 df4f9b17 ad2b417b e66c3710
AES_CMAC_96 51f0bebf 7e3b9d92 fc497417
--------------------------------------------------
6. Interaction with the ESP Cipher Mechanism π
As of this writing, there are no known issues that stop AES-CMAC-96 from being used with any specific cipher algorithm π.
7. Security Considerations π¨
This is serious, bestie ππ¨. For the security considerations, you have to read the security considerations section of [AES-CMAC]. Don't skip it!!
8. IANA Considerations π
IANA has allocated value 8 for IKEv2 Transform Type 3 (Integrity Algorithm) to the AUTH_AES_CMAC_96 algorithm ποΈ.
9. Acknowledgements π«Ά
Parts of this text were borrowed from [NIST-CMAC] and [XCBCa] π·. The authors want to thank Russ Housley for his helpful comments π.
The authors also acknowledge support from these grants: the Collaborative Technology Alliance (CTA) from the US Army Research Laboratory, DAAD19-01-2-0011; the Presidential Award from the Army Research Office, W911NF-05-1-0491; and NSF CAREER, ANI-0093187. The results don't reflect the position of any of the funding agencies π.
10. References π
10.1. Normative References π
[AES-CMAC] Song, JH., Poovendran, R., Lee, J., and T. Iwata, "The
AES-CMAC Algorithm", RFC 4493, June 2006.
[AH] Kent, S., "IP Authentication Header", RFC 4302, December
2005.
[ESP] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC
4303, December 2005.
[NIST-AES] NIST, FIPS 197, "Advanced Encryption Standard (AES)",
November 2001, http://csrc.nist.gov/publications/fips/
fips197/fips-197.pdf.
[NIST-CMAC] NIST, Special Publication 800-38B Draft, "Recommendation
for Block Cipher Modes of Operation: The CMAC Method for
Authentication", March 9, 2005.
10.2. Informative References π¦
[OMAC1a] Tetsu Iwata and Kaoru Kurosawa, "OMAC: One-Key CBC MAC",
Fast Software Encryption, FSE 2003, LNCS 2887, pp. 129-
153, Springer-Verlag, 2003.
[OMAC1b] Tetsu Iwata and Kaoru Kurosawa, "OMAC: One-Key CBC MAC",
Submission to NIST, December 2002. Available from
http://csrc.nist.gov/CryptoToolkit/modes/proposedmodes/
omac/omac-spec.pdf.
[RFC-HMAC] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104, February
1997.
[ROADMAP] Thayer, R., Doraswamy, N., and R. Glenn, "IP Security
Document Roadmap", RFC 2411, November 1998.
[XCBCa] John Black and Phillip Rogaway, "A Suggestion for
Handling Arbitrary-Length Messages with the CBC MAC",
NIST Second Modes of Operation Workshop, August 2001.
Available from http://csrc.nist.gov/CryptoToolkit/modes/
proposedmodes/xcbc-mac/xcbc-mac-spec.pdf.
[XCBCb] John Black and Phillip Rogaway, "CBC MACs for Arbitrary-
Length Messages: The Three-Key Constructions", Journal of
Cryptology, Vol. 18, No. 2, pp. 111-132, Springer-Verlag,
Spring 2005.
Authors' Addresses π
Junhyuk Song
University of Washington
Samsung Electronics
Phone: (206) 853-5843
EMail: songlee@ee.washington.edu, junhyuk.song@samsung.com
Jicheol Lee
Samsung Electronics
Phone: +82-31-279-3605
EMail: jicheol.lee@samsung.com
Radha Poovendran
Network Security Lab (NSL)
Dept. of Electrical Engineering
University of Washington
Phone: (206) 221-6512
EMail: radha@ee.washington.edu
Full Copyright Statement β¨
Okay, bestie, the legal bit π Copyright (C) The Internet Society (2006). π
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. π
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. π
Intellectual Property π¦
The IETF takes no position on whether any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document are valid or in scope, or on whether any license under such rights might or might not be available. It also doesn't say it has made any independent effort to identify any such rights, so no cap, that's not its job here. π§ You can find the procedures for rights in RFC documents in BCP 78 and BCP 79. π
Copies of IPR disclosures made to the IETF Secretariat, and any assurances of licenses to be made available, can be obtained from the IETF's online IPR repository at http://www.ietf.org/ipr. The same goes for the result of an attempt to get a general license or permission for implementers or users to use those proprietary rights for this specification. πΈ
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology required to implement this standard. Send that info to the IETF at ietf-ipr@ietf.org. π
Acknowledgement π«Ά
Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA). π
π¦ where this page comes from
- ietf: rfc4494 2006-06
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms