gnutls_x509_pr...import_rsa_raw2(3)

πŸ’– gnutls_x509_privkey_import_rsa_raw2 β€” the glow-up page πŸ’–

okay bestie, welcome to the gnutls manual (yes, that's the manual name, she's iconic) β€” specifically the part about gnutls_x509_privkey_import_rsa_raw2, which is literally the API function that turns your raw RSA numbers into a real, functioning private key. it's giving ✨cryptographic transformation✨ and honestly? we're obsessed.


🌸 NAME 🌸

gnutls_x509_privkey_import_rsa_raw2 β€” API function. that's her. that's the whole name. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509.h>

int gnutls_x509_privkey_import_rsa_raw2(gnutls_x509_privkey_t key, const
gnutls_datum_t * m, const gnutls_datum_t * e, const gnutls_datum_t * d,
const gnutls_datum_t * p, const gnutls_datum_t * q, const gnutls_datum_t
* u, const gnutls_datum_t * e1, const gnutls_datum_t * e2);

like, that's a LOT of parameters but every single one of them is doing her job and we respect it. πŸ’œ


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_privkey_t key β€” the data to store the parsed key. this is where the magic lands, bestie, it's the main character 🫢
  • const gnutls_datum_t * m β€” holds the modulus. big number energy, lowkey fundamental
  • const gnutls_datum_t * e β€” holds the public exponent. the one everybody's allowed to see, no cap
  • const gnutls_datum_t * d β€” holds the private exponent. 🀫 secret, keep it, protect it
  • const gnutls_datum_t * p β€” holds the first prime (p). prime number #1, she's a queen πŸ‘‘
  • const gnutls_datum_t * q β€” holds the second prime (q). prime number #2, equally iconic
  • const gnutls_datum_t * u β€” holds the coefficient (optional). not required, but slay if you got it
  • const gnutls_datum_t * e1 β€” holds e1 = d mod (p-1) (optional). math girlies rise up 🌈
  • const gnutls_datum_t * e2 β€” holds e2 = d mod (q-1) (optional). yes, another modular arithmetic moment, we love to see it

✨ DESCRIPTION ✨

so basically, this function will convert the given RSA raw parameters into the native gnutls_x509_privkey_t format. literally a whole transformation arc. πŸ’«

the output will be stored in key. that's it, that's the destination, she goes in the key box. 🎁


πŸ”₯ RETURNS πŸ”₯

on success, GNUTLS_E_SUCCESS (0) is returned. zero, as in zero problems, as in we ate and left no crumbs. πŸ“

otherwise? a negative error value. yeah, if it's negative something went wrong, no need to panic, just vibe check your parameters. 😭


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, report bugs to <bugs@gnutls.org>. πŸ“§

home page: https://www.gnutls.org β€” go say hi, she's lovely πŸ’–


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. fr fr, free as in freedom, and the receipts stay attached. 🧚


🌈 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/

go read it, iykyk, it's the full lore. πŸ’œ


and that's the whole page, bestie! this one's from gnutls version 3.8.13, and yes, the manual name really is just gnutls β€” short, sweet, iconic. mwah, take care of your RSA keys, protect d with your life, and remember: optional parameters are still slay. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from