Software APIs
Functions
kdf_ctr.h File Reference

(dbfdd20677)

KDF-CTR operations for the OpenTitan cryptography library. More...

#include "datatypes.h"

Go to the source code of this file.

Functions

otcrypto_status_t otcrypto_kdf_ctr_hmac (const otcrypto_blinded_key_t key_derivation_key, const otcrypto_const_byte_buf_t label, const otcrypto_const_byte_buf_t context, otcrypto_blinded_key_t *output_key_material)
 Performs KDF-CTR with HMAC as the PRF, according to NIST SP 800-108r1. More...
 

Detailed Description

KDF-CTR operations for the OpenTitan cryptography library.

Definition in file kdf_ctr.h.

Function Documentation

◆ otcrypto_kdf_ctr_hmac()

otcrypto_status_t otcrypto_kdf_ctr_hmac ( const otcrypto_blinded_key_t  key_derivation_key,
const otcrypto_const_byte_buf_t  label,
const otcrypto_const_byte_buf_t  context,
otcrypto_blinded_key_t output_key_material 
)

Performs KDF-CTR with HMAC as the PRF, according to NIST SP 800-108r1.

The caller should allocate and partially populate the output_key_material blinded key struct, including populating the key configuration and allocating space for the keyblob. The configuration may not indicate a hardware-backed key and must indicate a symmetric mode. The allocated keyblob length for the output key should be twice the unmasked key length indicated in its key configuration, rounded up to the nearest 32-bit word. The value in the checksum field of the blinded key struct will be populated by the key derivation function.

Parameters
key_derivation_keyBlinded key derivation key.
labelLabel string (optional, may be empty).
contextContext string (optional, may be empty).
[out]output_key_materialBlinded output key material.
Returns
Result of the key derivation operation.

Definition at line 62 of file kdf_ctr.c.