Implementation of SAM commands used for Virtual Card and ProximityCheck communication in X Mode.
More...
|
| | Defines |
| | Definitions for SAM commands used for Virtual Card and ProximityCheck communication in X Mode.
|
| |
|
| phStatus_t | phhalHw_Sam_Cmd_VCA_Select (phhalHw_Sam_DataParams_t *pDataParams, uint8_t bOption, uint8_t bEncKeyNo, uint8_t bEncKeyVer, uint8_t bMacKeyNo, uint8_t bMacKeyVer, uint8_t *pIID, uint8_t bIIDLen, uint8_t *pDivInput, uint8_t bDivInputLen, uint8_t **ppResponse, uint16_t *pRespLen, uint16_t *pPiccRetCode) |
| | The VCA_Select command handles in X-mode a complete VC Selection with or without PCD authentication depending on the AuthVCMandatory configuration of the VC. More...
|
| |
| phStatus_t | phhalHw_Sam_Cmd_VCA_ProximityCheck (phhalHw_Sam_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyVer, uint8_t bNumOfRand, uint8_t *pDivInput, uint8_t bDivInputLen, uint8_t **ppResponse, uint16_t *pRespLen) |
| | The VCA_ProximityCheck command performs the complete PICC proximity check between the SAM and the PICC. More...
|
| |
Implementation of SAM commands used for Virtual Card and ProximityCheck communication in X Mode.
◆ phhalHw_Sam_Cmd_VCA_Select()
| phStatus_t phhalHw_Sam_Cmd_VCA_Select |
( |
phhalHw_Sam_DataParams_t * |
pDataParams, |
|
|
uint8_t |
bOption, |
|
|
uint8_t |
bEncKeyNo, |
|
|
uint8_t |
bEncKeyVer, |
|
|
uint8_t |
bMacKeyNo, |
|
|
uint8_t |
bMacKeyVer, |
|
|
uint8_t * |
pIID, |
|
|
uint8_t |
bIIDLen, |
|
|
uint8_t * |
pDivInput, |
|
|
uint8_t |
bDivInputLen, |
|
|
uint8_t ** |
ppResponse, |
|
|
uint16_t * |
pRespLen, |
|
|
uint16_t * |
pPiccRetCode |
|
) |
| |
The VCA_Select command handles in X-mode a complete VC Selection with or without PCD authentication depending on the AuthVCMandatory configuration of the VC.
The SAM shall deduct the AuthVCMandatory configuration from the presence of a valid FCI (that is: expected 4-bytes TLV headers and payload size) in the response of the PICC ISOSelect.
- Returns
- Status code
- Return values
-
- 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.
|
| [in] | bEncKeyNo | [In] KeyID.VCSelectENCKey SAM Key Number.
- 0x00 - 0x7F: Standard (NVRam) Key
- 0xE0 - 0xE3: RAM Key
|
| [in] | bEncKeyVer | [In] KeyID.VCSelectENCKey SAM Key Version. |
| [in] | bMacKeyNo | [In] KeyID.VCSelectMACKey SAM Key Number.
- 0x00 - 0x7F: Standard (NVRam) Key
- 0xE0 - 0xE3: RAM Key
|
| [in] | bMacKeyVer | [In] KeyID.VCSelectMACKey SAM Key Version. |
| [in] | pIID | [In] The Installation Identifier (IID) to be selected. |
| [in] | bIIDLen | [In] Length of bytes available in pIID buffer. |
| [in] | pDivInput | [In] Diversification Input used to diversify the key. |
| [in] | bDivInputLen | [In] Length of bytes available in pDivInput buffer. |
| [out] | ppResponse | [Out] Response received from SAM based on the variants and AuthVCMandatory settings
- AuthVC Not Mandatory & Variant 1 : Conf0 (1byte), FCI (N bytes)
- AuthVC Mandatory & Variant 1 : Conf1 (1byte), Decrypted VC Data (16 bytes)
- AuthVC Mandatory & Variant 2 : Decrypted VC Data (16 bytes)
|
| [out] | pRespLen | [Out] Length of bytes available in ppResponse buffer. |
| [out] | pPiccRetCode | [Out] The status code returned from the PICC. This will be applicable for both the variants. |
◆ phhalHw_Sam_Cmd_VCA_ProximityCheck()
The VCA_ProximityCheck command performs the complete PICC proximity check between the SAM and the PICC.
It performs the PICC PreparePC command, the one or more PICC ProxmityChecks and the PICC VerifyPC commands.
- Returns
- Status code
- Return values
-
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Option to indicate diversification, processing and format options. Options can be ORed.
- Use Key Diversification. Instructs SAM to Diversify the Key.
- Option to indicate VerifyPC processing.
- The command format (ISO7816-4 mode) to be used to communicated to PICC.
|
| [in] | bKeyNo | [In] Key number to be used in SAM.
- 0x00 - 0x7F: Standard (NVRam) Key
- 0xE0 - 0xE3: RAM Key
|
| [in] | bKeyVer | [In] Key version to be used in SAM. |
| [in] | bNumOfRand | [In] Maximum number of random bytes sent in one Cmd. PICC_ProximityCheck
- M == 8: Only one iteration is made, SAM send all 8 random bytes in one Cmd.PICC_ProximityCheck
- M == 7: The SAM sends the first 7 random bytes in one Cmd.PICC_ProximityCheck and the remaining random byte in another one
- And so on as
- M = 6 + 2
- M = 5 + 3
- M = 4 + 4
- M = 3 + 3 + 2
- M = 2 + 2 + 2 + 2
- Finally M == 1
- The SAM sends 8 Cmd.PICC_ProximityCheck with one random byte.
|
| [in] | pDivInput | [In] Diversification Input used to diversify the key. |
| [in] | bDivInputLen | [In] Length bytes available in pDivInput buffer. |
| [out] | ppResponse | [Out] Response received from SAM.
- For PICC Error : The PICC error code will be returned.
- For PICC Success: The PPCDataLen and PPCData will be returned.
- PPCDataLen: Length of Cmd.PICC_PreparePC response data
- PPCData: Cmd.PICC_PreparePC response data: Option || PubRespTime [|| PPS1] [|| ActBitRate]
|
| [out] | pRespLen | [Out] Length bytes available in ppResponse buffer. |