gnutls_dh_get_peers_public_bits(3)

✨ gnutls_dh_get_peers_public_bits(3) ✨

okay bestie, welcome to the gnutls manual section 3 πŸ’– this one is short and sweet, and it's literally just about peeking at how big your Diffie-Hellman public key is. iconic behavior, no notes. πŸŽ€


🌸 NAME 🌸

gnutls_dh_get_peers_public_bits β€” an API function, and yeah that's the whole name, she's self-explanatory πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/gnutls.h>

int gnutls_dh_get_peers_public_bits(gnutls_session_t session);

like. that's it. that's the whole vibe. one include, one function call. we love a low-effort slay 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie this is a gnutls session. the session. the one you've been doing your handshakes in. give her here. πŸ’œ

⭐ DESCRIPTION ⭐

so what does this actually do?? it gets the Diffie-Hellman public key bit size πŸ”₯ that's the number of bits in the public key used in your DH exchange.

and the cute part: it works for both anonymous and ephemeral Diffie-Hellman. so no matter which flavor of DH you're running, this function has you covered. versatile queen. πŸ‘‘


πŸ’… RETURNS πŸ’…

  • the public key bit size that was used in the last Diffie-Hellman key exchange with the peer πŸ‘€
  • or, if things went sideways, a negative error code 😭 (yes, negative, so check your return value, don't just assume it's a bit count, i am begging you)
bestie fr fr: if you get a negative number back, that is NOT a key size, that is an error. do not pass go. do not collect $200. check the error. πŸ’€

πŸ› REPORTING BUGS πŸ›

found a bug? (rude of it, honestly.) 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. 🫢 (basically: be nice, keep the notice, you're good.)


πŸ‘€ 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/


and that's the whole page, bestie!! πŸ¦‹βœ¨ this was gnutls version 3.8.13, brought to you by the gnutls gang, and yeah she's got that gnutls_dh_get_peers_public_bits(3) energy through and through πŸ’– go forth, check those bits, and hydrate!! πŸŒΈπŸ’…πŸŒˆ

πŸ“¦ where this page comes from