gnutls_x509_pr...export_gost_raw(3)

πŸ’– gnutls_x509_privkey_export_gost_raw πŸ’–

okay bestie, sit down, we're doing a gnutls moment πŸŽ€ this one lives in the gnutls manual (section 3, the library-call girlies) and it's an API function that gets your GOST private key params out of a key struct. no cap. let's go ✨


✨ NAME ✨

gnutls_x509_privkey_export_gost_raw β€” API function πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_privkey_export_gost_raw(gnutls_x509_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);

like, seven arguments, she's high maintenance and that's iconic πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_privkey_t key β€” a key πŸ”‘ yes literally just a key, that's the whole vibe
  • gnutls_ecc_curve_t * curve β€” will hold the curve 🌈
  • gnutls_digest_algorithm_t * digest β€” will hold the digest πŸ“
  • gnutls_gost_paramset_t * paramset β€” will hold the GOST parameter set ID πŸ‘‘
  • 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 πŸ™ˆ (yes, the secret one, keep it safe bestie)

πŸ’œ DESCRIPTION πŸ’œ

so this function will export the GOST private key's parameters found in the given structure. the way it just… pulls them out and hands them to you 🫢

the new parameters will be allocated using gnutls_malloc() and will be stored in the appropriate datum. so like, the memory is yours now, act accordingly πŸ’…


⚠️ NOTE ⚠️

parameters will be stored with least significant byte first. on version 3.6.3 this was incorrectly returned in big-endian format. not me calling out a 3.6.3 bug 😭 they fixed it, we move on, periodt.

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so like, zero = slay, negative = something went wrong πŸ’€


πŸŽ€ SINCE πŸŽ€

3.6.3 β€” she's been here a minute, respect the elder πŸ’–


πŸ› REPORTING BUGS πŸ›

found something cursed? report bugs 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. (basically: go off, just keep the receipt 🧾✨)


🌈 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/

iykyk πŸ“š


and that's the whole page bestie, no crumbs left πŸ“ this was gnutls 3.8.13, dated right there in the footer with gnutls_x509_pr...export_gost_raw(3) β€” mwah, go export some GOST params, you've got this πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from