aes_ecb_decrypt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aes_ecb_decrypt(9) β€” like, the whole glow-up

okay bestie, so this is a page from the Kernel API Manual and honestly? it's a short one but it's iconic in a "we only keep you around for legacy reasons" kind of way. anyway, buckle up πŸŽ€


✨ NAME ✨

aes_ecb_decrypt β€” decrypt data using AES-ECB πŸ”“


✨ SYNOPSIS ✨

void aes_ecb_decrypt (u8 *dst , const u8 *src , size_t len , const
struct aes_key *key );

like yes, that's the whole signature, no cap πŸ’…


✨ ARGUMENTS ✨

  • dst β€” the destination buffer, queen πŸ‘‘. it can be in-place or out-of-place, so do whatever fits your life. but for other overlaps the behavior is unspecified, so like… don't, okay? πŸ™ˆ that's the vibe check you can absolutely fail.
  • src β€” the source data, aka the ciphertext you're trying to un-scramble. 🌸
  • len β€” number of bytes to decrypt. must be a multiple of AES_BLOCK_SIZE, fr fr, no exceptions. 😀
  • key β€” the key, already prepared using aes_preparekey πŸ”‘. don't come at it raw.

✨ DESCRIPTION ✨

ngl, ECB mode is insecure by itself. πŸ’€ like, we said what we said. this function exists only for compatibility with legacy protocols and for internal use by other modes. so it's giving "main character with a tragic backstory" β€” it's here, it works, but it's not the hero of this story. 😭

it does support incremental decryption though, bestie ✨ β€” just remember that the length of each chunk must be a multiple of AES_BLOCK_SIZE. every single one. periodt. πŸ’…

🫢 real talk: don't build something new on ECB. the manpage literally says it's insecure. take the warning seriously even while we're being cute about it.

✨ CONTEXT ✨

any context. literally any. 🌈 go wild.


✨ SEE ALSO ✨

  • the kernel file ./include/crypto/aes-ecb.h
  • aes_ecb_encrypt(9) β€” the encryption twin, go say hi πŸ¦‹

aaaand that's the page!! 🌸 this little cutie lives in ./include/crypto and it's dated October 2026, so like, mark your calendar bestie πŸ’– mwah, go decrypt responsibly βœ¨πŸŽ€

πŸ“¦ where this page comes from