gnutls_privkey_export_gost_raw2(3)
β¨ gnutls_privkey_export_gost_raw2 β¨
okay so bestie, we're in the gnutls manual, and this lil page is about gnutls_privkey_export_gost_raw2 β yes it's a whole API function, and yes it's giving very specific crypto girl energy π
πΈ NAME πΈ
gnutls_privkey_export_gost_raw2 β it's an API function, bestie. that's the whole vibe.
π¦ SYNOPSIS π¦
#include <gnutls/abstract.h>
int gnutls_privkey_export_gost_raw2(gnutls_privkey_t key,
gnutls_ecc_curve_t * curve, gnutls_digest_algorithm_t * digest,
gnutls_gost_paramset_t * paramset, gnutls_datum_t * x, gnutls_datum_t *
y, gnutls_datum_t * k, unsigned int flags);
like, look at that signature. it's long. it's iconic. it ate. π
π ARGUMENTS π
gnutls_privkey_t keyβ this one holds the public key. yes bestie, the public key, that's what it says, we don't question it, we just pass it. π«Άgnutls_ecc_curve_t * curveβ this pointer is gonna hold the curve. it's an out-param, so it's catching, not throwing. caught it. β¨gnutls_digest_algorithm_t * digestβ will hold the digest. the algorithm one. the hash vibe. π₯gnutls_gost_paramset_t * paramsetβ will hold the GOST parameter set ID. very niche, very specific, very her. πgnutls_datum_t * xβ will hold the x-coordinate. xoxo, x. πgnutls_datum_t * yβ will hold the y-coordinate. and y is for "y are you asking me to remember all these args" πgnutls_datum_t * kβ will hold the private key. the actual secret. guard it with your life fr fr πunsigned int flagsβ flags, and they come fromgnutls_abstract_export_flags_t. check the enum, bestie, don't guess. π
π DESCRIPTION π
so what does this function do? it will export the GOST private key's parameters found in the given structure. all of them. the curve, the digest, the paramset, x, y, and k β it's getting all of them out of there and handing them to you.
the new parameters will be allocated using gnutls_malloc(), and they'll be stored in the appropriate datum. so like, heads up: you own that memory now, bestie, gnutls_malloc() means you're responsible for the cleanup later. no cap. π§
β οΈ NOTE β οΈ
the parameters will be stored with least significant byte first.
and listen β on version 3.6.3 this was incorrectly returned in big-endian format. so if you're on that version, that's the bug, that's not you, it was never you. π
β RETURNS β
GNUTLS_E_SUCCESS on success β slay π
otherwise, a negative error code. so like, vibe check your return value, always. π
π SINCE π
3.6.3 β she's been here a minute. periodt.
π£ REPORTING BUGS π£
found a bug? don't suffer in silence, bestie:
- Report bugs to
<bugs@gnutls.org>. - Home page:
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. (free to share, 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, visit:
https://www.gnutls.org/manual/
and that's the whole page, bestie!! this was gnutls 3.8.13, from the gnutls crew, and gnutls_privkey_export_gost_raw2(3) said everything she needed to say. go forth and export responsibly π
β¨π¦
π¦ 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