aes_cmac_zeroize_ctx(9)
π
aes_cmac_zeroize_ctx(9) β zeroize an aes_cmac_ctx structure
okay so bestie, welcome to the Kernel API Manual β¨ this one's a short one but it's lowkey important, fr fr. it's all about wiping a crypto context clean before it ghosts you π«Ά
β¨ NAME β¨
aes_cmac_zeroize_ctx β Zeroize an aes_cmac_ctx structure π§Ή
β¨ SYNOPSIS β¨
void aes_cmac_zeroize_ctx (struct aes_cmac_ctx *ctx );
that's it. that's the whole vibe check π one function, one pointer, no return value, no drama.
β¨ ARGUMENTS β¨
ctxβ the location of the context that should be zeroized. so like, the address of yourstruct aes_cmac_ctx, pointing right at the thing you want scrubbed π this is the main character of the whole page honestly.
β¨ DESCRIPTION β¨
so what does it do? it explicitly fills the aes_cmac_ctx with zeroes. that's the whole bit. no sneaky magic, no clever tricks, just zeroes where your context used to be πΈ
and when do you call it? the moment the context is not required anymore, bestie. because if you don't, its contents can leak on the stack or heap and that is not the slay we're going for π nobody wants leftover crypto state just vibing in memory. it's giving security hazard. we don't love that.
β οΈ heads up: this is only required if you're not usingaes_cmac_final. ifaes_cmac_finalis already in the picture, it's got you covered β don't double up, iykyk π
β¨ SEE ALSO β¨
go touch some of these, they're all part of the same friend group π«Ά
- Kernel file
./include/crypto/aes-cbc-macs.h struct aes_cmac_key(9)aes_cmac_zeroize_key(9)struct aes_cmac_ctx(9)aes_cmac_preparekey(9)aes_xcbcmac_preparekey(9)aes_cmac_init(9)aes_cmac_update(9)aes_cmac_final(9)aes_cmac(9)
okay that's the page!! π huge shoutout to ./include/crypto for housing this iconic little file, and to October 2026 for the timestamp β the Kernel API Manual really said "short but necessary" and honestly? ate. πβ¨ go zeroize responsibly, bestie π
π¦ 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