STRUCT AES_CMAC_KEY(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct aes_cmac_key(9) ✨

okay bestie so this is a page from the Kernel API Manual and it's literally all about struct aes_cmac_key β€” no cap, that's the whole vibe πŸ’…


🌸 NAME 🌸

struct aes_cmac_key β€” the prepared key for AES-CMAC or AES-XCBC-MAC πŸŽ€

Like, it's the key, but prepared, y'know? It's giving "I've already done my skincare routine" energy. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct aes_cmac_key {
    struct aes_enckey aes;
    union {
      u8 b[AES_BLOCK_SIZE];
      __be64 w[2];
    } k_final[2];
 };

ok so that's the whole struct, copied exactly, don't come for me 😭 keep it character-for-character bestie.


πŸ‘‘ Members πŸ‘‘

  • aes β€” the AES key for cipher block chaining. that's her. the main character key πŸ”₯
  • k_final β€” the finalization subkeys for the final block, and the way this works is so specific so listen up 🫢: k_final[0] (that's CMAC K1, XCBC-MAC K2) gets used if it's a full block. and k_final[1] (that's CMAC K2, XCBC-MAC K3) gets used if it's a partial block. yes bestie, [0] for full, [1] for partial, write it down πŸ“

🌈 SEE ALSO 🌈

go look at the kernel file ./include/crypto/aes-cbc-macs.h β€” it's got the whole friend group in there:

literally the whole squad, iykyk πŸ’–


🧚 and that's the page!! sourced from ./include/crypto, dated October 2026 β€” mwah, iconic, periodt. bye bestie, go prep those keys πŸ’…β­πŸ“
πŸ“¦ where this page comes from