aes_cbc_decrypt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 of AES_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 if len == 0 β€” yes, zero, nothing happens, iconic ⭐)
  • key β€” the key, which you already prepared using aes_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 πŸ’œ


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