From b57c2d59358138119e8f795e639064fd131d3356 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 18 Mar 2019 23:31:04 +0100 Subject: [PATCH] reverting.. --- client/cmdhfmfhard.c | 5 +++-- client/hardnested/hardnested_tables.c | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client/cmdhfmfhard.c b/client/cmdhfmfhard.c index ac3066c84..415bcbaa2 100644 --- a/client/cmdhfmfhard.c +++ b/client/cmdhfmfhard.c @@ -367,7 +367,7 @@ static uint16_t PartialSumProperty(uint32_t state, odd_even_t odd_even) { uint32_t st = state; uint16_t part_sum = 0; if (odd_even == ODD_STATE) { - for (uint16_t i = 0; i < 4; i++) { + for (uint16_t i = 0; i < 5; i++) { part_sum ^= filter(st); st = (st << 1) | ((j >> (3 - i)) & 0x01) ; } @@ -1013,7 +1013,8 @@ static bool shrink_key_space(float *brute_forces) { //iceman 2018 return ((hardnested_stage & CHECK_2ND_BYTES) && reduction_rate >= 0.0 && - (reduction_rate < brute_force_per_second * (float)sample_period / 1000.0 || *brute_forces < 0x1F00000000)); + (reduction_rate < brute_force_per_second * (float)sample_period / 1000.0 || *brute_forces < 0xF00000)); + } diff --git a/client/hardnested/hardnested_tables.c b/client/hardnested/hardnested_tables.c index aacf0f63f..e1bc68549 100644 --- a/client/hardnested/hardnested_tables.c +++ b/client/hardnested/hardnested_tables.c @@ -240,7 +240,7 @@ void init_sum_bitarray(uint16_t sum_a0) { } for (odd_even_t odd_even = EVEN_STATE; odd_even <= ODD_STATE; odd_even++) { uint32_t count = count_states(sum_a0_bitarray[odd_even]); - printf("sum_a0_bitarray[%s] has %d states (%5.2f%%)\n", odd_even == EVEN_STATE ? "even" : "odd ", count, (float)count / (1 << 24) * 100.0); + printf("sum_a0_bitarray[%s] has %u states (%5.2f%%)\n", odd_even == EVEN_STATE ? "even" : "odd ", count, (float)count / (1 << 24) * 100.0); } printf("done.\n"); } @@ -350,7 +350,7 @@ static void precalculate_bit0_bitflip_bitarrays(uint8_t const bitflip, uint16_t for (odd_even_t odd_even = EVEN_STATE; odd_even <= ODD_STATE; odd_even++) { count[odd_even] = count_states(test_bitarray[odd_even]); if (count[odd_even] != 1 << 24) { - printf("Writing %d possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", + printf("Writing %u possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", count[odd_even], odd_even == EVEN_STATE ? "even" : "odd", bitflip, (1 << 24) - count[odd_even], @@ -377,7 +377,7 @@ static void precalculate_bit0_bitflip_bitarrays(uint8_t const bitflip, uint16_t } count[odd_even] = count_states(test_bitarray_2nd); if (count[odd_even] != 1 << 24) { - printf("Writing %d possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", + printf("Writing %u possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", count[odd_even], odd_even == EVEN_STATE ? "even" : "odd", bitflip | BITFLIP_2ND_BYTE, (1 << 24) - count[odd_even], @@ -462,7 +462,7 @@ static void precalculate_bit0_bitflip_bitarrays(uint8_t const bitflip, uint16_t for (odd_even_t odd_even = EVEN_STATE; odd_even <= ODD_STATE; odd_even++) { count[odd_even] = count_states(test_not_bitarray[odd_even]); if (count[odd_even] != 1 << 24) { - printf("Writing %d possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", + printf("Writing %u possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", count[odd_even], odd_even == EVEN_STATE ? "even" : "odd", bitflip | 0x100, (1 << 24) - count[odd_even], @@ -489,7 +489,7 @@ static void precalculate_bit0_bitflip_bitarrays(uint8_t const bitflip, uint16_t } count[odd_even] = count_states(test_bitarray_2nd); if (count[odd_even] != 1 << 24) { - printf("Writing %d possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", + printf("Writing %u possible %s states for bitflip property %03x (%d (%1.2f%%) states eliminated)\n", count[odd_even], odd_even == EVEN_STATE ? "even" : "odd", bitflip | 0x100 | BITFLIP_2ND_BYTE, (1 << 24) - count[odd_even], @@ -542,7 +542,7 @@ int main(int argc, char *argv[]) { } switch (sum_a0) { - case 0: + case 0: case 32: case 56: case 64: