These Functions implement the MIFARE DESFire EVx commands. More...

Modules | |
| Component : Software | |
| Component : Sam_NonX | |
| Component : Sam_X | |
| Commands_SecureMessaging | |
| These Components implement the MIFARE DESFire EVx Secure Messaging related commands. | |
| Commands_MemoryConfiguration | |
| These Components implement the MIFARE DESFire EVx Memory and Configuration Management related commands. | |
| Commands_KeyManagement | |
| These Components implement the MIFARE DESFire EVx Key Management related commands. | |
| Commands_ApplicationManagement | |
| These Components implement the MIFARE DESFire EVx Application Management related commands. | |
| Commands_FileManagement | |
| These Components implement the MIFARE DESFire EVx File Management related commands. | |
| Commands_DataManagement | |
| These Components implement the MIFARE DESFire EVx Data Management related commands. | |
| Commands_TransactionManagement | |
| These Components implement the MIFARE DESFire EVx Transaction Management related commands. | |
| Commands_ISO7816 | |
| These Components implement the MIFARE DESFire EVx ISO/IEC 7816-4 Basic commands. | |
| Commands_OriginalityCheck | |
| These Components implement the MIFARE DESFire EVx Originality Check functions. | |
| Commands_MIFARE_ClassicSupport | |
| These Components implement the MIFARE DESFire EVx MIFARE Classic Support functions. | |
| Commands_PostDeliveryConfiguration | |
| These Components implement the MIFARE DESFire EVx MIFARE Post Delivery configuration function. | |
| Commands_Miscellaneous | |
| These Components implement the MIFARE DESFire EVx Miscellaneous functions. These are not part of actual DESFire EVx data sheet rather its for internal purpose. | |
Other Options for various Functions | |
| #define | PHAL_MFDFEVX_ORIGINALITY_KEY_FIRST 0x01U |
| Originality key for AES. | |
| #define | PHAL_MFDFEVX_ORIGINALITY_KEY_LAST 0x04U |
| Originality key for AES | |
| #define | PHAL_MFDFEVX_MAC_DATA_INCOMPLETE 0x01U |
| Option for indicating more data to come in next call for MAC calculation. | |
| #define | PHAL_MFDFEVX_COMMUNICATION_MAC_ON_RC 0x02U |
| MAC is appended over response | |
| #define | PHAL_MFDFEVX_COMMUNICATION_MAC_ON_CMD 0x03U |
| MAC is appended over command. | |
| #define | PHAL_MFDFEVX_AUTHENTICATE_RESET 0x08U |
| authentication state shall be reset | |
| #define | PHAL_MFDFEVX_KEYSETVALUES_PRESENT 0x01U |
| Bit 0 of bKeySettings3 decides the presence of the key set values array. | |
| #define | PHAL_MFDFEVX_KEYSETT3_PRESENT 0x10U |
| Bit 4 of bKeySettings2 decides the presence of the keysetting3. | |
| #define | PHAL_MFDFEVX_MFC_KILL_KEY 0x31U |
| MFCKill key for AES. | |
Error Codes mapping to custom values. | |
| #define | PHAL_MFDFEVX_NO_CHANGES (PH_ERR_CUSTOM_BEGIN + 0) |
| MFDFEVx Response - No changes done to backup files. | |
| #define | PHAL_MFDFEVX_ERR_OUT_OF_EEPROM_ERROR (PH_ERR_CUSTOM_BEGIN + 1) |
| MFDFEVx Response - Insufficient NV-Memory. | |
| #define | PHAL_MFDFEVX_ERR_NO_SUCH_KEY (PH_ERR_CUSTOM_BEGIN + 2) |
| MFDFEVx Invalid key number specified. | |
| #define | PHAL_MFDFEVX_ERR_PERMISSION_DENIED (PH_ERR_CUSTOM_BEGIN + 3) |
| MFDFEVx Current configuration/status does not allow the requested command. | |
| #define | PHAL_MFDFEVX_ERR_APPLICATION_NOT_FOUND (PH_ERR_CUSTOM_BEGIN + 4) |
| MFDFEVx Requested AID not found on PICC. | |
| #define | PHAL_MFDFEVX_ERR_BOUNDARY_ERROR (PH_ERR_CUSTOM_BEGIN + 5) |
| MFDFEVx Attempt to read/write data from/to beyond the files/record's limits. | |
| #define | PHAL_MFDFEVX_ERR_COMMAND_ABORTED (PH_ERR_CUSTOM_BEGIN + 6) |
| MFDFEVx Previous cmd not fully completed. More... | |
| #define | PHAL_MFDFEVX_ERR_COUNT (PH_ERR_CUSTOM_BEGIN + 7) |
| MFDFEVx Num. More... | |
| #define | PHAL_MFDFEVX_ERR_DUPLICATE (PH_ERR_CUSTOM_BEGIN + 8) |
| MFDFEVx File/Application with same number already exists. | |
| #define | PHAL_MFDFEVX_ERR_FILE_NOT_FOUND (PH_ERR_CUSTOM_BEGIN + 9) |
| MFDFEVx Specified file number does not exist. | |
| #define | PHAL_MFDFEVX_ERR_PICC_CRYPTO (PH_ERR_CUSTOM_BEGIN + 10) |
| MFDFEVx Crypto error returned by PICC. | |
| #define | PHAL_MFDFEVX_ERR_PARAMETER_ERROR (PH_ERR_CUSTOM_BEGIN + 11) |
| MFDFEVx Parameter value error returned by PICC. | |
| #define | PHAL_MFDFEVX_ERR_DF_GEN_ERROR (PH_ERR_CUSTOM_BEGIN + 12) |
| MFDFEVx DesFire Generic error. More... | |
| #define | PHAL_MFDFEVX_ERR_DF_7816_GEN_ERROR (PH_ERR_CUSTOM_BEGIN + 13) |
| MFDFEVx ISO 7816 Generic error. More... | |
| #define | PHAL_MFDFEVX_ERR_CMD_INVALID (PH_ERR_CUSTOM_BEGIN + 14) |
| MFDFEVx ISO 7816 Generic error. More... | |
| #define | PHAL_MFDFEVX_ERR_NOT_SUPPORTED (PH_ERR_CUSTOM_BEGIN + 15) |
| MFDFEVx Not Supported Error. | |
| #define | PHAL_MFDFEVX_ERR_INTEGRITY_ERROR (PH_ERR_CUSTOM_BEGIN + 16) |
| MFDFEVx integrity error. | |
| #define | PHAL_MFDFEVX_ERR_MEMORY_ERROR (PH_ERR_CUSTOM_BEGIN + 17) |
| MFDFEVx memory error. | |
| #define | PHAL_MFDFEVX_ERR_OPERATION_OK_LIM (PH_ERR_CUSTOM_BEGIN + 27) |
| MFDFEVx custom error code for Successful operation with limited functionality. | |
| #define | PHAL_MFDFEVX_ERR_CMD_OVERFLOW (PH_ERR_CUSTOM_BEGIN + 28) |
| MFDFEVx Too many commands in the session or transaction. | |
| #define | PHAL_MFDFEVX_ERR_GEN_FAILURE (PH_ERR_CUSTOM_BEGIN + 29) |
| MFDFEVx Failure in the operation of the PD. | |
| #define | PHAL_MFDFEVX_ERR_BNR (PH_ERR_CUSTOM_BEGIN + 30) |
| MFDFEVx Invalid Block number: not existing in the implementation or not valid to target with this command. | |
| #define | PHAL_MFDFEVX_ERR_FORMAT (PH_ERR_CUSTOM_BEGIN + 31) |
| MFDFEVx Format of the command is not correct (e.g. More... | |
ISO7816-4 Error Codes mapping to custom values. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_MEMORY_FAILURE (PH_ERR_CUSTOM_BEGIN + 18) |
| ISO7816 custom response code for memory failure. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_WRONG_LENGTH (PH_ERR_CUSTOM_BEGIN + 19) |
| ISO7816 custom response code for wrong length, no further indication. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_SECURITY_STAT_NOT_SATISFIED (PH_ERR_CUSTOM_BEGIN + 20) |
| ISO7816 custom response code for security status not satisfied. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_CONDITIONS_NOT_SATISFIED (PH_ERR_CUSTOM_BEGIN + 21) |
| ISO7816 custom response code for conditions of use not satisfied. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_FILE_APPLICATION_NOT_FOUND (PH_ERR_CUSTOM_BEGIN + 22) |
| ISO7816 custom response code for file or application not found. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_INCORRECT_PARAM_P1_P2 (PH_ERR_CUSTOM_BEGIN + 23) |
| ISO7816 custom response code for incorrect parameters P1-P2. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_LC_INCONSISTENT (PH_ERR_CUSTOM_BEGIN + 24) |
| ISO7816 custom response code for LC inconsistent with parameter P1-P2. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_WRONG_LE (PH_ERR_CUSTOM_BEGIN + 25) |
| ISO7816 custom response code for wrong LE field. | |
| #define | PHAL_MFDFEVX_ISO7816_CUSTOM_ERR_INS_CODE_NOT_SUPPORTED (PH_ERR_CUSTOM_BEGIN + 26) |
| ISO7816 custom response code for instruction code not supported or invalid. | |
Authentication Modes | |
| #define | PHAL_MFDFEVX_NOT_AUTHENTICATED 0xFFU |
| No authentication. | |
| #define | PHAL_MFDFEVX_AUTHENTICATE 0x0AU |
| D40 Authentication; 0x0A. | |
| #define | PHAL_MFDFEVX_AUTHENTICATEISO 0x1AU |
| ISO Authentication; 0x1A. | |
| #define | PHAL_MFDFEVX_AUTHENTICATEAES 0xAAU |
| AES Authentication; 0xAA. | |
| #define | PHAL_MFDFEVX_AUTHENTICATEEV2 0x71U |
| EV2 Authentication; 0x71. | |
| #define | PHAL_MFDFEVX_AUTH_FIRST 0x01U |
| Option to perform EVx First Authentication. | |
| #define | PHAL_MFDFEVX_AUTH_NONFIRST 0x00U |
| Option to perform EVx NonFirst Authentication. | |
Option to be used for InitializeKeySet and CreateTransactionMACFile command. | |
| #define | PHAL_MFDFEVX_KEY_TYPE_2K3DES 0x00U |
| Option for 2 Key Triple Des key type. | |
| #define | PHAL_MFDFEVX_KEY_TYPE_3K3DES 0x01U |
| Option for 3 Key Triple Des key type. | |
| #define | PHAL_MFDFEVX_KEY_TYPE_AES128 0x02U |
| Option for AES 128 key type. | |
Option for most of the commands. | |
| #define | PHAL_MFDFEVX_SAI 0x80U |
| Option for Secondary application indicator (SAI). | |
Options for application / file creation commands command. | |
| #define | PHAL_MFDFEVX_ISO_FILE_INFO_NOT_AVAILABLE 0x00U |
| Option to indicate no ISO File ID or ISODFName are present. | |
| #define | PHAL_MFDFEVX_ISO_FILE_ID_AVAILABLE 0x01U |
| Option to indicate the presence of ISO FileID. | |
| #define | PHAL_MFDFEVX_ISO_DF_NAME_AVAILABLE 0x02U |
| Option to indicate the presence of ISO DFName. | |
| #define | PHAL_MFDFEVX_ISO_FILE_ID_DF_NAME_AVAILABLE 0x03U |
| Option to indicate the presence of both ISO FileID and ISO DFName. | |
The communication mode to be used. | |
| #define | PHAL_MFDFEVX_COMMUNICATION_PLAIN 0x00U |
| Plain mode of communication. | |
| #define | PHAL_MFDFEVX_COMMUNICATION_PLAIN_1 0x20U |
| Plain mode of communication. | |
| #define | PHAL_MFDFEVX_COMMUNICATION_MACD 0x10U |
| MAC mode of communication. | |
| #define | PHAL_MFDFEVX_COMMUNICATION_ENC 0x30U |
| Enciphered mode of communication. | |
These Functions implement the MIFARE DESFire EVx commands.
| #define PHAL_MFDFEVX_ERR_COMMAND_ABORTED (PH_ERR_CUSTOM_BEGIN + 6) |
MFDFEVx Previous cmd not fully completed.
Not all frames were requested or provided by the PCD.
| #define PHAL_MFDFEVX_ERR_COUNT (PH_ERR_CUSTOM_BEGIN + 7) |
MFDFEVx Num.
of applns limited to 28. No additional applications possible.
| #define PHAL_MFDFEVX_ERR_DF_GEN_ERROR (PH_ERR_CUSTOM_BEGIN + 12) |
MFDFEVx DesFire Generic error.
Check additional Info.
| #define PHAL_MFDFEVX_ERR_DF_7816_GEN_ERROR (PH_ERR_CUSTOM_BEGIN + 13) |
MFDFEVx ISO 7816 Generic error.
Check Additional Info.
| #define PHAL_MFDFEVX_ERR_CMD_INVALID (PH_ERR_CUSTOM_BEGIN + 14) |
MFDFEVx ISO 7816 Generic error.
Check Additional Info.
| #define PHAL_MFDFEVX_ERR_FORMAT (PH_ERR_CUSTOM_BEGIN + 31) |
MFDFEVx Format of the command is not correct (e.g.
too many or too few bytes).