trace extract: tell 2TDEA from 3TDEA by the challenge length
The ISO auth branch took a tag reply longer than 20 bytes as 3TDEA. A native 3TDEA reply is 20 bytes, so it was shown as 2TDEA with half the challenge. Use what is left after the framing, SW and CRC instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
26bd949bcd
commit
1f8e21dda7
1 file changed
+3
-1
@@ -471,8 +471,10 @@ static uint16_t extractChallenges(uint16_t tracepos, uint16_t traceLen, uint8_t
|
||||
break;
|
||||
}
|
||||
|
||||
// wrapped replies end with SW 91 AF before the CRC
|
||||
uint8_t sw_len = (long_jmp == 1) ? 0 : 2;
|
||||
uint8_t tdea = 8;
|
||||
if (next_hdr->data_len > 20) {
|
||||
if (next_hdr->data_len >= cpos + 16 + sw_len + 2) {
|
||||
tdea = 16;
|
||||
PrintAndLogEx(INFO, "3TDEA 1499999999 %s " NOLF, sprint_hex_inrow(next_hdr->frame + cpos, tdea));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user