crypto_ecdh_decode_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… crypto_ecdh_decode_key(9) β€” like, the kernel API manual edition πŸŽ€

okay so bestie, welcome to the crypto_ecdh_decode_key page, straight out of the kernel API manual (section 9, ikyk) ✨ this one's short and sweet and honestly kinda iconic for it.


🌸 NAME 🌸

crypto_ecdh_decode_key β€” decode a private key πŸ”‘

like... that's the whole vibe. it decodes a private key. no cap.


✨ SYNOPSIS ✨

int crypto_ecdh_decode_key (const char *buf , unsigned int len , struct
ecdh *p );

three args, one int back, we love a tidy little signature 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • buf β€” the buffer holding a packet key that should be decoded. it's giving "here's the raw material, go off" πŸ’–
  • len β€” the length of the packet private key buffer. yes, you gotta tell it how big buf is, don't just hope for the best πŸ™ˆ
  • p β€” a buffer that the caller allocates, and it gets filled with the unpacked ECDH private key. literally you bring the memory, the function does the unpacking πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the main character plot twist: the unpacking gets the private key by pointing p to the correct location inside buf. which means both pointers refer to the same memory, fr fr. so like... buf and p are lowkey sharing, okay? no separate copy, no dupe, just vibes and shared memory 🧚


πŸ”₯ RETURN πŸ”₯

  • -EINVAL β€” if the buffer has insufficient size (aka not enough room, tragic πŸ’€)
  • 0 β€” on success, slay ⭐

🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ“ this came to you from ./include/crypto and it's dated October 2026 β€” the manual page is crypto_ecdh_decode_key(9), and yes, we ate. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from