2 * Author......: Jens Steube <jens.steube@gmail.com>
76 uint cry_master_buf
[64];
78 uint public_key_buf
[64];
119 uint userdomain_buf
[64];
136 uint account_info
[512];
148 /* key-file handling */
152 u32 final_random_seed
[8];
153 u32 transf_random_seed
[8];
155 u32 contents_hash
[8];
157 /* specific to version 1 */
161 /* specific to version 2 */
162 u32 expected_bytes
[8];
170 uint keyfile_buf
[16];
221 uint encryptedVerifier
[4];
222 uint encryptedVerifierHash
[5];
230 uint encryptedVerifier
[4];
231 uint encryptedVerifierHash
[8];
237 uint encryptedVerifier
[4];
238 uint encryptedVerifierHash
[8];
245 uint encryptedVerifier
[4];
246 uint encryptedVerifierHash
[4];
254 uint encryptedVerifier
[4];
255 uint encryptedVerifierHash
[5];
362 } bitcoin_wallet_tmp_t
;
573 } pbkdf2_sha256_tmp_t
;
583 } pbkdf2_sha512_tmp_t
;
668 u32 salt
[5]; // unused, but makes better valid check
669 u32 iv
[2]; // unused, but makes better valid check
693 hashinfo_t
*hash_info
;
755 struct __stat64 stat
;
780 u32 alignment_placeholder_1
;
781 u32 alignment_placeholder_2
;
782 u32 alignment_placeholder_3
;
847 #define CPT_BUF 0x20000
899 int workload_profile
;
908 tuning_db_alias_t
*alias_buf
;
911 tuning_db_entry_t
*entry_buf
;
916 #define RULES_MAX 256
919 #define PW_MAX1 (PW_MAX + 1)
920 #define PW_DICTMAX 31
921 #define PW_DICTMAX1 (PW_DICTMAX + 1)
924 struct __hc_device_param
927 cl_device_type device_type
;
930 uint platform_devices_id
; // for mapping with hms devices
936 uint kernel_exec_timeout
;
938 uint device_processors
;
939 uint device_processor_cores
;
940 u64 device_maxmem_alloc
;
941 u64 device_global_mem
;
942 u32 device_maxclock_frequency
;
943 size_t device_maxworkgroup_size
;
950 uint kernel_loops_min
;
951 uint kernel_loops_max
;
952 uint kernel_accel_min
;
953 uint kernel_accel_max
;
964 size_t size_root_css
;
965 size_t size_markov_css
;
990 double exec_ms
[EXEC_CACHE
];
992 // workaround cpu spinning
994 double exec_us_prev1
;
995 double exec_us_prev2
;
996 double exec_us_prev3
;
998 // this is "current" speed
1001 u64 speed_cnt
[SPEED_CACHE
];
1002 double speed_ms
[SPEED_CACHE
];
1004 hc_timer_t timer_speed
;
1006 // device specific attributes starting
1009 char *device_vendor
;
1010 char *device_name_chksum
;
1011 char *device_version
;
1012 char *driver_version
;
1016 cl_uint device_vendor_id
;
1017 cl_uint platform_vendor_id
;
1024 cl_kernel kernel_mp
;
1025 cl_kernel kernel_mp_l
;
1026 cl_kernel kernel_mp_r
;
1027 cl_kernel kernel_amp
;
1028 cl_kernel kernel_tm
;
1029 cl_kernel kernel_weak
;
1030 cl_kernel kernel_memset
;
1035 cl_program program_mp
;
1036 cl_program program_amp
;
1038 cl_command_queue command_queue
;
1041 cl_mem d_pws_amp_buf
;
1042 cl_mem d_words_buf_l
;
1043 cl_mem d_words_buf_r
;
1051 cl_mem d_bitmap_s1_a
;
1052 cl_mem d_bitmap_s1_b
;
1053 cl_mem d_bitmap_s1_c
;
1054 cl_mem d_bitmap_s1_d
;
1055 cl_mem d_bitmap_s2_a
;
1056 cl_mem d_bitmap_s2_b
;
1057 cl_mem d_bitmap_s2_c
;
1058 cl_mem d_bitmap_s2_d
;
1059 cl_mem d_plain_bufs
;
1060 cl_mem d_digests_buf
;
1061 cl_mem d_digests_shown
;
1063 cl_mem d_esalt_bufs
;
1064 cl_mem d_bcrypt_bufs
;
1068 cl_mem d_scryptV_buf
;
1069 cl_mem d_root_css_buf
;
1070 cl_mem d_markov_css_buf
;
1072 void *kernel_params
[PARAMCNT
];
1073 void *kernel_params_mp
[PARAMCNT
];
1074 void *kernel_params_mp_r
[PARAMCNT
];
1075 void *kernel_params_mp_l
[PARAMCNT
];
1076 void *kernel_params_amp
[PARAMCNT
];
1077 void *kernel_params_tm
[PARAMCNT
];
1078 void *kernel_params_memset
[PARAMCNT
];
1080 u32 kernel_params_buf32
[PARAMCNT
];
1082 u32 kernel_params_mp_buf32
[PARAMCNT
];
1083 u64 kernel_params_mp_buf64
[PARAMCNT
];
1085 u32 kernel_params_mp_r_buf32
[PARAMCNT
];
1086 u64 kernel_params_mp_r_buf64
[PARAMCNT
];
1088 u32 kernel_params_mp_l_buf32
[PARAMCNT
];
1089 u64 kernel_params_mp_l_buf64
[PARAMCNT
];
1091 u32 kernel_params_amp_buf32
[PARAMCNT
];
1092 u32 kernel_params_memset_buf32
[PARAMCNT
];
1095 typedef struct __hc_device_param hc_device_param_t
;
1101 HM_ADAPTER_NVML nvml
;
1102 HM_ADAPTER_NVAPI nvapi
;
1106 int fan_get_supported
;
1107 int fan_set_supported
;
1110 #endif // HAVE_HWMON
1118 uint devices_status
;
1120 uint devices_active
;
1122 hc_device_param_t
*devices_param
;
1128 uint hardware_power_all
;
1129 uint kernel_power_all
;
1130 u64 kernel_power_final
; // we save that so that all divisions are done from the same base
1138 uint hashlist_format
;
1144 uint kernel_rules_cnt
;
1146 kernel_rule_t
*kernel_rules_buf
;
1157 cs_t
*markov_css_buf
;
1165 * opencl library stuff
1178 hm_attrs_t hm_device
[DEVICES_MAX
];
1190 uint
*digests_shown
;
1191 uint
*digests_shown_tmp
;
1205 uint logfile_disable
;
1214 cpt_t cpt_buf
[CPT_BUF
];
1237 uint outfile_format
;
1238 uint outfile_autohex
;
1239 uint outfile_check_timer
;
1240 char *eff_restore_file
;
1241 char *new_restore_file
;
1242 char *induction_directory
;
1243 char *outfile_check_directory
;
1245 char *loopback_file
;
1248 uint restore_disable
;
1251 uint machine_readable
;
1255 uint benchmark_repeats
;
1266 uint powertune_enable
;
1269 char *truecrypt_keyfiles
;
1270 char *veracrypt_keyfiles
;
1272 uint workload_profile
;
1289 uint gpu_temp_disable
;
1290 uint gpu_temp_abort
;
1291 uint gpu_temp_retain
;
1310 u64 checkpoint_cur_words
; // used for the "stop at next checkpoint" feature
1316 time_t runtime_start
;
1317 time_t runtime_stop
;
1326 u64
*words_progress_done
; // progress number of words done per salt
1327 u64
*words_progress_rejected
; // progress number of words rejected per salt
1328 u64
*words_progress_restored
; // progress number of words restored per salt
1330 hc_timer_t timer_running
; // timer on current dict
1331 hc_timer_t timer_paused
; // timer on current dict
1333 double ms_paused
; // timer on current dict
1336 * hash_info and username
1339 hashinfo_t
**hash_info
;
1342 int (*sort_by_digest
) (const void *, const void *);
1344 int (*parse_func
) (char *, uint
, hash_t
*);
1348 extern hc_global_data_t data
;