KCAPI_KPP_ECDH_SETCU(3)

✨ NAME ✨

kcapi_kpp_ecdh_setcurve β€” bestie, this is the one that sets the ECC curve you're gonna use for ECDH πŸ’…

(also known as KCAPI_KPP_ECDH_SETCU(3) if we're being formal, which we are, it's literally a manpage πŸŽ€)


🌸 SYNOPSIS 🌸

int kcapi_kpp_ecdh_setcurve(struct kcapi_handle * handle,
                            unsigned long curve_id);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • handle β€” [in] the cipher handle, your lil main character 🫢
  • curve_id β€” [in] the ID of the ECC curve. yeah, the curve ID. iconic of it πŸ’–

πŸ’œ DESCRIPTION πŸ’œ

okay so listen. with this function, the caller sets the ECC curve for all the cipher operations that come after it. and the curve ID? it's one of the ECC_CURVE_* identifiers. no cap, that's the whole vibe check on the ID ✨

πŸ“Œ note bestie: this function is the one that defines that the subsequent key generation AND shared secret operation will perform an ECC Diffie-Hellman operation. so like… it's not just picking a curve, it's setting the whole situation up. periodt πŸ”₯

and the return? return 0 upon success; a negative errno-style error code if an error occurred 😭 (as it should be, fr fr)


πŸ‘‘ AUTHOR πŸ‘‘

Stephan Mueller <smueller@chronox.de>

  • Author. yes that's him. the author. bow down πŸŽ€

that's a wrap on the libkcapi Manual 1.5.0, dated July 2025 πŸ¦‹ and the page itself is KCAPI_KPP_ECDH_SETCU(3), iykyk πŸ’– slay, go set that curve bestie πŸ’…βœ¨

πŸ“¦ where this page comes from