KCAPI_PBKDF(3)
β¨ KCAPI_PBKDF β¨
okay bestie, welcome to the kcapi_pbkdf page from section 3 of the manual π this is the one that turns your lil password into a whole actual cryptographic key. no cap.
πΈ NAME πΈ
kcapi_pbkdf β Password-based Key Derivation Function. it's giving key factory but make it password-flavored π
π SYNOPSIS π
ssize_t kcapi_pbkdf(const char * hashname, const uint8_t * pw,
uint32_t pwlen, const uint8_t * salt,
size_t saltlen, uint32_t count, uint8_t * key,
size_t keylen);
like. look at her. eight arguments and not one of them is optional π
π¦ ARGUMENTS π¦
hashnameβ [in] the kernel crypto API name of a keyed hash, bestie. e.g.hmac(sha1). yes you have to spell it exactly like that.pwβ [in] the Password that a key shall be derived from. your secret. guard it with your life fr fr πpwlenβ [in] Length of password string. gotta tell her how long it is, she's not psychic.saltβ [in] the Salt as defined in SP800-132. iconic spec behavior.saltlenβ [in] Length of salt buffer.countβ [in] Numbers of iterations to be performed for the PBKDF. more iterations = more pain for the attackers = more slay for you π₯keyβ [out] Buffer to store the generated key in. this is where the magic lands β¨keylenβ [in] Size of the key to be generated (i.e. length of the key buffer). the length of the buffer, not the length of the key inside it, bestie, don't get it twisted.
π DESCRIPTION π
This function is an implementation of the PBKDF as defined in SP800-132. that's the whole vibe. she derives keys from passwords, correctly, per spec. periodt.
returns 0 upon success; a negative errno-style error code if an error occurred. so like. zero means we ate. anything negative means we did not eat π
ngl bestie, always check the return value. a negative errno is the function telling you something went wrong, and she will not text you twice.
π AUTHOR π
Stephan Mueller <smueller@chronox.de> Author.
the literal author. main character energy, honestly.
π COPYRIGHT π
that's it, that's the page β this is the libkcapi Manual version 1.5.0, dated July 2025 π go derive some keys, bestie, and stay salty π§β¨
π¦ 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