gnutls_privkey_import_gost_raw(3)

πŸ’– gnutls_privkey_import_gost_raw(3) πŸ’–

okay so bestie, welcome to the gnutls manual, page gnutls_privkey_import_gost_raw(3) β€” yes that's a whole mouthful, we're gonna get through it together, i promise 🫢


✨ NAME ✨

gnutls_privkey_import_gost_raw β€” it's an API function, and it's giving "let me turn your raw GOST key bits into a real key object" πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/abstract.h>

int gnutls_privkey_import_gost_raw(gnutls_privkey_t key,
gnutls_ecc_curve_t curve, gnutls_digest_algorithm_t digest,
gnutls_gost_paramset_t paramset, const gnutls_datum_t * x, const
gnutls_datum_t * y, const gnutls_datum_t * k);

look at her. seven arguments. she's high maintenance but she's worth it ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_privkey_t key β€” the key, literally the main character here πŸ‘‘
  • gnutls_ecc_curve_t curve β€” holds the curve πŸŒ€
  • gnutls_digest_algorithm_t digest β€” holds the digest 🧚
  • gnutls_gost_paramset_t paramset β€” holds the GOST parameter set ID πŸ“
  • const gnutls_datum_t * x β€” holds the x-coordinate, cute lil x πŸ’œ
  • const gnutls_datum_t * y β€” holds the y-coordinate, her partner in crime πŸ’œ
  • const gnutls_datum_t * k β€” holds the k (private key) 🀫 keep that one secret fr fr

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she actually DO. this function will convert the given GOST private key's parameters to the native gnutls_privkey_t format πŸ’– the output gets stored in key β€” yes, that key, the one you passed in, she fills it in for you.

and about digest? bestie, it has to be one of GNUTLS_DIG_GOSR_94, GNUTLS_DIG_STREEBOG_256 or GNUTLS_DIG_STREEBOG_512. those three. no others. don't try it πŸ™ˆ

and if paramset is set to GNUTLS_GOST_PARAMSET_UNKNOWN, a default one will be selected depending on digest β€” so she picks for you, no cap ✨


⚠️ NOTE ⚠️

parameters should be stored with least significant byte first. and listen β€” on version 3.6.3 big-endian format was used incorrectly. yes, incorrectly. we don't talk about 3.6.3. πŸ’€

🌈 RETURNS 🌈

on success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰ otherwise you get a negative error value and honestly? vibe check failed 😭


⭐ SINCE ⭐

3.6.3 β€” she's been around, an icon, a legend πŸŽ€


πŸ› REPORTING BUGS πŸ›

found a bug? don't be shy, 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. slay, honestly πŸ’…


πŸ’« 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/

that's the whole page bestie, you ate that 🍽️✨ no cap, you now know everything this function has to offer.

gnutls version 3.8.13 β€” page gnutls_privkey_import_gost_raw(3) β€” mwah, bye, ily, go import some keys πŸ’–πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from