Software APIs
Data Fields
hkdf_test_vector Struct Reference

Represents a test for HKDF. More...

Data Fields

otcrypto_key_mode_t hmac_key_mode
 Key mode for HKDF (e.g. More...
 
uint32_t * ikm
 Input key derivation key (called IKM in RFC 5869).
 
size_t ikm_bytelen
 Length of key derivation key in bytes.
 
uint8_t * salt
 Salt value. More...
 
size_t salt_bytelen
 Length of salt in bytes.
 
uint8_t * info
 Context string. More...
 
size_t info_bytelen
 Length of info in bytes.
 
uint32_t * prk
 Expected value for the intermediate pseudo-random key. More...
 
size_t prk_wordlen
 Length of pseudo-random key in 32-bit words.
 
uint32_t * okm
 Expected output derived key (called OKM in RFC 5869).
 
size_t okm_bytelen
 Length of derived key in bytes.
 

Detailed Description

Represents a test for HKDF.

Definition at line 20 of file hkdf_functest.c.

Field Documentation

◆ hmac_key_mode

otcrypto_key_mode_t hkdf_test_vector::hmac_key_mode

Key mode for HKDF (e.g.

HMAC-256). Determines hash function.

Definition at line 24 of file hkdf_functest.c.

◆ ikm

uint32_t* hkdf_test_vector::ikm

Input key derivation key (called IKM in RFC 5869).

Definition at line 28 of file hkdf_functest.c.

◆ ikm_bytelen

size_t hkdf_test_vector::ikm_bytelen

Length of key derivation key in bytes.

Definition at line 32 of file hkdf_functest.c.

◆ info

uint8_t* hkdf_test_vector::info

Context string.

May be NULL if salt_bytelen is 0.

Definition at line 44 of file hkdf_functest.c.

◆ info_bytelen

size_t hkdf_test_vector::info_bytelen

Length of info in bytes.

Definition at line 48 of file hkdf_functest.c.

◆ okm

uint32_t* hkdf_test_vector::okm

Expected output derived key (called OKM in RFC 5869).

Definition at line 65 of file hkdf_functest.c.

◆ okm_bytelen

size_t hkdf_test_vector::okm_bytelen

Length of derived key in bytes.

Definition at line 69 of file hkdf_functest.c.

◆ prk

uint32_t* hkdf_test_vector::prk

Expected value for the intermediate pseudo-random key.

This is the output of the extract phase and the input for the expand phase. Its length should be the same as the hash function digest length. Some test vectors may not include an expected value for the PRK, so if this pointer is NULL, the PRK will not be checked.

Definition at line 57 of file hkdf_functest.c.

◆ prk_wordlen

size_t hkdf_test_vector::prk_wordlen

Length of pseudo-random key in 32-bit words.

Definition at line 61 of file hkdf_functest.c.

◆ salt

uint8_t* hkdf_test_vector::salt

Salt value.

May be NULL if salt_bytelen is 0.

Definition at line 36 of file hkdf_functest.c.

◆ salt_bytelen

size_t hkdf_test_vector::salt_bytelen

Length of salt in bytes.

Definition at line 40 of file hkdf_functest.c.