KCAPI_KDF_FB(3) | Programming Interface | KCAPI_KDF_FB(3) |
NAME¶
kcapi_kdf_fb - Feedback Mode Key Derivation Function
SYNOPSIS¶
ssize_t kcapi_kdf_fb(struct kcapi_handle * handle, const uint8_t * src, size_t slen, uint8_t * dst, size_t dlen);
ARGUMENTS¶
handle
src
slen
dst
dlen
DESCRIPTION¶
This function is an implementation of the KDF in feedback mode with a non-NULL IV and with counter according to SP800-108 section 5.2. The IV is supplied with src and must be equal to the digestsize of the used cipher.
In addition, the caller must provide Label || 0x00 || Context in src. This src pointer must not be NULL as the IV is required. The ultimate format of the src pointer is IV || Label || 0x00 || Context where the length of the IV is equal to the block size (i.e. the digest size of the underlying hash) of the PRF.
return 0 upon success; a negative errno-style error code if an error occurred
AUTHOR¶
Stephan Mueller <smueller@chronox.de>
COPYRIGHT¶
March 2023 | libkcapi Manual 1.4.0 |