gnutls_privkey_export_rsa_raw2(3)
β¨ NAME β¨
gnutls_privkey_export_rsa_raw2 β bestie it's an API function, and it's the one that gets your RSA private key parameters OUT of the key object π (this is the gnutls manual, btw, in case the vibe didn't give it away)
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_privkey_export_rsa_raw2(gnutls_privkey_t key, gnutls_datum_t
* m, gnutls_datum_t * e, gnutls_datum_t * d, gnutls_datum_t * p,
gnutls_datum_t * q, gnutls_datum_t * u, gnutls_datum_t * e1,
gnutls_datum_t * e2, unsigned int flags);
okay so it's a whole lineup of pointers, she's high maintenance but she delivers β¨
π ARGUMENTS π
gnutls_privkey_t keyβ holds the certificate, she's the main character here πgnutls_datum_t * mβ will hold the modulus πgnutls_datum_t * eβ will hold the public exponent π«Άgnutls_datum_t * dβ will hold the private exponent (yes the secret one, be normal about it π)gnutls_datum_t * pβ will hold the first prime (p) πΈgnutls_datum_t * qβ will hold the second prime (q) πΈgnutls_datum_t * uβ will hold the coefficient βgnutls_datum_t * e1β will holde1 = d mod (p-1)π§gnutls_datum_t * e2β will holde2 = d mod (q-1)π§unsigned int flagsβ flags fromgnutls_abstract_export_flags_tβ¨
π DESCRIPTION π
So the tea is: this function will export the RSA private key's parameters found in the given structure. Like, all of them, out into the open. π¦
The new parameters will be allocated using gnutls_malloc() and will be stored in the appropriate datum. Every single one of those gnutls_datum_t * guys above gets its own freshly gnutls_malloc()'d lil home, no cap. π
π RETURNS π
GNUTLS_E_SUCCESS on success, otherwise a negative error code. Slay when it works, check that return value when it doesn't, fr fr π
β SINCE β
3.6.0 β vintage but iconic, she's been here a minute π
π REPORTING BUGS π
Report bugs to <bugs@gnutls.org>. They want the tea, bestie, tell them everything.
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 licensing behaviour, honestly. No notes. π«Ά)
π¦ 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, no crumbs left π this was gnutls version 3.8.13, page dated with the same, gnutls_privkey_export_rsa_raw2(3) β go forth and export those primes responsibly, mwah π
β¨
π¦ 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