aes_ecb_encrypt(9)
π aes_ecb_encrypt(9) π
okay so bestie, welcome to the Kernel API Manual page for aes_ecb_encrypt β yes the whole manual is literally called that, we're in the big leagues now π
β¨ NAME β¨
aes_ecb_encrypt β encrypt data using AES-ECB π
β¨ SYNOPSIS β¨
void aes_ecb_encrypt (u8 *dst , const u8 *src , size_t len ,
aes_encrypt_arg key );
that's the whole vibe. four args, one function, let's go π«Ά
β¨ ARGUMENTS β¨
dstβ the destination buffer, a.k.a. where the encrypted glow-up lands π . it can be in-place or out-of-place, both are fine. for other overlaps though? nope, the behavior is unspecified β so don't be cute with it πsrcβ the source data, the original, the before picture πΈlenβ number of bytes to encrypt. must be a multiple ofAES_BLOCK_SIZEβ no cap, this is non-negotiable π¨keyβ the key, and it has to be already prepared usingaes_preparekeyoraes_prepareenckeyπβ¨ like, don't hand it a raw key, that's not the move
β¨ DESCRIPTION β¨
okay real talk for a sec: ECB mode is insecure by itself π this is not the moment to build your whole security model on it.
so why does it exist? literally only for compatibility with legacy protocols and for internal use by other modes π§ β that's the whole reason, periodt.
it does support incremental encryption, which is lowkey iconic, BUT (and this is the catch) the length of each chunk must be a multiple of AES_BLOCK_SIZE πβ same rule, every single time.
β¨ CONTEXT β¨
Any context. π truly the most chill line on this page. she's flexible.
β¨ SEE ALSO β¨
- kernel file
./include/crypto/aes-ecb.hπ aes_ecb_decrypt(9)β the reverse queen, iykyk π
and that's the page bestie! π¦ this whole thing lives under ./include/crypto, came out in October 2026, and yeah, it's aes_ecb_encrypt(9) the whole way through π mwah, go encrypt responsibly πβ¨
π¦ 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