gnutls_hkdf_extract(3)

πŸ’– gnutls_hkdf_extract πŸ’–

okay bestie, welcome to the gnutls manual, and specifically the page for gnutls_hkdf_extract β€” which is, and I cannot stress this enough, an API function. it's giving crypto. it's giving key derivation. let's get into it πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/crypto.h>

int gnutls_hkdf_extract(gnutls_mac_algorithm_t mac, const gnutls_datum_t
* key, const gnutls_datum_t * salt, void * output);

that's the whole vibe. one include, one function call, infinite possibilities πŸ¦‹


🌸 ARGUMENTS 🌸

  • gnutls_mac_algorithm_t mac β€” the mac algorithm used internally. yes it's doing mac stuff under the hood, no it's not that kind of mac, it's the message authentication code kind, iykyk πŸ’…
  • const gnutls_datum_t * key β€” the initial keying material. this is your starting ingredient, your main character input πŸ‘‘
  • const gnutls_datum_t * salt β€” the optional salt. it's optional! you can leave it out, but also, salt makes everything better, so. your call πŸ“
  • void * output β€” the output value of the extract operation. this is where the magic lands, so make sure you gave it somewhere real to live πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

so what does this actually do, bestie? this function will derive a fixed-size key using the HKDF-Extract function as defined in RFC 5869. that's it. that's the whole job. no cap, it extracts, it derives, it slays ✨

if you're the kind of person who reads RFCs for fun (iconic behaviour honestly), you already know exactly what's going on here. if not, just trust: it takes your keying material and your optional salt, runs the HKDF-Extract step with the mac algorithm you picked, and drops a fixed-size key into your output. periodt 🌈


⭐ RETURNS ⭐

Zero or a negative error code on error.

so zero = we ate, we're good, everything worked πŸ’– and a negative error code = something went sideways, check it, don't ignore it, your keys deserve better than being silently wrong 😭


πŸ¦‹ SINCE πŸ¦‹

3.6.13

she's been here since 3.6.13 and she's still serving. a legend. an icon. πŸ‘‘


🫢 REPORTING BUGS 🫢

found a bug? don't suffer in silence bestie, tell the people:

they literally want to hear from you, that's why the email exists πŸ’œ


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.

(translation: you can copy and share this freely, just keep the copyright notice and this notice intact. be respectful, 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/

like, if the local docs aren't giving what they need to give, the website has you covered, always 🌈


and that's the page, bestie!! this was gnutls_hkdf_extract from the gnutls manual, version 3.8.13 β€” go forth, extract your keys, and stay cryptographic πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from