KCAPI_HKDF(3)
β¨ NAME β¨
kcapi_hkdf β Extract-and-Expand HKDF (RFC5869)
okay bestie, welcome to page 3 of the libkcapi manual β this is KCAPI_HKDF(3) and it's literally the glow-up your key derivation needed π
π SYNOPSIS π
ssize_t kcapi_hkdf(const char * hashname, const uint8_t * ikm,
size_t ikmlen, const uint8_t * salt,
uint32_t saltlen, const uint8_t * info,
size_t infolen, uint8_t * dst, size_t dlen);
π¦ ARGUMENTS π¦
hashnameβ[in]the kernel crypto API name of a keyed hash, likehmac(sha1). that's the flavor of hash you're serving today πikmβ[in]Input Keying Material (IKM) β and no, you can't skip it, it must be provided. it's the main character here πikmlenβ[in]the length of the IKM buffer β must be non-zero. we do not accept zero, periodtsaltβ[in]salt buffer β lowkey optional, it may beNULLπ§saltlenβ[in]salt buffer length β may be zeroinfoβ[in]info buffer β also chill, may beNULLinfolenβ[in]info buffer length β may be zerodstβ[out]Buffer to store the generated key in,dlenβ[in]Length of thedstbuffer. This value defines the number of bytes generated by the KDF. so like, this is you deciding how much key you want β¨
π DESCRIPTION π
Perform the key-derivation function according to RFC5869. The input data is defined in sections 2.2 und 2.3 of RFC5869. (yes the "und" is in the original, we keep the receipts, no cap π«Ά)
return 0 upon success; a negative errno-style error code if an error occurred. so zero = slay, negative = something went sideways π
πΈ AUTHOR πΈ
Stephan Mueller <smueller@chronox.de>
- Author.
π COPYRIGHT π
that's the whole page bestie, go forth and derive π
and finally, the cute lil sign-off: this page comes from the libkcapi Manual 1.5.0, dated July 2025. bye bestie, drink water, check your error codes π π¦β¨
π¦ where this page comes from
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms