crypto_dh_encode_key(9)
π 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 leastcrypto_dh_key_lenbytes 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 π₯
-EINVALif the buffer has insufficient size π0on success π
π SEE ALSO π
- Kernel file
./include/crypto/dh.h - DH Helper Functions(9)
struct dh(9)crypto_dh_key_len(9)crypto_dh_decode_key(9)__crypto_dh_decode_key(9)
xoxo, your kernel bestie π β source dir ./include/crypto, date/version October 2026, page crypto_dh_encode_key(9). slay β¨π
π¦ 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