trace extract: print the full AES auth challenges

The MFDES AES auth branch printed 8 of the 16 RndB bytes and 16 of the
32 reader bytes, and accepted a 9 byte tag reply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
iceman1001andClaude Opus 5.5 committed 2026-11-09 14:23:25 +07:00
1 parent 1f543f3ced
commit f885a22d59
1 file changed
+5 -4
+5 -4
View File
@@ -493,19 +493,20 @@ static uint16_t extractChallenges(uint16_t tracepos, uint16_t traceLen, uint8_t
}
tracepos += TRACELOG_HDR_LEN + next_hdr->data_len + TRACELOG_PARITY_LEN(next_hdr);
if (next_hdr->data_len < 9) {
// PCB + 16 byte RndB + CRC
if (next_hdr->data_len < 19) {
break;
}
PrintAndLogEx(INFO, "AES 1499999999 %s " NOLF, sprint_hex_inrow(next_hdr->frame + 1, 8));
PrintAndLogEx(INFO, "AES 1499999999 %s " NOLF, sprint_hex_inrow(next_hdr->frame + 1, 16));
next_hdr = get_record(tracepos, traceLen, trace);
if (next_hdr != NULL) {
tracepos += TRACELOG_HDR_LEN + next_hdr->data_len + TRACELOG_PARITY_LEN(next_hdr);
}
if ((next_hdr != NULL) && (next_hdr->data_len >= pos + long_jmp + 16) && (next_hdr->frame[pos] == MFDES_ADDITIONAL_FRAME)) {
PrintAndLogEx(NORMAL, "%s", sprint_hex_inrow(next_hdr->frame + pos + long_jmp, 16));
if ((next_hdr != NULL) && (next_hdr->data_len >= pos + long_jmp + 32) && (next_hdr->frame[pos] == MFDES_ADDITIONAL_FRAME)) {
PrintAndLogEx(NORMAL, "%s", sprint_hex_inrow(next_hdr->frame + pos + long_jmp, 32));
} else {
PrintAndLogEx(NORMAL, "");
}