NXP Reader Library  v17.1.0.2535

Provides a Secure Messaging interface for AES mode. More...

Collaboration diagram for AES Host Secure Messaging:

Functions

phStatus_t phhalHw_Sam_HSM_AES_Encrypt (phhalHw_Sam_DataParams_t *pDataParams, uint8_t *pBuffer, uint16_t wBuffLen, uint16_t wBufferSize, uint16_t *pBuffLen, uint8_t bFirst, uint8_t bLast)
 Perform Encryption using Sam Host Protocol. More...
 
phStatus_t phhalHw_Sam_HSM_AES_Decrypt (phhalHw_Sam_DataParams_t *pDataParams, uint8_t *pBuffer, uint16_t wBuffLen, uint16_t *pBuffLen, uint8_t bFirst, uint8_t bLast)
 Perform Decryption using Sam Host Protocol. More...
 
phStatus_t phhalHw_Sam_HSM_AES_AppendMac (phhalHw_Sam_DataParams_t *pDataParams, uint8_t *pBuffer, uint16_t wBuffLen, uint16_t wBufferSize, uint16_t *pBuffLen, uint8_t bFirst, uint8_t bLast)
 Append MAC to a data stream using Sam Host Protocol. More...
 
phStatus_t phhalHw_Sam_HSM_AES_VerifyRemoveMac (phhalHw_Sam_DataParams_t *pDataParams, uint8_t *pBuffer, uint16_t wBuffLen, uint16_t *pBuffLen, uint8_t bFirst, uint8_t bLast)
 Remove Mac and verify it using Sam Host Protocol. More...
 
phStatus_t phhalHw_Sam_HSM_AES_GetFirstLastCommand (phhalHw_Sam_DataParams_t *pDataParams, uint8_t bCmd, uint8_t bP1, uint8_t bP2, uint8_t *pFirstCmd, uint8_t *pLastCmd)
 
phStatus_t phhalHw_Sam_HSM_AES_GetFirstLastResponse (phhalHw_Sam_DataParams_t *pDataParams, uint8_t bSw1, uint8_t bSw2, uint8_t *pFirstResponse, uint8_t *pLastResponse)
 
phStatus_t phhalHw_Sam_HSM_AES_InitAndLoadIV (phhalHw_Sam_DataParams_t *pDataParams, uint8_t *pIV, uint8_t bIsCommand)
 

Detailed Description

Provides a Secure Messaging interface for AES mode.

Function Documentation

◆ phhalHw_Sam_HSM_AES_Encrypt()

phStatus_t phhalHw_Sam_HSM_AES_Encrypt ( phhalHw_Sam_DataParams_t pDataParams,
uint8_t pBuffer,
uint16_t  wBuffLen,
uint16_t  wBufferSize,
uint16_t pBuffLen,
uint8_t  bFirst,
uint8_t  bLast 
)

Perform Encryption using Sam Host Protocol.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pBuffer[In] Data to encrypt.
[in]wBuffLen[In] Length of bytes available in pBuffer buffer.
[in]wBufferSize[In] Size of bytes allocated for pBuffer buffer.
[out]pBuffLen[Out] Number of encrypted data bytes.
[in]bFirst[In] Whether this is the first block.
[in]bLast[In] Whether this is the last block.

◆ phhalHw_Sam_HSM_AES_Decrypt()

phStatus_t phhalHw_Sam_HSM_AES_Decrypt ( phhalHw_Sam_DataParams_t pDataParams,
uint8_t pBuffer,
uint16_t  wBuffLen,
uint16_t pBuffLen,
uint8_t  bFirst,
uint8_t  bLast 
)

Perform Decryption using Sam Host Protocol.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pBuffer[In] Data to decrypt.
[in]wBuffLen[In] Length of bytes available in pBuffer buffer.
[in]pBuffLen[In] Size of bytes allocated for pBuffer buffer.
[in]bFirst[In] Whether this is the first block.
[in]bLast[In] Whether this is the last block.

◆ phhalHw_Sam_HSM_AES_AppendMac()

phStatus_t phhalHw_Sam_HSM_AES_AppendMac ( phhalHw_Sam_DataParams_t pDataParams,
uint8_t pBuffer,
uint16_t  wBuffLen,
uint16_t  wBufferSize,
uint16_t pBuffLen,
uint8_t  bFirst,
uint8_t  bLast 
)

Append MAC to a data stream using Sam Host Protocol.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
pBufferIn] Data for MAC computation.
[in]wBuffLen[In] Length of bytes available in pBuffer buffer.
[in]wBufferSize[In] Size of bytes allocated for pBuffer buffer.
[out]pBuffLen[Out] Number of data bytes incl. MAC.
[in]bFirst[In] Whether this is the first block.
[in]bLast[In] Whether this is the last block.

◆ phhalHw_Sam_HSM_AES_VerifyRemoveMac()

phStatus_t phhalHw_Sam_HSM_AES_VerifyRemoveMac ( phhalHw_Sam_DataParams_t pDataParams,
uint8_t pBuffer,
uint16_t  wBuffLen,
uint16_t pBuffLen,
uint8_t  bFirst,
uint8_t  bLast 
)

Remove Mac and verify it using Sam Host Protocol.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pBuffer[In] Data to unmac.
[in]wBuffLen[In] Length of bytes available in pBuffer buffer.
[out]pBuffLen[Out] Number of unmaced data bytes.
[in]bFirst[In] Whether this is the first block.
[in]bLast[In] Whether this is the last block.

◆ phhalHw_Sam_HSM_AES_GetFirstLastCommand()

phStatus_t phhalHw_Sam_HSM_AES_GetFirstLastCommand ( phhalHw_Sam_DataParams_t pDataParams,
uint8_t  bCmd,
uint8_t  bP1,
uint8_t  bP2,
uint8_t pFirstCmd,
uint8_t pLastCmd 
)
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCmd[In] Command code.
[in]bP1[In] P1 of command.
[in]bP2[In] P2 of command.
[out]pFirstCmd[Out] Whether this is the first block.
[out]pLastCmd[Out] Whether this is the last block.

◆ phhalHw_Sam_HSM_AES_GetFirstLastResponse()

phStatus_t phhalHw_Sam_HSM_AES_GetFirstLastResponse ( phhalHw_Sam_DataParams_t pDataParams,
uint8_t  bSw1,
uint8_t  bSw2,
uint8_t pFirstResponse,
uint8_t pLastResponse 
)
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bSw1[In] SW1 of response.
[in]bSw2[In] SW2 of response.
[out]pFirstResponse[Out] Whether this is the first block.
[out]pLastResponse[Out] Whether this is the last block.

◆ phhalHw_Sam_HSM_AES_InitAndLoadIV()

phStatus_t phhalHw_Sam_HSM_AES_InitAndLoadIV ( phhalHw_Sam_DataParams_t pDataParams,
uint8_t pIV,
uint8_t  bIsCommand 
)
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pIV[In] The Initialization vector to be initialized and loaded.
[in]bIsCommand[In] Is the Initialization vector for command or response.
  • PH_ON : Initialization Vector computation is for command.
  • PH_OFF: Initialization Vector computation is for Response.