'\" t .\" Title: kcapi_hkdf .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: April 2024 .\" Manual: Programming Interface .\" Source: libkcapi Manual 1.4.0 .\" Language: English .\" .TH "KCAPI_HKDF" "3" "April 2024" "libkcapi Manual 1\&.4\&.0" "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_hkdf \- Extract\-and\-Expand HKDF (RFC5869) .SH "SYNOPSIS" .HP \w'ssize_t\ kcapi_hkdf('u .BI "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" ");" .SH "ARGUMENTS" .PP \fIhashname\fR .RS 4 [in] kernel crypto API name of a keyed hash (e\&.g\&. hmac(sha1)) .RE .PP \fIikm\fR .RS 4 [in] Input Keying Material (IKM) \-\- must be provided .RE .PP \fIikmlen\fR .RS 4 [in] IKM buffer length \-\- must be non\-zero .RE .PP \fIsalt\fR .RS 4 [in] salt buffer \-\- may be NULL .RE .PP \fIsaltlen\fR .RS 4 [in] salt buffer length \-\- may be zero .RE .PP \fIinfo\fR .RS 4 [in] info buffer \-\- may be NULL .RE .PP \fIinfolen\fR .RS 4 [in] info buffer length \-\- may be zero .RE .PP \fIdst\fR .RS 4 [out] Buffer to store the generated key in, .RE .PP \fIdlen\fR .RS 4 [in] Length of the dst buffer\&. This value defines the number of bytes generated by the KDF\&. .RE .SH "DESCRIPTION" .PP Perform the key\-derivation function according to RFC5869\&. The input data is defined in sections 2\&.2 und 2\&.3 of RFC5869\&. .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