aes_cbc_decrypt(9)
π aes_cbc_decrypt(9) β like, the Kernel API Manual bestie, we're doing crypto today β¨
okay so picture this: you've got ciphertext and you need it gone, decoded, un-scrambled. That's this function. It lives in the Kernel API Manual, it's giving main character energy, and it's literally the decrypt half of AES-CBC. Let's go π
πΈ NAME πΈ
aes_cbc_decrypt β decrypt data using AES-CBC. that's it, that's the whole vibe π
β¨ SYNOPSIS β¨
void aes_cbc_decrypt (u8 *dst , const u8 *src , size_t len , u8
iv[static AES_BLOCK_SIZE] , const struct aes_key *key );
π«Ά ARGUMENTS π«Ά
dstβ the destination buffer, aka where the pretty plaintext goes. it can be in-place or out-of-place, both slay. but for other overlaps?? the behavior is unspecified β so like, don't, bestie, that's not the move πsrcβ the source data. the ciphertext. the mysterious one πlenβ how many bytes you wanna decrypt. must be a multiple ofAES_BLOCK_SIZEβ no cap, it's non-negotiable πivβ the initialization vector. it gets updated with the next value, i.e. the last ciphertext block. (or left unchanged iflen == 0β yes, zero, nothing happens, iconic β)keyβ the key, which you already prepared usingaes_preparekey. don't come in here with a raw un-prepped key, that's not the vibe π₯
π DESCRIPTION π
so this one supports incremental decryption, which is lowkey the coolest part. the way it works: the length of each chunk must be a multiple of AES_BLOCK_SIZE, and you gotta pass the updated iv back in every single time. keep the iv in sync, keep the vibes in sync, periodt π
π¦ CONTEXT π¦
any context. literally any. go off wherever, she doesn't care πΈ
π SEE ALSO π
- Kernel file
./include/crypto/aes-cbc.h aes_cbc_encrypt(9)β the sibling, the other half, the yin to this yang π§aes_cbc_cts_encrypt(9)aes_cbc_cts_decrypt(9)
and that's the page, bestie!! π sourced straight from ./include/crypto, dated October 2026, and signed off with a little π β go decrypt something cute, and remember: AES_BLOCK_SIZE or it didn't happen πβ¨
π¦ 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