aes_cbc_cts_encrypt(9)
β¨ 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 leastAES_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 usingaes_preparekeyoraes_prepareenckeyβ no raw keys allowed, that's the rule πβ¨
β CONTEXT β
Any context. literally any. she's flexible like that π§
π SEE ALSO π
- Kernel file
./include/crypto/aes-cbc.h aes_cbc_encrypt(9)aes_cbc_decrypt(9)aes_cbc_cts_decrypt(9)
go read those too, iykyk ππ₯
ok that's the whole page bestie π don't forget:lenβ₯AES_BLOCK_SIZE, yourivis 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
- 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