crypto_alloc_aead(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 the cra_name / name or the cra_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_ERR is true, and PTR_ERR returns 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