SAM commands used for MIFARE Classic card communication in Non-X-Mode.
More...
|
| phStatus_t | phhalHw_SamAV2_Cmd_SAM_AuthenticateMifare_Part1 (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bOption, uint8_t *pUid, uint8_t bKeyNoM, uint8_t bKeyVM, uint8_t bKeyType, uint8_t bBlockNo, uint8_t *pRndB, uint8_t bDivBlockNo, uint8_t *pTokenAB) |
| | First part of MF Authenticate. More...
|
| |
| phStatus_t | phhalHw_SamAV2_Cmd_SAM_AuthenticateMifare_Part2 (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t *pTokenAB) |
| | Second part of MF Authenticate. More...
|
| |
| phStatus_t | phhalHw_SamAV2_Cmd_SAM_ChangeKeyMifare (phhalHw_SamAV2_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNoM, uint8_t bKeyVM_KeyVMA, uint8_t bKeyAorB_KeyVMB, uint8_t *pAccessConditions, uint8_t *pUid, uint8_t bDivBlockNo, uint8_t *pKeyData, uint8_t *pKeyDataLength) |
| | Change key MIFARE command used to prepare an encrypted stream to be written to a MIFARE Classic card. More...
|
| |
SAM commands used for MIFARE Classic card communication in Non-X-Mode.
- See also
- Data Processing
◆ PHHAL_HW_SAMAV2_CMD_SAM_CHANGEKEY_MIFARE_ENCRYPT
| #define PHHAL_HW_SAMAV2_CMD_SAM_CHANGEKEY_MIFARE_ENCRYPT 0x08 |
Option flag for encrypted key retrival.
Not used in case of key change for MIFARE 1k or 4k.
◆ phhalHw_SamAV2_Cmd_SAM_AuthenticateMifare_Part1()
First part of MF Authenticate.
- 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 parameter:
|
| [in] | pUid | [In] Pointer to the Uid of the Card. |
| [in] | bKeyNoM | [In] Key Number. |
| [in] | bKeyVM | [In] Key Version. |
| [in] | bKeyType | [In] Key type A (0Ah) or B (0Bh). |
| [in] | bBlockNo | [In] Block Number. |
| [in] | pRndB | [In] Random number received from card (5 bytes). |
| [in] | bDivBlockNo | [In] Block number used for diversification. |
| [out] | pTokenAB | [Out] Buffer containing the token to be sent to the card. The buffer has to be 9 bytes long. |
◆ phhalHw_SamAV2_Cmd_SAM_AuthenticateMifare_Part2()
Second part of MF Authenticate.
- 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] | pTokenAB | [In] Token received from the card (5 bytes). |
◆ phhalHw_SamAV2_Cmd_SAM_ChangeKeyMifare()
Change key MIFARE command used to prepare an encrypted stream to be written to a MIFARE Classic card.
- 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 parameter:
|
| [in] | bKeyNoM | [In] Reference number of MIFARE key (00h to 7Fh). |
| [in] | bKeyVM_KeyVMA | [In] Key version of MIFARE key in case of key retrieval or key version of MIFARE key A in case of key change. |
| [in] | bKeyAorB_KeyVMB | [In] Key 0Ah or 0Bh in case of key retrieval or key version of MIFARE key B in case of key change.. |
| [in] | pAccessConditions | [In] Access conditions to be stored within MIFARE card. Only used for key change. This buffer has to be 4 bytes long. |
| [in] | pUid | [In] Uid of the card. Only used if diversification is needed. This buffer has to be 4 bytes long. |
| [in] | bDivBlockNo | [In] Block number to be used for diversification. |
| [out] | pKeyData | [Out] Buffer containing the key data. The buffer has to be 16 bytes long in case of key retrieval and 21 bytes long in case of key change. |
| [out] | pKeyDataLength | [Out] Amount of valid data bytes in pKeyData. |