crypto_kpp_set_secret(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… crypto_kpp_set_secret(9) β€” like, the Kernel API Manual edition πŸŽ€

okay bestie, so this is crypto_kpp_set_secret from the Kernel API Manual, and it's literally the function that hands your private key over to a KPP implementation. she's giving ✨key delivery✨ and honestly? iconic.


πŸ¦‹ NAME πŸ¦‹

crypto_kpp_set_secret β€” Invoke kpp operation

no cap, that's the whole vibe: you invoke a kpp operation. periodt.


🌸 SYNOPSIS 🌸

int crypto_kpp_set_secret (struct crypto_kpp *tfm , const void *buffer ,
unsigned int len );

she takes three things and gives you back an int, we love a simple queen πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • tfm β€” the tfm handle. that's your transform handle, your main character, the whole reason we're here 🫢
  • buffer β€” the Buffer holding the packet representation of the private key. and like, lowkey important: the structure of the packet key depends on the particular KPP implementation. Packing and unpacking helpers are provided for ECDH and DH β€” see the respective header files for those implementations, iykyk ✨
  • len β€” Length of the packet private key buffer. just the length bestie, don't overthink it πŸ“

πŸ’– DESCRIPTION πŸ’–

Function invokes the specific kpp operation for a given alg.

that's it, that's the tea β˜• she looks at your tfm, figures out which alg you're running, and invokes the specific kpp operation for it. literally just passing the vibe check through to the right implementation πŸ’«


⭐ RETURN ⭐

zero on success; error code in case of error

so like, 0 = slay, anything else = 😭 read the error code and go fix it. no in-between.

ngl, always check the return value. "error code in case of error" is the manpage equivalent of "the vibes will tell you" β€” she will not elaborate further πŸ’€

🌈 SEE ALSO 🌈


and that's the whole page bestie, go read the friends, they're all linked above 🧚

sign-off time πŸŽ€ this one lives in ./include/crypto, dated October 2026, and it's the crypto_kpp_set_secret(9) page β€” mwah, catch you in the next manpage πŸ’œ

πŸ“¦ where this page comes from