gnutls_encode_gost_rs_value(3)

πŸ’– gnutls_encode_gost_rs_value β€” API function πŸ’–

okay bestie, welcome to the gnutls manual, section 3 πŸŽ€ this one's all about gnutls_encode_gost_rs_value, and yes it's a whole vibe. let's get into it ✨


🌸 NAME 🌸

gnutls_encode_gost_rs_value β€” API function 🫢


✨ SYNOPSIS ✨

#include <gnutls/crypto.h>

int gnutls_encode_gost_rs_value(gnutls_datum_t * sig_value, const
       gnutls_datum_t * r, const gnutls_datum_t * s);

like, that's the whole signature, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_datum_t * sig_value β€” bestie, this one's the output slot. it will hold a GOST signature according to RFC 4491 section 2.2.2 πŸ‘‘
  • const gnutls_datum_t * r β€” must contain the r value, periodt. no r, no party πŸ™ˆ
  • const gnutls_datum_t * s β€” must contain the s value. it's giving the other half of the duo 🌈

πŸ’œ DESCRIPTION πŸ’œ

so what this function does is: it takes your r and your s values and encodes them into the binary representation according to RFC 4491 section 2.2.2 β€” the one used for GOST R 34.10-2001 signatures (and thus also for GOST R 34.10-2012 signatures, iykyk) πŸ”₯

it's literally just r + s β†’ one pretty encoded signature. iconic behaviour fr fr.

🚨 important bestie: the output value should be deallocated using gnutls_free(). don't just leave it hanging, that's a memory leak and we do not do those here 😭

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned πŸŽ‰ otherwise an error code is returned. so like, check your return value, it's the vibe check of this whole function πŸ’€


πŸŽ€ SINCE πŸŽ€

3.6.0 β€” been serving since 3.6.0, a true veteran πŸ‘‘


🌈 REPORTING BUGS 🌈

found a bug? not the cute kind? report it 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 🫢 (yes bestie, that means you can 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 contain the HTML form, visit

https://www.gnutls.org/manual/


and that's the whole page, bestie!! πŸ¦‹ this was gnutls version 3.8.13 of the gnutls_encode_gost_rs_value(3) manual β€” mwah, go encode some GOST signatures, you absolute main character πŸ’–βœ¨

πŸ“¦ where this page comes from