aes_ccm_decrypt(9)
β¨ NAME β¨
okay so bestie, this is the Kernel API Manual page for aes_ccm_decrypt(9), and it does literally what it says: Decrypt a message with AES-CCM. no cap. π
πΈ SYNOPSIS πΈ
int aes_ccm_decrypt (u8 *dst , const u8 *src , size_t data_len , const u8 *authtag , const u8 *ad , size_t ad_len , const u8 *nonce , size_t nonce_len , const struct aes_ccm_key *key );
π ARGUMENTS π
dstβ the destination plaintext data. It can be in-place or out-of-place, so she's flexible π. For other overlaps the behavior is unspecified.srcβ the source ciphertext data.data_lenβ length of plaintext in bytes (and ciphertext excluding the tag): at most2^(120 - (8 * nonce_len)) - 1.authtagβ the stored authentication tag. Length is theauthtag_lenthat was passed toaes_ccm_preparekey. Usually protocols using AES-CCM put the tag at the end of the ciphertext, in which case this should be set tosrc + data_lenandsrcmust have room for the tag.adβ the associated data.ad_lenβ length of associated data in bytes.nonceβ the nonce.nonce_lenβ length of the nonce in bytes: between7and13inclusive.keyβ the key, already prepared usingaes_ccm_preparekey.
π¦ CONTEXT π¦
Any context. it's giving "universally welcome" β¨.
π RETURN π
0on success. This is the only case where any decrypted or associated data can be used. like, the only only. π-EBADMSGif the message is inauthentic.-EINVALifnonce_lenis invalid.-EOVERFLOWifdata_lenis too large for the selectednonce_len.
bestie, pls note: if it's not 0, do not treat any decrypted or associated data as usable. that's the whole vibe check. π
π SEE ALSO π
Kernel file ./include/crypto/aes-ccm.h: struct aes_ccm_key(9), struct aes_ccm_ctx(9), aes_ccm_preparekey(9), aes_ccm_encrypt(9), aes_ccm_init(9), aes_ccm_auth_update(9), aes_ccm_encrypt_update(9), aes_ccm_decrypt_update(9), aes_ccm_encrypt_final(9), aes_ccm_decrypt_final(9).
mwah π this iconic little page comes from ./include/crypto and is dated October 2026 β go off, kernel docs. π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms