#./fio-stl/152 sha2z hkdf.h
5 public symbols.
#Macros
#FIO_HKDF_SHA256_HASH_LEN
c
#define FIO_HKDF_SHA256_HASH_LEN 32SHA-256 hash length (32 bytes).
Symbol type: macro
#FIO_HKDF_SHA384_HASH_LEN
c
#define FIO_HKDF_SHA384_HASH_LEN 48SHA-384 hash length (48 bytes).
Symbol type: macro
#Functions
#fio_hkdf_extract
c
void fio_hkdf_extract(void *restrict prk, const void *restrict salt, size_t salt_len, const void *restrict ikm, size_t ikm_len, int use_sha384)HKDF-Extract: PRK = HMAC-Hash(salt, IKM)
Extracts a pseudorandom key (PRK) from input keying material (IKM).
Parameters:
prk- Output buffer (32 bytes for SHA-256, 48 for SHA-384)salt- Optional salt (if NULL, uses zeros of hash length)salt_len- Salt length in bytesikm- Input keying materialikm_len- IKM length in bytesuse_sha384- If non-zero, use SHA-384; otherwise SHA-256
Symbol type: function
#fio_hkdf_expand
c
void fio_hkdf_expand(void *restrict okm, size_t okm_len, const void *restrict prk, size_t prk_len, const void *restrict info, size_t info_len, int use_sha384)HKDF-Expand: OKM = HKDF-Expand(PRK, info, L)
Expands a pseudorandom key (PRK) into output keying material (OKM).
Parameters:
okm- Output keying material bufferokm_len- Desired output length (max 255 * hash_len)prk- Pseudorandom key from Extract (32 or 48 bytes)prk_len- PRK length (32 for SHA-256, 48 for SHA-384)info- Optional context/application infoinfo_len- Info length in bytesuse_sha384- If non-zero, use SHA-384; otherwise SHA-256
Symbol type: function
#fio_hkdf
c
void fio_hkdf(void *restrict okm, size_t okm_len, const void *restrict salt, size_t salt_len, const void *restrict ikm, size_t ikm_len, const void *restrict info, size_t info_len, int use_sha384)Combined HKDF (Extract + Expand) - RFC 5869 Section 2.
Derives keying material from input keying material using HKDF.
Parameters:
okm- Output keying material bufferokm_len- Desired output length (max 255 * hash_len)salt- Optional salt (if NULL, uses zeros of hash length)salt_len- Salt length in bytesikm- Input keying materialikm_len- IKM length in bytesinfo- Optional context/application infoinfo_len- Info length in bytesuse_sha384- If non-zero, use SHA-384; otherwise SHA-256
Symbol type: function