gnutls_pubkey_export_ecc_raw2(3)

πŸ’– gnutls_pubkey_export_ecc_raw2(3) β€” the gnutls manual, bestie edition

okay so you found the page for gnutls_pubkey_export_ecc_raw2, which lives in the gnutls manual. it's an API function. it's giving "let me hand you the raw ECC bits of your public key." let's get into it πŸ’…


✨ NAME ✨

gnutls_pubkey_export_ecc_raw2 β€” literally just an API function, no cap


✨ SYNOPSIS ✨

#include <gnutls/abstract.h>

int gnutls_pubkey_export_ecc_raw2(gnutls_pubkey_t key,
gnutls_ecc_curve_t * curve, gnutls_datum_t * x, gnutls_datum_t * y,
unsigned int flags);

✨ ARGUMENTS ✨

  • gnutls_pubkey_t key β€” this holds the public key πŸ—οΈ the whole main character of the operation, fr.
  • gnutls_ecc_curve_t * curve β€” this is gonna hold the curve. it may be NULL, so you can ghost it if you don't need it. πŸŒ€
  • gnutls_datum_t * x β€” will hold the x-coordinate. also may be NULL, so optional bestie 🫢
  • gnutls_datum_t * y β€” will hold the y-coordinate. may be NULL too, it's a whole vibe of "only if you want her" πŸ™ˆ
  • unsigned int flags β€” flags, and they come from gnutls_abstract_export_flags_t. periodt.

✨ DESCRIPTION ✨

so this function exports the ECC public key's parameters that are sitting inside the given key. πŸŽ€ the new parameters get allocated using gnutls_malloc() and then stored in the appropriate datum. slay, no memory management drama left for you.

on EdDSA curves, the y parameter will be NULL and the other parameters will be in the native format for the curve. lowkey important, so don't come for her when y shows up empty πŸ‘‘

alsooo, this function allows for NULL parameters since 3.4.1. so if you're on something older... that's a different era, bestie 😭


✨ RETURNS ✨

GNUTLS_E_SUCCESS on success πŸŽ‰ otherwise a negative error code. that's it, that's the deal.


✨ SINCE ✨

3.6.0 β€” she's been around since then, iconic behavior ⭐


✨ REPORTING BUGS ✨

found a bug? don't suffer in silence, report it:


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. πŸ’œ


✨ 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 πŸ¦‹ go forth and export those coordinates responsibly. this was the gnutls manual, page for gnutls_pubkey_export_ecc_raw2(3), version 3.8.13 β€” mwah, love that for us πŸ’–βœ¨

πŸ“¦ where this page comes from