aes_ccm_decrypt_final(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aes_ccm_decrypt_final β€” like, the grand finale of AES-CCM decryption

okay bestie, welcome to the aes_ccm_decrypt_final page β€” it's from the Kernel API Manual, section 9, and yeah, it's giving "last step of a very serious crypto ritual" energy. πŸŽ€


✨ SYNOPSIS ✨

int aes_ccm_decrypt_final (struct aes_ccm_ctx *ctx , const u8 *authtag
);

that's the whole signature, no cap β€” it takes two things and hands you back an int. 🫢


🌸 ARGUMENTS 🌸

  • ctx β€” an AES-CCM context. like, the little workspace where all the crypto state has been chilling this whole time. 🧚
  • authtag β€” the stored authentication tag. and bestie, its length is exactly the authtag_len that was passed to aes_ccm_preparekey β€” don't go freestyling a different size, iykyk. πŸ”₯

πŸ’– DESCRIPTION πŸ’–

This is the wrap-up call. the finishing move. the "okay we're done here" moment. ✨

and here's the cute part: it also zeroizes ctx, so the caller doesn't need to do it. that's right, it cleans up after itself β€” main character energy who also does her own dishes. πŸ’…


πŸ¦‹ CONTEXT πŸ¦‹

Any context. literally any. no restrictions, no dress code, go off. 🌈


⭐ RETURN ⭐

  • 0 on success. πŸŽ‰ and listen β€” this is the only case where any decrypted or associated data can be used. like, only only. no exceptions, periodt.
  • -EBADMSG if the message is inauthentic πŸ’€ β€” which means somebody's been messing with your data and you should absolutely not trust it.
fr fr: if you don't get 0 back, do not touch the decrypted data. that's the whole vibe check of this function.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/crypto/aes-ccm.h, plus the whole squad:


and that's the page, bestie πŸ“ β€” brought to you by the fine folks over at ./include/crypto, dated October 2026. mwah, go decrypt something responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from