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 hoodconst gnutls_datum_t * keyβ the pseudorandom key, which you got fromHKDF-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 itvoid * outputβ where the expand operation's output value lands π your keying material goes heresize_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:
- Report bugs to
<bugs@gnutls.org>π§ - Home page:
https://www.gnutls.orgπ
π 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. π (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
- 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