aes_xts_decrypt(9)
π aes_xts_decrypt(9) β the Kernel API Manual, but make it cute π
okay so bestie, welcome to aes_xts_decrypt</pub> β she lives in the Kernel API Manual and she's here to Decrypt data using AES-XTS. that's the whole vibe. decryption. AES-XTS. iconic behavior only. β¨
πΈ NAME πΈ
aes_xts_decrypt β Decrypt data using AES-XTS
π¦ SYNOPSIS π¦
void aes_xts_decrypt (u8 *dst , const u8 *src , size_t len , u8
tweak[static AES_BLOCK_SIZE] , const struct aes_xts_key *key , bool cont
);
like, look at her. six params. zero drama (okay, some drama, we'll get to the overlaps). π
π ARGUMENTS π
dstβ the destination buffer, aka where the decrypted goodness lands. it can be in-place or out-of-place, both slay. for any other overlaps? the behavior is unspecified β so like, don't, bestie. πsrcβ The source data. the raw material. the moment before the glow-up. πlenβ number of bytes to decrypt. on non-final calls it must be a nonzero multiple ofAES_BLOCK_SIZE. on the final call it can be any value>= AES_BLOCK_SIZEβ which is a fancy way of saying ciphertext stealing is supported. she's flexible, we love that. πtweakβ the tweak. she gets updated with the next value, unlesslenisn't a multiple ofAES_BLOCK_SIZE, in which case the value is unspecified β so don't go reading her after that, k? πkeyβ the key, already prepared usingaes_xts_preparekey. do NOT hand her a raw key, she will simply not know what to do with it. π«Άcontβfalseto begin decrypting a new message (do the tweak encryption);trueto continue decrypting a message (skip tweak encryption). yes it's basically a "new convo or same convo" button. π¬
β¨ DESCRIPTION β¨
so this function supports both one-shot and incremental decryption. both. at once. main character energy tbh. π
on the first call, pass cont = false. on any later calls, pass cont = true and the updated tweak. all earlier len must have been multiples of AES_BLOCK_SIZE β that's non-negotiable, fr fr. β
okay tiny warning moment π¨ the "all earlierlenwere multiples ofAES_BLOCK_SIZE" thing is a must. if you fed her a weird length mid-message and then tried to continue, that's on you, not her. π
π§ CONTEXT π§
Any context. that's it. that's the section. she's lowkey available everywhere and honestly? relatable. π
π₯ SEE ALSO π₯
- Kernel file
./include/crypto/aes-xts.h struct aes_xts_key(9)aes_xts_preparekey(9)aes_xts_encrypt(9)
go read these, they're the besties she runs with. iykyk. π
cutest little sign-off ever: this page ships out of ./include/crypto, dated October 2026 πΈ β mwah, take care of her, and remember: tweak goes in, tweak comes out, you literally cannot explain that. π
β¨π
π¦ 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