aes_ccm_decrypt_update(9)
β¨ aes_ccm_decrypt_update β incrementally decrypt data with AES-CCM β¨
okay so bestie, welcome to the aes_ccm_decrypt_update(9) page π«Ά it lives in the Kernel API Manual and it's literally the "keep decrypting in chunks" girlie of the AES-CCM family. let's get into it π
πΈ SYNOPSIS πΈ
void aes_ccm_decrypt_update (struct aes_ccm_ctx *ctx , u8 *dst , const
u8 *src , size_t len );
that's the whole vibe. one function, four args, and it returns void (so no return value to check, she just does it π).
π ARGUMENTS π
ctxβ an AES-CCM context. like, the main character struct holding all your state π§dstβ the destination buffer, aka where the plaintext lands π«. it can be in-place or out-of-place, no cap. but for other overlaps the behavior is unspecified π so don't try to be cute with weird overlapping buffers, okay? that's giving undefined and we don't stan.srcβ the source ciphertext data π β and just to be super clear, this does not include the auth tag. the tag is a separate thing, bestie.lenβ number of bytes to decrypt π literally just how much you're decrypting this round.
π¦ DESCRIPTION π¦
so here's the tea β: you can call this only after all associated data has been processed. like, that's a prerequisite, not a suggestion π.
also β and this is highkey important β the total length of the decrypted data (over all calls to this function) MUST match the data_len that was passed to aes_ccm_init. so if you init'd with a data_len, every single len you feed this function across all your calls has to add up to exactly that. no more, no less, periodt π―.
β οΈ IMPORTANT: callers MUST NOT assume that any decrypted or associated data is authentic until the authentication tag has been verified π₯ like, do NOT trust that data yet, bestie, it has not earned your trust. verify the tag first, then you can relax π
π CONTEXT π
any context π that's it, she's flexible, she's low-maintenance, she slays in any context.
π 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_decrypt(9)aes_ccm_init(9)aes_ccm_auth_update(9)aes_ccm_encrypt_update(9)aes_ccm_encrypt_final(9)aes_ccm_decrypt_final(9)
the whole friend group fr fr π
and that's the page!! π source/location is ./include/crypto and this iconic little doc is dated October 2026 β go forth and decrypt incrementally, bestie, and remember: verify that tag before you trust anyone π€π
π¦ 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