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:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
they literally want to hear from you, that's why the email exists π
π COPYRIGHT π
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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms