nRF5 SDK v13.0.0
Macros | Enumerations | Functions

This module defines the API that supports HMAC Key derivation function as defined by RFC5869. More...

Macros

#define CRYS_HKDF_MAX_HASH_KEY_SIZE_IN_BYTES   512
 
#define CRYS_HKDF_MAX_HASH_DIGEST_SIZE_IN_BYTES   CRYS_HASH_SHA512_DIGEST_SIZE_IN_BYTES
 

Enumerations

enum  CRYS_HKDF_HASH_OpMode_t {
  CRYS_HKDF_HASH_SHA1_mode = 0,
  CRYS_HKDF_HASH_SHA224_mode = 1,
  CRYS_HKDF_HASH_SHA256_mode = 2,
  CRYS_HKDF_HASH_SHA384_mode = 3,
  CRYS_HKDF_HASH_SHA512_mode = 4,
  CRYS_HKDF_HASH_NumOfModes,
  CRYS_HKDF_HASH_OpModeLast = 0x7FFFFFFF
}
 

Functions

CRYSError_t CRYS_HKDF_KeyDerivFunc (CRYS_HKDF_HASH_OpMode_t HKDFhashMode, uint8_t *Salt_ptr, size_t SaltLen, uint8_t *Ikm_ptr, uint32_t IkmLen, uint8_t *Info, uint32_t InfoLen, uint8_t *Okm, uint32_t OkmLen, SaSiBool IsStrongKey)
 CRYS_HKDF_KeyDerivFunc performs the HMAC-based key derivation, according to RFC5869. More...
 

Detailed Description

This module defines the API that supports HMAC Key derivation function as defined by RFC5869.

Function Documentation

CRYSError_t CRYS_HKDF_KeyDerivFunc ( CRYS_HKDF_HASH_OpMode_t  HKDFhashMode,
uint8_t *  Salt_ptr,
size_t  SaltLen,
uint8_t *  Ikm_ptr,
uint32_t  IkmLen,
uint8_t *  Info,
uint32_t  InfoLen,
uint8_t *  Okm,
uint32_t  OkmLen,
SaSiBool  IsStrongKey 
)

CRYS_HKDF_KeyDerivFunc performs the HMAC-based key derivation, according to RFC5869.

Returns
CRYSError_t - On success the value CRYS_OK is returned, and on failure an ERROR as defined in CRYS_KDF_error.h: CRYS_HKDF_INVALID_ARGUMENT_POINTER_ERROR CRYS_HKDF_INVALID_ARGUMENT_SIZE_ERROR CRYS_HKDF_INVALID_ARGUMENT_HASH_MODE_ERROR
Parameters
[in]HKDFhashModeThe HKDF identifier of hash function to be used.
[in]Salt_ptrA pointer to a non secret random value. can be NULL.
[in]SaltLenThe size of the salt_ptr.
[in]Ikm_ptrA pointer to a input key message.
[in]IkmLenThe size of the input key message
[in]InfoA pointer to an optional context and application specific information. can be NULL
[in]InfoLenThe size of the info.
[in]OkmA pointer to a output key material.
[in]OkmLenThe size of the output key material.
[in]IsStrongKeyif TRUE , then no need to perform the extraction phase.

Documentation feedback | Developer Zone | Subscribe | Updated