New SIMD code for -a 1 -m 1460
[hashcat.git] / include / types.h
1 /**
2 * Author......: Jens Steube <jens.steube@gmail.com>
3 * License.....: MIT
4 */
5
6 #ifndef TYPES_H
7 #define TYPES_H
8
9 typedef struct
10 {
11 uint salt_buf[16];
12 uint salt_buf_pc[8];
13
14 uint salt_len;
15 uint salt_iter;
16 uint salt_sign[2];
17
18 uint keccak_mdlen;
19 uint truecrypt_mdlen;
20
21 uint digests_cnt;
22 uint digests_done;
23
24 uint digests_offset;
25
26 uint scrypt_N;
27 uint scrypt_r;
28 uint scrypt_p;
29 uint scrypt_tmto;
30 uint scrypt_phy;
31
32 } salt_t;
33
34 typedef struct
35 {
36 uint iv[4];
37
38 } rar5_t;
39
40 typedef struct
41 {
42 int V;
43 int R;
44 int P;
45
46 int enc_md;
47
48 uint id_buf[8];
49 uint u_buf[32];
50 uint o_buf[32];
51
52 int id_len;
53 int o_len;
54 int u_len;
55
56 uint rc4key[2];
57 uint rc4data[2];
58
59 } pdf_t;
60
61 typedef struct
62 {
63 uint pke[25];
64 uint eapol[64];
65 int eapol_size;
66 int keyver;
67
68 } wpa_t;
69
70 typedef struct
71 {
72 uint cry_master_buf[64];
73 uint ckey_buf[64];
74 uint public_key_buf[64];
75
76 uint cry_master_len;
77 uint ckey_len;
78 uint public_key_len;
79
80 } bitcoin_wallet_t;
81
82 typedef struct
83 {
84 uint salt_buf[30];
85 uint salt_len;
86
87 uint esalt_buf[38];
88 uint esalt_len;
89
90 } sip_t;
91
92 typedef struct
93 {
94 uint data[384];
95
96 } androidfde_t;
97
98 typedef struct
99 {
100 uint nr_buf[16];
101 uint nr_len;
102
103 uint msg_buf[128];
104 uint msg_len;
105
106 } ikepsk_t;
107
108 typedef struct
109 {
110 uint user_len;
111 uint domain_len;
112 uint srvchall_len;
113 uint clichall_len;
114
115 uint userdomain_buf[64];
116 uint chall_buf[256];
117
118 } netntlm_t;
119
120 typedef struct
121 {
122 uint user[16];
123 uint realm[16];
124 uint salt[32];
125 uint timestamp[16];
126 uint checksum[4];
127
128 } krb5pa_t;
129
130 typedef struct
131 {
132 uint account_info[512];
133 uint checksum[4];
134 uint edata2[2560];
135 uint edata2_len;
136
137 } krb5tgs_t;
138
139 typedef struct
140 {
141 uint salt_buf[16];
142 uint data_buf[112];
143 uint keyfile_buf[16];
144
145 } tc_t;
146
147 typedef struct
148 {
149 uint salt_buf[16];
150
151 } pbkdf2_md5_t;
152
153 typedef struct
154 {
155 uint salt_buf[16];
156
157 } pbkdf2_sha1_t;
158
159 typedef struct
160 {
161 uint salt_buf[16];
162
163 } pbkdf2_sha256_t;
164
165 typedef struct
166 {
167 uint salt_buf[32];
168
169 } pbkdf2_sha512_t;
170
171 typedef struct
172 {
173 u8 cipher[1040];
174
175 } agilekey_t;
176
177 typedef struct
178 {
179 uint salt_buf[128];
180 uint salt_len;
181
182 } rakp_t;
183
184 typedef struct
185 {
186 uint data_len;
187 uint data_buf[512];
188
189 } cloudkey_t;
190
191 typedef struct
192 {
193 uint encryptedVerifier[4];
194 uint encryptedVerifierHash[5];
195
196 uint keySize;
197
198 } office2007_t;
199
200 typedef struct
201 {
202 uint encryptedVerifier[4];
203 uint encryptedVerifierHash[8];
204
205 } office2010_t;
206
207 typedef struct
208 {
209 uint encryptedVerifier[4];
210 uint encryptedVerifierHash[8];
211
212 } office2013_t;
213
214 typedef struct
215 {
216 uint version;
217 uint encryptedVerifier[4];
218 uint encryptedVerifierHash[4];
219 uint rc4key[2];
220
221 } oldoffice01_t;
222
223 typedef struct
224 {
225 uint version;
226 uint encryptedVerifier[4];
227 uint encryptedVerifierHash[5];
228 uint rc4key[2];
229
230 } oldoffice34_t;
231
232 typedef struct
233 {
234 uint P[256];
235
236 } scrypt_tmp_t;
237
238 typedef struct
239 {
240 uint digest[4];
241 uint out[4];
242
243 } pdf14_tmp_t;
244
245 typedef struct
246 {
247 union
248 {
249 uint dgst32[16];
250 u64 dgst64[8];
251 } d;
252
253 uint dgst_len;
254 uint W_len;
255
256 } pdf17l8_tmp_t;
257
258 typedef struct
259 {
260 uint digest_buf[4];
261
262 } phpass_tmp_t;
263
264 typedef struct
265 {
266 uint digest_buf[4];
267
268 } md5crypt_tmp_t;
269
270 typedef struct
271 {
272 u64 l_alt_result[8];
273
274 u64 l_p_bytes[2];
275 u64 l_s_bytes[2];
276
277 } sha512crypt_tmp_t;
278
279 typedef struct
280 {
281 uint alt_result[8];
282
283 uint p_bytes[4];
284 uint s_bytes[4];
285
286 } sha256crypt_tmp_t;
287
288 typedef struct
289 {
290 uint ipad[5];
291 uint opad[5];
292
293 uint dgst[10];
294 uint out[10];
295
296 } wpa_tmp_t;
297
298 typedef struct
299 {
300 u64 dgst[8];
301
302 } bitcoin_wallet_tmp_t;
303
304 typedef struct
305 {
306 uint ipad[5];
307 uint opad[5];
308
309 uint dgst[5];
310 uint out[4];
311
312 } dcc2_tmp_t;
313
314 typedef struct
315 {
316 uint E[18];
317
318 uint P[18];
319
320 uint S0[256];
321 uint S1[256];
322 uint S2[256];
323 uint S3[256];
324
325 } bcrypt_tmp_t;
326
327 typedef struct
328 {
329 uint digest[2];
330
331 uint P[18];
332
333 uint S0[256];
334 uint S1[256];
335 uint S2[256];
336 uint S3[256];
337
338 } pwsafe2_tmp_t;
339
340 typedef struct
341 {
342 uint digest_buf[8];
343
344 } pwsafe3_tmp_t;
345
346 typedef struct
347 {
348 uint digest_buf[5];
349
350 } androidpin_tmp_t;
351
352 typedef struct
353 {
354 uint ipad[5];
355 uint opad[5];
356
357 uint dgst[10];
358 uint out[10];
359
360 } androidfde_tmp_t;
361
362 typedef struct
363 {
364 uint ipad[16];
365 uint opad[16];
366
367 uint dgst[64];
368 uint out[64];
369
370 } tc_tmp_t;
371
372 typedef struct
373 {
374 u64 ipad[8];
375 u64 opad[8];
376
377 u64 dgst[32];
378 u64 out[32];
379
380 } tc64_tmp_t;
381
382 typedef struct
383 {
384 uint ipad[5];
385 uint opad[5];
386
387 uint dgst[5];
388 uint out[5];
389
390 } agilekey_tmp_t;
391
392 typedef struct
393 {
394 uint ipad[5];
395 uint opad[5];
396
397 uint dgst1[5];
398 uint out1[5];
399
400 uint dgst2[5];
401 uint out2[5];
402
403 } mywallet_tmp_t;
404
405 typedef struct
406 {
407 uint ipad[5];
408 uint opad[5];
409
410 uint dgst[5];
411 uint out[5];
412
413 } sha1aix_tmp_t;
414
415 typedef struct
416 {
417 uint ipad[8];
418 uint opad[8];
419
420 uint dgst[8];
421 uint out[8];
422
423 } sha256aix_tmp_t;
424
425 typedef struct
426 {
427 u64 ipad[8];
428 u64 opad[8];
429
430 u64 dgst[8];
431 u64 out[8];
432
433 } sha512aix_tmp_t;
434
435 typedef struct
436 {
437 uint ipad[8];
438 uint opad[8];
439
440 uint dgst[8];
441 uint out[8];
442
443 } lastpass_tmp_t;
444
445 typedef struct
446 {
447 u64 digest_buf[8];
448
449 } drupal7_tmp_t;
450
451 typedef struct
452 {
453 uint ipad[5];
454 uint opad[5];
455
456 uint dgst[5];
457 uint out[5];
458
459 } lotus8_tmp_t;
460
461 typedef struct
462 {
463 uint out[5];
464
465 } office2007_tmp_t;
466
467 typedef struct
468 {
469 uint out[5];
470
471 } office2010_tmp_t;
472
473 typedef struct
474 {
475 u64 out[8];
476
477 } office2013_tmp_t;
478
479 typedef struct
480 {
481 uint digest_buf[5];
482
483 } saph_sha1_tmp_t;
484
485 typedef struct
486 {
487 u32 ipad[4];
488 u32 opad[4];
489
490 u32 dgst[32];
491 u32 out[32];
492
493 } pbkdf2_md5_tmp_t;
494
495 typedef struct
496 {
497 u32 ipad[5];
498 u32 opad[5];
499
500 u32 dgst[32];
501 u32 out[32];
502
503 } pbkdf2_sha1_tmp_t;
504
505 typedef struct
506 {
507 u32 ipad[8];
508 u32 opad[8];
509
510 u32 dgst[32];
511 u32 out[32];
512
513 } pbkdf2_sha256_tmp_t;
514
515 typedef struct
516 {
517 u64 ipad[8];
518 u64 opad[8];
519
520 u64 dgst[16];
521 u64 out[16];
522
523 } pbkdf2_sha512_tmp_t;
524
525 typedef struct
526 {
527 u64 out[8];
528
529 } ecryptfs_tmp_t;
530
531 typedef struct
532 {
533 u64 ipad[8];
534 u64 opad[8];
535
536 u64 dgst[16];
537 u64 out[16];
538
539 } oraclet_tmp_t;
540
541 typedef struct
542 {
543 uint block[16];
544
545 uint dgst[8];
546
547 uint block_len;
548 uint final_len;
549
550 } seven_zip_tmp_t;
551
552 typedef struct
553 {
554 uint Kc[16];
555 uint Kd[16];
556
557 uint iv[2];
558
559 } bsdicrypt_tmp_t;
560
561 typedef struct
562 {
563 uint dgst[17][5];
564
565 } rar3_tmp_t;
566
567 typedef struct
568 {
569 uint user[16];
570
571 } cram_md5_t;
572
573 typedef struct
574 {
575 uint iv_buf[4];
576 uint iv_len;
577
578 uint salt_buf[4];
579 uint salt_len;
580
581 uint crc;
582
583 uint data_buf[96];
584 uint data_len;
585
586 uint unpack_size;
587
588 } seven_zip_t;
589
590 typedef struct
591 {
592 u32 random[2];
593 u32 hash[5];
594 u32 salt[5]; // unused, but makes better valid check
595 u32 iv[2]; // unused, but makes better valid check
596
597 } psafe2_hdr;
598
599 typedef struct
600 {
601 char *user_name;
602 uint user_len;
603
604 } user_t;
605
606 typedef struct
607 {
608 user_t *user;
609 char *orighash;
610
611 } hashinfo_t;
612
613 typedef struct
614 {
615 void *digest;
616 salt_t *salt;
617 void *esalt;
618 int cracked;
619 hashinfo_t *hash_info;
620
621 } hash_t;
622
623 typedef struct
624 {
625 uint key;
626 u64 val;
627
628 } hcstat_table_t;
629
630 typedef struct
631 {
632 uint cs_buf[0x100];
633 uint cs_len;
634
635 } cs_t;
636
637 typedef struct
638 {
639 char essid[36];
640
641 u8 mac1[6];
642 u8 mac2[6];
643 u8 nonce1[32];
644 u8 nonce2[32];
645
646 u8 eapol[256];
647 int eapol_size;
648
649 int keyver;
650 u8 keymic[16];
651
652 } hccap_t;
653
654 typedef struct
655 {
656 char signature[4];
657 u32 salt_buf[8];
658 u32 iterations;
659 u32 hash_buf[8];
660
661 } psafe3_t;
662
663 typedef struct
664 {
665 char plain_buf[256];
666 int plain_len;
667
668 hash_t hash;
669
670 } pot_t;
671
672 typedef struct
673 {
674 u64 cnt;
675
676 #ifdef _POSIX
677 struct stat stat;
678 #endif
679
680 #ifdef _WIN
681 struct __stat64 stat;
682 #endif
683
684 } dictstat_t;
685
686 typedef struct
687 {
688 uint len;
689
690 char buf[0x100];
691
692 } cpu_rule_t;
693
694 typedef struct
695 {
696 uint cmds[0x100];
697
698 } kernel_rule_t;
699
700 typedef struct
701 {
702 u32 i[16];
703
704 u32 pw_len;
705
706 u32 alignment_placeholder_1;
707 u32 alignment_placeholder_2;
708 u32 alignment_placeholder_3;
709
710 } pw_t;
711
712 typedef struct
713 {
714 uint i;
715
716 } bf_t;
717
718 typedef struct
719 {
720 uint b[32];
721
722 } bs_word_t;
723
724 typedef struct
725 {
726 uint i[8];
727
728 uint pw_len;
729
730 } comb_t;
731
732 typedef struct
733 {
734 u32 version_bin;
735 char cwd[1024];
736 u32 pid;
737
738 u32 dictpos;
739 u32 maskpos;
740
741 u64 words_cur;
742
743 u32 argc;
744 char **argv;
745
746 } restore_data_t;
747
748 typedef struct
749 {
750 char *file_name;
751 long seek;
752 time_t ctime;
753
754 } outfile_data_t;
755
756 typedef struct
757 {
758 char *buf;
759 u32 incr;
760 u32 avail;
761 u32 cnt;
762 u32 pos;
763
764 } wl_data_t;
765
766 typedef struct
767 {
768 uint bitmap_shift;
769 uint collisions;
770
771 } bitmap_result_t;
772
773 #define CPT_BUF 0x20000
774
775 typedef struct
776 {
777 uint cracked;
778 time_t timestamp;
779
780 } cpt_t;
781
782 /*
783 typedef struct
784 {
785 uint plain_buf[16];
786 uint plain_len;
787
788 } plain_t;
789 */
790
791 typedef struct
792 {
793 uint gidvid;
794 uint il_pos;
795
796 } plain_t;
797
798 typedef struct
799 {
800 uint word_buf[16];
801
802 } wordl_t;
803
804 typedef struct
805 {
806 uint word_buf[1];
807
808 } wordr_t;
809
810 typedef struct
811 {
812 char *device_name;
813 char *alias_name;
814
815 } tuning_db_alias_t;
816
817 typedef struct
818 {
819 char *device_name;
820 int attack_mode;
821 int hash_type;
822 int workload_profile;
823 int vector_width;
824 int kernel_accel;
825 int kernel_loops;
826
827 } tuning_db_entry_t;
828
829 typedef struct
830 {
831 tuning_db_alias_t *alias_buf;
832 int alias_cnt;
833
834 tuning_db_entry_t *entry_buf;
835 int entry_cnt;
836
837 } tuning_db_t;
838
839 #define RULES_MAX 256
840 #define PW_MIN 0
841 #define PW_MAX 54
842 #define PW_MAX1 (PW_MAX + 1)
843 #define PW_DICTMAX 31
844 #define PW_DICTMAX1 (PW_DICTMAX + 1)
845 #define PARAMCNT 32
846
847 struct __hc_device_param
848 {
849 cl_device_id device;
850 cl_device_type device_type;
851
852 uint device_id;
853 uint platform_devices_id; // for mapping with hms devices
854
855 bool skipped;
856
857 uint sm_major;
858 uint sm_minor;
859 uint kernel_exec_timeout;
860
861 uint device_processors;
862 uint device_processor_cores;
863 u64 device_maxmem_alloc;
864 u64 device_global_mem;
865 u32 device_maxclock_frequency;
866
867 uint vector_width;
868
869 uint kernel_threads;
870 uint kernel_loops;
871 uint kernel_accel;
872 uint kernel_loops_min;
873 uint kernel_loops_max;
874 uint kernel_accel_min;
875 uint kernel_accel_max;
876 uint kernel_power;
877 uint kernel_power_user;
878
879 uint size_pws;
880 uint size_tmps;
881 uint size_hooks;
882 uint size_bfs;
883 uint size_combs;
884 uint size_rules;
885 uint size_rules_c;
886 uint size_root_css;
887 uint size_markov_css;
888 uint size_digests;
889 uint size_salts;
890 uint size_shown;
891 uint size_results;
892 uint size_plains;
893
894 FILE *combs_fp;
895 comb_t *combs_buf;
896
897 void *hooks_buf;
898
899 pw_t *pws_buf;
900 uint pws_cnt;
901
902 u64 words_off;
903 u64 words_done;
904
905 uint *result;
906
907 uint outerloop_pos;
908 uint outerloop_left;
909
910 uint innerloop_pos;
911 uint innerloop_left;
912
913 uint exec_pos;
914 double exec_ms[EXEC_CACHE];
915
916 uint speed_pos;
917 u64 speed_cnt[SPEED_CACHE];
918 float speed_ms[SPEED_CACHE];
919
920 hc_timer_t speed_rec[SPEED_CACHE];
921
922 hc_timer_t timer_speed;
923
924 // device specific attributes starting
925
926 char *device_name;
927 char *device_name_chksum;
928 char *device_version;
929 char *driver_version;
930
931 bool opencl_v12;
932
933 cl_uint vendor_id;
934
935 cl_kernel kernel1;
936 cl_kernel kernel12;
937 cl_kernel kernel2;
938 cl_kernel kernel23;
939 cl_kernel kernel3;
940 cl_kernel kernel_mp;
941 cl_kernel kernel_mp_l;
942 cl_kernel kernel_mp_r;
943 cl_kernel kernel_amp;
944 cl_kernel kernel_tb;
945 cl_kernel kernel_tm;
946 cl_kernel kernel_weak;
947
948 cl_context context;
949
950 cl_program program;
951 cl_program program_mp;
952 cl_program program_amp;
953 cl_program program_weak;
954
955 cl_command_queue command_queue;
956
957 cl_mem d_pws_buf;
958 cl_mem d_pws_amp_buf;
959 cl_mem d_words_buf_l;
960 cl_mem d_words_buf_r;
961 cl_mem d_rules;
962 cl_mem d_rules_c;
963 cl_mem d_combs;
964 cl_mem d_combs_c;
965 cl_mem d_bfs;
966 cl_mem d_bfs_c;
967 cl_mem d_tm_c;
968 cl_mem d_bitmap_s1_a;
969 cl_mem d_bitmap_s1_b;
970 cl_mem d_bitmap_s1_c;
971 cl_mem d_bitmap_s1_d;
972 cl_mem d_bitmap_s2_a;
973 cl_mem d_bitmap_s2_b;
974 cl_mem d_bitmap_s2_c;
975 cl_mem d_bitmap_s2_d;
976 cl_mem d_plain_bufs;
977 cl_mem d_digests_buf;
978 cl_mem d_digests_shown;
979 cl_mem d_salt_bufs;
980 cl_mem d_esalt_bufs;
981 cl_mem d_bcrypt_bufs;
982 cl_mem d_tmps;
983 cl_mem d_hooks;
984 cl_mem d_result;
985 cl_mem d_scryptV_buf;
986 cl_mem d_root_css_buf;
987 cl_mem d_markov_css_buf;
988
989 void *kernel_params[PARAMCNT];
990 void *kernel_params_mp[PARAMCNT];
991 void *kernel_params_mp_r[PARAMCNT];
992 void *kernel_params_mp_l[PARAMCNT];
993 void *kernel_params_amp[PARAMCNT];
994 void *kernel_params_tb[PARAMCNT];
995 void *kernel_params_tm[PARAMCNT];
996
997 u32 kernel_params_buf32[PARAMCNT];
998
999 u32 kernel_params_mp_buf32[PARAMCNT];
1000 u64 kernel_params_mp_buf64[PARAMCNT];
1001
1002 u32 kernel_params_mp_r_buf32[PARAMCNT];
1003 u64 kernel_params_mp_r_buf64[PARAMCNT];
1004
1005 u32 kernel_params_mp_l_buf32[PARAMCNT];
1006 u64 kernel_params_mp_l_buf64[PARAMCNT];
1007
1008 u32 kernel_params_amp_buf32[PARAMCNT];
1009 };
1010
1011 typedef struct __hc_device_param hc_device_param_t;
1012
1013 #ifdef HAVE_HWMON
1014 typedef struct
1015 {
1016 union
1017 {
1018 #ifdef HAVE_ADL
1019 HM_ADAPTER_AMD amd;
1020 #endif
1021
1022 #if defined(HAVE_NVML) || defined(HAVE_NVAPI)
1023 HM_ADAPTER_NV nv;
1024 #endif
1025
1026 } adapter_index;
1027
1028 int od_version;
1029 int fan_supported;
1030
1031 // int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1032 // int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
1033
1034 } hm_attrs_t;
1035 #endif // HAVE_HWMON
1036
1037 typedef struct
1038 {
1039 /**
1040 * threads
1041 */
1042
1043 uint devices_status;
1044 uint devices_cnt;
1045 uint devices_active;
1046
1047 hc_device_param_t *devices_param;
1048
1049 /**
1050 * workload specific
1051 */
1052
1053 uint kernel_power_all;
1054 float kernel_power_div;
1055
1056 /**
1057 * attack specific
1058 */
1059
1060 uint wordlist_mode;
1061 uint hashlist_mode;
1062 uint hashlist_format;
1063
1064 uint attack_mode;
1065 uint attack_kern;
1066 uint attack_exec;
1067
1068 uint kernel_rules_cnt;
1069
1070 kernel_rule_t *kernel_rules_buf;
1071
1072 uint combs_mode;
1073 uint combs_cnt;
1074
1075 uint bfs_cnt;
1076
1077 uint css_cnt;
1078 cs_t *css_buf;
1079
1080 cs_t *root_css_buf;
1081 cs_t *markov_css_buf;
1082
1083 char *rule_buf_l;
1084 char *rule_buf_r;
1085 int rule_len_l;
1086 int rule_len_r;
1087
1088 /**
1089 * opencl library stuff
1090 */
1091
1092 void *ocl;
1093
1094 /**
1095 * hardware watchdog
1096 */
1097
1098 #ifdef HAVE_HWMON
1099 void *hm_nv;
1100 void *hm_amd;
1101 hm_attrs_t hm_device[DEVICES_MAX];
1102 #endif
1103
1104 /**
1105 * hashes
1106 */
1107
1108 uint digests_cnt;
1109 uint digests_done;
1110 uint digests_saved;
1111
1112 void *digests_buf;
1113 uint *digests_shown;
1114 uint *digests_shown_tmp;
1115
1116 uint salts_cnt;
1117 uint salts_done;
1118
1119 salt_t *salts_buf;
1120 uint *salts_shown;
1121
1122 void *esalts_buf;
1123
1124 /**
1125 * logging
1126 */
1127
1128 uint logfile_disable;
1129 char *logfile;
1130 char *topid;
1131 char *subid;
1132
1133 /**
1134 * crack-per-time
1135 */
1136
1137 cpt_t cpt_buf[CPT_BUF];
1138 int cpt_pos;
1139 time_t cpt_start;
1140 u64 cpt_total;
1141
1142 /**
1143 * user
1144 */
1145
1146 char *dictfile;
1147 char *dictfile2;
1148 char *mask;
1149 uint maskcnt;
1150 uint maskpos;
1151 char *session;
1152 char separator;
1153 char *hashfile;
1154 char *homedir;
1155 char *install_dir;
1156 char *profile_dir;
1157 char *session_dir;
1158 char *shared_dir;
1159 char *outfile;
1160 uint outfile_format;
1161 uint outfile_autohex;
1162 uint outfile_check_timer;
1163 char *eff_restore_file;
1164 char *new_restore_file;
1165 char *induction_directory;
1166 char *outfile_check_directory;
1167 uint loopback;
1168 char *loopback_file;
1169 uint restore;
1170 uint restore_timer;
1171 uint restore_disable;
1172 uint status;
1173 uint status_timer;
1174 uint status_automat;
1175 uint quiet;
1176 uint force;
1177 uint benchmark;
1178 uint benchmark_repeats;
1179 uint runtime;
1180 uint remove;
1181 uint remove_timer;
1182 uint debug_mode;
1183 char *debug_file;
1184 uint hex_charset;
1185 uint hex_salt;
1186 uint hex_wordlist;
1187 uint pw_min;
1188 uint pw_max;
1189 uint powertune_enable;
1190 uint scrypt_tmto;
1191 uint segment_size;
1192 char *truecrypt_keyfiles;
1193 uint workload_profile;
1194
1195 uint hash_mode;
1196 uint hash_type;
1197 uint kern_type;
1198 uint opts_type;
1199 uint salt_type;
1200 uint esalt_size;
1201 uint isSalted;
1202 uint dgst_size;
1203 uint opti_type;
1204 uint dgst_pos0;
1205 uint dgst_pos1;
1206 uint dgst_pos2;
1207 uint dgst_pos3;
1208
1209 #ifdef HAVE_HWMON
1210 uint gpu_temp_disable;
1211 uint gpu_temp_abort;
1212 uint gpu_temp_retain;
1213 #endif
1214
1215 char **rp_files;
1216 uint rp_files_cnt;
1217 uint rp_gen;
1218 uint rp_gen_seed;
1219
1220 FILE *pot_fp;
1221
1222 /**
1223 * used for restore
1224 */
1225
1226 u64 skip;
1227 u64 limit;
1228
1229 restore_data_t *rd;
1230
1231 u64 checkpoint_cur_words; // used for the "stop at next checkpoint" feature
1232
1233 /**
1234 * status, timer
1235 */
1236
1237 time_t runtime_start;
1238 time_t runtime_stop;
1239
1240 time_t proc_start;
1241 time_t proc_stop;
1242
1243 u64 words_cnt;
1244 u64 words_cur;
1245 u64 words_base;
1246
1247 u64 *words_progress_done; // progress number of words done per salt
1248 u64 *words_progress_rejected; // progress number of words rejected per salt
1249 u64 *words_progress_restored; // progress number of words restored per salt
1250
1251 hc_timer_t timer_running; // timer on current dict
1252 hc_timer_t timer_paused; // timer on current dict
1253
1254 float ms_paused; // timer on current dict
1255
1256 /**
1257 * hash_info and username
1258 */
1259
1260 hashinfo_t **hash_info;
1261 uint username;
1262
1263 int (*sort_by_digest) (const void *, const void *);
1264
1265 int (*parse_func) (char *, uint, hash_t *);
1266
1267 } hc_global_data_t;
1268
1269 extern hc_global_data_t data;
1270
1271 #endif