nRF5 SDK v17.1.0
Enumerations | Functions
CryptoCell utility key derivation APIs

Enumerations

enum  SaSiUtilKeyType_t {
  SASI_UTIL_USER_KEY = 0,
  SASI_UTIL_ROOT_KEY = 1,
  SASI_UTIL_END_OF_KEY_TYPE = 0x7FFFFFFF
}
 

Functions

SaSiUtilError_t SaSi_UtilKeyDerivation (SaSiUtilKeyType_t keyType, SaSiAesUserKeyData_t *pUserKey, const uint8_t *pLabel, size_t labelSize, const uint8_t *pContextData, size_t contextSize, uint8_t *pDerivedKey, size_t derivedKeySize)
 The key derivation function is as specified in [SP800-108] in section "KDF in Counter Mode". The derivation is based on length l, label L, context C and derivation key Ki. AES-CMAC is used as the pseudorandom function (PRF). More...
 

Detailed Description

Enumeration Type Documentation

Input key derivation type.

Enumerator
SASI_UTIL_USER_KEY 

User's key.

SASI_UTIL_ROOT_KEY 

Root key (Kdr).

SASI_UTIL_END_OF_KEY_TYPE 

Reserved.

Function Documentation

SaSiUtilError_t SaSi_UtilKeyDerivation ( SaSiUtilKeyType_t  keyType,
SaSiAesUserKeyData_t pUserKey,
const uint8_t *  pLabel,
size_t  labelSize,
const uint8_t *  pContextData,
size_t  contextSize,
uint8_t *  pDerivedKey,
size_t  derivedKeySize 
)

The key derivation function is as specified in [SP800-108] in section "KDF in Counter Mode". The derivation is based on length l, label L, context C and derivation key Ki. AES-CMAC is used as the pseudorandom function (PRF).

Returns
SASI_UTIL_OK on success.
A non-zero value from ssi_util_error.h on failure.
Parameters
[in]keyTypeThe key type that is used as an input to a key derivation function. Can be one of: SASI_UTIL_USER_KEY or SASI_UTIL_ROOT_KEY.
[in]pUserKeyA pointer to the user's key buffer (in case of SASI_UTIL_USER_KEY).
[in]pLabelA string that identifies the purpose for the derived keying material.
[in]labelSizeThe label size should be in range of 1 to 64 bytes length.
[in]pContextDataA binary string containing the information related to the derived keying material.
[in]contextSizeThe context size should be in range of 1 to 64 bytes length.
[out]pDerivedKeyKeying material output (MUST be atleast the size of derivedKeySize).
[in]derivedKeySizeSize of the derived keying material in bytes (limited to 4080 bytes).

Documentation feedback | Developer Zone | Subscribe | Updated