]> git.zerfleddert.de Git - proxmark3-svn/blob - client/cmdhfmfhard.h
optimization UDOL creation. does not affect on functionality.
[proxmark3-svn] / client / cmdhfmfhard.h
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2015 piwi
3 //
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
6 // the license.
7 //-----------------------------------------------------------------------------
8 // hf mf hardnested command
9 //-----------------------------------------------------------------------------
10
11 #ifndef CMDHFMFHARD_H__
12 #define CMDHFMFHARD_H__
13
14 #include <stdint.h>
15 #include <stdbool.h>
16
17 #define NUM_SUMS 19 // number of possible sum property values
18
19 typedef struct guess_sum_a8 {
20 float prob;
21 uint64_t num_states;
22 uint8_t sum_a8_idx;
23 } guess_sum_a8_t;
24
25 typedef struct noncelistentry {
26 uint32_t nonce_enc;
27 uint8_t par_enc;
28 void *next;
29 } noncelistentry_t;
30
31 typedef struct noncelist {
32 uint16_t num;
33 uint16_t Sum;
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;
42 } noncelist_t;
43
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);
46
47 #endif
48
Impressum, Datenschutz