gnutls_pubkey_export_ecc_raw(3)

πŸ’– gnutls_pubkey_export_ecc_raw πŸ’–

okay bestie so this is a page straight out of the gnutls manual, and today we're unlocking the ECC raw export function. it's giving "let me get those curve coordinates out of your public key" energy and honestly? iconic. ✨


🌸 NAME 🌸

gnutls_pubkey_export_ecc_raw β€” API function


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/abstract.h>

int gnutls_pubkey_export_ecc_raw(gnutls_pubkey_t key, gnutls_ecc_curve_t
* curve, gnutls_datum_t * x, gnutls_datum_t * y);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_pubkey_t key β€” holds the public key, bestie. this is the main character of the whole operation πŸ’…
  • gnutls_ecc_curve_t * curve β€” will hold the curve (may be NULL) πŸŒ€
  • gnutls_datum_t * x β€” will hold x-coordinate (may be NULL) πŸ“
  • gnutls_datum_t * y β€” will hold y-coordinate (may be NULL) πŸ“

✨ DESCRIPTION ✨

so this function will export the ECC public key's parameters found in the given key, fr fr. the new parameters get allocated using gnutls_malloc() and will be stored in the appropriate datum. cute, clean, allocated. 🫢

now, plot twist: in EdDSA curves the y parameter will be NULL and the other parameters will be in the native format for the curve. so if you're looking for y in EdDSA land, bestie... it's not there. it's on vacation. 🌴

and here's the glow-up moment β€” this function allows for NULL parameters since 3.4.1. periodt. πŸ‘‘


⭐ RETURNS ⭐

GNUTLS_E_SUCCESS on success, otherwise a negative error code. so like, if it's negative, it's not slaying, it's struggling. 😭


🌈 SINCE 🌈

3.0


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? not the vibe. report it, bestie:


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 visit

https://www.gnutls.org/manual/


lowkey important: every parameter here can be NULL if you don't need it, but that's only been true since 3.4.1 β€” so don't go trying it on ancient versions, iykyk 🧚

and that's the whole page!! this one's from the gnutls manual, version 3.8.13, and we're all caught up β€” mwah, go export some coordinates πŸ’…πŸ’–

πŸ“¦ where this page comes from