RFC 6655

AES-CCM Cipher Suites for Transport Layer Security (TLS)

πŸ“… published July 2012, from ietf

RFC 6655: AES-CCM Cipher Suites for Transport Layer Security (TLS) πŸ’– (Part 1 of 2)

Okay bestie, let's talk about RFC 6655, AES-CCM Cipher Suites for Transport Layer Security (TLS) πŸŽ€ It's an IETF (Internet Engineering Task Force) doc and it's on the Standards Track, dated July 2012. The authors are D. McGrew from Cisco Systems and D. Bailey from RSA, Security Division of EMC. Its ISSN is 2070-1721. There are no Obsoletes or Updates listed in the title block, so it doesn't obsolete or update anything else. ✨


Abstract ✨

This memo explains how AES (Advanced Encryption Standard) gets used in CCM (Counter with Cipher Block Chaining - Message Authentication Code (CBC-MAC) Mode) inside TLS and DTLS (Datagram TLS) πŸ” The goal is confidentiality and data origin authentication. AES-CCM is compact to implement, which makes it perfect for constrained environments πŸ¦‹


Status of This Memo πŸ“œ

Okay so this is an Internet Standards Track document. πŸ’…

It's a product of the Internet Engineering Task Force (IETF), which means it reflects the consensus of the IETF community. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check Section 2 of RFC 5741.

For the current status, errata, and how to send feedback, go to http://www.rfc-editor.org/info/rfc6655. 🌸


Copyright (c) 2012 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 (http://trustee.ietf.org/license-info) as they stand on the publication date. Please actually read those, because they lay out your rights and restrictions for this document. Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License. βš–οΈ


Table of Contents πŸ—‚οΈ

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.  Conventions Used in This Document . . . . . . . . . . . . . . . 3
3.  RSA-Based AES-CCM Cipher Suites . . . . . . . . . . . . . . . . 3
4.  PSK-Based AES-CCM Cipher Suites . . . . . . . . . . . . . . . . 5
5.  TLS Versions  . . . . . . . . . . . . . . . . . . . . . . . . . 5
6.  New AEAD Algorithms . . . . . . . . . . . . . . . . . . . . . . 5
  6.1.  AES-128-CCM with an 8-Octet Integrity Check Value (ICV) . . 6
  6.2.  AES-256-CCM with a 8-Octet Integrity Check Value (ICV)  . . 6
7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6
8.  Security Considerations . . . . . . . . . . . . . . . . . . . . 6
  8.1.  Perfect Forward Secrecy . . . . . . . . . . . . . . . . . . 6
  8.2.  Counter Reuse . . . . . . . . . . . . . . . . . . . . . . . 6
9.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 7
10. References  . . . . . . . . . . . . . . . . . . . . . . . . . . 7
  10.1. Normative References  . . . . . . . . . . . . . . . . . . . 7
  10.2. Informative References  . . . . . . . . . . . . . . . . . . 8

1. Introduction πŸ¦‹

Okay so this doc is all about using AES (Advanced Encryption Standard) [AES] inside CCM (Counter with CBC-MAC Mode) [CCM] across several TLS ciphersuites. AES-CCM gives you both authentication and confidentiality, and its only primitive is the AES encrypt operation. The AES decrypt operation isn't needed at all! 🀯 That's why it's so compact to implement, which is a big deal in constrained environments. Adoption outside those environments is still necessary for interoperability, like between web clients and embedded servers or between embedded clients and web servers. AES-CCM has also been specified for IPsec Encapsulating Security Payload (ESP) [RFC4309] and 802.15.4 wireless networks [IEEE802154]. πŸ’–

Authenticated encryption is the glow-up here ✨ It doesn't just encrypt the plaintext, it also gives you a way to check its integrity and authenticity. AEAD (Authenticated Encryption with Associated Data) [RFC5116] goes further and checks the integrity and authenticity of associated data that isn't encrypted. This document uses the AEAD facility within TLS 1.2 [RFC5246] and the AES-CCM-based AEAD algorithms defined in [RFC5116]. It also defines additional AEAD algorithms that use AES-CCM but have shorter authentication tags. Those are better for networks where bandwidth is tight and messages can be small. πŸ’…

The ciphersuites in this document use RSA or Pre-Shared Key (PSK) as their key establishment mechanism, and they can be used with DTLS [RFC6347]. AEAD ciphers only showed up in DTLS version 1.2, so these ciphersuites can't be used with earlier versions of that protocol. 🫢


2. Conventions Used in This Document πŸ“

Quick vibe check on the key words: "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" all get read the way [RFC2119] says they should be read. πŸŽ€


3. RSA-Based AES-CCM Cipher Suites πŸ”‘

These ciphersuites are based on the AES-CCM AEAD algorithms AEAD_AES_128_CCM and AEAD_AES_256_CCM from [RFC5116]. Here's the RSA-based lineup:

          CipherSuite TLS_RSA_WITH_AES_128_CCM       = {0xC0,0x9C}
          CipherSuite TLS_RSA_WITH_AES_256_CCM       = {0xC0,0x9D)
          CipherSuite TLS_DHE_RSA_WITH_AES_128_CCM   = {0xC0,0x9E}
          CipherSuite TLS_DHE_RSA_WITH_AES_256_CCM   = {0xC0,0x9F}
          CipherSuite TLS_RSA_WITH_AES_128_CCM_8     = {0xC0,0xA0}
          CipherSuite TLS_RSA_WITH_AES_256_CCM_8     = {0xC0,0xA1)
          CipherSuite TLS_DHE_RSA_WITH_AES_128_CCM_8 = {0xC0,0xA2}
          CipherSuite TLS_DHE_RSA_WITH_AES_256_CCM_8 = {0xC0,0xA3}

These ciphersuites use the AEAD capability in TLS 1.2 [RFC5246]. Each one uses AES-CCM. The ones ending in "_8" have an 8-octet authentication tag, while the rest have 16-octet authentication tags. 🌈

The Hashed Message Authentication Code (HMAC) truncation option described in Section 7 of [RFC6066] (which negotiates the "truncated_hmac" TLS extension) has no effect on cipher suites that don't use HMAC. πŸ™ˆ

The "nonce" input to the AEAD algorithm is exactly the one from [RFC5288]: the "nonce" SHALL be 12 bytes long and is built like this (this is an example of a "partially explicit" nonce; see Section 3.2.1 in [RFC5116]):

                     struct {
           opaque salt[4];
           opaque nonce_explicit[8];
                     } CCMNonce;

The salt is the "implicit" part of the nonce, and it's never sent in the packet. Instead, it gets generated during the handshake. It's either the client_write_IV (when the client is sending) or the server_write_IV (when the server is sending). The salt length (SecurityParameters.fixed_iv_length) is 4 octets. ✨

The nonce_explicit is the "explicit" part of the nonce. The sender picks it and it's carried in each TLS record in the GenericAEADCipher.nonce_explicit field. Its length (SecurityParameters.record_iv_length) is 8 octets. Each value of the nonce_explicit MUST be distinct for each distinct invocation of the GCM encrypt function for any fixed key. Failing this uniqueness requirement can significantly degrade security, so please don't skip it 🚨 The nonce_explicit MAY be the 64-bit sequence number, as long as those values are assured to meet the distinctness requirement. πŸ’€

In DTLS, the 64-bit seq_num is the 16-bit epoch concatenated with the 48-bit seq_num. 🧚

When the nonce_explicit equals the sequence number, the CCMNonce takes on the structure of the CCMNonceExample below:

           struct {
            uint32 client_write_IV; // low order 32-bits
            uint64 seq_num;         // TLS sequence number
           } CCMClientNonce.


           struct {
            uint32 server_write_IV; // low order 32-bits
            uint64 seq_num; // TLS sequence number
           } CCMServerNonce.


           struct {
            case client:
              CCMClientNonce;
            case server:
              CCMServerNonce:
           } CCMNonceExample;

These ciphersuites use the default TLS 1.2 Pseudorandom Function (PRF), which uses HMAC with the SHA-256 hash function. The RSA and DHE_RSA, key exchange is performed as defined in [RFC5246]. πŸ”


4. PSK-Based AES-CCM Cipher Suites πŸ—οΈ

Same vibes as Section 3, because these ciphersuites follow [RFC5116] too. The PSK and DHE_PSK key exchange is performed as in [RFC4279]. Here are the ciphersuites defined:

          CipherSuite TLS_PSK_WITH_AES_128_CCM       = {0xC0,0xA4}
          CipherSuite TLS_PSK_WITH_AES_256_CCM       = {0xC0,0xA5)
          CipherSuite TLS_DHE_PSK_WITH_AES_128_CCM   = {0xC0,0xA6}
          CipherSuite TLS_DHE_PSK_WITH_AES_256_CCM   = {0xC0,0xA7}
          CipherSuite TLS_PSK_WITH_AES_128_CCM_8     = {0xC0,0xA8}
          CipherSuite TLS_PSK_WITH_AES_256_CCM_8     = {0xC0,0xA9)
          CipherSuite TLS_PSK_DHE_WITH_AES_128_CCM_8 = {0xC0,0xAA}
          CipherSuite TLS_PSK_DHE_WITH_AES_256_CCM_8 = {0xC0,0xAB}

The "nonce" input to the AEAD algorithm is defined the same way as in Section 3. πŸ’–

These ciphersuites also use the default TLS 1.2 Pseudorandom Function (PRF), which uses HMAC with the SHA-256 hash function. The PSK and DHE_PSK key exchange is performed as defined in [RFC5487]. ✨

(continued in part 2 πŸ¦‹)

6.2. AES-256-CCM with a 8-Octet Integrity Check Value (ICV) ✨

okay bestie, so AEAD_AES_256_CCM_8 is basically the same vibe as AEAD_AES_256_CCM (check Section 5.4 of [RFC5116] for the original πŸ¦‹) πŸ’– the one difference is the tag: it uses 8 octets for authentication instead of the full 16 octets that AEAD_AES_256_CCM uses 🫢 the ciphertext is the CCM encryption output with that 8-octet authentication tag stuck on the end πŸŽ€ test cases live in [CCM] 🧚 the input and output lengths match AEAD_AES_128_CCM, and an AEAD_AES_128_CCM_8 ciphertext is exactly 8 octets longer than its plaintext πŸ’…

7. IANA Considerations πŸ‘‘

okay so IANA already assigned the values for the ciphersuites from Sections 3 and 4 in the "TLS Cipher Suite" registry 🌸 and the AEAD algorithm values from Section 6 went into the "AEAD Algorithms" registry πŸ“ all done, no cap πŸ’…βœ¨

8. Security Considerations πŸ™ˆ

this part is seriously important, so pay attention bestie 😭

8.1. Perfect Forward Secrecy πŸ”₯

the perfect forward secrecy stuff for RSA-based TLS ciphersuites is covered in the security analysis of [RFC5246] πŸ’œ but here's the tea: only the ephemeral Diffie-Hellman-based ciphersuites can actually provide perfect forward secrecy πŸ’€ so RSA-based ones don't get that, periodt 🫢

8.2. Counter Reuse πŸ’€

AES-CCM security absolutely requires that the counter is never reused 😱πŸ”₯ the IV construction in Section 3 was designed specifically to prevent counter reuse πŸ›‘οΈ so if you're implementing this, do not mess with that πŸ™…β€β™€οΈπŸ’–

9. Acknowledgements 🫢

this document borrows heavily from [RFC5288] 🌈 huge thanks to Stephen Farrell and Robert Cragie for their input πŸ’œπŸŽ€

10. References πŸ“š

10.1. Normative References πŸ¦‹

  • [AES] National Institute of Standards and Technology, "Specification for the Advanced Encryption Standard (AES)", FIPS 197, November 2001. ✨
  • [CCM] National Institute of Standards and Technology, "Recommendation for Block Cipher Modes of Operation: The CCM Mode for Authentication and Confidentiality", SP 800-38C, May 2004. πŸ’…
  • [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. 🌸
  • [RFC4279] Eronen, P. and H. Tschofenig, "Pre-Shared Key Ciphersuites for Transport Layer Security (TLS)", RFC 4279, December 2005. πŸ“
  • [RFC5116] McGrew, D., "An Interface and Algorithms for Authenticated Encryption", RFC 5116, January 2008. 🧚
  • [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008. πŸ‘‘
  • [RFC5288] Salowey, J., Choudhury, A., and D. McGrew, "AES Galois Counter Mode (GCM) Cipher Suites for TLS", RFC 5288, August 2008. πŸ’–
  • [RFC5487] Badra, M., "Pre-Shared Key Cipher Suites for TLS with SHA-256/384 and AES Galois Counter Mode", RFC 5487, March 2009. ✨
  • [RFC6066] Eastlake, D., "Transport Layer Security (TLS) Extensions: Extension Definitions", RFC 6066, January 2011. πŸŽ€
  • [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer Security Version 1.2", RFC 6347, January 2012. πŸ¦‹

10.2. Informative References 🌈

  • [IEEE802154] Institute of Electrical and Electronics Engineers, "Wireless Personal Area Networks", IEEE Standard 802.15.4-2006, 2006. πŸ’œ
  • [RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM Mode with IPsec Encapsulating Security Payload (ESP)", RFC 4309, December 2005. 🫢

Authors' Addresses 🧚

David McGrew Cisco Systems 13600 Dulles Technology Drive Herndon, VA 20171 USA

EMail: mcgrew@cisco.com

Daniel V. Bailey RSA, Security Division of EMC 174 Middlesex Tpke. Bedford, MA 01463 USA

EMail: dbailey@rsa.com

πŸ“¦ where this page comes from