SAM commands used for host communication and security related configuration.
More...
|
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_LockUnlock (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bCmdType, uint16_t wRdKeyNo, uint16_t wRdKeyVer, uint8_t bSamKeyNo, uint8_t bSamKeyVer, uint8_t bUnlockKeyNo, uint8_t bUnlockKeyVer, uint32_t dwMaxChainBlocks) |
| | Lock or Unlock the SAM. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_AuthenticateHost (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bHostMode, uint16_t wRdKeyNo, uint16_t wRdKeyV, uint8_t bSamKeyNo, uint8_t bSamKeyV) |
| | Mutual 3-pass-AV2 or 3-Pass AV3 authentication between Host and SAM. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_GetVersion (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t *pVersion, uint8_t *pVersionLen) |
| | Get version information from the SAM. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_DisableCrypto (phhalHw_SamAV3_DataParams_t *pDataParams, uint16_t wProMas) |
| | Disable cryto-related features of the SAM permanently and is irreversible. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_ActivateOfflineKey (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyVer, uint8_t *pDivInput, uint8_t bDivInputLen) |
| | Activation of an OfflineCrypto or an OfflineChange Key. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_LoadInitVector (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t *pData, uint8_t bDataLen) |
| | Load an Init Vector for the next cryptographic operation into the SAM. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_KillAuthentication (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption) |
| | Kill all active authentications in this logical channel. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_SelectApplication (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t *pDF_Aid) |
| | Select an application by the DF_AID. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_GetRandom (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bExpLen, uint8_t *pRnd) |
| | Gets a random number. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_Sleep (phhalHw_SamAV3_DataParams_t *pDataParams) |
| | Set the SAM into power down mode. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_SetConfiguration (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t *pData, uint8_t bDataLen) |
| | Used to update SAM configuration settings. More...
|
| |
SAM commands used for host communication and security related configuration.
◆ phhalHw_SamAV3_Cmd_SAM_LockUnlock()
Lock or Unlock the SAM.
Its important to perform Host Authentication after successfull LockUnlock operation to set the new session keys. Host Authentication is required because, LockUnlock interface will utilize the same Cryptoparams which was utilized by Host Authentication interface. Since the Cryptoparams are common, the keys will be updated by LockUnlock interface and the exisiting Host Authentication session keys will not be available.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bCmdType | [In] Sub Command type.
|
| [in] | wRdKeyNo | [In] Key reference number to be used in software key store. |
| [in] | wRdKeyVer | [In] Key version to be used in software keystore. |
| [in] | bSamKeyNo | [In] Key reference number in hardware keytsore. |
| [in] | bSamKeyVer | [In] Key version to be used in hardware key store. |
| [in] | bUnlockKeyNo | [In] Unlock Key Number to be used in hardware key store (only used when bCmdType = 0x01). |
| [in] | bUnlockKeyVer | [In] Unlock Key Version to be used in hardware key store (only used when bCmdType = 0x01). |
| [in] | dwMaxChainBlocks | [In] Maximal message size under command chaining in MAC or Full Protection (only used during switch from AV2 to AV3). |
◆ phhalHw_SamAV3_Cmd_SAM_AuthenticateHost()
Mutual 3-pass-AV2 or 3-Pass AV3 authentication between Host and SAM.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
◆ phhalHw_SamAV3_Cmd_SAM_GetVersion()
Get version information from the SAM.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [out] | pVersion | [Out] Buffer containing the read version. It has to be 31 bytes long. |
| [out] | pVersionLen | [Out] Amount of valid bytes in the version buffer. |
◆ phhalHw_SamAV3_Cmd_SAM_DisableCrypto()
Disable cryto-related features of the SAM permanently and is irreversible.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wProMas | [In] Two byte mask to specify the desired settings for cryptography-related features.
|
◆ phhalHw_SamAV3_Cmd_SAM_ActivateOfflineKey()
Activation of an OfflineCrypto or an OfflineChange Key.
This command is available in both AV2 and AV3 mode.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Option to update the P1 information if Keytype is AES_128LRP.
|
| [in] | bKeyNo | [In] Key reference number in hardware keytsore. |
| [in] | bKeyVer | [In] Key version to be used in hardware key store. |
| [in] | pDivInput | [In] Diversification Input used to diversify the key. |
| [in] | bDivInputLen | [In] Length of diversification input used to diversify the key. |
◆ phhalHw_SamAV3_Cmd_SAM_LoadInitVector()
Load an Init Vector for the next cryptographic operation into the SAM.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] One of the below option.
|
| [in] | pData | [In] Data based on the option selected.
If
|
| [in] | bDataLen | [In] The length of bytes available in Data buffer. |
◆ phhalHw_SamAV3_Cmd_SAM_KillAuthentication()
Kill all active authentications in this logical channel.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] The type of authentication to be killed.
|
◆ phhalHw_SamAV3_Cmd_SAM_SelectApplication()
Select an application by the DF_AID.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | pDF_Aid | [In] DESFire application identifier (3 bytes). |
◆ phhalHw_SamAV3_Cmd_SAM_GetRandom()
Gets a random number.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bExpLen | [In] The length of random bytes expected form Sam hardware. |
| [out] | pRnd | [Out] The random number returned by Sam. |
◆ phhalHw_SamAV3_Cmd_SAM_Sleep()
Set the SAM into power down mode.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
◆ phhalHw_SamAV3_Cmd_SAM_SetConfiguration()
Used to update SAM configuration settings.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Configuration setting ID. Define length and content of the Data parameter.
|
| [in] | pData | [In] Configuration setting data.
|
| [in] | bDataLen | [In] Length of Configuration setting data. |