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 the r value ✨
  • gnutls_datum_t * s β€” and this one comes back holding the s value ✨

πŸ’… 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 Β© 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