gnutls_privkey_import_ecc_raw(3)

✨ gnutls_privkey_import_ecc_raw ✨

okay bestie, so this is a page from the gnutls manual, and today we're getting into gnutls_privkey_import_ecc_raw β€” the API function that lets you yeet some elliptic curve parameters straight into a native gnutls private key. no cap, it's giving "I already have the raw numbers, just take them." πŸ’…


🌸 NAME 🌸

gnutls_privkey_import_ecc_raw β€” literally an API function, that's it, that's the whole name πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/abstract.h>

int gnutls_privkey_import_ecc_raw(gnutls_privkey_t key,
gnutls_ecc_curve_t curve, const gnutls_datum_t * x, const gnutls_datum_t
* y, const gnutls_datum_t * k);

πŸ’– ARGUMENTS πŸ’–

  • gnutls_privkey_t key β€” bestie this is the key, the main character, the whole point 🫢
  • gnutls_ecc_curve_t curve β€” holds the curve (iykyk, we're doing elliptic curves today)
  • const gnutls_datum_t * x β€” holds the x-coordinate, like x marks the spot ✨
  • const gnutls_datum_t * y β€” holds the y-coordinate, the other half of the moment
  • const gnutls_datum_t * k β€” holds the k (private key) πŸ‘‘ lowkey the most important one, keep it secret fr fr

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function will convert the given elliptic curve parameters into the native gnutls_privkey_t format. the glow-up happens, and the output gets stored in key. periodt πŸ’…

ok but listen β€” on EdDSA curves, the y parameter should be NULL, and the x and k parameters must be in the native format for the curve. no improvising, bestie, it has to be the native format. 🌈

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value and honestly? not the vibe. 😭


πŸŽ€ SINCE πŸŽ€

3.0 β€” she's been here since 3.0, iconic behaviour honestly πŸ‘‘


πŸ’€ REPORTING BUGS πŸ’€

found a bug? don't suffer in silence, 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. so like, go off, 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, no notes πŸ’– this was the gnutls 3.8.13 version of gnutls_privkey_import_ecc_raw(3) β€” thanks for reading, mwah, slay, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from