Hawkynt

AES-CCM

AES Counter with CBC-MAC authenticated encryption. NIST-standardized AEAD mode combining AES with CBC-MAC for authentication and counter mode for encryption.

Properties

Property Value
Category Authenticated Encryption
Sub-category Authenticated Encryption with Associated Data
Security status πŸŽ“ Educational Only
Complexity Intermediate
Inventor Doug Whiting, Russ Housley, Niels Ferguson
Year 2003
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/aead/aes-ccm.js

Parameters

Parameter Supported values
Key sizes 16 bytes (128 bits) to 32 bytes (256 bits) in steps of 8 bytes
Nonce sizes 7 bytes (56 bits) to 13 bytes (104 bits)
Tag sizes 4 bytes (32 bits) to 16 bytes (128 bits) in steps of 2 bytes

Capabilities

Flag Value
SupportsDetached No

Security

Status: πŸŽ“ Educational Only

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

4 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” RFC 3610 Packet Vector #1 (L=2, M=8)

Field Value
key c0c1c2c3c4c5c6c7c8c9cacbcccdcecf
nonce 00000003020100a0a1a2a3a4a5
aad 0001020304050607
tagSize 8
input 08090a0b0c0d0e0f101112131415161718191a1b1c1d1e
expected 588c979a61c663d2f066d0c2c0f989806d5f6b61dac38417e8d12cfdf926e0

Vector 2 β€” RFC 3610 Packet Vector #2 (L=2, M=8)

Field Value
key c0c1c2c3c4c5c6c7c8c9cacbcccdcecf
nonce 00000004030201a0a1a2a3a4a5
aad 0001020304050607
tagSize 8
input 08090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f
expected 72c91a36e135f8cf291ca894085c87e3cc15c439c9e43a3ba091d56e10400916

Vector 3 β€” NIST SP 800-38C Appendix C Example 1 (L=8, M=4)

Field Value
key 404142434445464748494a4b4c4d4e4f
nonce 10111213141516
aad 0001020304050607
tagSize 4
input 20212223
expected 7162015b4dac255d

Vector 4 β€” NIST SP 800-38C Appendix C Example 3 (L=4, M=8)

Field Value
key 404142434445464748494a4b4c4d4e4f
nonce 101112131415161718191a1b
aad 000102030405060708090a0b0c0d0e0f10111213
tagSize 8
input 202122232425262728292a2b2c2d2e2f3031323334353637
expected e3b201a9f5b71a7a9b1ceaeccd97e70b6176aad9a4428aa5484392fbc1b09951

← All algorithms