STRUCT AES_CMAC_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct aes_cmac_ctx(9) 🌸

okay so bestie, we're in the Kernel API Manual today and this one is literally the little bookkeeping struct that holds your whole AES-CMAC / AES-XCBC-MAC vibe while you're computing a value. it's giving "backstage pass" energy β€” not the star of the show, but nothing happens without it πŸ’…


✨ NAME ✨

struct aes_cmac_ctx β€” the context for computing an AES-CMAC or AES-XCBC-MAC value. that's it, that's the whole job πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct aes_cmac_ctx {
    const struct aes_cmac_key *key;
    size_t partial_len;
    u8 h[AES_BLOCK_SIZE];
};

three little members and they all matter, no filler, no fluff, periodt ✨


πŸ‘‘ Members πŸ‘‘

  • key β€” a pointer to the key struct, and bestie listen, it's a pointer and not a copy on purpose. the key struct can be lowkey huge, so we're not out here duplicating it. the catch? it's assumed the key lives at least as long as the context does. so if your key dips out early… yeah, don't do that 😭 the context does not keep it alive for you.
  • partial_len β€” the number of bytes that have been XOR'ed into h since the last AES encryption. it's 0 if no data has been processed yet, and otherwise it's between 1 and AES_BLOCK_SIZE inclusive. so like, it's never a random number, it's either zero or it's in the range, no cap 🫢
  • h β€” the current chaining value. that's the whole description, she's iconic and she's brief πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

like a whole friend group honestly, go read them all, iykyk 🌈


and that's the page !! this one came from ./include/crypto, dated October 2026, and yeah the header/footer both say struct aes_cmac_ctx(9) because she contains multitudes πŸ’œ bye bestie, go hash something 🧚⭐

πŸ“¦ where this page comes from