1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2015 piwi
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
7 //-----------------------------------------------------------------------------
8 // hf mf hardnested command
9 //-----------------------------------------------------------------------------
11 #ifndef CMDHFMFHARD_H__
12 #define CMDHFMFHARD_H__
17 #define NUM_SUMS 19 // number of possible sum property values
19 typedef struct guess_sum_a8
{
25 typedef struct noncelistentry
{
31 typedef struct noncelist
{
34 guess_sum_a8_t sum_a8_guess
[NUM_SUMS
];
35 bool sum_a8_guess_dirty
;
36 float expected_num_brute_force
;
37 uint8_t BitFlips
[0x400];
38 uint32_t *states_bitarray
[2];
39 uint32_t num_states_bitarray
[2];
40 bool all_bitflips_dirty
[2];
41 noncelistentry_t
*first
;
44 int mfnestedhard(uint8_t blockNo
, uint8_t keyType
, uint8_t *key
, uint8_t trgBlockNo
, uint8_t trgKeyType
, uint8_t *trgkey
, bool nonce_file_read
, bool nonce_file_write
, bool slow
, int tests
);
45 void hardnested_print_progress(uint32_t nonces
, char *activity
, float brute_force
, uint64_t min_diff_print_time
);