monster merge...
all those changes marshmellow did.. and more...
This commit is contained in:
@@ -47,15 +47,15 @@ int nonce2key(uint32_t uid, uint32_t nt, uint32_t nr, uint64_t par_info, uint64_
|
||||
}
|
||||
PrintAndLog("+----+--------+---+-----+---------------+");
|
||||
|
||||
clock_t t1 = clock();
|
||||
uint64_t t1 = msclock();
|
||||
|
||||
state = lfsr_common_prefix(nr, rr, ks3x, par);
|
||||
lfsr_rollback_word(state, uid ^ nt, 0);
|
||||
crypto1_get_lfsr(state, key);
|
||||
crypto1_destroy(state);
|
||||
|
||||
t1 = clock() - t1;
|
||||
if ( t1 > 0 ) PrintAndLog("Time in nonce2key: %.0f ticks", (float)t1);
|
||||
t1 = msclock() - t1;
|
||||
PrintAndLog("Time in nonce2key: %.0f ticks", (float)t1/1000.0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ out:
|
||||
return retval;
|
||||
}
|
||||
|
||||
// 32 bit recover key from 2 nonces
|
||||
// 32 bit recover key from 2 nonces, with same nonce
|
||||
bool tryMfk32(nonces_t data, uint64_t *outputkey, bool verbose) {
|
||||
struct Crypto1State *s,*t;
|
||||
uint64_t outkey = 0;
|
||||
@@ -193,7 +193,7 @@ bool tryMfk32(nonces_t data, uint64_t *outputkey, bool verbose) {
|
||||
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
|
||||
bool isSuccess = FALSE;
|
||||
bool isSuccess = false;
|
||||
uint8_t counter = 0;
|
||||
|
||||
clock_t t1 = clock();
|
||||
@@ -248,7 +248,7 @@ bool tryMfk32_moebius(nonces_t data, uint64_t *outputkey, bool verbose) {
|
||||
uint32_t nt1 = data.nonce2; // second tag challenge (nonce)
|
||||
uint32_t nr1_enc = data.nr2; // second encrypted reader challenge
|
||||
uint32_t ar1_enc = data.ar2; // second encrypted reader response
|
||||
bool isSuccess = FALSE;
|
||||
bool isSuccess = false;
|
||||
int counter = 0;
|
||||
|
||||
clock_t t1 = clock();
|
||||
@@ -296,6 +296,7 @@ bool tryMfk32_moebius(nonces_t data, uint64_t *outputkey, bool verbose) {
|
||||
return isSuccess;
|
||||
}
|
||||
|
||||
// 64 bit recover key from a full authentication. (sniffed)
|
||||
int tryMfk64_ex(uint8_t *data, uint64_t *outputkey){
|
||||
uint32_t uid = LE32TOH(data);
|
||||
uint32_t nt = LE32TOH(data+4); // tag challenge
|
||||
|
||||
Reference in New Issue
Block a user