GNUTLS_X509_PRIVKEY_EXPORT_ECC_RAW(3)

πŸ’– gnutls_x509_pri..._export_ecc_raw(3) πŸ’–

okay bestie, welcome to the gnutls manual β€” this one's a lil page about yanking an ECC private key's raw bits out of a gnutls_x509_privkey_t. yes, raw. no cap. let's go 🫢


✨ NAME ✨

gnutls_x509_privkey_export_ecc_raw β€” API function 🌸


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_privkey_export_ecc_raw(gnutls_x509_privkey_t key,
gnutls_ecc_curve_t * curve, gnutls_datum_t * x, gnutls_datum_t * y,
gnutls_datum_t * k);

✨ ARGUMENTS ✨

  • gnutls_x509_privkey_t key β€” a key πŸ’… like, the actual key you're tryna export from, the main character here
  • gnutls_ecc_curve_t * curve β€” will hold the curve πŸŽ€ it's an out-param, so it gets filled in for you
  • gnutls_datum_t * x β€” will hold the x-coordinate ⭐
  • gnutls_datum_t * y β€” will hold the y-coordinate ✨
  • gnutls_datum_t * k β€” will hold the private key πŸ‘‘ the secret one, okurrr

✨ DESCRIPTION ✨

So this function exports the ECC private key's parameters that were found in the given structure. that's the whole vibe. the new parameters get allocated using gnutls_malloc() and they get stored in the appropriate datum β€” so like, you own that memory, bestie, don't forget it exists πŸ™ˆ

In EdDSA curves the y parameter will be NULL and the other parameters will be in the native format for the curve. yes, NULL. not a typo, not a glitch, just how EdDSA does it πŸ¦‹ iykyk.


✨ RETURNS ✨

On success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value 😭 that's the bad timeline, check it.


✨ SINCE ✨

3.0 β€” an og, fr fr πŸ’œ


✨ REPORTING BUGS ✨

found a bug? spill it to <bugs@gnutls.org> πŸ“§

Home page: https://www.gnutls.org


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. (slay, no royalty, we love a permissive queen πŸ’–)


✨ 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!! πŸŽ€βœ¨ you understood it, you ate, no crumbs left. this was page gnutls_x509_pri..._export_ecc_raw(3) from gnutls 3.8.13 β€” go forth and export those ECC params responsibly πŸ’…πŸ¦‹πŸ’–

πŸ“¦ where this page comes from