We need an esalt to hold the unused IV otherwise the unique salt count becomes incorr...
[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 uint8_t 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 };
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 uint64_t l_alt_result[8];
264
265 uint64_t l_p_bytes[2];
266 uint64_t 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 uint64_t 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 uint64_t ipad[8];
366 uint64_t opad[8];
367
368 uint64_t dgst[32];
369 uint64_t 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 uint64_t ipad[8];
419 uint64_t opad[8];
420
421 uint64_t dgst[8];
422 uint64_t 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 uint64_t 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 uint64_t 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 uint32_t ipad[4];
479 uint32_t opad[4];
480
481 uint32_t dgst[32];
482 uint32_t out[32];
483
484 } pbkdf2_md5_tmp_t;
485
486 typedef struct
487 {
488 uint32_t ipad[5];
489 uint32_t opad[5];
490
491 uint32_t dgst[32];
492 uint32_t out[32];
493
494 } pbkdf2_sha1_tmp_t;
495
496 typedef struct
497 {
498 uint32_t ipad[8];
499 uint32_t opad[8];
500
501 uint32_t dgst[32];
502 uint32_t out[32];
503
504 } pbkdf2_sha256_tmp_t;
505
506 typedef struct
507 {
508 uint64_t ipad[8];
509 uint64_t opad[8];
510
511 uint64_t dgst[16];
512 uint64_t out[16];
513
514 } pbkdf2_sha512_tmp_t;
515
516 typedef struct
517 {
518 uint64_t out[8];
519
520 } ecryptfs_tmp_t;
521
522 typedef struct
523 {
524 uint64_t ipad[8];
525 uint64_t opad[8];
526
527 uint64_t dgst[16];
528 uint64_t 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 char *user_name;
584 uint user_len;
585
586 } user_t;
587
588 typedef struct
589 {
590 user_t *user;
591 char *orighash;
592
593 } hashinfo_t;
594
595 typedef struct
596 {
597 void *digest;
598 salt_t *salt;
599 void *esalt;
600 int cracked;
601 hashinfo_t *hash_info;
602
603 } hash_t;
604
605 typedef struct
606 {
607 uint key;
608 uint64_t val;
609
610 } hcstat_table_t;
611
612 typedef struct
613 {
614 uint cs_buf[0x100];
615 uint cs_len;
616
617 } cs_t;
618
619 typedef struct
620 {
621 char essid[36];
622
623 unsigned char mac1[6];
624 unsigned char mac2[6];
625 unsigned char nonce1[32];
626 unsigned char nonce2[32];
627
628 unsigned char eapol[256];
629 int eapol_size;
630
631 int keyver;
632 unsigned char keymic[16];
633
634 } hccap_t;
635
636 typedef struct
637 {
638 char signature[4];
639 uint32_t salt_buf[8];
640 uint32_t iterations;
641 uint32_t hash_buf[8];
642
643 } psafe3_t;
644
645 typedef struct
646 {
647 char plain_buf[256];
648 int plain_len;
649
650 hash_t hash;
651
652 } pot_t;
653
654 typedef struct
655 {
656 uint64_t cnt;
657
658 #ifdef _POSIX
659 struct stat stat;
660 #endif
661
662 #ifdef _WIN
663 struct __stat64 stat;
664 #endif
665
666 } dictstat_t;
667
668 typedef struct
669 {
670 uint len;
671
672 char buf[0x100];
673
674 } cpu_rule_t;
675
676 typedef struct
677 {
678 uint cmds[0x100];
679
680 } kernel_rule_t;
681
682 typedef struct
683 {
684 union
685 {
686 uint8_t hc4[4][ 64];
687 uint32_t hi4[4][ 16];
688 uint64_t hl4[4][ 8];
689
690 uint8_t hc2[2][128];
691 uint32_t hi2[2][ 32];
692 uint64_t hl2[2][ 16];
693
694 uint8_t hc1[1][256];
695 uint32_t hi1[1][ 64];
696 uint64_t hl1[1][ 32];
697 };
698
699 uint pw_len;
700 uint alignment_placeholder_1;
701 uint alignment_placeholder_2;
702 uint alignment_placeholder_3;
703
704 } pw_t;
705
706 typedef struct
707 {
708 uint i;
709
710 } bf_t;
711
712 typedef struct
713 {
714 uint b[32];
715
716 } bs_word_t;
717
718 typedef struct
719 {
720 uint i[8];
721
722 uint pw_len;
723
724 } comb_t;
725
726 typedef struct
727 {
728 pw_t pw_buf;
729
730 uint cnt;
731
732 } pw_cache_t;
733
734 typedef struct
735 {
736 uint32_t version_bin;
737 char cwd[256];
738 uint32_t pid;
739
740 uint32_t dictpos;
741 uint32_t maskpos;
742
743 uint64_t words_cur;
744
745 uint32_t argc;
746 char **argv;
747
748 } restore_data_t;
749
750 typedef struct
751 {
752 char *file_name;
753 long seek;
754 time_t ctime;
755
756 } outfile_data_t;
757
758 typedef struct
759 {
760 char *buf;
761 uint32_t incr;
762 uint32_t avail;
763 uint32_t cnt;
764 uint32_t pos;
765
766 } wl_data_t;
767
768 typedef struct
769 {
770 uint bitmap_shift;
771 uint collisions;
772
773 } bitmap_result_t;
774
775 #define CPT_BUF 0x20000
776
777 typedef struct
778 {
779 uint cracked;
780 time_t timestamp;
781
782 } cpt_t;
783
784 /*
785 typedef struct
786 {
787 uint plain_buf[16];
788 uint plain_len;
789
790 } plain_t;
791 */
792
793 typedef struct
794 {
795 uint gidvid;
796 uint il_pos;
797
798 } plain_t;
799
800 typedef struct
801 {
802 uint word_buf[16];
803
804 } wordl_t;
805
806 typedef struct
807 {
808 uint word_buf[1];
809
810 } wordr_t;
811
812 #define RULES_MAX 256
813 #define PW_MIN 0
814 #define PW_MAX 54
815 #define PW_MAX1 (PW_MAX + 1)
816 #define PW_DICTMAX 31
817 #define PW_DICTMAX1 (PW_DICTMAX + 1)
818
819 struct __hc_device_param
820 {
821 uint device_id;
822
823 uint sm_major;
824 uint sm_minor;
825 uint kernel_exec_timeout;
826
827 uint device_processors;
828 uint device_processor_cores;
829 uint64_t device_maxmem_alloc;
830
831 uint kernel_threads;
832 uint kernel_accel;
833 uint kernel_power; // these both are based on their _user counterpart
834 uint kernel_blocks; // but are modified by autotuner and used inside crack loops
835 uint kernel_power_user;
836 uint kernel_blocks_user;
837
838 uint size_pws;
839 uint size_tmps;
840 uint size_hooks;
841 uint size_root_css;
842 uint size_markov_css;
843 uint size_digests;
844 uint size_salts;
845 uint size_shown;
846 uint size_results;
847 uint size_plains;
848
849 uint (*pw_add) (struct __hc_device_param *, const uint8_t *, const uint);
850
851 void (*pw_transpose) (const pw_t *, pw_t *);
852
853 FILE *combs_fp;
854 comb_t *combs_buf;
855
856 void *hooks_buf;
857
858 pw_cache_t *pw_caches;
859
860 pw_t *pws_buf;
861 uint pws_cnt;
862 uint64_t pw_cnt;
863
864 uint64_t words_off;
865 uint64_t words_done;
866
867 uint *result;
868
869 uint outerloop_pos;
870 uint outerloop_left;
871
872 uint innerloop_pos;
873 uint innerloop_left;
874
875 uint speed_pos;
876 uint64_t speed_cnt[SPEED_CACHE];
877 float speed_ms[SPEED_CACHE];
878 hc_timer_t speed_rec[SPEED_CACHE];
879
880 hc_timer_t timer_speed;
881
882 // device specific attributes starting
883
884 char *device_name;
885 char *device_name_chksum;
886 char *device_version;
887 char *driver_version;
888
889 cl_device_id device;
890 cl_device_type device_type;
891
892 cl_kernel kernel1;
893 cl_kernel kernel12;
894 cl_kernel kernel2;
895 cl_kernel kernel23;
896 cl_kernel kernel3;
897 cl_kernel kernel_mp;
898 cl_kernel kernel_mp_l;
899 cl_kernel kernel_mp_r;
900 cl_kernel kernel_amp;
901 cl_kernel kernel_tb;
902 cl_kernel kernel_tm;
903
904 cl_context context;
905
906 cl_program program;
907 cl_program program_mp;
908 cl_program program_amp;
909
910 cl_command_queue command_queue;
911
912 cl_mem d_pws_buf;
913 cl_mem d_pws_amp_buf;
914 cl_mem d_words_buf_l;
915 cl_mem d_words_buf_r;
916 cl_mem d_rules;
917 cl_mem d_rules_c;
918 cl_mem d_combs;
919 cl_mem d_combs_c;
920 cl_mem d_bfs;
921 cl_mem d_bfs_c;
922 cl_mem d_tm_c;
923 cl_mem d_bitmap_s1_a;
924 cl_mem d_bitmap_s1_b;
925 cl_mem d_bitmap_s1_c;
926 cl_mem d_bitmap_s1_d;
927 cl_mem d_bitmap_s2_a;
928 cl_mem d_bitmap_s2_b;
929 cl_mem d_bitmap_s2_c;
930 cl_mem d_bitmap_s2_d;
931 cl_mem d_plain_bufs;
932 cl_mem d_digests_buf;
933 cl_mem d_digests_shown;
934 cl_mem d_salt_bufs;
935 cl_mem d_esalt_bufs;
936 cl_mem d_bcrypt_bufs;
937 cl_mem d_tmps;
938 cl_mem d_hooks;
939 cl_mem d_result;
940 cl_mem d_scryptV_buf;
941 cl_mem d_root_css_buf;
942 cl_mem d_markov_css_buf;
943
944 #define PARAMCNT 32
945
946 void *kernel_params[PARAMCNT];
947 void *kernel_params_mp[PARAMCNT];
948 void *kernel_params_mp_r[PARAMCNT];
949 void *kernel_params_mp_l[PARAMCNT];
950 void *kernel_params_amp[PARAMCNT];
951 void *kernel_params_tb[PARAMCNT];
952 void *kernel_params_tm[PARAMCNT];
953
954 uint32_t kernel_params_buf32[PARAMCNT];
955
956 uint32_t kernel_params_mp_buf32[PARAMCNT];
957 uint64_t kernel_params_mp_buf64[PARAMCNT];
958
959 uint32_t kernel_params_mp_r_buf32[PARAMCNT];
960 uint64_t kernel_params_mp_r_buf64[PARAMCNT];
961
962 uint32_t kernel_params_mp_l_buf32[PARAMCNT];
963 uint64_t kernel_params_mp_l_buf64[PARAMCNT];
964
965 uint32_t kernel_params_amp_buf32[PARAMCNT];
966
967 };
968
969 typedef struct __hc_device_param hc_device_param_t;
970
971 typedef struct
972 {
973 union {
974 HM_ADAPTER_AMD amd;
975 HM_ADAPTER_NV nv;
976 } adapter_index;
977
978 int od_version;
979
980 int fan_supported;
981
982 // int busid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
983 // int devid; // used for CL_DEVICE_TOPOLOGY_AMD but broken for dual GPUs
984
985 } hm_attrs_t;
986
987 typedef struct
988 {
989 /**
990 * threads
991 */
992
993 uint vendor_id;
994
995 uint devices_status;
996 uint devices_cnt;
997 hc_device_param_t *devices_param;
998
999 uint kernel_blocks_all;
1000
1001 /**
1002 * attack specific
1003 */
1004
1005 uint wordlist_mode;
1006 uint hashlist_mode;
1007 uint hashlist_format;
1008
1009 uint attack_mode;
1010 uint attack_kern;
1011 uint attack_exec;
1012
1013 uint kernel_rules_cnt;
1014 kernel_rule_t *kernel_rules_buf;
1015
1016 uint combs_mode;
1017 uint combs_cnt;
1018
1019 uint bfs_cnt;
1020
1021 uint css_cnt;
1022 cs_t *css_buf;
1023
1024 cs_t *root_css_buf;
1025 cs_t *markov_css_buf;
1026
1027 char *rule_buf_l;
1028 char *rule_buf_r;
1029 int rule_len_l;
1030 int rule_len_r;
1031
1032 /**
1033 * hardware watchdog
1034 */
1035
1036 HM_LIB hm_dll;
1037 hm_attrs_t hm_device[DEVICES_MAX];
1038
1039 /**
1040 * hashes
1041 */
1042
1043 uint digests_cnt;
1044 uint digests_done;
1045 uint digests_saved;
1046
1047 void *digests_buf;
1048 uint *digests_shown;
1049 uint *digests_shown_tmp;
1050
1051 uint salts_cnt;
1052 uint salts_done;
1053
1054 salt_t *salts_buf;
1055 uint *salts_shown;
1056
1057 void *esalts_buf;
1058
1059 /**
1060 * logging
1061 */
1062
1063 uint logfile_disable;
1064 char *logfile;
1065 char *topid;
1066 char *subid;
1067
1068 /**
1069 * crack-per-time
1070 */
1071
1072 cpt_t cpt_buf[CPT_BUF];
1073 int cpt_pos;
1074 time_t cpt_start;
1075 uint64_t cpt_total;
1076
1077 /**
1078 * user
1079 */
1080
1081 char *dictfile;
1082 char *dictfile2;
1083 char *mask;
1084 uint maskcnt;
1085 uint maskpos;
1086 char *session;
1087 char separator;
1088 char *hashfile;
1089 char *homedir;
1090 char *install_dir;
1091 char *profile_dir;
1092 char *session_dir;
1093 char *shared_dir;
1094 char *outfile;
1095 uint outfile_format;
1096 uint outfile_autohex;
1097 uint outfile_check_timer;
1098 char *eff_restore_file;
1099 char *new_restore_file;
1100 char *induction_directory;
1101 char *outfile_check_directory;
1102 uint loopback;
1103 char *loopback_file;
1104 uint restore;
1105 uint restore_timer;
1106 uint restore_disable;
1107 uint status;
1108 uint status_timer;
1109 uint status_automat;
1110 uint quiet;
1111 uint force;
1112 uint benchmark;
1113 uint runtime;
1114 uint remove;
1115 uint remove_timer;
1116 uint debug_mode;
1117 char *debug_file;
1118 uint hex_charset;
1119 uint hex_salt;
1120 uint hex_wordlist;
1121 uint pw_min;
1122 uint pw_max;
1123 float kernel_blocks_div;
1124 uint kernel_accel;
1125 uint kernel_loops;
1126 uint powertune_enable;
1127 uint scrypt_tmto;
1128 uint segment_size;
1129 char *truecrypt_keyfiles;
1130
1131 uint hash_mode;
1132 uint hash_type;
1133 uint kern_type;
1134 uint opts_type;
1135 uint salt_type;
1136 uint esalt_size;
1137 uint isSalted;
1138 uint dgst_size;
1139 uint opti_type;
1140 uint dgst_pos0;
1141 uint dgst_pos1;
1142 uint dgst_pos2;
1143 uint dgst_pos3;
1144
1145 uint gpu_temp_disable;
1146 uint gpu_temp_abort;
1147 uint gpu_temp_retain;
1148
1149 char **rp_files;
1150 uint rp_files_cnt;
1151 uint rp_gen;
1152 uint rp_gen_seed;
1153
1154 FILE *pot_fp;
1155
1156 /**
1157 * used for restore
1158 */
1159
1160 uint64_t skip;
1161 uint64_t limit;
1162
1163 restore_data_t *rd;
1164
1165 uint64_t checkpoint_cur_words; // used for the "stop at next checkpoint" feature
1166
1167 /**
1168 * status, timer
1169 */
1170
1171 time_t runtime_start;
1172 time_t runtime_stop;
1173
1174 time_t proc_start;
1175 time_t proc_stop;
1176
1177 uint64_t words_cnt;
1178 uint64_t words_cur;
1179 uint64_t words_base;
1180
1181 uint64_t *words_progress_done; // progress number of words done per salt
1182 uint64_t *words_progress_rejected; // progress number of words rejected per salt
1183 uint64_t *words_progress_restored; // progress number of words restored per salt
1184
1185 hc_timer_t timer_running; // timer on current dict
1186 hc_timer_t timer_paused; // timer on current dict
1187
1188 float ms_paused; // timer on current dict
1189
1190 /**
1191 * hash_info and username
1192 */
1193
1194 hashinfo_t **hash_info;
1195 uint username;
1196
1197 int (*sort_by_digest) (const void *, const void *);
1198
1199 int (*parse_func) (char *, uint, hash_t *);
1200
1201 } hc_global_data_t;
1202
1203 extern hc_global_data_t data;
1204
1205 #endif