gnutls_pubkey_import_gost_raw(3)
π gnutls_pubkey_import_gost_raw β the glow-up your raw GOST key deserves π
okay bestie, this one lives in the gnutls manual, and it's literally the moment a pile of raw GOST numbers becomes a real, whole gnutls_pubkey_t. no cap. π¦
β¨ NAME β¨
gnutls_pubkey_import_gost_raw β API function
it's giving "raw coordinates in, fancy key object out." π
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_pubkey_import_gost_raw(gnutls_pubkey_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);
look at her. six arguments. main character energy fr fr. π
π ARGUMENTS π
gnutls_pubkey_t keyβ the structure where the parsed key gets stored, like a little jewelry box for your public key πgnutls_ecc_curve_t curveβ holds the curvegnutls_digest_algorithm_t digestβ holds the digestgnutls_gost_paramset_t paramsetβ holds the parameters idconst gnutls_datum_t * xβ holds the x-coordinateconst gnutls_datum_t * yβ holds the y-coordinate
six little besties walking into a function together, iconic. β¨
π¦ DESCRIPTION π¦
so this function will convert the given GOST public key's parameters into a gnutls_pubkey_t. the output gets stored in key. π
about that digest though β she has exactly three acceptable values, bestie, and you need to pick one of them:
GNUTLS_DIG_GOSR_94GNUTLS_DIG_STREEBOG_256GNUTLS_DIG_STREEBOG_512
(those are copied straight from the source, so yes, GNUTLS_DIG_GOSR_94 is spelled exactly like that β don't come for me, I'm just the messenger π)
and if paramset is set to GNUTLS_GOST_PARAMSET_UNKNOWN, then a default one will be selected for you, depending on digest. the function is literally doing your homework. π«Ά
β οΈ NOTE β οΈ
parameters should be stored with least significant byte first. and heads up β on version 3.6.3, big-endian format was used incorrectly. so like, vintage behavior, but not the cute kind. π
π RETURNS π
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value β and we do not love that for us. π
β SINCE β
3.6.3
she's been here since 3.6.3 and she has been serving ever since. π
π REPORTING BUGS π
found a bug? don't be shy, tell the devs:
- 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, bestie. π
π 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, no crumbs left. π this gorgeous little number comes to you from gnutls 3.8.13 β mwah, take care of her, she's doing her best. π§β¨π
π¦ 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