crypto_aead_encrypt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ crypto_aead_encrypt(9) β€” Kernel API Manual, but make it make sense

okay bestie, so this one lives in the Kernel API Manual and it's called crypto_aead_encrypt β€” say that three times fast, i can't 😭. it's the "turn your plaintext into ciphertext" girlie, and she's honestly kind of iconic. let's get into it πŸŽ€


✨ NAME ✨

crypto_aead_encrypt β€” encrypt plaintext. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

int crypto_aead_encrypt (struct aead_request *req );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • req β€” a reference to the aead_request handle that's holding literally all the info needed to actually perform the cipher operation. like, it's the main character carrying everything, we love a prepared queen πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

so you're encrypting plaintext data using the aead_request handle. that data structure β€” and the way you fill it with data β€” gets discussed over in the aead_request_* functions, so go read those if you need the tea β˜•

IMPORTANT NOTE 🚨 bestie pls read this one. the encryption operation is the thing that creates the authentication data / tag. that data gets concatenated with the created ciphertext. so the ciphertext memory size is the given number of block cipher blocks + the size defined by the crypto_aead_setauthsize invocation. the caller must ensure that sufficient memory is available for the ciphertext and the authentication tag. no cap, if you skimp on the memory you're gonna have a bad time 😭

⭐ RETURN ⭐

  • 0 if the cipher operation was successful πŸŽ‰
  • < 0 if an error occurred πŸ’€

🌈 SEE ALSO 🌈


okay that's the whole page, you ate that 🫢 this one's sourced from ./include/crypto, dated October 2026, and it's crypto_aead_encrypt(9) β€” go forth and encrypt responsibly, mwah πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from