1KCAPI_HKDF(3)                Programming Interface               KCAPI_HKDF(3)
2
3
4

NAME

6       kcapi_hkdf - Extract-and-Expand HKDF (RFC5869)
7

SYNOPSIS

9       int32_t kcapi_hkdf(const char * hashname, const uint8_t * ikm,
10                          uint32_t ikmlen, const uint8_t * salt,
11                          uint32_t saltlen, const uint8_t * info,
12                          uint32_t infolen, uint8_t * dst, uint32_t dlen);
13

ARGUMENTS

15       hashname
16           [in] kernel crypto API name of a keyed hash (e.g. hmac(sha1))
17
18       ikm
19           [in] Input Keying Material (IKM) -- must be provided
20
21       ikmlen
22           [in] IKM buffer length -- must be non-zero
23
24       salt
25           [in] salt buffer -- may be NULL
26
27       saltlen
28           [in] salt buffer length -- may be zero
29
30       info
31           [in] info buffer -- may be NULL
32
33       infolen
34           [in] info buffer length -- may be zero
35
36       dst
37           [out] Buffer to store the generated key in,
38
39       dlen
40           [in] Length of the dst buffer. This value defines the number of
41           bytes generated by the KDF.
42

DESCRIPTION

44       Perform the key-derivation function according to RFC5869. The input
45       data is defined in sections 2.2 und 2.3 of RFC5869.
46
47       return 0 upon success; a negative errno-style error code if an error
48       occurred
49

AUTHOR

51       Stephan Mueller <smueller@chronox.de>
52           Author.
53
55libkcapi Manual 1.2.0             August 2020                    KCAPI_HKDF(3)
Impressum