gnutls_privkey_import_rsa_raw(3)
β¨ NAME β¨
gnutls_privkey_import_rsa_raw β it's an API function, bestie π
This one lives in the gnutls manual, and it's all about taking your raw RSA numbers and making them into a real, usable key. iykyk π
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_privkey_import_rsa_raw(gnutls_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);
π«Ά ARGUMENTS π«Ά
okay so, meet the whole squad, every single one of them is a const gnutls_datum_t * except the first one, periodt:
gnutls_privkey_t keyβ the structure that's gonna hold your parsed key. this is the glow-up container β¨const gnutls_datum_t * mβ holds the modulus, no capconst gnutls_datum_t * eβ holds the public exponentconst gnutls_datum_t * dβ holds the private exponent (optional, so you can skip it if you must π)const gnutls_datum_t * pβ holds the first prime (p)const gnutls_datum_t * qβ holds the second prime (q)const gnutls_datum_t * uβ holds the coefficient (optional)const gnutls_datum_t * e1β holdse1 = d mod (p-1)(optional)const gnutls_datum_t * e2β holdse2 = d mod (q-1)(optional)
bestie, notice which ones are optional:d,u,e1,e2. the rest? mandatory. don't come for me, that's just how it is π
π DESCRIPTION π
So like, this function will convert the given RSA raw parameters to the native gnutls_privkey_t format. That's the whole vibe. π
And the output? It gets stored in key. That's it, that's the tea π
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned β slay π
Otherwise? a negative error value. not the moment, but okay, we deal π
π¦ REPORTING BUGS π¦
Found a bug? Tell the people:
- Report bugs to
<bugs@gnutls.org>. - Home page:
https://www.gnutls.org
π 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. (iconic behaviour honestly π«Ά)
π§ 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_privkey_import_rsa_raw(3) from gnutls 3.8.13 β go import some keys and be the main character πβ¨π
π¦ 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