mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
added get needed parity from field
This commit is contained in:
parent
25c8aaf411
commit
48f79e3b73
1 changed files with 11 additions and 7 deletions
|
@ -579,13 +579,15 @@ uint64_t ui64Key;
|
||||||
uint32_t ks2;
|
uint32_t ks2;
|
||||||
uint32_t ks3;
|
uint32_t ks3;
|
||||||
|
|
||||||
uint32_t uid; // serial number
|
uint32_t uid; // serial number
|
||||||
uint32_t nt; // tag challenge
|
uint32_t nt; // tag challenge
|
||||||
uint32_t nt_enc; // encrypted tag challenge
|
uint32_t nt_enc; // encrypted tag challenge
|
||||||
uint8_t nt_enc_par;
|
uint8_t nt_enc_par; // encrypted tag challenge parity
|
||||||
uint32_t nr_enc; // encrypted reader challenge
|
uint32_t nr_enc; // encrypted reader challenge
|
||||||
uint32_t ar_enc; // encrypted reader response
|
uint32_t ar_enc; // encrypted reader response
|
||||||
uint32_t at_enc; // encrypted tag response
|
uint8_t ar_enc_par; // encrypted reader response parity
|
||||||
|
uint32_t at_enc; // encrypted tag response
|
||||||
|
uint8_t at_enc_par; // encrypted tag response parity
|
||||||
|
|
||||||
int isTraceCardEmpty(void) {
|
int isTraceCardEmpty(void) {
|
||||||
return ((traceCard[0] == 0) && (traceCard[1] == 0) && (traceCard[2] == 0) && (traceCard[3] == 0));
|
return ((traceCard[0] == 0) && (traceCard[1] == 0) && (traceCard[2] == 0) && (traceCard[3] == 0));
|
||||||
|
@ -827,6 +829,7 @@ int mfTraceDecode(uint8_t *data_src, int len, uint8_t parity, bool wantSaveToEml
|
||||||
|
|
||||||
nr_enc = bytes_to_num(data, 4);
|
nr_enc = bytes_to_num(data, 4);
|
||||||
ar_enc = bytes_to_num(data + 4, 4);
|
ar_enc = bytes_to_num(data + 4, 4);
|
||||||
|
ar_enc_par = parity;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
traceState = TRACE_ERROR;
|
traceState = TRACE_ERROR;
|
||||||
|
@ -839,6 +842,7 @@ int mfTraceDecode(uint8_t *data_src, int len, uint8_t parity, bool wantSaveToEml
|
||||||
traceState = TRACE_IDLE;
|
traceState = TRACE_IDLE;
|
||||||
|
|
||||||
at_enc = bytes_to_num(data, 4);
|
at_enc = bytes_to_num(data, 4);
|
||||||
|
at_enc_par = parity;
|
||||||
if (!traceCrypto1) {
|
if (!traceCrypto1) {
|
||||||
|
|
||||||
// decode key here)
|
// decode key here)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue