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