GNUTLS_X509_PRIVKEY_IMPORT_ECC_RAW(3)

✨ gnutls_x509_privkey_import_ecc_raw ✨

okay bestie, gather round, because this one is a little cryptographic glow-up and it's from the gnutls manual πŸ’…


🌸 NAME 🌸

gnutls_x509_privkey_import_ecc_raw β€” literally just an API function, no cap 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

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

that's the whole vibe right there πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_privkey_t key β€” bestie this is the data to store the parsed key, like it's the lil container the whole thing moves into 🏠
  • gnutls_ecc_curve_t curve β€” holds the curve, that's it, that's the job
  • const gnutls_datum_t * x β€” holds the x-coordinate πŸ“
  • const gnutls_datum_t * y β€” holds the y-coordinate πŸ“
  • const gnutls_datum_t * k β€” holds the k πŸ”‘

πŸ’– DESCRIPTION πŸ’–

so the way this works: this function will convert the given elliptic curve parameters into the native gnutls_x509_privkey_t format. the output gets stored in key β€” that's where it lives now, periodt πŸ’…

and hmm, one tiny but important thing: for EdDSA keys, the x and k values must be in the native to curve format. like, don't just hand it any old bytes, it has to match the curve's own format or it's giving chaos 😭


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰ otherwise you get a negative error value, which is the function's way of saying "not me being dramatic but something went wrong" πŸ’€


🌈 SINCE 🌈

3.0 β€” an icon, an OG, been here since forever ✨


πŸ› REPORTING BUGS πŸ›

found a bug? spill the tea, report 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, that's genuinely so generous of them 🫢


🧚 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/

no cap: if you're out here reading manpages for fun, you ARE the main character 🫑✨

and that's a wrap, bestie β€” this page came from gnutls 3.8.13 πŸ’– go forth and import those ECC keys responsibly, mwah πŸ˜˜πŸ’…

πŸ“¦ where this page comes from