GNUTLS_X509_PRIVKEY_IMPORT_RSA_RAW(3)
π NAME π
gnutls_x509_privkey_import_rsa_raw β bestie it's an API function, and it's the one that takes your raw RSA numbers and turns them into a whole real key π
β¨ SYNOPSIS β¨
#include <gnutls/x509.h>
int gnutls_x509_privkey_import_rsa_raw(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);
okay so that's a LOT of arguments but we're gonna go through every single one, no skipping, promise π«Ά
πΈ ARGUMENTS πΈ
gnutls_x509_privkey_t keyβ the lil container where the parsed key is gonna live. it's the data to store the parsed key, like the cute lil box everything gets dropped into πconst gnutls_datum_t * mβ holds the modulus. that's the big N energy, literally πconst gnutls_datum_t * eβ holds the public exponent. yes, the famous65537one, iykyk βconst gnutls_datum_t * dβ holds the private exponent. secret. do NOT leak this one bestie π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 π
fr fr,d,p,qanduare the secret sauce. guard them with your life. π
π DESCRIPTION π
so this function will convert the given RSA raw parameters into the native gnutls_x509_privkey_t format. like, glow-up transformation, raw numbers in, β¨valid key objectβ¨ out.
the output will be stored in key.
that's it, that's the whole vibe. she takes your modular bits and bobs and makes them a real, usable private key. ate π
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned β iconic, zero, flawless, no notes β¨
otherwise you get a negative error value. so like, if it's negative, something went sideways and you should go read that error code. not the slay you were hoping for π
π REPORTING BUGS π
found a bug? spill the tea 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. so like, go ahead, share the love, 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, go visit
https://www.gnutls.org/manual/
and that's the whole page bestie π₯° this is from the gnutls manual, version 3.8.13 β mwah, go forth and import those RSA params responsibly πβ¨π
π¦ 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