kcapi_hkdf(3)

kcapi_hkdf3

Extract-and-expand hkdf (rfc5869)

Usage

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);

Arguments

hashname

[in] kernel crypto API name of a keyed hash (e.g. hmac(sha1))

ikm

[in] Input Keying Material (IKM) -- must be provided

ikmlen

[in] IKM buffer length -- must be non-zero

salt

[in] salt buffer -- may be NULL

saltlen

[in] salt buffer length -- may be zero

info

[in] info buffer -- may be NULL

infolen

[in] info buffer length -- may be zero

dst

[out] Buffer to store the generated key in,

dlen

[in] Length of the dst buffer. This value defines the number of bytes generated by the KDF.

Overview

Perform the key-derivation function according to RFC5869. The input data is defined in sections 2.2 und 2.3 of RFC5869.

return 0 upon success; a negative errno-style error code if an error occurred

Releases

3 releases since Debian 11 (Bullseye); the text changed 2 times.

  1. 11
  2. 12
  3. 13

Author

Stephan Mueller <[email protected]>

Author.

From libkcapi-dev 1.4.0-1+b2 in Debian 13 (Trixie). Parsed by carta from the page's man source.