gnutls_dh_get_prime_bits(3)
β¨ gnutls_dh_get_prime_bits β¨
okay bestie, welcome to the gnutls manual, we're doing the whole tour π this one's a little function that tells you how thicc your Diffie-Hellman prime was. iconic behaviour honestly.
π NAME π
gnutls_dh_get_prime_bits β an API function, and yes it does exactly what the name says πΈ
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_dh_get_prime_bits(gnutls_session_t session);
π ARGUMENTS π
gnutls_session_t sessionβ it's a gnutls session, babes. that's the whole vibe. hand it your session and it'll spill the tea π«
π DESCRIPTION π
so this function returns the bits of the prime that got used in the last Diffie-Hellman key exchange with the peer. main character energy β¨
use it for both anonymous and ephemeral Diffie-Hellman, fr fr, it's got you either way π«Ά
β οΈ but listen β some ciphers, like RSA and DSA without DHE, literally do not do a Diffie-Hellman key exchange at all. so for those, this function just returns 0. not a bug, just not that kind of party π
β RETURNS β
you get the Diffie-Hellman bit strength back, slay π
- if no Diffie-Hellman key exchange was done β it returns
0 - if things go sideways β it returns a negative error code π
π REPORTING BUGS π
found something cursed? report bugs to <bugs@gnutls.org> and they'll handle it π
home page: https://www.gnutls.org β go say hi π
π COPYRIGHT π
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: go off, just keep the receipts π§Ύβ¨)
π 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, no notes π
this was gnutls version 3.8.13, and the page itself goes by gnutls_dh_get_prime_bits(3) β mwah, take care of her πππ¦
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms