KeyStore component implementation for SAM (AV4 and future SAM's). More...

Modules | |
| Define | |
| Definitions for SAM (AV4 and future SAM's) KeyStore component. | |
Data Structures | |
| struct | phKeyStore_Sam_DataParams_t |
| SAM (AV4 and future SAM's) parameter structure. More... | |
| struct | phKeyStore_Sam_KeyEntry_t |
| Data structure for KeyStore SAM (AV4 and future SAM's) layer implementation. More... | |
KeyStore component implementation for SAM (AV4 and future SAM's).
| phStatus_t phKeyStore_Sam_Init | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wSizeOfDataParams, | ||
| phhalHw_Sam_DataParams_t * | pHalDataParams | ||
| ) |
Initializes the KeyStore component as SAM (AV4 and future SAM's) component.
| PH_ERR_SUCCESS | Operation successful. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wSizeOfDataParams | [In] Specifies the size of the data parameter structure. |
| [in] | pHalDataParams | [In] Pointer to the parameter structure of the underlying layer. |
| phStatus_t phKeyStore_Sam_FormatKeyEntry | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wKeyNo, | ||
| uint16_t | wKeyType | ||
| ) |
Format a key entry to a new KeyType.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wKeyNo = INVALID value. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wKeyNo | [In] KeyEntry number to be formatted. One of the following,
|
| [in] | wKeyType | [In] New key type of the KeyEntry (predefined type of KeyType). One of the following. |
| phStatus_t phKeyStore_Sam_SetKUC | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wKeyNo, | ||
| uint16_t | wRefNoKUC | ||
| ) |
Change the KUC of a key entry.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wKeyNo = INVALID value. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wKeyNo | [In] Key number of the key to be loaded. One of the following,
|
| [in] | wRefNoKUC | [In] Reference Number of the key usage counter used together with that key. |
| phStatus_t phKeyStore_Sam_GetKUC | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wRefNoKUC, | ||
| uint32_t * | pdwLimit, | ||
| uint32_t * | pdwCurVal | ||
| ) |
Obtain a key usage counter entry.
The function returns the KUC entry retrieved by the SAM_GetKUCEntry command. KeyNoCKUC and KeyVCKUC are stored in the configuration parameters and can be accessed via the GetConfig function.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wRefNoKUC | [In] Number of the key usage counter to be looked at (00h to 0Fh) |
| [out] | pdwLimit | [Out] Currently set Limit in the KUC. |
| [out] | pdwCurVal | [Out] Currently value in the KUC. |
| phStatus_t phKeyStore_Sam_ChangeKUC | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wRefNoKUC, | ||
| uint32_t | dwLimit | ||
| ) |
Change a key usage counter entry.
The function changes the KUC by using the SAM_ChangeKUCEntry command. KeyNoCKUC and KeyVCKUC are set to according to the configuration parameters.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wRefNoKUC | [In] Number of the key usage counter. |
| [in] | dwLimit | [In] Limit of the Key Usage Counter. |
| phStatus_t phKeyStore_Sam_SetConfig | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wConfig, | ||
| uint16_t | wValue | ||
| ) |
Set configuration parameter.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wConfig is having a identifier that is not supported. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wConfig | [In] Configuration Identifier |
| [in] | wValue | [In] Configuration Value |
| phStatus_t phKeyStore_Sam_SetConfigStr | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wConfig, | ||
| uint8_t * | pBuffer, | ||
| uint16_t | wBufferLen | ||
| ) |
Set the DESFire Application Identifier.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wConfig is having a identifier that is not supported. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wConfig | [In] Configuration Identifier, mainly DF_AID is supported. |
| [in] | pBuffer | [In] Buffer containing the DESFire Application Identifier. |
| [in] | wBufferLen | [In] Length of data available in pBuffer. |
| phStatus_t phKeyStore_Sam_GetConfig | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wConfig, | ||
| uint16_t * | pValue | ||
| ) |
Get configuration parameter.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wConfig is having a identifier that is not supported. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wConfig | [In] Configuration Identifier |
| [out] | pValue | [Out] Configuration Value |
| phStatus_t phKeyStore_Sam_GetConfigStr | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wConfig, | ||
| uint8_t ** | ppBuffer, | ||
| uint16_t * | pBufferLen | ||
| ) |
Get the DESFire Application Identifier.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wConfig is having a identifier that is not supported. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wConfig | [In] Configuration Identifier, mainly DF_AID is supported. |
| [out] | ppBuffer | [Out] Buffer containing the DESFire Application Identifier. |
| [out] | pBufferLen | [Out] Length of data available in pBuffer. |
| phStatus_t phKeyStore_Sam_SetKey | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wKeyNo, | ||
| uint16_t | wKeyVer, | ||
| uint16_t | wKeyType, | ||
| uint8_t * | pNewKey, | ||
| uint16_t | wNewKeyVer | ||
| ) |
Change a key entry at a given version.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wKeyNo = INVALID value. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wKeyNo | [In] Key number of the key to be loaded. One of the following,
|
| [in] | wKeyVer | [In] Key version of the key to be loaded. |
| [in] | wKeyType | [In] New key type of the KeyEntry (predefined type of KeyType). One of the following. |
| [in] | pNewKey | [In] The key information to be updated. |
| [in] | wNewKeyVer | [In] New Key version of the key to be updated. |
| phStatus_t phKeyStore_Sam_SetKeyAtPos | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wKeyNo, | ||
| uint16_t | wPos, | ||
| uint16_t | wKeyType, | ||
| uint8_t * | pKey, | ||
| uint16_t | wKeyVer | ||
| ) |
Change a key entry at the specified position.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER |
|
| - | KeyType mismatch or wrong wPos. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wKeyNo | [In] Key number of the key to be loaded. One of the following,
|
| [in] | wPos | [In] Key position to be updated. |
| [in] | wKeyType | [In] New key type of the KeyEntry (predefined type of KeyType). One of the following. |
| [in] | pKey | [In] The key information to be loaded. |
| [in] | wKeyVer | [In] Key version of the key to be updated. |
| phStatus_t phKeyStore_Sam_SetFullKeyEntry | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wNoOfKeys, | ||
| uint16_t | wKeyNo, | ||
| uint16_t | wNewRefNoKUC, | ||
| uint16_t | wNewKeyType, | ||
| uint8_t * | pNewKeys, | ||
| uint16_t * | pNewKeyVerList | ||
| ) |
Change a full key entry.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wKeyNo = INVALID value. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wNoOfKeys | [In] Number of keys in pNewKeys. |
| [in] | wKeyNo | [In] Number of the keys to be changed in the entry. |
| [in] | wNewRefNoKUC | [In] Reference number of the key usage counter to be used. |
| [in] | wNewKeyType | [In] Key type of the new key. One of the following. |
| [in] | pNewKeys | [In] Buffer containing the Keys to be updated. This buffer has to be wNoOfKeys * Key Length bytes long. |
| [in] | pNewKeyVerList | [In] KeyVersionList of the key to be loaded. This buffer has to be wNoOfKeys * 2 bytes long. |
| phStatus_t phKeyStore_Sam_GetKey | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wKeyNo, | ||
| uint16_t | wKeyVer, | ||
| uint8_t | bKeyBufSize, | ||
| uint8_t * | pKey, | ||
| uint16_t * | pKeyType | ||
| ) |
Get a key.
The function returns a key selected by its key version:
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wKeyNo = INVALID value. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wKeyNo | [In] Key number of the key to be retrieved. One of the following,
|
| [in] | wKeyVer | [In] Key version of the key to be retrieved. |
| [in] | bKeyBufSize | [In] Size of the key buffer. |
| [out] | pKey | [Out] Pointer to the key itself. |
| [out] | pKeyType | [Out] Type of the key. One of the following. |
| phStatus_t phKeyStore_Sam_GetKeyEntry | ( | phKeyStore_Sam_DataParams_t * | pDataParams, |
| uint16_t | wKeyNo, | ||
| uint16_t * | pKeyVer, | ||
| uint16_t * | pKeyVerLen, | ||
| uint16_t * | pKeyType | ||
| ) |
Get a key entry information block.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_INVALID_PARAMETER | If wKeyNo = INVALID value. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layers parameter structure. |
| [in] | wKeyNo | [In] Key number of the key entry of interest. One of the following,
|
| [out] | pKeyVer | [Out] Array for version information. |
| [out] | pKeyVerLen | [Out] Length of bytes available in pKeyVer buffer. |
| [out] | pKeyType | [Out] Type of the key. One of the following. |