- uint64_t key; // recovered key
- uint32_t uid = le32toh(data);
- uint32_t nt = le32toh(data+4); // tag challenge
- uint32_t nr0_enc = le32toh(data+8); // first encrypted reader challenge
- uint32_t ar0_enc = le32toh(data+12); // first encrypted reader response
- //+16 uid2
- //+20 nt2
- uint32_t nr1_enc = le32toh(data+24); // second encrypted reader challenge
- uint32_t ar1_enc = le32toh(data+28); // second encrypted reader response
+ uint64_t outkey = 0;
+ uint64_t key=0; // recovered key
+ uint32_t uid = data.cuid;
+ uint32_t nt = data.nonce; // first tag challenge (nonce)
+ uint32_t nr0_enc = data.nr; // first encrypted reader challenge
+ uint32_t ar0_enc = data.ar; // first encrypted reader response
+ uint32_t nr1_enc = data.nr2; // second encrypted reader challenge
+ uint32_t ar1_enc = data.ar2; // second encrypted reader response
+ clock_t t1 = clock();