gnutls_hpke_export(3)
β¨ gnutls_hpke_export(3) β¨
okay bestie, welcome to the gnutls manual page for gnutls_hpke_export β yes it's an API function, yes it's giving crypto main character energy, and yes we're gonna get through it together π
πΈ NAME πΈ
gnutls_hpke_export β literally an API function, that's the whole vibe
π¦ SYNOPSIS π¦
#include <gnutls/hpke.h>
int gnutls_hpke_export(gnutls_hpke_context_t ctx, const gnutls_datum_t *
exporter_context, size_t length, gnutls_datum_t * secret);
π ARGUMENTS π
gnutls_hpke_context_t ctxβ the HPKE context you're using to export the secret. like, the whole reason we're here πconst gnutls_datum_t * exporter_contextβ the application-specific context that gets included in the export. it's your lil personalized touch β¨size_t lengthβ how many bytes of secret you want exported. the requested length, bestie, in bytes, exactly as asked πgnutls_datum_t * secretβ a pointer to agnutls_datum_tstruct where the exported secret is gonna land. that's its home now π
π DESCRIPTION π
so this function? it performs the export operation of HPKE. iconic behaviour honestly.
It derives a secret of length bytes from the exporter secret in the HPKE context, using the application-specific context you handed over plus the KDF specified in the context. The resulting secret gets stored in secret. And before it does any of that, it checks that the parameters you passed are valid, that the context is properly initialized, and that there's actually an exporter secret available in the context β no secret, no service π
length should be a positive integer that does not exceed the maximum allowed size for HPKE exports. don't be greedy, the limit is real π
heads up: The function will allocate memory forsecret, and you β yes you, the caller β are responsible for freeing this memory usinggnutls_free()when it is no longer needed. don't leak, it's not cute π«Ά
β RETURNS β
0 on success, or a negative error code on failure. that's it, that's the whole mood π
π SINCE π
3.8.13 β vintage, but make it fresh β¨
π REPORTING BUGS π
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. slay, legally speaking π
π§ 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/
and that's the whole page, bestie π this was gnutls_hpke_export(3), straight outta the gnutls manual, version 3.8.13. go export those secrets responsibly, mwah πβ¨π¦
π¦ 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