'\" t .\" Title: kcapi_kdf_dpi .\" Author: .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: November 2020 .\" Manual: Programming Interface .\" Source: libkcapi Manual 1.2.1 .\" Language: English .\" .TH "KCAPI_KDF_DPI" "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_kdf_dpi \- Double Pipeline Mode Key Derivation Function .SH "SYNOPSIS" .HP \w'int32_t\ kcapi_kdf_dpi('u .BI "int32_t kcapi_kdf_dpi(struct\ kcapi_handle\ *\ " "handle" ", const\ uint8_t\ *\ " "src" ", uint32_t\ " "slen" ", uint8_t\ *\ " "dst" ", uint32_t\ " "dlen" ");" .SH "ARGUMENTS" .PP \fIhandle\fR .RS 4 [in] cipher handle allocated by caller\&. This cipher handle must be allocated with \fBkcapi_md_init\fR\&. If the caller is interested in a KDF using a keyed message digest, the caller should also call \fBkcapi_md_setkey\fR before invoking this function\&. .RE .PP \fIsrc\fR .RS 4 [in] Input data that should be transformed into a key (see below)\&. .RE .PP \fIslen\fR .RS 4 [in] Length of the src input data\&. .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 This function is an implementation of the KDF in double pipeline iteration mode according with counter to SP800\-108 section 5\&.3\&. .PP The caller must provide Label || 0x00 || Context in src\&. This src pointer may also be NULL if the caller wishes not to provide anything\&. .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