mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
ADD: added some time debug statements to be able to measure execution time.
CHG: change the auth_ex method to send usb package faster, REM: removed some bucketsort changes.
This commit is contained in:
parent
aacb96d7ed
commit
838c15a643
16 changed files with 279 additions and 288 deletions
|
@ -139,12 +139,11 @@ int mifare_classic_authex(struct Crypto1State *pcs, uint32_t uid, uint8_t blockN
|
|||
// variables
|
||||
int len;
|
||||
uint32_t pos;
|
||||
uint8_t tmp4[4] = {0x00};
|
||||
uint8_t par[1] = {0x00};
|
||||
|
||||
// "random" reader nonce:
|
||||
byte_t nr[4] = {0x55, 0x41, 0x49, 0x92};
|
||||
//byte_t nr[4] = {0x01, 0x01, 0x01, 0x01};
|
||||
//byte_t nr[4] = {0x55, 0x41, 0x49, 0x92};
|
||||
byte_t nr[4] = {0x01, 0x01, 0x01, 0x01};
|
||||
|
||||
uint32_t nt, ntpp; // Supplied tag nonce
|
||||
|
||||
|
@ -210,10 +209,9 @@ int mifare_classic_authex(struct Crypto1State *pcs, uint32_t uid, uint8_t blockN
|
|||
return 2;
|
||||
}
|
||||
|
||||
memcpy(tmp4, receivedAnswer, 4);
|
||||
ntpp = prng_successor(nt, 32) ^ crypto1_word(pcs, 0,0);
|
||||
|
||||
if (ntpp != bytes_to_num(tmp4, 4)) {
|
||||
|
||||
if (ntpp != bytes_to_num(receivedAnswer, 4)) {
|
||||
if (MF_DBGLEVEL >= 1) Dbprintf("Authentication failed. Error card response.");
|
||||
return 3;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue