gnutls_privkey_export_ecc_raw(3)
π gnutls_privkey_export_ecc_raw β bestie edition π
okay so this is a page from the gnutls manual (the 3.8.13 era, we'll get to that at the end π) and it's all about pulling the raw guts out of an ECC private key. yes, raw. we're going feral, we're going low-level, we're getting the actual numbers. slay. π
β¨ NAME β¨
gnutls_privkey_export_ecc_raw β it's an API function, bestie. that's the whole name. periodt.
β¨ SYNOPSIS β¨
#include <gnutls/abstract.h>
int gnutls_privkey_export_ecc_raw(gnutls_privkey_t key,
gnutls_ecc_curve_t * curve, gnutls_datum_t * x, gnutls_datum_t * y,
gnutls_datum_t * k);
look at her. five params. main character energy fr fr π
β¨ ARGUMENTS β¨
gnutls_privkey_t keyβ this holds the public key. yes, we know, the function name says private and this says public, but that's what the manpage says so that's what we're saying. no notes, iykyk π«Άgnutls_ecc_curve_t * curveβ this one's gonna hold the curve when we're done. she's the output slot for the curve π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 actual secret. the tea. the whole point.
β¨ DESCRIPTION β¨
okay so what does she do. this function exports the ECC private key's parameters that are chillin' inside the given structure. that's it. that's the job.
the new parameters get allocated using gnutls_malloc() and get stored in the appropriate datum. so like β fresh memory, all yours, allocated for you. cute of her honestly π
β οΈ important plot twist: in EdDSA curves theyparameter will beNULL, and the other parameters will be in the native format for the curve. so if you're an EdDSA girlie, don't go dereferencingy, she's not there. it's giving ghosted π
β¨ RETURNS β¨
GNUTLS_E_SUCCESS on success β we love a win π
otherwise you get a negative error code. negative. as in not-okay. read the error, bestie, don't just vibe past it π
β¨ SINCE β¨
3.3.0 β she's been around a minute, an icon, a legend π
β¨ REPORTING BUGS β¨
found a bug? don't be shy, report it to <bugs@gnutls.org> π
home page is right here: https://www.gnutls.org
β¨ COPYRIGHT β¨
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, take it, share it, just keep the receipts π
β¨ SEE ALSO β¨
the full documentation for gnutls is maintained as a Texinfo manual. so 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!! πβ¨ this was the gnutls manual, version 3.8.13, page gnutls_privkey_export_ecc_raw(3) β go forth and export those raw ECC params responsibly, mwah ππ¦πΈ
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms