1KCAPI_PBKDF(3) Programming Interface KCAPI_PBKDF(3)
2
3
4
6 kcapi_pbkdf - Password-based Key Derivation Function
7
9 ssize_t kcapi_pbkdf(const char * hashname, const uint8_t * pw,
10 uint32_t pwlen, const uint8_t * salt,
11 size_t saltlen, uint32_t count, uint8_t * key,
12 size_t keylen);
13
15 hashname
16 [in] kernel crypto API name of a keyed hash (e.g. hmac(sha1))
17
18 pw
19 [in] Password a key shall be derived from
20
21 pwlen
22 [in] Length of password string
23
24 salt
25 [in] Salt as defined in SP800-132
26
27 saltlen
28 [in] Length of salt buffer
29
30 count
31 [in] Numbers of iterations to be performed for the PBKDF
32
33 key
34 [out] Buffer to store the generated key in
35
36 keylen
37 [in] Size of the key to be generated (i.e. length of the key
38 buffer)
39
41 This function is an implementation of the PBKDF as defined in
42 SP800-132.
43
44 return 0 upon success; a negative errno-style error code if an error
45 occurred
46
48 Stephan Mueller <smueller@chronox.de>
49 Author.
50
52libkcapi Manual 1.4.0 January 2023 KCAPI_PBKDF(3)