These Components implement the MIFARE DESFire EVx Key Management related commands.
More...
|
| phStatus_t | phalMfdfEVx_ChangeKey (void *pDataParams, uint16_t wOption, uint16_t wOldKeyNo, uint16_t wOldKeyVer, uint16_t wNewKeyNo, uint16_t wNewKeyVer, uint8_t bKeyNoCard, uint8_t *pDivInput, uint8_t bDivLen) |
| | Changes any key on the PICC. More...
|
| |
| phStatus_t | phalMfdfEVx_ChangeKeyEv2 (void *pDataParams, uint16_t wOption, uint16_t wOldKeyNo, uint16_t wOldKeyVer, uint16_t wNewKeyNo, uint16_t wNewKeyVer, uint8_t bKeySetNo, uint8_t bKeyNoCard, uint8_t *pDivInput, uint8_t bDivLen) |
| | Changes any key present in KeySet on the PICC. More...
|
| |
| phStatus_t | phalMfdfEVx_InitializeKeySet (void *pDataParams, uint8_t bKeySetNo, uint8_t bKeyType) |
| | Initializes KeySet with bKeySetNo specified with type of the KeySet bKeyType. More...
|
| |
| phStatus_t | phalMfdfEVx_FinalizeKeySet (void *pDataParams, uint8_t bKeySetNo, uint8_t bKeySetVersion) |
| | Finalizes KeySet targeted by bKeySetNo by setting the key set version to the bKeySetVersion. More...
|
| |
| phStatus_t | phalMfdfEVx_RollKeySet (void *pDataParams, uint8_t bKeySetNo) |
| | RollKeySet changes the ActiveKeySet to key set currently targeted with bKeySetNumber. More...
|
| |
| phStatus_t | phalMfdfEVx_GetKeySettings (void *pDataParams, uint8_t *pKeySettings, uint8_t *bRespLen) |
| | Gets information on the PICC and application master key settings. More...
|
| |
| phStatus_t | phalMfdfEVx_ChangeKeySettings (void *pDataParams, uint8_t bKeySettings) |
| | Changes the master key settings on PICC and application level. More...
|
| |
| phStatus_t | phalMfdfEVx_GetKeyVersion (void *pDataParams, uint8_t bKeyNo, uint8_t bKeySetNo, uint8_t *pKeyVersion, uint8_t *bRxLen) |
| | Reads out the current key version of any key stored on the PICC. More...
|
| |
These Components implement the MIFARE DESFire EVx Key Management related commands.
◆ PHAL_MFDFEVX_CHGKEY_DIV_NEW_KEY
| #define PHAL_MFDFEVX_CHGKEY_DIV_NEW_KEY 0x0002U |
Bit 1.
Indicating diversification of new key required.
◆ PHAL_MFDFEVX_CHGKEY_DIV_NEW_KEY_ONERND
| #define PHAL_MFDFEVX_CHGKEY_DIV_NEW_KEY_ONERND 0x0008U |
Bit 3 indicating new key diversification using one round.
Default is two rounds.
◆ PHAL_MFDFEVX_CHGKEY_DIV_OLD_KEY_ONERND
| #define PHAL_MFDFEVX_CHGKEY_DIV_OLD_KEY_ONERND 0x0010U |
Bit 4 indicating old key diversification using one round.
Default is two rounds.
◆ PHAL_MFDFEVX_CHGKEY_DIV_METHOD_CMAC
| #define PHAL_MFDFEVX_CHGKEY_DIV_METHOD_CMAC 0x0020U |
Bit 5 indicating key diversification method based on CMAC.
Default is Encryption method
◆ phalMfdfEVx_ChangeKey()
Changes any key on the PICC.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] One of the below options.
|
| [in] | wOldKeyNo | [In] Old key number in KeyStore of software or SAM. |
| [in] | wOldKeyVer | [In] Old key version in KeyStore of software or SAM. |
| [in] | wNewKeyNo | [In] New key number in KeyStore of software or SAM. |
| [in] | wNewKeyVer | [In] New key version in KeyStore of software or SAM. |
| [in] | bKeyNoCard | [In] Key number on card. ORed with PHAL_MFDFEVX_SAI to indicate secondary application indicator. |
| [in] | pDivInput | [In] Diversification input. Can be NULL. |
| [in] | bDivLen | [In] Length of diversification input max 31B. |
◆ phalMfdfEVx_ChangeKeyEv2()
Changes any key present in KeySet on the PICC.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] One of the below options.
|
| [in] | wOldKeyNo | [In] Old key number in KeyStore of software or SAM. |
| [in] | wOldKeyVer | [In] Old key version in KeyStore of software or SAM. |
| [in] | wNewKeyNo | [In] New key number in KeyStore of software or SAM. |
| [in] | wNewKeyVer | [In] New key version in KeyStore of software or SAM. |
| [in] | bKeySetNo | [In] Key set number within targeted application. |
| [in] | bKeyNoCard | [In] Key number on card. ORed with PHAL_MFDFEVX_SAI to indicate secondary application indicator. |
| [in] | pDivInput | [In] Diversification input. Can be NULL. |
| [in] | bDivLen | [In] Length of diversification input max 31B. |
◆ phalMfdfEVx_InitializeKeySet()
Initializes KeySet with bKeySetNo specified with type of the KeySet bKeyType.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeySetNo | [In] Key set number within targeted application. ORed with PHAL_MFDFEVX_SAI to indicate secondary application indicator. |
| [in] | bKeyType | [In] One of the below mentioned options.
|
◆ phalMfdfEVx_FinalizeKeySet()
Finalizes KeySet targeted by bKeySetNo by setting the key set version to the bKeySetVersion.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeySetNo | [In] Key set number within targeted application. ORed with PHAL_MFDFEVX_SAI to indicate secondary application indicator. |
| [in] | bKeySetVersion | [In] KeySet version of the key set to be finalized. |
◆ phalMfdfEVx_RollKeySet()
RollKeySet changes the ActiveKeySet to key set currently targeted with bKeySetNumber.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeySetNo | [In] Key set number within targeted application. ORed with PHAL_MFDFEVX_SAI to indicate secondary application indicator. |
◆ phalMfdfEVx_GetKeySettings()
Gets information on the PICC and application master key settings.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [out] | pKeySettings | [Out] Returns the key settings. Can be 2 or 3 bytes. |
| [out] | bRespLen | [Out] Length bytes available in KeySettings buffer. |
◆ phalMfdfEVx_ChangeKeySettings()
| phStatus_t phalMfdfEVx_ChangeKeySettings |
( |
void * |
pDataParams, |
|
|
uint8_t |
bKeySettings |
|
) |
| |
Changes the master key settings on PICC and application level.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeySettings | [In] New key settings to be updated. |
◆ phalMfdfEVx_GetKeyVersion()
Reads out the current key version of any key stored on the PICC.
- Returns
- Status code
- Return values
-
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlying component. |
- Parameters
-
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeyNo | [In] Key number of the targeted key. ORed with one of the below options
|
| [in] | bKeySetNo | [In] Key set number. ORed with one of the below options
|
| [out] | pKeyVersion | [Out] Key set versions of the selected application ordered by ascending key set number, i.e. starting with the AKS. |
| [out] | bRxLen | [Out] Length of bytes available in KeyVersion buffer. |