KCAPI_KPP_KEYGEN(3)

✨ NAME ✨

kcapi_kpp_keygen β€” bestie, this one generates a public key πŸ’–

Okay so real talk, this is a page from the libkcapi manual (section 3, the library-calls section, iykyk), and it's all about making a brand new public key. Let's get into it 🫢


🌸 SYNOPSIS 🌸

ssize_t kcapi_kpp_keygen(struct kcapi_handle * handle, uint8_t * pubkey,
                         size_t pubkeylen, int access);

πŸŽ€ ARGUMENTS πŸŽ€

  • handle β€” [in] the cipher handle, aka your little passport to the kernel crypto world πŸ’…
  • pubkey β€” [out] the generated public key lands right here, freshly baked ✨
  • pubkeylen β€” [in] how long that key buffer is, bestie, gotta tell it
  • access β€” [in] the kernel access type, and there are three vibes to pick from:
    • KCAPI_ACCESS_HEURISTIC β€” uses an internal heuristic to find the fastest kernel access πŸ”₯
    • KCAPI_ACCESS_VMSPLICE β€” uses vmsplice access
    • KCAPI_ACCESS_SENDMSG β€” uses sendmsg access

πŸ’œ DESCRIPTION πŸ’œ

So what does it return, you ask? πŸ‘€

On success it returns the number of bytes returned by the key generation operation. On error it hands you back a negative errno-style error code β€” not me getting a negative number and knowing exactly what that means 😭 it's giving "something went wrong, check the errno."


πŸ‘‘ AUTHOR πŸ‘‘

Stephan Mueller <smueller@chronox.de> β€” Author. Periodt. πŸ’…


That's the whole page, bestie πŸ¦‹ no cap, you now know everything this manual entry has to say.


Sign-off time: this lil masterpiece lives in the libkcapi Manual, version 1.5.0, dated July 2025, and it goes by the name KCAPI_KPP_KEYGEN(3) πŸ’– Go generate some keys, you main character πŸ‘‘βœ¨

πŸ“¦ where this page comes from