dthe_aead_prep_crypt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 input req->src/req->dst scatterlist. 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 🧚


πŸ’œ 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