aes_xcbcmac_preparekey(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aes_xcbcmac_preparekey(9) β€” like, the Kernel API Manual entry, bestie

okay so real talk: this is a section 9 manpage from the Kernel API Manual, and it's about prepping a key for AES-XCBC-MAC. it's short, it's sweet, it's giving "small function, big responsibilities" energy ✨ let's get into it 🫢


🌸 NAME 🌸

aes_xcbcmac_preparekey β€” literally just Prepare a key for AES-XCBC-MAC πŸ’– that's the whole assignment, no cap.


✨ SYNOPSIS ✨

void aes_xcbcmac_preparekey(struct aes_cmac_key *key,
                            const u8 in_key[static AES_KEYSIZE_128]);

so it returns void (nothing back, she's a doer not a returner πŸ’…), takes a struct aes_cmac_key * and a const u8 array that's static AES_KEYSIZE_128 long. that's it. that's the vibe 🌈


πŸŽ€ ARGUMENTS πŸŽ€

  • key β€” (output) the key struct you're gonna initialize. this is the one getting the glow-up ✨ she comes in empty, she leaves prepared 🧚
  • in_key β€” the raw key, bestie. and per the AES-XCBC-MAC specification (RFC 3566), this bad boy is 128 bits, which matches the internal use of AES-128 πŸ‘‘ like, exactly 128 bits, don't try to be cute and pass something else fr fr

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea β˜•: AES-XCBC-MAC and AES-CMAC are lowkey the same thing except for the key preparation step. that's the only difference. everything else? identical energy πŸ’€

after that key-prep step happens, AES-XCBC-MAC is fully supported via the aes_cmac_* functions β€” the way that she just slots right into the CMAC family like she was always there 🫢

🚨 and like, a gentle heads-up from the docs themselves: New users should use AES-CMAC instead of AES-XCBC-MAC. so if you're new here, pick CMAC. it's the main character now πŸ‘‘

πŸ¦‹ CONTEXT πŸ¦‹

Any context. literally any. she does not care where you call her from, she's flexible like that πŸ’…βœ¨


πŸ”₯ SEE ALSO πŸ”₯

go read those too, iykyk πŸ“šπŸ’–


⭐ sign-off ⭐

and that's the page!! screams from the ./include/crypto source, dated October 2026 πŸ—“οΈβœ¨ go prep those keys responsibly bestie, mwah πŸ’‹πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from