Skip to main content

Module aes_ccm_256

Module aes_ccm_256 

Source
Expand description

Test the AES-256-CCM implementation using NIST vectors.

Each test vector is run twice: once encrypting, once decrypting. The following cases are covered:

Vec 0 — auth-only (confidential=false), AAD only, no plaintext, 16-byte MIC Vec 1 — full AEAD: AAD + plaintext, 16-byte MIC Vec 2 — full AEAD: AAD + plaintext, 16-byte MIC Vec 3 — full AEAD: AAD + plaintext, 16-byte MIC Vec 4 — full AEAD: AAD + plaintext, 16-byte MIC Vec 5 — tampered MIC: decryption must report tag_is_valid = false Vec 6 — full AEAD: AAD + plaintext, 14-byte MIC

Buffer layout for each vector: [0 .. a_data.len()] — AAD (a_data) [a_data.len() .. a_data.len() + m_data.len()] — plaintext (enc) [a_data.len() .. a_data.len() + m_data.len() + tag.len()] — ciphertext + MIC (dec)

Structs§

TestAES256Ccm