Hawkynt

CMAC

Cipher-based Message Authentication Code as defined in NIST SP 800-38B. Provides cryptographic authentication using AES block cipher.

Properties

Property Value
Category Message Authentication
Sub-category CMAC
Security status πŸ›‘οΈ Secure
Complexity Intermediate
Inventor NIST
Year 2005
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/mac/cmac.js

Parameters

Parameter Supported values
MAC sizes 16 bytes (128 bits)

Capabilities

Flag Value
NeedsKey Yes

Security

Status: πŸ›‘οΈ Secure

No vulnerabilities are recorded for this implementation.

Documentation

References

Test vectors

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

Vector 1 β€” NIST SP 800-38B Example 1 - Empty Message

Field Value
key 2b7e151628aed2a6abf7158809cf4f3c
input (empty)
expected bb1d6929e95937287fa37d129b756746

Vector 2 β€” NIST SP 800-38B Example 2 - Single Block

Field Value
key 2b7e151628aed2a6abf7158809cf4f3c
input 6bc1bee22e409f96e93d7e117393172a
expected 070a16b46b4d4144f79bdd9dd04a287c

Vector 3 β€” NIST SP 800-38B Example 3 - Multi Block

Field Value
key 2b7e151628aed2a6abf7158809cf4f3c
input 6bc1bee22e409f96e93d7e117393172a ae2d8a571e03ac9c9eb76fac45af8e51 30c81c46a35ce411
expected dfa66747de9ae63030ca32611497c827

← All algorithms