crypto_dh_encode_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ crypto_dh_encode_key(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual entry for crypto_dh_encode_key(9) β€” it’s giving β€œencode the private key” energy and honestly it’s lowkey iconic πŸ’…βœ¨


🌸 NAME 🌸

crypto_dh_encode_key β€” encode the private key 🫢


✨ SYNOPSIS ✨

int crypto_dh_encode_key (char *buf , unsigned int len , const struct dh *params );

πŸ’– ARGUMENTS πŸ’–

  • buf β€” bestie, this is the buffer allocated by the caller to hold the packet DH private key. The buffer should be at least crypto_dh_key_len bytes in size, no cap 🧚
  • len β€” the length of the packet private key buffer πŸ“
  • params β€” buffer with the caller-specified private key πŸ”‘

πŸ¦‹ DESCRIPTION πŸ¦‹

The DH implementations operate on a packet representation of the private key. That’s the whole vibe β€” packet representation, private key, periodt πŸ’œ


πŸ”₯ RETURN πŸ”₯

  • -EINVAL if the buffer has insufficient size 😭
  • 0 on success πŸŽ‰

🌈 SEE ALSO 🌈


xoxo, your kernel bestie πŸ’– β€” source dir ./include/crypto, date/version October 2026, page crypto_dh_encode_key(9). slay βœ¨πŸ‘‘

πŸ“¦ where this page comes from