KCAPI_KPP_SSGEN(3)

✨ KCAPI_KPP_SSGEN(3) ✨

okay bestie, welcome to the Programming Interface corner of the libkcapi universe πŸ’– this is the page for kcapi_kpp_ssgen, and it is literally the "let's make a shared secret together" function. no cap.


🌸 NAME 🌸

kcapi_kpp_ssgen β€” generate a shared secret


πŸŽ€ SYNOPSIS πŸŽ€

ssize_t kcapi_kpp_ssgen(struct kcapi_handle * handle,
                        const uint8_t * pubkey, size_t pubkeylen,
                        uint8_t * ss, size_t sslen, int access);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [in] the cipher handle. your main character. 🫢
  • pubkey β€” [in] public key of peer that shall be used to generate the shared secret with. yes, the peer's key β€” you're doing this together, it's giving collaborative. πŸ’…
  • pubkeylen β€” [in] length of the public key buffer
  • ss β€” [out]</out> generated shared secret. this is where the magic lands, bestie. ✨
  • sslen β€” [in] length of key buffer
  • access β€” [in] kernel access type. pick your vibe:
    • KCAPI_ACCESS_HEURISTIC β€” use internal heuristic for fastest kernel access 🏎️
    • KCAPI_ACCESS_VMSPLICE β€” use vmsplice access
    • KCAPI_ACCESS_SENDMSG β€” sendmsg access

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” this returns the number of bytes returned by the shared secret generation operation upon success; a negative errno-style error code if an error occurred. like, if it works you get a happy little byte count, and if it doesn't you get a negative errno-style error code. periodt. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Stephan Mueller <smueller@chronox.de>

  • Author.


libkcapi Manual 1.5.0 🌈 July 2025 β€” and that's the whole page, bestie! go forth and generate shared secrets responsibly, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from