mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
added TBD code
This commit is contained in:
parent
b45ac1c912
commit
c3a4f4c7ed
1 changed files with 22 additions and 7 deletions
|
@ -579,6 +579,7 @@ uint32_t ks3;
|
|||
|
||||
uint32_t uid; // serial number
|
||||
uint32_t nt; // tag challenge
|
||||
uint32_t nt_enc; // encrypted tag challenge
|
||||
uint32_t nr_enc; // encrypted reader challenge
|
||||
uint32_t ar_enc; // encrypted reader response
|
||||
uint32_t at_enc; // encrypted tag response
|
||||
|
@ -802,7 +803,11 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
|
|||
case TRACE_AUTH1:
|
||||
if (len == 4) {
|
||||
traceState = TRACE_AUTH2;
|
||||
if (!traceCrypto1) {
|
||||
nt = bytes_to_num(data, 4);
|
||||
} else {
|
||||
nt_enc = bytes_to_num(data, 4);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
traceState = TRACE_ERROR;
|
||||
|
@ -848,7 +853,16 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
|
|||
printf("key> Prng: HARDEND\n");
|
||||
}
|
||||
} else {
|
||||
printf("key> nested not implemented!\n");
|
||||
if (validate_prng_nonce(nt)) {
|
||||
at_enc = bytes_to_num(data, 4);
|
||||
|
||||
|
||||
|
||||
printf("key> nested... TBD\n");
|
||||
crypto1_destroy(traceCrypto1);
|
||||
traceState = TRACE_ERROR;
|
||||
} else {
|
||||
printf("key> hardnested not implemented!\n");
|
||||
at_enc = bytes_to_num(data, 4);
|
||||
|
||||
crypto1_destroy(traceCrypto1);
|
||||
|
@ -856,6 +870,7 @@ int mfTraceDecode(uint8_t *data_src, int len, bool wantSaveToEmlFile) {
|
|||
// not implemented
|
||||
traceState = TRACE_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
int blockShift = ((traceCurBlock & 0xFC) + 3) * 16;
|
||||
if (isBlockEmpty((traceCurBlock & 0xFC) + 3)) memcpy(traceCard + blockShift + 6, trailerAccessBytes, 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue