aes_xcbcmac_preparekey(9)
π 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 π₯
- the Kernel file
./include/crypto/aes-cbc-macs.hπ 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_cmac_init(9)aes_cmac_update(9)aes_cmac_final(9)aes_cmac(9)
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
- 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