X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/b112787d4f40c5fd948594303653f6b0ce444700..02ac2ed4643822ce87b8ccc2739355c2b20682f4:/client/cmdhfmfhard.c diff --git a/client/cmdhfmfhard.c b/client/cmdhfmfhard.c index f7c2f650..eac783ff 100644 --- a/client/cmdhfmfhard.c +++ b/client/cmdhfmfhard.c @@ -88,7 +88,7 @@ typedef struct noncelist { } noncelist_t; -static uint32_t cuid; +static uint32_t cuid = 0; static noncelist_t nonces[256]; static uint8_t best_first_bytes[256]; static uint16_t first_byte_Sum = 0; @@ -686,7 +686,8 @@ static void Check_for_FilterFlipProperties(void) static void simulate_MFplus_RNG(uint32_t test_cuid, uint64_t test_key, uint32_t *nt_enc, uint8_t *par_enc) { - struct Crypto1State sim_cs; + struct Crypto1State sim_cs = {0, 0}; +// sim_cs.odd = sim_cs.even = 0; // init cryptostate with key: for(int8_t i = 47; i > 0; i -= 2) { @@ -1304,7 +1305,7 @@ static void generate_candidates(uint16_t sum_a0, uint16_t sum_a8) } } } - printf("Number of possible keys with Sum(a0) = %d: %lld (2^%1.1f)\n", sum_a0, maximum_states, log(maximum_states)/log(2.0)); + printf("Number of possible keys with Sum(a0) = %d: %"PRIu64" (2^%1.1f)\n", sum_a0, maximum_states, log(maximum_states)/log(2.0)); init_statelist_cache(); @@ -1353,7 +1354,7 @@ static void generate_candidates(uint16_t sum_a0, uint16_t sum_a8) for (statelist_t *sl = candidates; sl != NULL; sl = sl->next) { maximum_states += (uint64_t)sl->len[ODD_STATE] * sl->len[EVEN_STATE]; } - printf("Number of remaining possible keys: %lld (2^%1.1f)\n", maximum_states, log(maximum_states)/log(2.0)); + printf("Number of remaining possible keys: %"PRIu64" (2^%1.1f)\n", maximum_states, log(maximum_states)/log(2.0)); if (write_stats) { if (maximum_states != 0) { fprintf(fstats, "%1.1f;", log(maximum_states)/log(2.0));