gnutls_dh_get_secret_bits(3)

πŸ’– gnutls_dh_get_secret_bits(3) πŸ’–

okay bestie, welcome to the gnutls corner of the man pages, this one's a little function with a big job and it's honestly so underrated 🫢


✨ NAME ✨

gnutls_dh_get_secret_bits β€” it's an API function, periodt πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_dh_get_secret_bits(gnutls_session_t session);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_session_t session β€” bestie. it's a gnutls session. that's the whole vibe. it's the session you're asking about πŸ’œ

πŸ‘‘ DESCRIPTION πŸ‘‘

so the way that this works is: this function hands you back the bits used in the last Diffie-Hellman key exchange with the peer. like, how many bits of secret y'all shook hands on. iconic behavior fr fr πŸ”₯

and lowkey important: it should be used for both anonymous and ephemeral Diffie-Hellman. both of them. no picking favorites πŸ’–


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned πŸŽ€

otherwise? an error code comes back instead 😭 no in-between, no gray area, just the numbers.


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found something sus? report bugs to <bugs@gnutls.org> πŸ“§

home page: https://www.gnutls.org


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, go forth, but keep the receipts bestie 🫢


🧚 SEE ALSO 🧚

the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:

https://www.gnutls.org/manual/

that's the plug, iykyk ✨


and that's the whole page, bestie πŸ’œ this was gnutls 3.8.13, signing off β€” stay hydrated, stay curious, and go read your DH bits πŸ“πŸ’…

πŸ“¦ where this page comes from