STRUCT ECDH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ struct ecdh β€” define an ECDH private key πŸ’œ

okay so bestie, this is struct ecdh(9) from the Kernel API Manual, and honestly? she's small but she's mighty. 🫢 This is the little struct that holds your ECDH private key, and the way that it just... exists in ./include/crypto? iconic. Let's get into it.


✨ SYNOPSIS ✨

like, here's literally the whole thing, no cap:

struct ecdh {
    char *key;
    unsigned short key_size;
 };

that's it. two members. main character energy in the most minimal way possible. πŸ’…


πŸŽ€ Members πŸŽ€

okay so let's meet the cast:

  • key β€” the Private ECDH key itself. that's the whole vibe. πŸ”‘
  • key_size β€” the Size of the private ECDH key. yes bestie, you gotta know how big she is. πŸ“

πŸ¦‹ SEE ALSO πŸ¦‹

go check these out, iykyk:

  • Kernel file ./include/crypto/ecdh.h β€” ECDH Helper Functions(9)
  • crypto_ecdh_key_len(9)
  • crypto_ecdh_encode_key(9)
  • crypto_ecdh_decode_key(9)

lowkey remember: this struct is just the definition of a private key holder β€” the real work happens in those helper functions above, so fr fr go read them next. πŸ’–

✨ and that's the whole page, bestie! ✨ this little gem lives in ./include/crypto, dated October 2026, and it's struct ecdh(9) all day every day. slay, periodt. πŸ‘‘πŸŒΈ

πŸ“¦ where this page comes from