'\" t .\" Title: kcapi_pbkdf .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: November 2020 .\" Manual: Programming Interface .\" Source: libkcapi Manual 1.2.1 .\" Language: English .\" .TH "KCAPI_PBKDF" "3" "November 2020" "libkcapi Manual 1\&.2\&.1" "Programming Interface" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" kcapi_pbkdf \- Password\-based Key Derivation Function .SH "SYNOPSIS" .HP \w'int32_t\ kcapi_pbkdf('u .BI "int32_t kcapi_pbkdf(const\ char\ *\ " "hashname" ", const\ uint8_t\ *\ " "pw" ", uint32_t\ " "pwlen" ", const\ uint8_t\ *\ " "salt" ", uint32_t\ " "saltlen" ", uint32_t\ " "count" ", uint8_t\ *\ " "key" ", uint32_t\ " "keylen" ");" .SH "ARGUMENTS" .PP \fIhashname\fR .RS 4 [in] kernel crypto API name of a keyed hash (e\&.g\&. hmac(sha1)) .RE .PP \fIpw\fR .RS 4 [in] Password a key shall be derived from .RE .PP \fIpwlen\fR .RS 4 [in] Length of password string .RE .PP \fIsalt\fR .RS 4 [in] Salt as defined in SP800\-132 .RE .PP \fIsaltlen\fR .RS 4 [in] Length of salt buffer .RE .PP \fIcount\fR .RS 4 [in] Numbers of iterations to be performed for the PBKDF .RE .PP \fIkey\fR .RS 4 [out] Buffer to store the generated key in .RE .PP \fIkeylen\fR .RS 4 [in] Size of the key to be generated (i\&.e\&. length of the key buffer) .RE .SH "DESCRIPTION" .PP This function is an implementation of the PBKDF as defined in SP800\-132\&. .PP \fIreturn\fR 0 upon success; a negative errno\-style error code if an error occurred .SH "AUTHOR" .PP \fBStephan Mueller\fR <\&smueller@chronox.de\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br