mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
em4x70 makestyle
This commit is contained in:
parent
13268df9c3
commit
701914430f
2 changed files with 11 additions and 11 deletions
|
@ -367,19 +367,19 @@ static int authenticate(const uint8_t *rnd, const uint8_t *frnd, uint8_t *respon
|
|||
em4x70_send_nibble(EM4X70_COMMAND_AUTH, true);
|
||||
|
||||
// Send 56-bit Random number
|
||||
for(int i=0;i<7;i++) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
em4x70_send_byte(rnd[i]);
|
||||
}
|
||||
|
||||
// Send 7 x 0's (Diversity bits)
|
||||
for(int i=0; i<7; i++) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
em4x70_send_bit(0);
|
||||
}
|
||||
|
||||
// Send 28-bit f(RN)
|
||||
|
||||
// Send first 24 bits
|
||||
for(int i=0; i < 3; i++) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
em4x70_send_byte(frnd[i]);
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ static int authenticate(const uint8_t *rnd, const uint8_t *frnd, uint8_t *respon
|
|||
// Receive header, 20-bit g(RN), LIW
|
||||
uint8_t grnd[EM4X70_MAX_RECEIVE_LENGTH] = {0};
|
||||
int num = em4x70_receive(grnd);
|
||||
if(num < 10) {
|
||||
if (num < 10) {
|
||||
Dbprintf("Auth failed");
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue