NXP Reader Library  v17.1.0.2535
Component : KeyProvisioning

DUT implementation of the KeyStore interface. More...

Collaboration diagram for Component : KeyProvisioning:

Modules

 Define
 Definitions for DUT layer configuration.
 

Functions

phStatus_t phKeyStore_DUT_Provision_Init (phKeyStore_DUT_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pTransportKey_AES128, uint8_t *pTransportKey_AES256, uint8_t *pAppRootKey_AES128, uint8_t *pAppRootKey_AES256, uint8_t *pExpDecData, uint8_t *pDervMsg, uint8_t *pWrapIV)
 Initializes the DUT KeyStore component for Key provisioning. More...
 
void phKeyStore_DUT_Provision_DeInit (phKeyStore_DUT_DataParams_t *pDataParams)
 De-Initializes PN7642 KeyStore component for Key provisioning. More...
 
phStatus_t phKeyStore_DUT_SetConfig_Ext (phKeyStore_DUT_DataParams_t *pDataParams, uint16_t wConfig, uint8_t *pValue, uint16_t wValueLen)
 Set configuration parameter. More...
 
phStatus_t phKeyStore_DUT_GetConfig_Ext (phKeyStore_DUT_DataParams_t *pDataParams, uint16_t wConfig, uint8_t *pValue, uint16_t *pValueLen)
 Get configuration parameter. More...
 
phStatus_t phKeyStore_DUT_Provision_AppFixedKeys (phKeyStore_DUT_DataParams_t *pDataParams, uint8_t bKeyIndex, uint16_t wKeyType, uint8_t *pNewKey)
 Provision Application Fixed Keys. More...
 

Detailed Description

DUT implementation of the KeyStore interface.

Function Documentation

◆ phKeyStore_DUT_Provision_Init()

phStatus_t phKeyStore_DUT_Provision_Init ( phKeyStore_DUT_DataParams_t pDataParams,
uint16_t  wOption,
uint8_t pTransportKey_AES128,
uint8_t pTransportKey_AES256,
uint8_t pAppRootKey_AES128,
uint8_t pAppRootKey_AES256,
uint8_t pExpDecData,
uint8_t pDervMsg,
uint8_t pWrapIV 
)

Initializes the DUT KeyStore component for Key provisioning.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf the input size do not match the DataParams size of this component.
PH_ERR_INVALID_PARAMETER
  • If any of the parameter is null.
  • If Derivation message pDervMsg does not hold 24 bytes of information.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]wOption[In] Options to perform the following.
[in]pTransportKey_AES128[In] Array containing AES 128-Bit [16 Byte] Transport Key. Can be NULL if wOption = PH_KEYSTORE_PROVISION_APP_ROOT_KEY_PROVISION_DISABLED
[in]pTransportKey_AES256[In] Array containing AES 256-Bit [32 Byte] Transport Key. Can be NULL if wOption = PH_KEYSTORE_PROVISION_APP_ROOT_KEY_PROVISION_DISABLED
[in]pAppRootKey_AES128[In] Array containing AES 128-Bit [16 Byte] Application Root Key. Should not be Null.
[in]pAppRootKey_AES256[In] Array containing AES 256-Bit [32 Byte] Application Root Key. Should not be Null.
[in]pExpDecData[In] Array containing AES 128-Bit [16 Byte] expected Decrypted data to be used while opening the Session. Should not be NULL.
[in]pDervMsg[In] Array containing derivation message. Should not be NULL.
  • Derivation message to derive a wrapping key from existing Transport Key (NXP_TPT_KEY) or Application Root Key (APP_ROOT_KEY)
  • Will be used while opening a session and provisioning the Keys.
  • Should be 24 bytes in length.
[in]pWrapIV[In] IV used for wrapping the key. This information will be used while provisioning the Key.
  • Should be 16 bytes in length.
  • If NULL, Zero IV will be used for wrapping the key.

◆ phKeyStore_DUT_Provision_DeInit()

void phKeyStore_DUT_Provision_DeInit ( phKeyStore_DUT_DataParams_t pDataParams)

De-Initializes PN7642 KeyStore component for Key provisioning.

Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.

◆ phKeyStore_DUT_SetConfig_Ext()

phStatus_t phKeyStore_DUT_SetConfig_Ext ( phKeyStore_DUT_DataParams_t pDataParams,
uint16_t  wConfig,
uint8_t pValue,
uint16_t  wValueLen 
)

Set configuration parameter.

This interface is supported only for PN7642 hardware.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]wConfig[In] Configuration Identifier.
[in]pValue[In] Configuration Value to update.
[in]wValueLen[In] Length of byte available in pValue buffer.

◆ phKeyStore_DUT_GetConfig_Ext()

phStatus_t phKeyStore_DUT_GetConfig_Ext ( phKeyStore_DUT_DataParams_t pDataParams,
uint16_t  wConfig,
uint8_t pValue,
uint16_t pValueLen 
)

Get configuration parameter.

This interface is supported only for PN7642 hardware.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]wConfig[In] Configuration Identifier.
[in]pValue[In] Configuration Value to retrieve.
[in]pValueLen[In] Length of byte available in pValue buffer.

◆ phKeyStore_DUT_Provision_AppFixedKeys()

phStatus_t phKeyStore_DUT_Provision_AppFixedKeys ( phKeyStore_DUT_DataParams_t pDataParams,
uint8_t  bKeyIndex,
uint16_t  wKeyType,
uint8_t pNewKey 
)

Provision Application Fixed Keys.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf the input size do not match the DataParams size of this component.
PH_ERR_INVALID_PARAMETER
  • If any of the parameter is null.
  • If Derivation message pDervMsg does not hold 24 bytes of information.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]bKeyIndex[In] Key number of the hardware keys store to be provisioned. Keys Index will be 10h - 1Ah
[in]wKeyType[In] Key type of the key to be loaded. Should be one of the following
[in]pNewKey[In] Pointer to the key itself.