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 fundamentalconst gnutls_datum_t * eβ holds the public exponent. the one everybody's allowed to see, no capconst gnutls_datum_t * dβ holds the private exponent. π€« secret, keep it, protect itconst 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 iconicconst gnutls_datum_t * uβ holds the coefficient (optional). not required, but slay if you got itconst gnutls_datum_t * e1β holdse1 = d mod (p-1)(optional). math girlies rise up πconst gnutls_datum_t * e2β holdse2 = 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 π
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
- 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