trace list -t mfdes - updated EV2, EV3 annotations

This commit is contained in:
iceman1001 2021-04-30 08:14:11 +02:00
parent d527136dcc
commit 3c072721bf
2 changed files with 53 additions and 1 deletions

View file

@ -863,6 +863,9 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
case MFDES_CREATE_CYCLIC_RECORD_FILE:
snprintf(exp, size, "CREATE CYCLIC RECORD FILE");
break;
case MFDES_CREATE_TRANS_MAC_FILE:
snprintf(exp, size, "CREATE TRANSACTION MAC FILE");
break;
case MFDES_DELETE_FILE:
snprintf(exp, size, "DELETE FILE");
break;
@ -875,6 +878,12 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
case MFDES_AUTHENTICATE_AES:
snprintf(exp, size, "AUTH AES (keyNo %d)", cmd[pos + 1]);
break;
case MFDES_AUTHENTICATE_EV2F:
snprintf(exp, size, "AUTH EV2 First");
break;
case MFDES_AUTHENTICATE_EV2NF:
snprintf(exp, size, "AUTH EV2 Non First");
break;
case MFDES_CHANGE_KEY_SETTINGS:
snprintf(exp, size, "CHANGE KEY SETTINGS");
break;
@ -893,6 +902,36 @@ void annotateMfDesfire(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
case MFDES_READSIG:
snprintf(exp, size, "READ SIGNATURE");
break;
case MFDES_ROLL_KEY_SETTINGS:
snprintf(exp, size, "ROLL KEY SETTINGS");
break;
case MFDES_INIT_KEY_SETTINGS:
snprintf(exp, size, "INIT KEY SETTINGS");
break;
case MFDES_FINALIZE_KEY_SETTINGS:
snprintf(exp, size, "FINALIZE KEY SETTINGS");
break;
case MFDES_GET_DELEGATE_INFO:
snprintf(exp, size, "GET DELEGATE INFO");
break;
case MFDES_CHANGE_KEY_EV2:
snprintf(exp, size, "CHANGE KEY EV2");
break;
case MFDES_COMMIT_READER_ID:
snprintf(exp, size, "COMMIT READER ID");
break;
case MFDES_CREATE_DELEGATE_APP:
snprintf(exp, size, "CREATE DELEGATE APPLICATION");
break;
case MFDES_PREPARE_PC:
snprintf(exp, size, "PREPARE PROXIMITY CHECK");
break;
case MFDES_PROXIMITY_CHECK:
snprintf(exp, size, "PROXIMITY CHECK");
break;
case MFDES_VERIFY_PC:
snprintf(exp, size, "VERIFY PROXIMITY CHECK");
break;
default:
found_annotation = false;
break;

View file

@ -409,6 +409,9 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
#define MFDES_AUTHENTICATE_ISO 0x1A // AUTHENTICATE_STANDARD
#define MFDES_AUTHENTICATE_AES 0xAA
#define MFDES_AUTHENTICATE_EV2F 0x71
#define MFDES_AUTHENTICATE_EV2NF 0x77
#define MFDES_CREDIT 0x0C
#define MFDES_LIMITED_CREDIT 0x1C
#define MFDES_WRITE_RECORD 0x3B
@ -417,11 +420,15 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
#define MFDES_GET_KEY_SETTINGS 0x45
#define MFDES_GET_UID 0x51
#define MFDES_CHANGE_KEY_SETTINGS 0x54
#define MFDES_ROLL_KEY_SETTINGS 0x55
#define MFDES_INIT_KEY_SETTINGS 0x56
#define MFDES_FINALIZE_KEY_SETTINGS 0x57
#define MFDES_SELECT_APPLICATION 0x5A
#define MFDES_CHANGE_FILE_SETTINGS 0x5F
#define MFDES_GET_VERSION 0x60
#define MFDES_GET_ISOFILE_IDS 0x61
#define MFDES_GET_KEY_VERSION 0x64
#define MFDES_GET_DELEGATE_INFO 0x69
#define MFDES_GET_APPLICATION_IDS 0x6A
#define MFDES_GET_VALUE 0x6C
#define MFDES_GET_FREE_MEMORY 0x6E
@ -434,18 +441,24 @@ ISO 7816-4 Basic interindustry commands. For command APDU's.
#define MFDES_CREATE_CYCLIC_RECORD_FILE 0xC0
#define MFDES_CREATE_LINEAR_RECORD_FILE 0xC1
#define MFDES_CHANGE_KEY 0xC4
#define MFDES_CHANGE_KEY_EV2 0xC6
#define MFDES_COMMIT_TRANSACTION 0xC7
#define MFDES_COMMIT_READER_ID 0xC8
#define MFDES_CREATE_DELEGATE_APP 0xC9
#define MFDES_CREATE_APPLICATION 0xCA
#define MFDES_CREATE_BACKUP_DATA_FILE 0xCB
#define MFDES_CREATE_VALUE_FILE 0xCC
#define MFDES_CREATE_STD_DATA_FILE 0xCD
#define MFDES_CREATE_TRANS_MAC_FILE 0xCE
#define MFDES_DELETE_APPLICATION 0xDA
#define MFDES_DEBIT 0xDC
#define MFDES_DELETE_FILE 0xDF
#define MFDES_CLEAR_RECORD_FILE 0xEB
#define MFDES_PREPARE_PC 0xF0
#define MFDES_PROXIMITY_CHECK 0xF2
#define MFDES_GET_FILE_SETTINGS 0xF5
#define MFDES_FORMAT_PICC 0xFC
#define MFDES_VERIFY_PC 0xFD
// MIFARE DESFire status & error codes:
#define MFDES_S_OPERATION_OK 0x00