AES-CCM
CBC-MAC then counter-mode encryption with AES (NIST SP 800-38C, RFC 3610)
Overview
AES-CCM authenticates the associated data and plaintext with CBC-MAC and encrypts with AES in counter mode, using a single key and a single block cipher. It is common in constrained wireless standards where only an AES encryption core is available.
Counter with CBC-MAC was designed to need only the forward direction of a block cipher, which keeps hardware small. It is an authenticate-then-encrypt construction: a formatted first block encodes the nonce, tag length and message length, the CBC-MAC runs over that block, the associated data and the plaintext, and the tag is encrypted with the first counter block.
CCM is used in IEEE 802.11 (CCMP in WPA2), IEEE 802.15.4, Bluetooth Low Energy and the TLS CCM cipher suites. NextSSL offers AES-128, AES-192 and AES-256 with 16-byte tags and AES-128-CCM-8 with an 8-byte tag. The message length must be known before processing begins, and the mode is two-pass, so it is slower than GCM in software.
History
2003–2004Specified in RFC 3610
Specified in NIST SP 800-38C
How it works
- Format the nonce, tag length and message length into the first block B0.
- Compute CBC-MAC over B0, the length-prefixed associated data and the plaintext.
- Encrypt the plaintext in counter mode starting from counter block 1.
- Encrypt counter block 0 and XOR it with the CBC-MAC value to form the tag.
Security notes
Nonce reuse leaks plaintext XORs and weakens authentication, so nonces must be unique per key. CCM-8 tags offer only 64-bit forgery resistance per attempt and suit only protocols that limit verification attempts.
Typical uses
Variants in NextSSL
4| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| AES-128-CCM aes-128-ccm |
standard FIPS | key 16 · nonce 12 · tag 16 | NIST SP 800-38C, RFC 3610 | safe |
| AES-128-CCM-8 aes-128-ccm-8 |
standard FIPS | key 16 · nonce 12 · tag 8 | NIST SP 800-38C, RFC 3610 | safe |
| AES-192-CCM aes-192-ccm |
standard FIPS | key 24 · nonce 12 · tag 16 | NIST SP 800-38C, RFC 3610 | safe |
| AES-256-CCM aes-256-ccm |
standard FIPS | key 32 · nonce 12 · tag 16 | NIST SP 800-38C, RFC 3610 | safe |
Frequently asked questions
Which AES-CCM variants does NextSSL include?
NextSSL registers 4 AES-CCM variants: aes-128-ccm, aes-128-ccm-8, aes-192-ccm, aes-256-ccm.