crypto_dh_decode_key(9)
Hey bestie!! Welcome to the crypto_dh_decode_key(9) page from the Kernel API Manual β¨ β today we're decoding a private key and it's giving main-character energy π
β¨ NAME β¨
crypto_dh_decode_key β decode a private key π
π SYNOPSIS π
int crypto_dh_decode_key (const char *buf , unsigned int len , struct dh
*params );
π¦ ARGUMENTS π¦
bufβ Buffer holding a packet key that should be decoded. That's the input bestie π«Άlenβ Length of the packet private key buffer. Literally how much buffer you're working with πparamsβ Buffer allocated by the caller that is filled with the unpacked DH private key. You bring the buffer, it gets filled β¨
π DESCRIPTION π
Okay so here's the tea: the unpacking obtains the private key by pointing p to the correct location in buf. Thus, both pointers refer to the same memory. No cap, that's the whole vibe β they're sharing the same memory space π«Ά
π₯ RETURN π₯
It hands back -EINVAL if the buffer has insufficient size, and 0 on success. That's the mood π
π SEE ALSO π
Kernel file ./include/crypto/dh.h β plus DH Helper Functions(9), struct dh(9), crypto_dh_key_len(9), crypto_dh_encode_key(9), and __crypto_dh_decode_key(9). Go read those if you want the full lore ππ
Later, bestie π«Ά β this page lives under ./include/crypto and it's the October 2026 version of crypto_dh_decode_key(9). Mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms