aes_ccm_decrypt_update(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 🌈

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