gnutls_pk_bits_to_sec_param(3)

πŸ’– gnutls_pk_bits_to_sec_param πŸ’–

okay bestie, so this one lives in the gnutls manual, and today we're doing the glow-up on gnutls_pk_bits_to_sec_param(3). she's an API function, she's lowkey a math girlie, and she's about to tell you how many bits of key = how much security. slay.


✨ NAME ✨

gnutls_pk_bits_to_sec_param β€” API function πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

gnutls_sec_param_t gnutls_pk_bits_to_sec_param(gnutls_pk_algorithm_t
algo, unsigned int bits);

like yes, that's the whole vibe. include the header, call the function, get a security parameter back. periodt.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pk_algorithm_t algo β€” this is a public key algorithm. which one? that's on you bestie, you pick. πŸ”₯
  • unsigned int bits β€” this is the number of bits. the raw bit count. the digits. the whole point. πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea: this function is the inverse of gnutls_sec_param_to_pk_bits(). they're giving mirror selfie, they're giving two sides of the same coin, they're giving iconic duo.

so instead of going "here's a security parameter, what key size do I need?", you flip it: you hand her an algorithm and a number of bits, and she hands you back the security parameter. 🫢

ngl, she's giving rough indication. it's a vibe check, not a legal contract. don't be weird about it. 😭

⭐ RETURNS ⭐

the security parameter. that's it, that's the whole return. the gnutls_sec_param_t. she ate and left no crumbs. πŸ‘‘


πŸŽ€ SINCE πŸŽ€

2.12.0 β€” she's been here since forever, a true OG. πŸ’€


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? not her fault, but like, tell someone:


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.

(translation: share it, remix it, 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/

iykyk. go read it, bestie. πŸ“š


and that's the whole page!! this was gnutls_pk_bits_to_sec_param(3) from gnutls 3.8.13 β€” mwah, no notes, see you in the next manpage. πŸ“βœ¨πŸ’–

πŸ“¦ where this page comes from