gnutls_decode_gost_rs_value(3)
π gnutls_decode_gost_rs_value β the NAME section, bestie β¨
okay so this page is from the gnutls manual (the gnutls manual, section 3, iykyk), and it's all about one little function called gnutls_decode_gost_rs_value π β yes it's an API function, yes it's iconic, let's go.
π SYNOPSIS π
#include <gnutls/crypto.h>
int gnutls_decode_gost_rs_value(const gnutls_datum_t * sig_value,
gnutls_datum_t * r, gnutls_datum_t * s);
that's the whole vibe. three args, one int back. periodt π
π«Ά ARGUMENTS π«Ά
const gnutls_datum_t * sig_valueβ bestie this is the one you're feeding in, and it's gonna hold a GOST signature set up according to RFC 4491 section 2.2.2. no cap, that's the spec, go read it.gnutls_datum_t * rβ this one is gonna come back holding thervalue β¨gnutls_datum_t * sβ and this one comes back holding thesvalue β¨
π DESCRIPTION π
so what does it actually DO? it takes the sig_value you handed it and decodes it, splitting it out into the r and s elements. that's it, that's the job πΈ. if you wanna know what the format of that signature value looks like, the answer is RFC 4491 section 2.2.2 β go look, it's right there.
heads up, this is the important bit: the output values may be padded with a zero byte so they don't get read as negative values π (not me getting wrecked by two's complement). and listen β those values need to be deallocated with gnutls_free(). don't forget, fr fr. memory leaks are not the move π§
β RETURNS β
if everything slays, you get GNUTLS_E_SUCCESS (that's 0 π) back. if it doesn't slay, you get an error code instead. that's the whole deal.
π¦ SINCE π¦
3.6.0 β so it's been around a minute, it's not new new.
π REPORTING BUGS π
found a bug? tell the people: <bugs@gnutls.org> π§
home page, if you wanna vibe: https://www.gnutls.org π
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
and the legal tea: copying and distribution of this file, with or without modification, are permitted in any medium without royalty, as long as 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 π. if the /usr/share/doc/gnutls/ directory does not have the HTML form, then go visit:
https://www.gnutls.org/manual/
that's the page bestie, you're so welcome π
later, legend β this was gnutls 3.8.13, and yeah, it's literally the gnutls_decode_gost_rs_value(3) page, 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