crypto_aead_encrypt(9)
π 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 theaead_requesthandle 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 β
0if the cipher operation was successful π< 0if an error occurred π
π SEE ALSO π
- Kernel file
./include/crypto/aead.h - Authenticated Encryption With Associated Data (AEAD) Cipher API(9)
struct aead_request(9)struct aead_alg(9)crypto_alloc_aead(9)crypto_free_aead(9)crypto_has_aead(9)crypto_aead_ivsize(9)crypto_aead_authsize(9)crypto_aead_blocksize(9)crypto_aead_setkey(9)crypto_aead_setauthsize(9)crypto_aead_decrypt(9)- Asynchronous AEAD Request Handle(9)
crypto_aead_reqsize(9)aead_request_set_tfm(9)aead_request_alloc(9)aead_request_free(9)aead_request_set_callback(9)aead_request_set_crypt(9)aead_request_set_ad(9)
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
- 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