gnutls_srp_verifier(3)

πŸ’– gnutls_srp_verifier(3) πŸ’–

okay bestie, sit down, hydrate, and let me tell you about a lil function from the gnutls manual (section 3, if we're being precise, which we are πŸ’…).


✨ NAME ✨

gnutls_srp_verifier β€” it's an API function, bestie. that's the whole vibe.


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_srp_verifier(const char * username, const char * password,
const gnutls_datum_t * salt, const gnutls_datum_t * generator, const
gnutls_datum_t * prime, gnutls_datum_t * res);

like. six arguments. she's high maintenance and honestly? iconic for it. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * username β€” the user's name, obviously. who even is she.
  • const char * password β€” the user's password. shhh. 🀫
  • const gnutls_datum_t * salt β€” this should be some randomly generated bytes. RANDOM. not your birthday, not "password123", random. got it? πŸ§‚
  • const gnutls_datum_t * generator β€” the generator of the group. math queen behavior.
  • const gnutls_datum_t * prime β€” the group's prime. yes, the big number. the big one. πŸ‘‘
  • gnutls_datum_t * res β€” where the verifier will be stored. she lives here now.

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function will create an SRP verifier, exactly as specified in RFC2945. no cap.

the prime and generator should be one of the static parameters defined in gnutls/gnutls.h β€” or, if you're feeling bold, they may be generated. your call, main character.

and listen: the verifier will be allocated with @gnutls_malloc() and will be stored in res using binary format. so don't go reading it like it's a cute lil string, because it is not. it's bytes. respect the bytes. 😭

⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (that's 0, babe) is returned β€” or an error code. which is giving "we'll see how it goes." πŸ™ˆ


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me gatekeeping the email:

they wanna hear from you fr fr.


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, that's a very chill license actually. 🫢


🌈 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, bestie, just visit:

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


okay that's the whole page!! mwah, go make some verifiers, drink water, and remember: random salt only. πŸ’–βœ¨πŸŽ€πŸ¦‹

this was gnutls 3.8.13, page gnutls_srp_verifier(3) β€” thanks for reading, ily, bye!! πŸ’œ

πŸ“¦ where this page comes from