mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
Make style
This commit is contained in:
parent
30a044445a
commit
f7c40e83bd
1 changed files with 3 additions and 3 deletions
|
@ -296,7 +296,7 @@ int mifare_ultra_auth(uint8_t *keybytes) {
|
|||
memcpy(enc_random_b, resp + 1, 8);
|
||||
|
||||
// decrypt nonce.
|
||||
tdes_nxp_receive((void *)enc_random_b, (void *)random_b, sizeof(random_b), (const void *)key, IV,2);
|
||||
tdes_nxp_receive((void *)enc_random_b, (void *)random_b, sizeof(random_b), (const void *)key, IV, 2);
|
||||
rol(random_b, 8);
|
||||
memcpy(rnd_ab, random_a, 8);
|
||||
memcpy(rnd_ab + 8, random_b, 8);
|
||||
|
@ -316,7 +316,7 @@ int mifare_ultra_auth(uint8_t *keybytes) {
|
|||
}
|
||||
|
||||
// encrypt out, in, length, key, iv
|
||||
tdes_nxp_send(rnd_ab, rnd_ab, sizeof(rnd_ab), key, enc_random_b,2);
|
||||
tdes_nxp_send(rnd_ab, rnd_ab, sizeof(rnd_ab), key, enc_random_b, 2);
|
||||
|
||||
len = mifare_sendcmd(MIFARE_ULC_AUTH_2, rnd_ab, sizeof(rnd_ab), resp, respPar, NULL);
|
||||
if (len != 11) {
|
||||
|
@ -329,7 +329,7 @@ int mifare_ultra_auth(uint8_t *keybytes) {
|
|||
memcpy(enc_resp, resp + 1, 8);
|
||||
|
||||
// decrypt out, in, length, key, iv
|
||||
tdes_nxp_receive(enc_resp, resp_random_a, 8, key, enc_random_b,2);
|
||||
tdes_nxp_receive(enc_resp, resp_random_a, 8, key, enc_random_b, 2);
|
||||
if (memcmp(resp_random_a, random_a, 8) != 0) {
|
||||
if (DBGLEVEL >= DBG_ERROR) Dbprintf("failed authentication");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue