dthe_aead_prep_crypt(9)
β¨ dthe_aead_prep_crypt(9) β¨
okay so bestie, we're in the Kernel API Manual today and this one is a whole function from dthe_aead_prep_crypt β yes the (9) means it's a kernel function page, iykyk π
πΈ NAME πΈ
dthe_aead_prep_crypt β literally prepares a crypt scatterlist from req->src/req->dst. that's it, that's the vibe π
π¦ SYNOPSIS π¦
struct scatterlist * dthe_aead_prep_crypt (struct scatterlist *sg ,
unsigned int assoclen , unsigned int cryptlen , u8 *pad_buf );
she takes four things and hands you back a pointer, no cap β¨
π ARGUMENTS π
sgβ your inputreq->src/req->dstscatterlist. the raw material, the main character πassoclenβ the length of the AAD (which we skip, bye bestie π)cryptlenβ the length of the ciphertext/plaintext. heads up though: on decryption this is minus the size of the TAG π·οΈpad_bufβ a zeroed buffer that holds the crypt padding, in case padding is needed π«Ά
π DESCRIPTION π
so what she actually does: she creates a scatterlist containing only the ciphertext/plaintext portion β AAD gets skipped entirely β with padding to align to AES_BLOCK_SIZE β
it's giving "i only want the good part, and i want it lined up perfectly" π
π₯ RETURN π₯
you get a pointer to the ciphertext scatterlist. slay. but if something goes wrong you get ERR_PTR(error) instead π
β οΈ real talk: the calling function needs to free the returned scatterlist when done. don't just leave her hanging, that's rude fr fr
π§ SEE ALSO π§
- Kernel file
./drivers/crypto/ti/dthev2-aes.c dthe_aead_prep_aad(9)
π that's the whole page bestie, go forth and align your blocks π
and for the sign-off β this one comes from the ./drivers/crypto/ti corner of the kernel, dated October 2026 π see you in the next manpage, mwah πβ¨
π¦ 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