aes_cmac_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– aes_cmac_init β€” the kernel API manual, bestie edition πŸ’–

okay so you're looking at aes_cmac_init(9) from the Kernel API Manual and honestly? she's a little starter-queen function. let's get into it ✨


🌸 NAME 🌸

aes_cmac_init β€” start computing an AES-CMAC or AES-XCBC-MAC value πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

void aes_cmac_init (struct aes_cmac_ctx *ctx , const struct aes_cmac_key
*key );

like, that's the whole vibe. two pointers, no return value, she just does it πŸ’…

⭐ ARGUMENTS ⭐

  • ctx β€” (output) the context you're initializing. this is the girl you're filling in 🫢
  • key β€” the key to use. ⚠️ and listen, a pointer to the key is saved in the context, so the key must live at least as long as the context does. no cap, don't let your key expire early or you're gonna have a bad time 😭

πŸ”₯ DESCRIPTION πŸ”₯

this one supports both AES-CMAC and AES-XCBC-MAC. which one you actually get depends on whether aes_cmac_preparekey or aes_xcbcmac_preparekey was called first. so like, the choice was made before you got here, she's just following through πŸ’β€β™€οΈ

also: the caller should ensure that the context is zeroized at the end of its lifetime, e.g. by calling aes_cmac_final or aes_cmac_zeroize_ctx. that's the responsible main-character move, do not skip it πŸ™ˆ

🌈 SEE ALSO 🌈


and that's the page, bestie πŸ“ sign-off time: this lil beauty lives under ./include/crypto and it's dated October 2026 β€” iconic, timeless, obsessed πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from