aes_expandkey(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ aes_expandkey β€” like, the AES key glow-up ✨

okay so this is a Kernel API Manual page, and we're talking about aes_expandkey(9) β€” the function that takes your lil baby AES key and expands it, exactly as described in FIPS-197. bestie, it's giving cryptography main character energy πŸ”₯


πŸŽ€ NAME πŸŽ€

aes_expandkey β€” expands the AES key as described in FIPS-197 πŸ’…


🌸 SYNOPSIS 🌸

int aes_expandkey (struct crypto_aes_ctx *ctx , const u8 *in_key ,
unsigned int key_len );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctx β€” where the computed key gets stored. this is the destination, the home, the moment πŸ’–
  • in_key β€” the key you're supplying. the supplied one. the raw material, if you will ✨
  • key_len β€” the length of the supplied key. yes, the length. of the key. that you supplied 🫢

πŸ’œ DESCRIPTION πŸ’œ

So it returns 0 on success β€” slay. the function fails only if an invalid key size (or pointer) is supplied, so like... give it good input and you're golden πŸ™ˆ

The expanded key size is 240 bytes β€” that's the max of 14 rounds with a unique 16 bytes key schedule, plus a 16 bytes key which is used before the first round. math! iconic! πŸ”₯

The decryption key is prepared for the "Equivalent Inverse Cipher" as described in FIPS-197. yes, that's the actual name, no cap.

And the layout, because this part matters: the first slot (16 bytes) of each key (enc or dec) is for the initial combination, the second slot for the first round and so on. so it's slot one, slot two, keep going. periodt πŸ’…


🌈 SEE ALSO 🌈

go read them, they're all part of the same friend group πŸ’–


okay that's the whole page bestie πŸŽ€ it came from ./include/crypto and the version/date situation is October 2026 β€” so mark your calendar, or don't, i'm not your mom πŸ’œ mwah πŸ’‹

πŸ“¦ where this page comes from