]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/nonce2key/nonce2key.c
REM: removed unused code.
[proxmark3-svn] / client / nonce2key / nonce2key.c
index b0f2c93dcfe4e52cd287d5bf7d4d1f351b168853..2d0590df384bf27b7bcae53d36af315245472c69 100644 (file)
 #include "ui.h"
 #include "proxmark3.h"
 
-int compar_state(const void * a, const void * b) {
-       // didn't work: (the result is truncated to 32 bits)
-       //return (*(int64_t*)b - *(int64_t*)a);
-
-       // better:
-       if (*(int64_t*)b == *(int64_t*)a) return 0;
-       else if (*(int64_t*)b > *(int64_t*)a) return 1;
-       else return -1;
-}
-
 int nonce2key(uint32_t uid, uint32_t nt, uint32_t nr, uint64_t par_info, uint64_t ks_info, uint64_t * key) {
 
        struct Crypto1State *state;
@@ -59,7 +49,6 @@ int nonce2key(uint32_t uid, uint32_t nt, uint32_t nr, uint64_t par_info, uint64_
        state = lfsr_common_prefix(nr, rr, ks3x, par);
        lfsr_rollback_word(state, uid^nt, 0);
        crypto1_get_lfsr(state, key);
-    printf("\nkey recovered: %012"llx"\n\n",key);
        crypto1_destroy(state);
        return 0;
 }
Impressum, Datenschutz