KCAPI_AEAD_INIT(3)

πŸ’– kcapi_aead_init(3) β€” the libkcapi glow-up πŸ’–

okay bestie, sit DOWN, because we're about to talk about kcapi_aead_init from the libkcapi manual, and honestly? it's giving ✨ establishing a connection to the kernel ✨ and I'm obsessed.


🌸 NAME 🌸

kcapi_aead_init β€” literally just the initialization of a cipher handle, no biggie, just your girl getting the whole thing set up πŸŽ€


✨ SYNOPSIS ✨

int kcapi_aead_init(struct kcapi_handle ** handle,
                    const char * ciphername, uint32_t flags);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [out] the cipher handle, which gets filled in during the call 🫢
  • ciphername β€” [in] the kernel crypto API cipher name, exactly as specified in /proc/crypto (yes, that file, go look πŸ‘€)
  • flags β€” [in] the flags that specify the type of cipher handle πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

so here's the vibe: this function initializes an AEAD cipher handle and establishes the connection to the kernel. main character energy, fr fr πŸ‘‘

On success, a pointer to the kcapi_handle object is returned in *handle. And bestie, listen β€” you gotta call kcapi_aead_destroy afterwards to free the resources. Don't leave it hanging, that's not cute 😭

and now the returns, no cap:

  • 0 upon success πŸŽ‰
  • -ENOENT β€” algorithm not available πŸ’€
  • -EOPNOTSUPP β€” AF_ALG family not available πŸ™ˆ
  • -EINVAL β€” accept syscall failed
  • -ENOMEM β€” cipher handle cannot be allocated 😭
like, not me listing every single one of these error codes with my whole chest, but you NEED them, iykyk 🧚

🌈 AUTHOR 🌈

Stephan Mueller <smueller@chronox.de>

  • Author. that's it, that's the credit, and we stan πŸ‘‘


and that's the whole page, bestie!! πŸ’– this was libkcapi Manual version 1.5.0, dated July 2025 β€” mwah, slay, periodt βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from