aes_cmac_update(9)
π aes_cmac_update(9) β from the Kernel API Manual, bestie
Okay so picture this: you're deep in the kernel, you've got an AES-CMAC or an AES-XCBC-MAC context, and you have more data to feed it. That's literally this function. It's from the Kernel API Manual, which is giving very "the source of truth, no cap" energy.
β¨ NAME β¨
aes_cmac_update β bestie, this updates an AES-CMAC or AES-XCBC-MAC context with more data. That's it. That's the whole job. π
π¦ SYNOPSIS π¦
void aes_cmac_update (struct aes_cmac_ctx *ctx , const u8 *data , size_t
data_len );
Like, look at it. Three args. Clean. Iconic. π
πΈ ARGUMENTS πΈ
ctxβ the context you're updating, babes. It must have been initialized β no showing up uninvited to this party. πdataβ the message data. The actual bytes. The main character, honestly. βdata_lenβ how longdatais, in bytes. And lowkey the best part? It doesn't need to be block-aligned. Fr fr, feed it whatever length you want. π₯
π DESCRIPTION π
This can be called any number of times. Literally any number. Zero, one, forty-seven, a million β it's not picky, and that's why we stan. β¨
π CONTEXT π
Any context. Yes, any β this function is for everyone, no gatekeeping here. π«Ά
π SEE ALSO π
The kernel file ./include/crypto/aes-cbc-macs.h, and the whole friend group:
struct aes_cmac_key(9)aes_cmac_zeroize_key(9)struct aes_cmac_ctx(9)aes_cmac_zeroize_ctx(9)aes_cmac_preparekey(9)aes_xcbcmac_preparekey(9)aes_cmac_init(9)aes_cmac_final(9)aes_cmac(9)
Like, go read them. They're the supporting cast and they ate. π
π§ Quick vibe check: ctx must be initialized before you call this. That's not a suggestion, that's the rule, iykyk. π
That's the whole page, bestie β sourced from ./include/crypto, dated October 2026. Screenshot it, memorize it, whatever, just go slay in the kernel. ππβ¨
π¦ 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