gnutls_hkdf_expand(3)

✨ gnutls_hkdf_expand ✨

okay bestie, welcome to the gnutls manual page for gnutls_hkdf_expand πŸ’– this is a section 3 page (that's the "library functions" section, iykyk) and it's all about turning your pseudorandom key into as much keying material as your lil heart desires ✨


πŸŽ€ NAME πŸŽ€

gnutls_hkdf_expand β€” literally just an API function, no cap 🫢


🌸 SYNOPSIS 🌸

#include <gnutls/crypto.h>

int gnutls_hkdf_expand(gnutls_mac_algorithm_t mac, const gnutls_datum_t
* key, const gnutls_datum_t * info, void * output, size_t length);

like. the whole thing. one function. slay πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_mac_algorithm_t mac β€” the MAC algorithm that gets used internally ✨ like, the actual machinery under the hood
  • const gnutls_datum_t * key β€” the pseudorandom key, which you got from HKDF-Extract πŸ‘‘ (extract first, expand after β€” the order matters bestie)
  • const gnutls_datum_t * info β€” the optional informational data 🌸 yes it's optional, no you don't have to stress about it
  • void * output β€” where the expand operation's output value lands πŸŽ€ your keying material goes here
  • size_t length β€” how long you want that output key to be πŸ’– you pick, it delivers

🌈 DESCRIPTION 🌈

So the way this works: this function derives variable length keying material from the pseudorandom key, using the HKDF-Expand function, exactly as defined in RFC 5869 πŸ“œπŸ”₯

variable length is the main character here β€” you say how much you want, it gives you that much. iconic behaviour tbh.


⭐ RETURNS ⭐

Zero on success, or a negative error code on error 😭 so like, check it. 0 = we're so back, negative = it's over.


πŸ’œ SINCE πŸ’œ

3.6.13 β€” she's been around a minute, a seasoned queen πŸ‘‘


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found a bug? Don't be shy, tell the devs, they wanna know 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. πŸ’– (yes you can share it, 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, go visit:

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

that's the whole vibe check, go read up 🌈


and that's the page!! this was gnutls_hkdf_expand from the gnutls manual, version 3.8.13 πŸŽ€ thanks for reading bestie, go expand some keys and stay iconic πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from