KCAPI_KDF_CTR(3) | Programming Interface | KCAPI_KDF_CTR(3) |
NAME¶
kcapi_kdf_ctr - Counter Mode Key Derivation Function
SYNOPSIS¶
int32_t kcapi_kdf_ctr(struct kcapi_handle * handle, const uint8_t * src, uint32_t slen, uint8_t * dst, uint32_t dlen);
ARGUMENTS¶
handle
src
slen
dst
dlen
DESCRIPTION¶
This function is an implementation of the KDF in counter mode according to SP800-108 section 5.1 as well as SP800-56A section 5.8.1 (Single-step KDF).
SP800-108: The caller must provide Label || 0x00 || Context in src. This src pointer may also be NULL if the caller wishes not to provide anything.
SP800-56A: If a keyed MAC is used, the key shall NOT be the shared secret from the DH operation, but an independently generated key. The src pointer is defined as Z || other info where Z is the shared secret from DH and other info is an arbitrary string (see SP800-56A section 5.8.1.2).
return 0 upon success; a negative errno-style error code if an error occurred
AUTHOR¶
Stephan Mueller <smueller@chronox.de>
COPYRIGHT¶
July 2017 | libkcapi Manual 0.13.0 |