SAM commands used for MIFARE Classic S communication.
More...
|
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_AuthenticateMIFARE_Part1 (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t *pMFUID, uint8_t bKeyNo, uint8_t bKeyVer, uint8_t bKeyType, uint8_t bMFBlockNo, uint8_t bDivBlockNo, uint8_t *pNumberRB, uint8_t bNumRBLen, uint8_t **ppEncToken, uint16_t *pEncTokenLen) |
| | Performs the MIFARE Classic authentication in S mode. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_AuthenticateMIFARE_Part2 (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t *pEncToken, uint8_t bEncTokenLen) |
| | Performs the MIFARE Classic authentication in S mode. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_ChangeKeyMIFARE (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyVerA, uint8_t bKeyVerB, uint8_t *pAccCond, uint8_t *pMFUID, uint8_t bDivBlockNo, uint8_t **ppProtData, uint16_t *pProtDataLen) |
| | Performs the MIFARE Classic key change in S mode. More...
|
| |
| phStatus_t | phhalHw_SamAV3_Cmd_SAM_ChangeKeyMIFAREDump (phhalHw_SamAV3_DataParams_t *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyVer, uint8_t bKeyType, uint8_t *pMFUID, uint8_t bDivBlockNo, uint8_t **ppSecretKey, uint16_t *pSecretKeyLen) |
| | Performs the MIFARE Classic key dump in S mode. More...
|
| |
SAM commands used for MIFARE Classic S communication.
◆ phhalHw_SamAV3_Cmd_SAM_AuthenticateMIFARE_Part1()
| phStatus_t phhalHw_SamAV3_Cmd_SAM_AuthenticateMIFARE_Part1 |
( |
phhalHw_SamAV3_DataParams_t * |
pDataParams, |
|
|
uint8_t |
bOption, |
|
|
uint8_t * |
pMFUID, |
|
|
uint8_t |
bKeyNo, |
|
|
uint8_t |
bKeyVer, |
|
|
uint8_t |
bKeyType, |
|
|
uint8_t |
bMFBlockNo, |
|
|
uint8_t |
bDivBlockNo, |
|
|
uint8_t * |
pNumberRB, |
|
|
uint8_t |
bNumRBLen, |
|
|
uint8_t ** |
ppEncToken, |
|
|
uint16_t * |
pEncTokenLen |
|
) |
| |
Performs the MIFARE Classic authentication in S mode.
This interfaces exchanges the first part of random challange received from PICC to Sam hardware.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS_CHAINING | Operation successful, chaining ongoing. |
| Other | Depending on implementation and underlaying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bOption | [In] Specify whether diversification block number should be exchanged or not.
|
| [in] | pMFUID | [In] MIFARE classic UID. Here the last four bytes of the UID should be passed regardless of 4 or 7 byte UID. |
| [in] | bKeyNo | [In] Key number of MIFARE key available in Sam keystore. |
| [in] | bKeyVer | [In] Key Version of MIFARE key available in Sam keystore. |
| [in] | bKeyType | [In] Type of key to be used.
|
| [in] | bMFBlockNo | [In] MIFARE block number used for authentication. |
| [in] | bDivBlockNo | [In] Block number to be used for Key diversification in Sam. |
| [in] | pNumberRB | [In] Should have the 5bytes (4 bytes of Rnd + 1 byte of Parity) of information (Token RB) returned by PICC. |
| [in] | bNumRBLen | [In] Length of Number RB returned by PICC. |
| [out] | ppEncToken | [Out] The encrypted (Token AB) information to be send to PICC. This will have 9 bytes (8 bytes of encrypted information + 1 byte of Parity) |
| [out] | pEncTokenLen | [Out] Length of encrypted token returned. |
◆ phhalHw_SamAV3_Cmd_SAM_AuthenticateMIFARE_Part2()
Performs the MIFARE Classic authentication in S mode.
This interfaces exchanges the second part of random challange received from PICC to Sam hardware.
- 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] | pEncToken | [In] Should have the 5bytes (4 bytes of Rnd + 1 byte of Parity) of information (Token BA) returned by PICC. |
| [in] | bEncTokenLen | [In] Length of Enc token returned by PICC. |
◆ phhalHw_SamAV3_Cmd_SAM_ChangeKeyMIFARE()
Performs the MIFARE Classic key change in S 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] Specify whether diversification block number and UID should be exchanged or not.
|
| [in] | bKeyNo | [In] Key number of MIFARE key available in Sam keystore. |
| [in] | bKeyVerA | [In] Key Version of MIFARE key A available in Sam keystore. |
| [in] | bKeyVerB | [In] Key Version of MIFARE key B available in Sam keystore. |
| [in] | pAccCond | [In] MIFARE classic access conditions. |
| [in] | pMFUID | [In] MIFARE classic UID. Here the last four bytes of the UID should be passed regardless of 4 or 7 byte UID. |
| [in] | bDivBlockNo | [In] Block number to be used for Key diversification in Sam. |
| [out] | ppProtData | [Out] The protected information to be sent to PICC. |
| [out] | pProtDataLen | [Out] Length of protected information returned. |
◆ phhalHw_SamAV3_Cmd_SAM_ChangeKeyMIFAREDump()
Performs the MIFARE Classic key dump in S 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] Specify whether diversification block number and UID should be exchanged or not.
|
| [in] | bKeyNo | [In] Key number of MIFARE key available in Sam keystore. |
| [in] | bKeyVer | [In] Key Version of MIFARE key available in Sam keystore. |
| [in] | bKeyType | [In] Key Version of MIFARE key B available in Sam keystore. Type of key to be used.
|
| [in] | pMFUID | [In] MIFARE classic UID. Here the last four bytes of the UID should be passed regardless of 4 or 7 byte UID. |
| [in] | bDivBlockNo | [In] Block number to be used for Key diversification in Sam. |
| [out] | ppSecretKey | [Out] The Secret key information to be sent to PICC. |
| [out] | pSecretKeyLen | [Out] Length of Secret key information returned. |