aes_cbc_cts_encrypt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ aes_cbc_cts_encrypt(9) ✨

okay so bestie, this one lives in the Kernel API Manual and it's literally the glow-up function for encrypting your data with AES-CBC-CTS (CS3 variant) πŸ’… β€” the CTS stands for ciphertext stealing and yes she ate πŸ’–


πŸŽ€ NAME πŸŽ€

aes_cbc_cts_encrypt β€” encrypt data using AES-CBC-CTS (CS3 variant), no cap ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void aes_cbc_cts_encrypt (u8 *dst , const u8 *src , size_t len , u8
iv[static AES_BLOCK_SIZE] , aes_encrypt_arg key );

like, that's the whole signature, she's not that complicated 🫢


🌸 ARGUMENTS 🌸

  • dst β€” the destination buffer, i.e. where the encrypted vibes go πŸ’«. It can be in-place or out-of-place, super chill. But for any other overlap? ngl the behavior is unspecified β€” so don't be messy about it, okay? 😭
  • src β€” the source data, the raw material, the main character πŸŽ€
  • len β€” number of bytes to encrypt, and it must be at least AES_BLOCK_SIZE β€” like, minimum effort is required, periodt πŸ’…
  • iv β€” the initialization vector. Heads up: it gets clobbered by this function 😳 so don't come back looking for it, she's gone πŸ™ˆ
  • key β€” the key, and it has to be already prepared using aes_preparekey or aes_prepareenckey β€” no raw keys allowed, that's the rule πŸ”‘βœ¨

⭐ CONTEXT ⭐

Any context. literally any. she's flexible like that 🧚


🌈 SEE ALSO 🌈

go read those too, iykyk πŸ‘‘πŸ”₯


ok that's the whole page bestie πŸ’– don't forget: len β‰₯ AES_BLOCK_SIZE, your iv is getting clobbered, and weird overlaps are on you πŸ™ˆ

mwah πŸ’‹ this page came from the kernel source dir ./include/crypto, dated October 2026 β€” stamped and slayed, fr fr πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from