NXP Reader Library  v17.1.0.2535

SAM commands used for Virtaul Card communication in S-Mode. More...

Collaboration diagram for S Mode:

Functions

phStatus_t phhalHw_SamAV3_Cmd_SAM_SelectVC (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t bEncKeyNo, uint8_t bEncKeyVer, uint8_t bMacKeyNo, uint8_t bMacKeyVer, uint8_t *pData, uint8_t bDataLen, uint8_t *pDivInput, uint8_t bDivInputLen, uint8_t **ppResponse, uint16_t *pRespLen)
 Performs Virtual card selection based on the response of ISOSelect command. More...
 
phStatus_t phhalHw_SamAV3_Cmd_SAM_ProximityCheck_Part1 (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyVer, uint8_t *PPCData, uint8_t bPPCDataLen, uint8_t *pPCData, uint8_t bPCDataLen, uint8_t *pDivInput, uint8_t bDivInputLen, uint8_t **ppMac, uint16_t *pMacLen)
 Performs Proximity Check Part 1 command execution. More...
 
phStatus_t phhalHw_SamAV3_Cmd_SAM_ProximityCheck_Part2 (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t *pData, uint8_t bDataLen, uint8_t *pPiccRetCode)
 Performs Proximity Check Part 2 command execution. More...
 

Sam AV3 command code for Sam Virtual Card feature in S mode.

#define PHHAL_HW_SAMAV3_CMD_SAM_SELECT_VC_INS   0x44
 Sam AV3 Insturction code for SAM_SelectVC command.
 
#define PHHAL_HW_SAMAV3_CMD_SAM_PROXIMITY_CHECK_INS   0xFA
 Sam AV3 Insturction code for SAM_ProximityCheck command.
 

Detailed Description

SAM commands used for Virtaul Card communication in S-Mode.

Function Documentation

◆ phhalHw_SamAV3_Cmd_SAM_SelectVC()

phStatus_t phhalHw_SamAV3_Cmd_SAM_SelectVC ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bOption,
uint8_t  bEncKeyNo,
uint8_t  bEncKeyVer,
uint8_t  bMacKeyNo,
uint8_t  bMacKeyVer,
uint8_t pData,
uint8_t  bDataLen,
uint8_t pDivInput,
uint8_t  bDivInputLen,
uint8_t **  ppResponse,
uint16_t pRespLen 
)

Performs Virtual card selection based on the response of ISOSelect command.

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]bOption[In] Option to update the P1 information. The options can be combined by bitwise oring. Option for diversification of VCSelectENCKey.
[in]bEncKeyNo[In] Reference key number to be used in hardware keystore as VCSelectEncKey.
[in]bEncKeyVer[In] Reference key version to be used in hardware keystore as VCSelectEncKey.
[in]bMacKeyNo[In] Reference key number to be used in hardware keystore as VCSelectMacKey.
[in]bMacKeyVer[In] Reference key version to be used in hardware keystore as VCSelectMacKey.
[in]pData[In] Cmd.ISOSelect response payload (32 Bytes) without TLV headers, including the VC related data.
[in]bDataLen[In] Length of bytes available in Data buffer.
[in]pDivInput[In] Diversification Input used to diversify the key.
[in]bDivInputLen[In] Length of diversification input used to diversify the key.
[out]ppResponse[Out] Response to Challenge as MACt(DivKey(KVCSelMAC)), RndChal || VCData)
[out]pRespLen[Out] Length of bytes available in Response buffer.

◆ phhalHw_SamAV3_Cmd_SAM_ProximityCheck_Part1()

phStatus_t phhalHw_SamAV3_Cmd_SAM_ProximityCheck_Part1 ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t  bOption,
uint8_t  bKeyNo,
uint8_t  bKeyVer,
uint8_t PPCData,
uint8_t  bPPCDataLen,
uint8_t pPCData,
uint8_t  bPCDataLen,
uint8_t pDivInput,
uint8_t  bDivInputLen,
uint8_t **  ppMac,
uint16_t pMacLen 
)

Performs Proximity Check Part 1 command execution.

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]bOption[In] Option to update the P1 information.
[in]bKeyNo[In] Reference key number to be used in hardware keystore.
[in]bKeyVer[In] Reference key version to be used in hardware keystore.
[in]PPCData[In] Cmd.PreparePC response data.
For DESFIRE PICC: Option (1byte) || PubRespTime (2byte) [|| PPS1 (1byte)]
For PLUS PICC : Option (1byte) || PubRespTime (2byte) [|| PPS1 (1byte)] [|| ActBitRate (N byte)]
[in]bPPCDataLen[In] Length of bytes available in PPCData buffer.
[in]pPCData[In] Response and challenge bytes exchanged during the proximity check protocol as (pRndR1 || pRndC1) || ... || (pRndR8 || pRndC8)
[in]bPCDataLen[In] Length of bytes available in PCData buffer.
[in]pDivInput[In] Diversification Input used to diversify the key.
[in]bDivInputLen[In] Length of diversification input used to diversify the key.
[out]ppMac[Out] The MAC to be exchanged to the PICC.
[out]pMacLen[Out] Length of bytes available in MAC buffer.

◆ phhalHw_SamAV3_Cmd_SAM_ProximityCheck_Part2()

phStatus_t phhalHw_SamAV3_Cmd_SAM_ProximityCheck_Part2 ( phhalHw_SamAV3_DataParams_t pDataParams,
uint8_t pData,
uint8_t  bDataLen,
uint8_t pPiccRetCode 
)

Performs Proximity Check Part 2 command execution.

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]pData[In] The data to be exchaned to SAM hardware.
For PICC Error : The PICC error code should be passed and bDataLen should be 1.
For PICC Success: The MAC received from PICC should be passed and bDataLen should be 8.
[in]bDataLen[In] Length of bytes available in Data bffer.
[out]pPiccRetCode[Out] The response code PICC echoed back by the Sam hardware.