KCAPI_KPP_INIT(3)

✨ KCAPI_KPP_INIT ✨

okay bestie, welcome to kcapi_kpp_init(3) from the Programming Interface corner of the libkcapi manual πŸ’– this is the one that spins up a KPP cipher handle for you, no cap.


🌸 NAME 🌸

kcapi_kpp_init β€” initialize cipher handle πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [out] the cipher handle, all filled in for you by the time this call is done. it's giving "here's your new bestie" 🫢
  • ciphername β€” [in] the kernel crypto API cipher name, exactly as it's spelled in /proc/crypto (yes, literally that file, go look πŸ‘€)
  • flags β€” [in] flags that say what type of cipher handle you want ✨

πŸ’– DESCRIPTION πŸ’–

so this function does the whole init thing: it sets up a KPP cipher handle and opens up the connection to the kernel. main character energy, truly πŸ‘‘

on success, a pointer to a kcapi_handle object gets handed back to you in *handle. and bestie, listen β€” you have to call kcapi_kpp_destroy afterwards to free those resources. don't leave it hanging, that's not the vibe πŸ™ˆ

returns 0 upon success; -ENOENT β€” algorithm not available; -EOPNOTSUPP β€” AF_ALG family not available; -EINVAL β€” accept syscall failed; -ENOMEM β€” cipher handle cannot be allocated πŸ’€

lowkey important: that -ENOMEM one means the cipher handle could not be allocated, so like... nothing to clean up, but also nothing to use 😭

⭐ AUTHOR ⭐

Stephan Mueller <smueller@chronox.de> β€” Author. iconic behavior, we stan 🧚


that's the whole page, periodt πŸ’œ


and that's a wrap on the KCAPI_KPP_INIT(3) page, bestie β€” brought to you by libkcapi Manual 1.5.0, dated July 2025. go forth and initialize responsibly πŸŒˆπŸ’–

πŸ“¦ where this page comes from