mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Implemented new optimized version of MAC-calculation for iclass
This commit is contained in:
parent
b19caaefc2
commit
10a8875c72
7 changed files with 9 additions and 698 deletions
|
@ -47,8 +47,9 @@
|
|||
// different initial value (CRC_ICLASS)
|
||||
#include "iso14443crc.h"
|
||||
#include "iso15693tools.h"
|
||||
#include "cipher.h"
|
||||
#include "protocols.h"
|
||||
#include "optimized_cipher.h"
|
||||
|
||||
static int timeout = 4096;
|
||||
|
||||
|
||||
|
@ -1213,13 +1214,14 @@ int doIClassSimulation( int simulationMode, uint8_t *reader_mac_buf)
|
|||
//Put nr there
|
||||
memcpy(ccnr+8, receivedCmd+1,4);
|
||||
//Now, calc MAC
|
||||
doMAC(ccnr,diversified_key, data_generic_trace);
|
||||
opt_doMAC(ccnr,diversified_key, data_generic_trace);
|
||||
trace_data = data_generic_trace;
|
||||
trace_data_size = 4;
|
||||
CodeIClassTagAnswer(trace_data , trace_data_size);
|
||||
memcpy(data_response, ToSend, ToSendMax);
|
||||
modulated_response = data_response;
|
||||
modulated_response_size = ToSendMax;
|
||||
//exitLoop = true;
|
||||
}else
|
||||
{ //Not fullsim, we don't respond
|
||||
// We do not know what to answer, so lets keep quiet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue