---
name: "kcapi_pbkdf"
section: "3"
platform: "linux"
package: "libkcapi-dev"
version: "1.4.0-1+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/kcapi_pbkdf"
---

# kcapi\_pbkdf(3)

Password-based Key Derivation Function

## NAME

kcapi\_pbkdf - Password-based Key Derivation Function

## 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***);**

## ARGUMENTS

*hashname*

\[in\] kernel crypto API name of a keyed hash (e.g. hmac(sha1))

*pw*

\[in\] Password a key shall be derived from

*pwlen*

\[in\] Length of password string

*salt*

\[in\] Salt as defined in SP800-132

*saltlen*

\[in\] Length of salt buffer

*count*

\[in\] Numbers of iterations to be performed for the PBKDF

*key*

\[out\] Buffer to store the generated key in

*keylen*

\[in\] Size of the key to be generated (i.e. length of the key buffer)

## DESCRIPTION

This function is an implementation of the PBKDF as defined in SP800-132.

*return* 0 upon success; a negative errno-style error code if an error occurred

## AUTHOR

**Stephan Mueller** \<smueller@chronox.de\>

Author.

## COPYRIGHT
