crypto_alloc_aead(9)
π crypto_alloc_aead(9) β the Kernel API Manual, bestie edition π
Okay so picture this: you're in the kernel, you need an AEAD, and you need a handle for it. That's literally this function. Welcome to crypto_alloc_aead, straight out of the Kernel API Manual, and yes we're gonna get you through it π«Ά
β¨ NAME β¨
crypto_alloc_aead β allocate an AEAD cipher handle. That's the whole vibe. It hands you the handle, you do great things with it π
πΈ SYNOPSIS πΈ
struct crypto_aead * crypto_alloc_aead (const char *alg_name , u32 type
, u32 mask );
π ARGUMENTS π
alg_nameβ this is thecra_name/ name or thecra_driver_name/ driver name of the AEAD cipher. Basically: tell it who you want and it goes and finds them πtypeβ specifies the type of the cipher. Yep. That's the type. That's what it does π¦maskβ specifies the mask for the cipher. Matching vibes, matching energy β¨
π DESCRIPTION π
So what actually happens? You call this and it allocates a cipher handle for an AEAD. The struct crypto_aead it gives back is the cipher handle β and like, it's not optional, bestie. You need it for any subsequent API invocation for that AEAD. Every. Single. One. It's giving main character energy because literally everything else depends on it π
π₯ RETURN π₯
- On success you get the allocated cipher handle π
- On error,
IS_ERRis true, andPTR_ERRreturns the error code β so check it, don't just rawdog the pointer, okay? π
π 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_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_encrypt(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)
Like, go read them. All of them. Iykyk π
Okay that's the whole page!! This iconic little number lives under ./include/crypto, it's dated October 2026, and it's filed as crypto_alloc_aead(9) in the Kernel API Manual. Slay, go allocate something π
β¨π
π¦ 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