mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
style
This commit is contained in:
parent
7843de1988
commit
17338e2a5f
8 changed files with 178 additions and 133 deletions
|
@ -325,7 +325,7 @@ void setT55xxConfig(uint8_t arg0, const t55xx_configurations_t *c) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (SPIFFS_OK == rdv40_spiffs_write(T55XX_CONFIG_FILE, (uint8_t*)&T55xx_Timing, T55XX_CONFIG_LEN, RDV40_SPIFFS_SAFETY_SAFE)) {
|
||||
if (SPIFFS_OK == rdv40_spiffs_write(T55XX_CONFIG_FILE, (uint8_t *)&T55xx_Timing, T55XX_CONFIG_LEN, RDV40_SPIFFS_SAFETY_SAFE)) {
|
||||
DbpString("T55XX Config save " _GREEN_("success"));
|
||||
}
|
||||
|
||||
|
@ -2133,7 +2133,7 @@ void T55xx_ChkPwds(uint8_t flags, bool ledcontrol) {
|
|||
|
||||
BigBuf_Clear_EM();
|
||||
uint32_t size = 0;
|
||||
|
||||
|
||||
if (exists_in_spiffs(T55XX_KEYS_FILE)) {
|
||||
size = size_in_spiffs(T55XX_KEYS_FILE);
|
||||
}
|
||||
|
|
|
@ -907,10 +907,10 @@ static int StCheckSig(uint8_t *uid) {
|
|||
// add UID (scan, uid)
|
||||
memcpy(packet->raw + packet->rawlen, uid, HF15_UID_LENGTH);
|
||||
packet->rawlen += HF15_UID_LENGTH;
|
||||
packet->flags = (ISO15_CONNECT| ISO15_READ_RESPONSE | ISO15_NO_DISCONNECT);
|
||||
packet->flags = (ISO15_CONNECT | ISO15_READ_RESPONSE | ISO15_NO_DISCONNECT);
|
||||
uint16_t blkoff = packet->rawlen;
|
||||
char signature_hex[65] = {0};
|
||||
for (int j=0; j<17; j++) {
|
||||
for (int j = 0; j < 17; j++) {
|
||||
packet->rawlen = blkoff;
|
||||
// block no
|
||||
packet->raw[packet->rawlen++] = 0x3F + j;
|
||||
|
@ -929,7 +929,7 @@ static int StCheckSig(uint8_t *uid) {
|
|||
ISO15_ERROR_HANDLING_RESPONSE
|
||||
uint8_t *d = resp.data.asBytes;
|
||||
ISO15_ERROR_HANDLING_CARD_RESPONSE(d, resp.length)
|
||||
if (j==0) {
|
||||
if (j == 0) {
|
||||
if (memcmp(d + 1, "K04S", 4) != 0) {
|
||||
// No signature
|
||||
free(packet);
|
||||
|
|
|
@ -3015,12 +3015,12 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
|||
int tearoff_start = arg_get_int_def(ctx, 12, 100);
|
||||
int tearoff_end = arg_get_int_def(ctx, 13, 200);
|
||||
|
||||
if(tearoff_end <= tearoff_start){
|
||||
if (tearoff_end <= tearoff_start) {
|
||||
PrintAndLogEx(ERR, "Tearoff end delay must be bigger than the start delay.");
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
if(tearoff_start < 0 || tearoff_end <= 0){
|
||||
if (tearoff_start < 0 || tearoff_end <= 0) {
|
||||
PrintAndLogEx(ERR, "Tearoff start/end delays should be bigger than 0.");
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
@ -3041,22 +3041,22 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
|||
int isok = 0;
|
||||
tearoff_params_t params;
|
||||
bool read_ok = false;
|
||||
while(tearoff_start < tearoff_end && !read_ok){
|
||||
while (tearoff_start < tearoff_end && !read_ok) {
|
||||
//perform read here, repeat if failed or 00s
|
||||
|
||||
uint8_t data_read_orig[8] = {0};
|
||||
bool first_read = false;
|
||||
bool reread = false;
|
||||
while(!first_read){
|
||||
while (!first_read) {
|
||||
int res_orig = iclass_read_block_ex(key, blockno, 0x88, elite, rawkey, use_replay, verbose, auth, shallow_mod, data_read_orig, false);
|
||||
if (res_orig == PM3_SUCCESS && !reread){
|
||||
if (memcmp(data_read_orig, zeros, 8) == 0){
|
||||
if (res_orig == PM3_SUCCESS && !reread) {
|
||||
if (memcmp(data_read_orig, zeros, 8) == 0) {
|
||||
reread = true;
|
||||
}else{
|
||||
} else {
|
||||
first_read = true;
|
||||
reread = false;
|
||||
}
|
||||
} else if (res_orig == PM3_SUCCESS && reread){
|
||||
} else if (res_orig == PM3_SUCCESS && reread) {
|
||||
first_read = true;
|
||||
reread = false;
|
||||
}
|
||||
|
@ -3082,36 +3082,36 @@ static int CmdHFiClass_TearBlock(const char *Cmd) {
|
|||
first_read = false;
|
||||
reread = false;
|
||||
bool decrease = false;
|
||||
while(!first_read){
|
||||
while (!first_read) {
|
||||
int res = iclass_read_block_ex(key, blockno, 0x88, elite, rawkey, use_replay, verbose, auth, shallow_mod, data_read, false);
|
||||
if (res == PM3_SUCCESS && !reread){
|
||||
if (memcmp(data_read, zeros, 8) == 0){
|
||||
if (res == PM3_SUCCESS && !reread) {
|
||||
if (memcmp(data_read, zeros, 8) == 0) {
|
||||
reread = true;
|
||||
}else{
|
||||
} else {
|
||||
first_read = true;
|
||||
reread = false;
|
||||
}
|
||||
} else if (res == PM3_SUCCESS && reread){
|
||||
} else if (res == PM3_SUCCESS && reread) {
|
||||
first_read = true;
|
||||
reread = false;
|
||||
} else if (res != PM3_SUCCESS){
|
||||
} else if (res != PM3_SUCCESS) {
|
||||
decrease = true;
|
||||
}
|
||||
}
|
||||
if (decrease && tearoff_start > 0){ //if there was an error reading repeat the tearoff with the same delay
|
||||
if (decrease && tearoff_start > 0) { //if there was an error reading repeat the tearoff with the same delay
|
||||
tearoff_start--;
|
||||
}
|
||||
bool tear_success = true;
|
||||
for (int i=0; i<PICOPASS_BLOCK_SIZE; i++){
|
||||
if(data[i] != data_read[i]){
|
||||
for (int i = 0; i < PICOPASS_BLOCK_SIZE; i++) {
|
||||
if (data[i] != data_read[i]) {
|
||||
tear_success = false;
|
||||
}
|
||||
}
|
||||
if(tear_success){ //tearoff succeeded
|
||||
if (tear_success) { //tearoff succeeded
|
||||
read_ok = true;
|
||||
PrintAndLogEx(SUCCESS, _GREEN_("Tear-off Success!"));
|
||||
PrintAndLogEx(INFO, "Read: %s", sprint_hex(data_read, sizeof(data_read)));
|
||||
}else{ //tearoff did not succeed
|
||||
} else { //tearoff did not succeed
|
||||
PrintAndLogEx(FAILED, _RED_("Tear-off Failed!"));
|
||||
tearoff_start++;
|
||||
}
|
||||
|
|
|
@ -2440,9 +2440,9 @@ void annotateFMCOS20(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
|
|||
snprintf(exp, size, "APP UNBLOCK");
|
||||
break;
|
||||
case FMCOS20_CMD_APP_BLOCK:
|
||||
if (cmd[pos+1] == 0)
|
||||
if (cmd[pos + 1] == 0)
|
||||
snprintf(exp, size, "APP BLOCK (TEMP)");
|
||||
else if(cmd[pos+1] == 1)
|
||||
else if (cmd[pos + 1] == 1)
|
||||
snprintf(exp, size, "APP BLOCK (PERM)");
|
||||
else
|
||||
snprintf(exp, size, "APP BLOCK");
|
||||
|
@ -2451,34 +2451,34 @@ void annotateFMCOS20(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
|
|||
snprintf(exp, size, "PIN UNBLOCK");
|
||||
break;
|
||||
case FMCOS20_CMD_CHANGE_PIN:
|
||||
if (cmd[pos+1] == 0)
|
||||
if (cmd[pos + 1] == 0)
|
||||
snprintf(exp, size, "RESET PIN");
|
||||
else if (cmd[pos+1] == 1)
|
||||
else if (cmd[pos + 1] == 1)
|
||||
snprintf(exp, size, "CHANGE PIN");
|
||||
break;
|
||||
case FMCOS20_CMD_INITIALIZE_TRANSACTION:
|
||||
if (cmd[pos+1] == 0)
|
||||
if (cmd[pos + 1] == 0)
|
||||
snprintf(exp, size, "INIT. TRANSACTION (CREDIT)");
|
||||
else if (cmd[pos+1] == 1)
|
||||
else if (cmd[pos + 1] == 1)
|
||||
snprintf(exp, size, "INIT. TRANSACTION (PURCHASE)");
|
||||
else if (cmd[pos+1] == 2)
|
||||
else if (cmd[pos + 1] == 2)
|
||||
snprintf(exp, size, "INIT. TRANSACTION (CASH WITHDRAW)");
|
||||
else if (cmd[pos+1] == 3)
|
||||
else if (cmd[pos + 1] == 3)
|
||||
snprintf(exp, size, "INIT. TRANSACTION (CAPP PURCHASE)");
|
||||
else if (cmd[pos+1] == 4)
|
||||
else if (cmd[pos + 1] == 4)
|
||||
snprintf(exp, size, "INIT. TRANSACTION (OVERDRAFT)");
|
||||
else if (cmd[pos+1] == 5)
|
||||
else if (cmd[pos + 1] == 5)
|
||||
snprintf(exp, size, "INIT. TRANSACTION (WITHDRAW)");
|
||||
break;
|
||||
case FMCOS20_CMD_CREDIT_LOAD:
|
||||
snprintf(exp, size, "CREDIT LOAD");
|
||||
break;
|
||||
case FMCOS20_CMD_PURCHASE:
|
||||
if(cmd[pos+1] == 0)
|
||||
if (cmd[pos + 1] == 0)
|
||||
snprintf(exp, size, "PURCHASE");
|
||||
else if (cmd[pos+1] == 1)
|
||||
else if (cmd[pos + 1] == 1)
|
||||
snprintf(exp, size, "CAPP PURCHASE / CASH WITHDRAW");
|
||||
else if (cmd[pos+1] == 3)
|
||||
else if (cmd[pos + 1] == 3)
|
||||
snprintf(exp, size, "WITHDRAW");
|
||||
break;
|
||||
case FMCOS20_CMD_UPDATE_OVERDRAW_LIMIT:
|
||||
|
@ -2491,15 +2491,15 @@ void annotateFMCOS20(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
|
|||
snprintf(exp, size, "GET BALANCE");
|
||||
break;
|
||||
case FMCOS20_CMD_INITIALIZE_GREY_LOCK_UNLOCK:
|
||||
if (cmd[pos+1] == 8)
|
||||
if (cmd[pos + 1] == 8)
|
||||
snprintf(exp, size, "INIT. GRAY LOCK");
|
||||
else if (cmd[pos+1] == 9)
|
||||
else if (cmd[pos + 1] == 9)
|
||||
snprintf(exp, size, "INIT. GRAY UNLOCK");
|
||||
break;
|
||||
case FMCOS20_CMD_GREY_LOCK_UNLOCK:
|
||||
if (cmd[pos+1] == 8)
|
||||
if (cmd[pos + 1] == 8)
|
||||
snprintf(exp, size, "GRAY LOCK");
|
||||
else if (cmd[pos+1] == 9)
|
||||
else if (cmd[pos + 1] == 9)
|
||||
snprintf(exp, size, "GRAY UNLOCK");
|
||||
break;
|
||||
case FMCOS20_CMD_DEBIT_UNLOCK:
|
||||
|
@ -2536,4 +2536,4 @@ void annotateFMCOS20(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
|
|||
//snprintf(exp, size, "?");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2032,9 +2032,9 @@ uint64_t GetHF14AMfU_Type(void) {
|
|||
} else {
|
||||
// data[3] == KID == 0x05 Key ID
|
||||
// data[2] == REV == 0x13 Product version
|
||||
if ((data[1]==0x90) && (data[0]==0x90)) {
|
||||
if ((data[1] == 0x90) && (data[0] == 0x90)) {
|
||||
tagtype = MFU_TT_ST25TN01K;
|
||||
} else if ((data[1]==0x90) && (data[0]==0x91)) {
|
||||
} else if ((data[1] == 0x90) && (data[0] == 0x91)) {
|
||||
tagtype = MFU_TT_ST25TN512;
|
||||
}
|
||||
}
|
||||
|
@ -2431,7 +2431,7 @@ static int CmdHF14AMfUInfo(const char *Cmd) {
|
|||
PrintAndLogEx(INFO, " Product Version: %02x", data[2]);
|
||||
PrintAndLogEx(INFO, " Product Code: %02x%02x", data[1], data[0]);
|
||||
uint8_t signature[32] = {0};
|
||||
for (int blkoff=0; blkoff<8; blkoff++) {
|
||||
for (int blkoff = 0; blkoff < 8; blkoff++) {
|
||||
status = ul_read(0x34 + blkoff, signature + (blkoff * 4), 4);
|
||||
if (status <= 1) {
|
||||
PrintAndLogEx(ERR, "Error: tag didn't answer to READ SYSBLOCK");
|
||||
|
|
|
@ -357,7 +357,8 @@ static int CmdLFHitagSRead(const char *Cmd) {
|
|||
|
||||
// access right
|
||||
if (page_addr == HITAGS_UID_PADR) {
|
||||
PrintAndLogEx(NORMAL, _RED_("RO ")NOLF);\
|
||||
PrintAndLogEx(NORMAL, _RED_("RO ")NOLF);
|
||||
\
|
||||
} else if (packet.cmd == HTSF_82xx && page_addr > 40) { // using an 82xx (pages>40 are RO)
|
||||
PrintAndLogEx(NORMAL, _RED_("RO ")NOLF);
|
||||
} else if (page_addr == HITAGS_CONFIG_PADR) {
|
||||
|
@ -615,7 +616,7 @@ static int CmdLFHitagSRestore(const char *Cmd) {
|
|||
|
||||
lf_hts_read_response_t *config = (lf_hts_read_response_t *)resp.data.asBytes;
|
||||
hitags_config_t tag_config = config->config_page.s;
|
||||
|
||||
|
||||
const int hts_mem_sizes[] = {1, 8, 64, 64};
|
||||
int mem_size = hts_mem_sizes[tag_config.MEMT] * HITAGS_PAGE_SIZE;
|
||||
|
||||
|
@ -625,30 +626,30 @@ static int CmdLFHitagSRestore(const char *Cmd) {
|
|||
return PM3_EFILE;
|
||||
}
|
||||
|
||||
uint8_t* dump_bytes = (uint8_t*)dump;
|
||||
uint8_t *dump_bytes = (uint8_t *)dump;
|
||||
bool auth_changed = false;
|
||||
|
||||
for (int page = packet.page_count + 1; page < hts_mem_sizes[tag_config.MEMT]; page++) { // skip config page
|
||||
|
||||
|
||||
if (packet.cmd == HTSF_82xx && page > 40) {
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(WARNING, "Using " _YELLOW_("82xx") ", Pages " _YELLOW_("41-63") " will be skipped");
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
break;
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
break;
|
||||
}
|
||||
|
||||
size_t offset = page * HITAGS_PAGE_SIZE;
|
||||
|
||||
|
||||
packet.page = page;
|
||||
memcpy(packet.data, &dump_bytes[offset], HITAGS_PAGE_SIZE);
|
||||
|
||||
PrintAndLogEx(INPLACE, " Writing page "_YELLOW_("%d")", data: " _GREEN_("%02X %02X %02X %02X"), page,
|
||||
dump_bytes[offset],
|
||||
dump_bytes[offset + 1],
|
||||
dump_bytes[offset + 2],
|
||||
dump_bytes[offset + 3]);
|
||||
|
||||
|
||||
PrintAndLogEx(INPLACE, " Writing page "_YELLOW_("%d")", data: " _GREEN_("%02X %02X %02X %02X"), page,
|
||||
dump_bytes[offset],
|
||||
dump_bytes[offset + 1],
|
||||
dump_bytes[offset + 2],
|
||||
dump_bytes[offset + 3]);
|
||||
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_LF_HITAGS_WRITE, (uint8_t *)&packet, sizeof(packet));
|
||||
|
||||
|
@ -671,26 +672,26 @@ static int CmdLFHitagSRestore(const char *Cmd) {
|
|||
case 2: // auth first page
|
||||
if (packet.cmd == HTSF_82xx) {
|
||||
if (memcmp(packet.pwd, &dump_bytes[offset], HITAGS_PAGE_SIZE) == 0) {
|
||||
break;
|
||||
break;
|
||||
}
|
||||
auth_changed = true;
|
||||
|
||||
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(WARNING, "Password Changed! Old: " _BACK_BLUE_("%02X %02X %02X %02X") ", New: "_BACK_BLUE_("%02X %02X %02X %02X"),
|
||||
packet.pwd[0], packet.pwd[1], packet.pwd[2], packet.pwd[3],
|
||||
dump_bytes[offset], dump_bytes[offset + 1],
|
||||
dump_bytes[offset + 2], dump_bytes[offset + 3]);
|
||||
|
||||
PrintAndLogEx(WARNING, "Password Changed! Old: " _BACK_BLUE_("%02X %02X %02X %02X") ", New: "_BACK_BLUE_("%02X %02X %02X %02X"),
|
||||
packet.pwd[0], packet.pwd[1], packet.pwd[2], packet.pwd[3],
|
||||
dump_bytes[offset], dump_bytes[offset + 1],
|
||||
dump_bytes[offset + 2], dump_bytes[offset + 3]);
|
||||
|
||||
|
||||
memcpy(packet.pwd, &dump_bytes[offset], HITAG_PASSWORD_SIZE);
|
||||
|
||||
|
||||
PrintAndLogEx(SUCCESS, "Using new password for subsequent writes");
|
||||
}
|
||||
break;
|
||||
case 3: // crypto mode
|
||||
break;
|
||||
case 3: // crypto mode
|
||||
if (packet.cmd == HTSF_KEY) {
|
||||
|
||||
|
||||
if (memcmp(packet.key, &dump_bytes[offset - HITAGS_PAGE_SIZE], HITAG_CRYPTOKEY_SIZE) == 0) {
|
||||
break;
|
||||
}
|
||||
|
@ -700,28 +701,28 @@ static int CmdLFHitagSRestore(const char *Cmd) {
|
|||
|
||||
PrintAndLogEx(NORMAL, "");
|
||||
PrintAndLogEx(WARNING, "New key detected: " _BACK_BLUE_("%02X %02X %02X %02X %02X %02X"),
|
||||
packet.key[0], packet.key[1], packet.key[2],
|
||||
packet.key[3], packet.key[4], packet.key[5]);
|
||||
|
||||
packet.key[0], packet.key[1], packet.key[2],
|
||||
packet.key[3], packet.key[4], packet.key[5]);
|
||||
|
||||
PrintAndLogEx(SUCCESS, "Using new key for subsequent writes");
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// restore config page at end
|
||||
size_t config_offset = HITAGS_PAGE_SIZE * 1; // page 1
|
||||
size_t config_offset = HITAGS_PAGE_SIZE * 1; // page 1
|
||||
packet.page = HITAGS_CONFIG_PADR;
|
||||
memcpy(packet.data, &dump_bytes[HITAGS_PAGE_SIZE], HITAGS_PAGE_SIZE);
|
||||
|
||||
|
||||
PrintAndLogEx(SUCCESS, "Applying "_YELLOW_("restored config: ") _GREEN_("%02X %02X %02X %02X"),
|
||||
dump_bytes[config_offset],
|
||||
dump_bytes[config_offset + 1],
|
||||
dump_bytes[config_offset + 2],
|
||||
dump_bytes[config_offset + 3]);
|
||||
dump_bytes[config_offset],
|
||||
dump_bytes[config_offset + 1],
|
||||
dump_bytes[config_offset + 2],
|
||||
dump_bytes[config_offset + 3]);
|
||||
|
||||
|
||||
|
||||
clearCommandBuffer();
|
||||
SendCommandNG(CMD_LF_HITAGS_WRITE, (uint8_t *)&packet, sizeof(packet));
|
||||
|
||||
|
@ -741,15 +742,15 @@ static int CmdLFHitagSRestore(const char *Cmd) {
|
|||
}
|
||||
|
||||
PrintAndLogEx(INFO, "Write process completed");
|
||||
|
||||
|
||||
if (auth_changed) {
|
||||
if (packet.cmd == HTSF_82xx) {
|
||||
PrintAndLogEx(SUCCESS, "New Password: " _BACK_BLUE_("%02X %02X %02X %02X"),
|
||||
packet.pwd[0], packet.pwd[1], packet.pwd[2], packet.pwd[3]);
|
||||
PrintAndLogEx(SUCCESS, "New Password: " _BACK_BLUE_("%02X %02X %02X %02X"),
|
||||
packet.pwd[0], packet.pwd[1], packet.pwd[2], packet.pwd[3]);
|
||||
} else if (packet.cmd == HTSF_KEY) {
|
||||
PrintAndLogEx(SUCCESS, "New Key: " _BACK_BLUE_("%02X %02X %02X %02X %02X %02X"),
|
||||
packet.key[0], packet.key[1], packet.key[2],
|
||||
packet.key[3], packet.key[4], packet.key[5]);
|
||||
packet.key[0], packet.key[1], packet.key[2],
|
||||
packet.key[3], packet.key[4], packet.key[5]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -929,7 +930,7 @@ static command_t CommandTable[] = {
|
|||
{"reader", CmdLFHitagSReader, IfPm3Hitag, "Act like a Hitag S reader"},
|
||||
{"rdbl", CmdLFHitagSRead, IfPm3Hitag, "Read Hitag S page"},
|
||||
{"dump", CmdLFHitagSDump, IfPm3Hitag, "Dump Hitag S pages to a file"},
|
||||
{"restore", CmdLFHitagSRestore,IfPm3Hitag, "Restore Hitag S memory from dump file"},
|
||||
{"restore", CmdLFHitagSRestore, IfPm3Hitag, "Restore Hitag S memory from dump file"},
|
||||
{"wrbl", CmdLFHitagSWrite, IfPm3Hitag, "Write Hitag S page"},
|
||||
{"-----------", CmdHelp, IfPm3Hitag, "----------------------- " _CYAN_("Simulation") " -----------------------"},
|
||||
{"sim", CmdLFHitagSSim, IfPm3Hitag, "Simulate Hitag S transponder"},
|
||||
|
|
|
@ -22,73 +22,117 @@
|
|||
|
||||
// See tools/recover_pk.py to recover Pk from UIDs and signatures
|
||||
const ecdsa_publickey_ng_t manufacturer_public_keys[] = {
|
||||
{PK_MFC, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP MIFARE Classic MFC1C14_x",
|
||||
"044F6D3F294DEA5737F0F46FFEE88A356EED95695DD7E0C27A591E6F6F65962BAF"},
|
||||
{PK_MFC, MBEDTLS_ECP_DP_SECP128R1, 33, "MIFARE Classic / QL88",
|
||||
"046F70AC557F5461CE5052C8E4A7838C11C7A236797E8A0730A101837C004039C2"},
|
||||
{
|
||||
PK_MFC, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP MIFARE Classic MFC1C14_x",
|
||||
"044F6D3F294DEA5737F0F46FFEE88A356EED95695DD7E0C27A591E6F6F65962BAF"
|
||||
},
|
||||
{
|
||||
PK_MFC, MBEDTLS_ECP_DP_SECP128R1, 33, "MIFARE Classic / QL88",
|
||||
"046F70AC557F5461CE5052C8E4A7838C11C7A236797E8A0730A101837C004039C2"
|
||||
},
|
||||
|
||||
// ref: TagInfo
|
||||
// NTAG 210/212 ? not present in recover_pk
|
||||
{PK_MFUL, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP Public key",
|
||||
"04A748B6A632FBEE2C0897702B33BEA1C074998E17B84ACA04FF267E5D2C91F6DC"},
|
||||
{
|
||||
PK_MFUL, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP Public key",
|
||||
"04A748B6A632FBEE2C0897702B33BEA1C074998E17B84ACA04FF267E5D2C91F6DC"
|
||||
},
|
||||
// ref: AN11341 MIFARE Ultralight EV1 Originality Signature Validation
|
||||
{PK_MFUL, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP Ultralight EV1",
|
||||
"0490933BDCD6E99B4E255E3DA55389A827564E11718E017292FAF23226A96614B8"},
|
||||
{
|
||||
PK_MFUL, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP Ultralight EV1",
|
||||
"0490933BDCD6E99B4E255E3DA55389A827564E11718E017292FAF23226A96614B8"
|
||||
},
|
||||
// ref: AN11350 NTAG 21x Originality Signature Validation
|
||||
{PK_MFUL, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP NTAG21x (2013)",
|
||||
"04494E1A386D3D3CFE3DC10E5DE68A499B1C202DB5B132393E89ED19FE5BE8BC61"},
|
||||
{
|
||||
PK_MFUL, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP NTAG21x (2013)",
|
||||
"04494E1A386D3D3CFE3DC10E5DE68A499B1C202DB5B132393E89ED19FE5BE8BC61"
|
||||
},
|
||||
|
||||
// ref: AN13452 MIFARE Ultralight AES features and hints
|
||||
{PK_MFULAES, MBEDTLS_ECP_DP_SECP192R1, 49, "NXP Ultralight AES",
|
||||
"0453BF8C49B7BD9FE3207A91513B9C1D238ECAB07186B772104AB535F7D3AE63CF7C7F3DD0D169DA3E99E43C6399621A86"},
|
||||
{
|
||||
PK_MFULAES, MBEDTLS_ECP_DP_SECP192R1, 49, "NXP Ultralight AES",
|
||||
"0453BF8C49B7BD9FE3207A91513B9C1D238ECAB07186B772104AB535F7D3AE63CF7C7F3DD0D169DA3E99E43C6399621A86"
|
||||
},
|
||||
// ref: TagInfo
|
||||
{PK_MFULAES, MBEDTLS_ECP_DP_SECP192R1, 49, "NXP Ultralight AES (alt key)",
|
||||
"04DC34DAA903F2726A6225B11C692AF6AB4396575CA12810CBBCE3F781A097B3833B50AB364A70D9C2B641A728A599AE74"},
|
||||
{
|
||||
PK_MFULAES, MBEDTLS_ECP_DP_SECP192R1, 49, "NXP Ultralight AES (alt key)",
|
||||
"04DC34DAA903F2726A6225B11C692AF6AB4396575CA12810CBBCE3F781A097B3833B50AB364A70D9C2B641A728A599AE74"
|
||||
},
|
||||
|
||||
{PK_MFP, MBEDTLS_ECP_DP_SECP224R1, 57, "MIFARE Plus EV1",
|
||||
"044409ADC42F91A8394066BA83D872FB1D16803734E911170412DDF8BAD1A4DADFD0416291AFE1C748253925DA39A5F39A1C557FFACD34C62E"},
|
||||
// not present in recover_pk
|
||||
{PK_MFP, MBEDTLS_ECP_DP_SECP224R1, 57, "MIFARE Plus EV2",
|
||||
"04BB49AE4447E6B1B6D21C098C1538B594A11A4A1DBF3D5E673DEACDEB3CC512D1C08AFA1A2768CE20A200BACD2DC7804CD7523A0131ABF607"},
|
||||
{PK_MFP, MBEDTLS_ECP_DP_SECP224R1, 57, "MIFARE Plus Troika",
|
||||
"040F732E0EA7DF2B38F791BF89425BF7DCDF3EE4D976669E3831F324FF15751BD52AFF1782F72FF2731EEAD5F63ABE7D126E03C856FFB942AF"},
|
||||
{
|
||||
PK_MFP, MBEDTLS_ECP_DP_SECP224R1, 57, "MIFARE Plus EV1",
|
||||
"044409ADC42F91A8394066BA83D872FB1D16803734E911170412DDF8BAD1A4DADFD0416291AFE1C748253925DA39A5F39A1C557FFACD34C62E"
|
||||
},
|
||||
// not present in recover_pk
|
||||
{
|
||||
PK_MFP, MBEDTLS_ECP_DP_SECP224R1, 57, "MIFARE Plus EV2",
|
||||
"04BB49AE4447E6B1B6D21C098C1538B594A11A4A1DBF3D5E673DEACDEB3CC512D1C08AFA1A2768CE20A200BACD2DC7804CD7523A0131ABF607"
|
||||
},
|
||||
{
|
||||
PK_MFP, MBEDTLS_ECP_DP_SECP224R1, 57, "MIFARE Plus Troika",
|
||||
"040F732E0EA7DF2B38F791BF89425BF7DCDF3EE4D976669E3831F324FF15751BD52AFF1782F72FF2731EEAD5F63ABE7D126E03C856FFB942AF"
|
||||
},
|
||||
|
||||
// ref: AN12343 MIFARE DESFire Light Features and Hints
|
||||
// not present in recover_pk
|
||||
{PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "DESFire Light",
|
||||
"040E98E117AAA36457F43173DC920A8757267F44CE4EC5ADD3C54075571AEBBF7B942A9774A1D94AD02572427E5AE0A2DD36591B1FB34FCF3D"},
|
||||
{PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "NTAG413DNA, DESFire EV1",
|
||||
"04BB5D514F7050025C7D0F397310360EEC91EAF792E96FC7E0F496CB4E669D414F877B7B27901FE67C2E3B33CD39D1C797715189AC951C2ADD"},
|
||||
{PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "NTAG424DNA, NTAG424DNATT, DESFire EV2, DESFire Light EV2",
|
||||
"04B304DC4C615F5326FE9383DDEC9AA892DF3A57FA7FFB3276192BC0EAA252ED45A865E3B093A3D0DCE5BE29E92F1392CE7DE321E3E5C52B3A"},
|
||||
{
|
||||
PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "DESFire Light",
|
||||
"040E98E117AAA36457F43173DC920A8757267F44CE4EC5ADD3C54075571AEBBF7B942A9774A1D94AD02572427E5AE0A2DD36591B1FB34FCF3D"
|
||||
},
|
||||
{
|
||||
PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "NTAG413DNA, DESFire EV1",
|
||||
"04BB5D514F7050025C7D0F397310360EEC91EAF792E96FC7E0F496CB4E669D414F877B7B27901FE67C2E3B33CD39D1C797715189AC951C2ADD"
|
||||
},
|
||||
{
|
||||
PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "NTAG424DNA, NTAG424DNATT, DESFire EV2, DESFire Light EV2",
|
||||
"04B304DC4C615F5326FE9383DDEC9AA892DF3A57FA7FFB3276192BC0EAA252ED45A865E3B093A3D0DCE5BE29E92F1392CE7DE321E3E5C52B3A"
|
||||
},
|
||||
// ref: AN12196 NTAG 424 DNA and NTAG 424 DNA TagTamper features and hints
|
||||
{PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "NTAG424DNA, DESFire EV2, DESFire Light",
|
||||
"048A9B380AF2EE1B98DC417FECC263F8449C7625CECE82D9B916C992DA209D68422B81EC20B65A66B5102A61596AF3379200599316A00A1410"},
|
||||
{PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "DESFire EV2 XL",
|
||||
"04CD5D45E50B1502F0BA4656FF37669597E7E183251150F9574CC8DA56BF01C7ABE019E29FEA48F9CE22C3EA4029A765E1BC95A89543BAD1BC"},
|
||||
{PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "DESFire EV3",
|
||||
"041DB46C145D0A36539C6544BD6D9B0AA62FF91EC48CBC6ABAE36E0089A46F0D08C8A715EA40A63313B92E90DDC1730230E0458A33276FB743"},
|
||||
{
|
||||
PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "NTAG424DNA, DESFire EV2, DESFire Light",
|
||||
"048A9B380AF2EE1B98DC417FECC263F8449C7625CECE82D9B916C992DA209D68422B81EC20B65A66B5102A61596AF3379200599316A00A1410"
|
||||
},
|
||||
{
|
||||
PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "DESFire EV2 XL",
|
||||
"04CD5D45E50B1502F0BA4656FF37669597E7E183251150F9574CC8DA56BF01C7ABE019E29FEA48F9CE22C3EA4029A765E1BC95A89543BAD1BC"
|
||||
},
|
||||
{
|
||||
PK_MFDES, MBEDTLS_ECP_DP_SECP224R1, 57, "DESFire EV3",
|
||||
"041DB46C145D0A36539C6544BD6D9B0AA62FF91EC48CBC6ABAE36E0089A46F0D08C8A715EA40A63313B92E90DDC1730230E0458A33276FB743"
|
||||
},
|
||||
|
||||
// ref: AN5101 TruST25 digital signature for ST25TA512B, ST25TA02KB, ST25TA02KB-D and ST25TA02KB-P devices
|
||||
{PK_ST25TA, MBEDTLS_ECP_DP_SECP128R1, 33, "ST25TA TruST25 (ST) key 01?",
|
||||
"041D92163650161A2548D33881C235D0FB2315C2C31A442F23C87ACF14497C0CBA"},
|
||||
{
|
||||
PK_ST25TA, MBEDTLS_ECP_DP_SECP128R1, 33, "ST25TA TruST25 (ST) key 01?",
|
||||
"041D92163650161A2548D33881C235D0FB2315C2C31A442F23C87ACF14497C0CBA"
|
||||
},
|
||||
// ref: AN5660 TruST25 digital signature for ST25TN512 and ST25TN01K devices
|
||||
{PK_ST25TN, MBEDTLS_ECP_DP_SECP128R1, 33, "ST25TN TruST25 (ST) KeyID 05",
|
||||
"0440004F974F7C76BC8718E523D85FA7B354A9A992BFA966CB8219242F9D274FD6"},
|
||||
{
|
||||
PK_ST25TN, MBEDTLS_ECP_DP_SECP128R1, 33, "ST25TN TruST25 (ST) KeyID 05",
|
||||
"0440004F974F7C76BC8718E523D85FA7B354A9A992BFA966CB8219242F9D274FD6"
|
||||
},
|
||||
// ref: AN5104 TruST25 digital signature for ST25TV512 and ST25TV02K devices ?
|
||||
// ref: AN5149 TruST25 digital signature for ST25DV02K-W1, ST25DV02K-W2 devices ?
|
||||
// ref: AN5580 TruST25 digital signature for ST25TV512C and ST25TV02KC devices
|
||||
{PK_ST25TV, MBEDTLS_ECP_DP_SECP128R1, 33, "ST25TV TruST25 (ST) KeyID 04",
|
||||
"04101E188A8B4CDDBC62D5BC3E0E6850F0C2730E744B79765A0E079907FBDB01BC"},
|
||||
{
|
||||
PK_ST25TV, MBEDTLS_ECP_DP_SECP128R1, 33, "ST25TV TruST25 (ST) KeyID 04",
|
||||
"04101E188A8B4CDDBC62D5BC3E0E6850F0C2730E744B79765A0E079907FBDB01BC"
|
||||
},
|
||||
|
||||
{PK_15, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP ICODE DNA, ICODE SLIX2",
|
||||
"048878A2A2D3EEC336B4F261A082BD71F9BE11C4E2E896648B32EFA59CEA6E59F0"},
|
||||
{PK_15, MBEDTLS_ECP_DP_SECP128R1, 33, "VivoKey Spark1 Public key",
|
||||
"04D64BB732C0D214E7EC580736ACF847284B502C25C0F7F2FA86AACE1DADA4387A"},
|
||||
{
|
||||
PK_15, MBEDTLS_ECP_DP_SECP128R1, 33, "NXP ICODE DNA, ICODE SLIX2",
|
||||
"048878A2A2D3EEC336B4F261A082BD71F9BE11C4E2E896648B32EFA59CEA6E59F0"
|
||||
},
|
||||
{
|
||||
PK_15, MBEDTLS_ECP_DP_SECP128R1, 33, "VivoKey Spark1 Public key",
|
||||
"04D64BB732C0D214E7EC580736ACF847284B502C25C0F7F2FA86AACE1DADA4387A"
|
||||
},
|
||||
|
||||
// FIXME: what type(s) of card exactly? MFC? MFUL? not present in recover_pk
|
||||
{PK_MIK, MBEDTLS_ECP_DP_SECP128R1, 33, "MIKRON Public key",
|
||||
"04F971EDA742A4A80D32DCF6A814A707CC3DC396D35902F72929FDCD698B3468F2"},
|
||||
{
|
||||
PK_MIK, MBEDTLS_ECP_DP_SECP128R1, 33, "MIKRON Public key",
|
||||
"04F971EDA742A4A80D32DCF6A814A707CC3DC396D35902F72929FDCD698B3468F2"
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ int mf_check_keys_fast_ex(uint8_t sectorsCnt, uint8_t firstChunk, uint8_t lastCh
|
|||
// takes about 97s, still some margin before abort
|
||||
// timeout = 180 => ~360s @ Mifare Classic 1k @ ~2300 keys in dict
|
||||
// ~2300 keys @ Mifare Classic 1k => ~620s
|
||||
if (timeout > 60*12) {
|
||||
if (timeout > 60 * 12) {
|
||||
PrintAndLogEx(WARNING, "\nNo response from Proxmark3. Aborting...");
|
||||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue