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
| enum SaSiUtilKeyType_t |
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] keyType The 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] pUserKey A pointer to the user's key buffer (in case of SASI_UTIL_USER_KEY). [in] pLabel A string that identifies the purpose for the derived keying material. [in] labelSize The label size should be in range of 1 to 64 bytes length. [in] pContextData A binary string containing the information related to the derived keying material. [in] contextSize The context size should be in range of 1 to 64 bytes length. [out] pDerivedKey Keying material output (MUST be atleast the size of derivedKeySize). [in] derivedKeySize Size of the derived keying material in bytes (limited to 4080 bytes).