this patch makes it much clearer where the sessions under ~/.hashcat are located
[hashcat.git] / include / shared.h
1 /**
2 * Author......: Jens Steube <jens.steube@gmail.com>
3 * License.....: MIT
4 */
5
6 #ifndef SHARED_H
7 #define SHARED_H
8
9 #include <common.h>
10 #include <constants.h>
11
12 /**
13 * thread management
14 */
15
16 #ifdef _WIN
17 #define hc_timer_get(a,r) { hc_timer_t hr_freq; QueryPerformanceFrequency (&hr_freq); hc_timer_t hr_tmp; hc_timer_set (&hr_tmp); (r) = (double) ((double) (hr_tmp.QuadPart - (a).QuadPart) / (double) (hr_freq.QuadPart / 1000)); }
18 #define hc_timer_set(a) { QueryPerformanceCounter ((a)); }
19 #elif _POSIX
20 #define hc_timer_get(a,r) { hc_timer_t hr_tmp; hc_timer_set (&hr_tmp); (r) = (double) (((hr_tmp.tv_sec - (a).tv_sec) * 1000) + ((double) (hr_tmp.tv_usec - (a).tv_usec) / 1000)); }
21 #define hc_timer_set(a) { gettimeofday ((a), NULL); }
22 #endif
23
24 #ifdef _WIN
25 #define hc_thread_create(t,f,a) t = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &f, a, 0, NULL)
26 #define hc_thread_wait(n,a) for (uint i = 0; i < n; i++) WaitForSingleObject ((a)[i], INFINITE)
27 #define hc_thread_exit(t) ExitThread (t)
28
29 #define hc_thread_mutex_lock(m) EnterCriticalSection (&m)
30 #define hc_thread_mutex_unlock(m) LeaveCriticalSection (&m)
31 #define hc_thread_mutex_init(m) InitializeCriticalSection (&m)
32 #define hc_thread_mutex_delete(m) DeleteCriticalSection (&m)
33
34 #elif _POSIX
35
36 #define hc_thread_create(t,f,a) pthread_create (&t, NULL, f, a)
37 #define hc_thread_wait(n,a) for (uint i = 0; i < n; i++) pthread_join ((a)[i], NULL)
38 #define hc_thread_exit(t) pthread_exit (&t)
39
40 #define hc_thread_mutex_lock(m) pthread_mutex_lock (&m)
41 #define hc_thread_mutex_unlock(m) pthread_mutex_unlock (&m)
42 #define hc_thread_mutex_init(m) pthread_mutex_init (&m, NULL)
43 #define hc_thread_mutex_delete(m) pthread_mutex_destroy (&m)
44
45 #endif
46
47 /**
48 * system stuff
49 */
50
51 #ifdef _WIN
52 #define hc_sleep(x) Sleep ((x) * 1000);
53 #elif _POSIX
54 #define hc_sleep(x) sleep ((x));
55 #endif
56
57 #include <ext_OpenCL.h>
58
59 /**
60 * temperature management
61 */
62
63 #ifdef LINUX
64 #include <ext_nvml.h>
65 #include <ext_ADL.h>
66 #endif
67
68 #ifdef WIN
69 #include <ext_nvapi.h>
70 #include <ext_ADL.h>
71 #endif
72
73 #ifdef OSX
74 #include <ext_smi.h>
75 #include <ext_dummy.h>
76 #endif
77
78 /**
79 * shared stuff
80 */
81
82 #define ETC_MAX (60 * 60 * 24 * 365 * 10)
83
84 #define DEVICES_MAX 128
85
86 #define CL_PLATFORMS_MAX 16
87
88 #define CL_VENDOR_NV "NVIDIA Corporation"
89 #define CL_VENDOR_AMD "Advanced Micro Devices, Inc."
90 #define CL_VENDOR_SDS "Shiloh Distributed Solutions"
91 #define CL_VENDOR_APPLE "Apple"
92
93 #define VENDOR_ID_AMD 4098
94 #define VENDOR_ID_NV 4318
95 #define VENDOR_ID_UNKNOWN 0
96
97 #define BLOCK_SIZE 64
98
99 #define CHARSIZ 0x100
100 #define INFOSZ CHARSIZ
101
102 #define SP_HCSTAT "hashcat.hcstat"
103 #define SP_PW_MIN 2
104 #define SP_PW_MAX 64
105 #define SP_ROOT_CNT (SP_PW_MAX * CHARSIZ)
106 #define SP_MARKOV_CNT (SP_PW_MAX * CHARSIZ * CHARSIZ)
107
108 #define INDUCT_DIR "induct"
109 #define OUTFILES_DIR "outfiles"
110
111 #define LOOPBACK_FILE "hashcat.loopback"
112
113 /**
114 * types
115 */
116
117 #ifdef _WIN
118 typedef LARGE_INTEGER hc_timer_t;
119 typedef HANDLE hc_thread_t;
120 typedef CRITICAL_SECTION hc_thread_mutex_t;
121 #elif _POSIX
122 typedef struct timeval hc_timer_t;
123 typedef pthread_t hc_thread_t;
124 typedef pthread_mutex_t hc_thread_mutex_t;
125 #endif
126
127 #include <types.h>
128 #include "rp_cpu.h"
129 #include "rp_gpu.h"
130
131 /**
132 * valid project specific global stuff
133 */
134
135 extern const char *PROGNAME;
136 extern const char *VERSION_TXT;
137
138 extern const uint VERSION_BIN;
139 extern const uint RESTORE_MIN;
140
141 extern const char *EULA_TXT[];
142 extern const char *USAGE_MINI[];
143 extern const char *USAGE_BIG[];
144
145 extern const char *PROMPT;
146
147 extern int SUPPRESS_OUTPUT;
148
149 extern hc_thread_mutex_t mux_adl;
150 extern hc_thread_mutex_t mux_counter;
151 extern hc_thread_mutex_t mux_dispatcher;
152 extern hc_thread_mutex_t mux_display;
153
154 /**
155 * password lengths supported
156 */
157
158 #define PW_LENGTH_MIN_0 0
159 #define PW_LENGTH_MAX_0 55
160 #define PW_LENGTH_MIN_400 0
161 #define PW_LENGTH_MAX_400 40
162 #define PW_LENGTH_MIN_500 0
163 #define PW_LENGTH_MAX_500 15
164 #define PW_LENGTH_MIN_1600 0
165 #define PW_LENGTH_MAX_1600 15
166 #define PW_LENGTH_MIN_1800 0
167 #define PW_LENGTH_MAX_1800 15
168 #define PW_LENGTH_MIN_2500 0
169 #define PW_LENGTH_MAX_2500 64
170 #define PW_LENGTH_MIN_6300 0
171 #define PW_LENGTH_MAX_6300 15
172 #define PW_LENGTH_MIN_7400 0
173 #define PW_LENGTH_MAX_7400 15
174
175 /**
176 * gpu accel / loops macro
177 */
178
179 #define GPU_ACCEL_NV_0 128
180 #define GPU_ACCEL_NV_10 128
181 #define GPU_ACCEL_NV_11 128
182 #define GPU_ACCEL_NV_12 128
183 #define GPU_ACCEL_NV_20 64
184 #define GPU_ACCEL_NV_21 64
185 #define GPU_ACCEL_NV_22 64
186 #define GPU_ACCEL_NV_23 64
187 #define GPU_ACCEL_NV_30 128
188 #define GPU_ACCEL_NV_40 64
189 #define GPU_ACCEL_NV_50 64
190 #define GPU_ACCEL_NV_60 64
191 #define GPU_ACCEL_NV_100 64
192 #define GPU_ACCEL_NV_101 64
193 #define GPU_ACCEL_NV_110 64
194 #define GPU_ACCEL_NV_111 64
195 #define GPU_ACCEL_NV_112 64
196 #define GPU_ACCEL_NV_120 64
197 #define GPU_ACCEL_NV_121 64
198 #define GPU_ACCEL_NV_122 64
199 #define GPU_ACCEL_NV_124 64
200 #define GPU_ACCEL_NV_130 64
201 #define GPU_ACCEL_NV_131 64
202 #define GPU_ACCEL_NV_132 64
203 #define GPU_ACCEL_NV_133 64
204 #define GPU_ACCEL_NV_140 64
205 #define GPU_ACCEL_NV_141 64
206 #define GPU_ACCEL_NV_150 64
207 #define GPU_ACCEL_NV_160 64
208 #define GPU_ACCEL_NV_190 64
209 #define GPU_ACCEL_NV_200 64
210 #define GPU_ACCEL_NV_300 64
211 #define GPU_ACCEL_NV_400 8
212 #define GPU_ACCEL_NV_500 8
213 #define GPU_ACCEL_NV_501 8
214 #define GPU_ACCEL_NV_900 128
215 #define GPU_ACCEL_NV_910 128
216 #define GPU_ACCEL_NV_1000 128
217 #define GPU_ACCEL_NV_1100 64
218 #define GPU_ACCEL_NV_1400 64
219 #define GPU_ACCEL_NV_1410 64
220 #define GPU_ACCEL_NV_1420 64
221 #define GPU_ACCEL_NV_1421 64
222 #define GPU_ACCEL_NV_1430 64
223 #define GPU_ACCEL_NV_1440 64
224 #define GPU_ACCEL_NV_1441 64
225 #define GPU_ACCEL_NV_1450 32
226 #define GPU_ACCEL_NV_1460 32
227 #define GPU_ACCEL_NV_1500 16
228 #define GPU_ACCEL_NV_1600 8
229 #define GPU_ACCEL_NV_1700 64
230 #define GPU_ACCEL_NV_1710 64
231 #define GPU_ACCEL_NV_1711 64
232 #define GPU_ACCEL_NV_1720 64
233 #define GPU_ACCEL_NV_1722 64
234 #define GPU_ACCEL_NV_1730 64
235 #define GPU_ACCEL_NV_1731 64
236 #define GPU_ACCEL_NV_1740 64
237 #define GPU_ACCEL_NV_1750 32
238 #define GPU_ACCEL_NV_1760 32
239 #define GPU_ACCEL_NV_1800 2
240 #define GPU_ACCEL_NV_2100 8
241 #define GPU_ACCEL_NV_2400 64
242 #define GPU_ACCEL_NV_2410 64
243 #define GPU_ACCEL_NV_2500 8
244 #define GPU_ACCEL_NV_2600 64
245 #define GPU_ACCEL_NV_2611 64
246 #define GPU_ACCEL_NV_2612 64
247 #define GPU_ACCEL_NV_2711 64
248 #define GPU_ACCEL_NV_2811 64
249 #define GPU_ACCEL_NV_3000 64
250 #define GPU_ACCEL_NV_3100 16
251 #define GPU_ACCEL_NV_3200 2
252 #define GPU_ACCEL_NV_3710 64
253 #define GPU_ACCEL_NV_3711 64
254 #define GPU_ACCEL_NV_3800 128
255 #define GPU_ACCEL_NV_4300 64
256 #define GPU_ACCEL_NV_4400 64
257 #define GPU_ACCEL_NV_4500 64
258 #define GPU_ACCEL_NV_4700 64
259 #define GPU_ACCEL_NV_4800 128
260 #define GPU_ACCEL_NV_4900 64
261 #define GPU_ACCEL_NV_5000 64
262 #define GPU_ACCEL_NV_5100 64
263 #define GPU_ACCEL_NV_5200 8
264 #define GPU_ACCEL_NV_5300 32
265 #define GPU_ACCEL_NV_5400 32
266 #define GPU_ACCEL_NV_5500 64
267 #define GPU_ACCEL_NV_5600 8
268 #define GPU_ACCEL_NV_5700 64
269 #define GPU_ACCEL_NV_5800 8
270 #define GPU_ACCEL_NV_6000 64
271 #define GPU_ACCEL_NV_6100 8
272 #define GPU_ACCEL_NV_6211 16
273 #define GPU_ACCEL_NV_6212 8
274 #define GPU_ACCEL_NV_6213 8
275 #define GPU_ACCEL_NV_6221 4
276 #define GPU_ACCEL_NV_6222 4
277 #define GPU_ACCEL_NV_6223 4
278 #define GPU_ACCEL_NV_6231 4
279 #define GPU_ACCEL_NV_6232 4
280 #define GPU_ACCEL_NV_6233 4
281 #define GPU_ACCEL_NV_6241 32
282 #define GPU_ACCEL_NV_6242 16
283 #define GPU_ACCEL_NV_6243 16
284 #define GPU_ACCEL_NV_6300 8
285 #define GPU_ACCEL_NV_6400 8
286 #define GPU_ACCEL_NV_6500 8
287 #define GPU_ACCEL_NV_6600 8
288 #define GPU_ACCEL_NV_6700 8
289 #define GPU_ACCEL_NV_6800 8
290 #define GPU_ACCEL_NV_6900 16
291 #define GPU_ACCEL_NV_7100 2
292 #define GPU_ACCEL_NV_7200 2
293 #define GPU_ACCEL_NV_7300 64
294 #define GPU_ACCEL_NV_7400 2
295 #define GPU_ACCEL_NV_7500 8
296 #define GPU_ACCEL_NV_7600 64
297 #define GPU_ACCEL_NV_7700 16
298 #define GPU_ACCEL_NV_7800 8
299 #define GPU_ACCEL_NV_7900 2
300 #define GPU_ACCEL_NV_8000 8
301 #define GPU_ACCEL_NV_8100 64
302 #define GPU_ACCEL_NV_8200 2
303 #define GPU_ACCEL_NV_8300 64
304 #define GPU_ACCEL_NV_8400 64
305 #define GPU_ACCEL_NV_8500 64
306 #define GPU_ACCEL_NV_8600 8
307 #define GPU_ACCEL_NV_8700 8
308 #define GPU_ACCEL_NV_8800 8
309 #define GPU_ACCEL_NV_8900 16
310 #define GPU_ACCEL_NV_9000 2
311 #define GPU_ACCEL_NV_9100 8
312 #define GPU_ACCEL_NV_9200 2
313 #define GPU_ACCEL_NV_9300 2
314 #define GPU_ACCEL_NV_9400 8
315 #define GPU_ACCEL_NV_9500 8
316 #define GPU_ACCEL_NV_9600 2
317 #define GPU_ACCEL_NV_9700 8
318 #define GPU_ACCEL_NV_9710 8
319 #define GPU_ACCEL_NV_9720 8
320 #define GPU_ACCEL_NV_9800 8
321 #define GPU_ACCEL_NV_9810 8
322 #define GPU_ACCEL_NV_9820 8
323 #define GPU_ACCEL_NV_9900 64
324 #define GPU_ACCEL_NV_10000 2
325 #define GPU_ACCEL_NV_10100 128
326 #define GPU_ACCEL_NV_10200 64
327 #define GPU_ACCEL_NV_10300 8
328 #define GPU_ACCEL_NV_10400 8
329 #define GPU_ACCEL_NV_10410 8
330 #define GPU_ACCEL_NV_10420 8
331 #define GPU_ACCEL_NV_10500 64
332 #define GPU_ACCEL_NV_10600 64
333 #define GPU_ACCEL_NV_10700 1
334 #define GPU_ACCEL_NV_10800 64
335 #define GPU_ACCEL_NV_10900 2
336 #define GPU_ACCEL_NV_11000 64
337 #define GPU_ACCEL_NV_11100 64
338 #define GPU_ACCEL_NV_11200 64
339 #define GPU_ACCEL_NV_11300 2
340 #define GPU_ACCEL_NV_11400 8
341 #define GPU_ACCEL_NV_11500 128
342 #define GPU_ACCEL_NV_11600 2
343 #define GPU_ACCEL_NV_11700 4
344 #define GPU_ACCEL_NV_11800 4
345 #define GPU_ACCEL_NV_11900 2
346 #define GPU_ACCEL_NV_12000 2
347 #define GPU_ACCEL_NV_12100 2
348 #define GPU_ACCEL_NV_12200 2
349 #define GPU_ACCEL_NV_12300 2
350 #define GPU_ACCEL_NV_12400 64
351 #define GPU_ACCEL_NV_12500 8
352 #define GPU_ACCEL_NV_12600 32
353 #define GPU_ACCEL_NV_12700 64
354 #define GPU_ACCEL_NV_12800 64
355
356 #define GPU_ACCEL_AMD_0 128
357 #define GPU_ACCEL_AMD_10 128
358 #define GPU_ACCEL_AMD_11 128
359 #define GPU_ACCEL_AMD_12 128
360 #define GPU_ACCEL_AMD_20 64
361 #define GPU_ACCEL_AMD_21 64
362 #define GPU_ACCEL_AMD_22 64
363 #define GPU_ACCEL_AMD_23 64
364 #define GPU_ACCEL_AMD_30 128
365 #define GPU_ACCEL_AMD_40 64
366 #define GPU_ACCEL_AMD_50 64
367 #define GPU_ACCEL_AMD_60 64
368 #define GPU_ACCEL_AMD_100 64
369 #define GPU_ACCEL_AMD_101 64
370 #define GPU_ACCEL_AMD_110 64
371 #define GPU_ACCEL_AMD_111 64
372 #define GPU_ACCEL_AMD_112 64
373 #define GPU_ACCEL_AMD_120 64
374 #define GPU_ACCEL_AMD_121 64
375 #define GPU_ACCEL_AMD_122 64
376 #define GPU_ACCEL_AMD_124 64
377 #define GPU_ACCEL_AMD_130 64
378 #define GPU_ACCEL_AMD_131 64
379 #define GPU_ACCEL_AMD_132 64
380 #define GPU_ACCEL_AMD_133 64
381 #define GPU_ACCEL_AMD_140 64
382 #define GPU_ACCEL_AMD_141 64
383 #define GPU_ACCEL_AMD_150 64
384 #define GPU_ACCEL_AMD_160 64
385 #define GPU_ACCEL_AMD_190 64
386 #define GPU_ACCEL_AMD_200 64
387 #define GPU_ACCEL_AMD_300 64
388 #define GPU_ACCEL_AMD_400 8
389 #define GPU_ACCEL_AMD_500 8
390 #define GPU_ACCEL_AMD_501 8
391 #define GPU_ACCEL_AMD_900 128
392 #define GPU_ACCEL_AMD_910 128
393 #define GPU_ACCEL_AMD_1000 128
394 #define GPU_ACCEL_AMD_1100 64
395 #define GPU_ACCEL_AMD_1400 64
396 #define GPU_ACCEL_AMD_1410 64
397 #define GPU_ACCEL_AMD_1420 64
398 #define GPU_ACCEL_AMD_1421 64
399 #define GPU_ACCEL_AMD_1430 64
400 #define GPU_ACCEL_AMD_1440 64
401 #define GPU_ACCEL_AMD_1441 64
402 #define GPU_ACCEL_AMD_1450 32
403 #define GPU_ACCEL_AMD_1460 32
404 #define GPU_ACCEL_AMD_1500 16
405 #define GPU_ACCEL_AMD_1600 8
406 #define GPU_ACCEL_AMD_1700 64
407 #define GPU_ACCEL_AMD_1710 64
408 #define GPU_ACCEL_AMD_1711 64
409 #define GPU_ACCEL_AMD_1720 64
410 #define GPU_ACCEL_AMD_1722 64
411 #define GPU_ACCEL_AMD_1730 64
412 #define GPU_ACCEL_AMD_1731 64
413 #define GPU_ACCEL_AMD_1740 64
414 #define GPU_ACCEL_AMD_1750 32
415 #define GPU_ACCEL_AMD_1760 32
416 #define GPU_ACCEL_AMD_1800 2
417 #define GPU_ACCEL_AMD_2100 8
418 #define GPU_ACCEL_AMD_2400 64
419 #define GPU_ACCEL_AMD_2410 64
420 #define GPU_ACCEL_AMD_2500 8
421 #define GPU_ACCEL_AMD_2600 64
422 #define GPU_ACCEL_AMD_2611 64
423 #define GPU_ACCEL_AMD_2612 64
424 #define GPU_ACCEL_AMD_2711 64
425 #define GPU_ACCEL_AMD_2811 64
426 #define GPU_ACCEL_AMD_3000 128
427 #define GPU_ACCEL_AMD_3100 16
428 #define GPU_ACCEL_AMD_3200 2
429 #define GPU_ACCEL_AMD_3710 64
430 #define GPU_ACCEL_AMD_3711 64
431 #define GPU_ACCEL_AMD_3800 128
432 #define GPU_ACCEL_AMD_4300 64
433 #define GPU_ACCEL_AMD_4400 64
434 #define GPU_ACCEL_AMD_4500 64
435 #define GPU_ACCEL_AMD_4700 64
436 #define GPU_ACCEL_AMD_4800 128
437 #define GPU_ACCEL_AMD_4900 64
438 #define GPU_ACCEL_AMD_5000 64
439 #define GPU_ACCEL_AMD_5100 64
440 #define GPU_ACCEL_AMD_5200 8
441 #define GPU_ACCEL_AMD_5300 32
442 #define GPU_ACCEL_AMD_5400 32
443 #define GPU_ACCEL_AMD_5500 64
444 #define GPU_ACCEL_AMD_5600 64
445 #define GPU_ACCEL_AMD_5700 64
446 #define GPU_ACCEL_AMD_5800 8
447 #define GPU_ACCEL_AMD_6000 64
448 #define GPU_ACCEL_AMD_6100 8
449 #define GPU_ACCEL_AMD_6211 16
450 #define GPU_ACCEL_AMD_6212 8
451 #define GPU_ACCEL_AMD_6213 8
452 #define GPU_ACCEL_AMD_6221 4
453 #define GPU_ACCEL_AMD_6222 4
454 #define GPU_ACCEL_AMD_6223 4
455 #define GPU_ACCEL_AMD_6231 4
456 #define GPU_ACCEL_AMD_6232 4
457 #define GPU_ACCEL_AMD_6233 4
458 #define GPU_ACCEL_AMD_6241 32
459 #define GPU_ACCEL_AMD_6242 16
460 #define GPU_ACCEL_AMD_6243 16
461 #define GPU_ACCEL_AMD_6300 8
462 #define GPU_ACCEL_AMD_6400 8
463 #define GPU_ACCEL_AMD_6500 8
464 #define GPU_ACCEL_AMD_6600 8
465 #define GPU_ACCEL_AMD_6700 8
466 #define GPU_ACCEL_AMD_6800 8
467 #define GPU_ACCEL_AMD_6900 16
468 #define GPU_ACCEL_AMD_7100 2
469 #define GPU_ACCEL_AMD_7200 2
470 #define GPU_ACCEL_AMD_7300 64
471 #define GPU_ACCEL_AMD_7400 2
472 #define GPU_ACCEL_AMD_7500 8
473 #define GPU_ACCEL_AMD_7600 64
474 #define GPU_ACCEL_AMD_7700 16
475 #define GPU_ACCEL_AMD_7800 8
476 #define GPU_ACCEL_AMD_7900 2
477 #define GPU_ACCEL_AMD_8000 8
478 #define GPU_ACCEL_AMD_8100 64
479 #define GPU_ACCEL_AMD_8200 2
480 #define GPU_ACCEL_AMD_8300 64
481 #define GPU_ACCEL_AMD_8400 64
482 #define GPU_ACCEL_AMD_8500 64
483 #define GPU_ACCEL_AMD_8600 8
484 #define GPU_ACCEL_AMD_8700 8
485 #define GPU_ACCEL_AMD_8800 8
486 #define GPU_ACCEL_AMD_8900 16
487 #define GPU_ACCEL_AMD_9000 2
488 #define GPU_ACCEL_AMD_9100 8
489 #define GPU_ACCEL_AMD_9200 2
490 #define GPU_ACCEL_AMD_9300 2
491 #define GPU_ACCEL_AMD_9400 8
492 #define GPU_ACCEL_AMD_9500 8
493 #define GPU_ACCEL_AMD_9600 2
494 #define GPU_ACCEL_AMD_9700 8
495 #define GPU_ACCEL_AMD_9710 8
496 #define GPU_ACCEL_AMD_9720 8
497 #define GPU_ACCEL_AMD_9800 8
498 #define GPU_ACCEL_AMD_9810 8
499 #define GPU_ACCEL_AMD_9820 8
500 #define GPU_ACCEL_AMD_9900 64
501 #define GPU_ACCEL_AMD_10000 2
502 #define GPU_ACCEL_AMD_10100 128
503 #define GPU_ACCEL_AMD_10200 64
504 #define GPU_ACCEL_AMD_10300 8
505 #define GPU_ACCEL_AMD_10400 8
506 #define GPU_ACCEL_AMD_10410 8
507 #define GPU_ACCEL_AMD_10420 8
508 #define GPU_ACCEL_AMD_10500 64
509 #define GPU_ACCEL_AMD_10600 64
510 #define GPU_ACCEL_AMD_10700 1
511 #define GPU_ACCEL_AMD_10800 64
512 #define GPU_ACCEL_AMD_10900 2
513 #define GPU_ACCEL_AMD_11000 64
514 #define GPU_ACCEL_AMD_11100 64
515 #define GPU_ACCEL_AMD_11200 64
516 #define GPU_ACCEL_AMD_11300 2
517 #define GPU_ACCEL_AMD_11400 8
518 #define GPU_ACCEL_AMD_11500 128
519 #define GPU_ACCEL_AMD_11600 2
520 #define GPU_ACCEL_AMD_11700 4
521 #define GPU_ACCEL_AMD_11800 4
522 #define GPU_ACCEL_AMD_11900 2
523 #define GPU_ACCEL_AMD_12000 2
524 #define GPU_ACCEL_AMD_12100 2
525 #define GPU_ACCEL_AMD_12200 2
526 #define GPU_ACCEL_AMD_12300 2
527 #define GPU_ACCEL_AMD_12400 64
528 #define GPU_ACCEL_AMD_12500 8
529 #define GPU_ACCEL_AMD_12600 32
530 #define GPU_ACCEL_AMD_12700 64
531 #define GPU_ACCEL_AMD_12800 64
532
533 #define GPU_LOOPS_NV_0 512
534 #define GPU_LOOPS_NV_10 512
535 #define GPU_LOOPS_NV_11 512
536 #define GPU_LOOPS_NV_12 512
537 #define GPU_LOOPS_NV_20 128
538 #define GPU_LOOPS_NV_21 128
539 #define GPU_LOOPS_NV_22 128
540 #define GPU_LOOPS_NV_23 128
541 #define GPU_LOOPS_NV_30 512
542 #define GPU_LOOPS_NV_40 128
543 #define GPU_LOOPS_NV_50 64
544 #define GPU_LOOPS_NV_60 64
545 #define GPU_LOOPS_NV_100 128
546 #define GPU_LOOPS_NV_101 128
547 #define GPU_LOOPS_NV_110 128
548 #define GPU_LOOPS_NV_111 128
549 #define GPU_LOOPS_NV_112 128
550 #define GPU_LOOPS_NV_120 64
551 #define GPU_LOOPS_NV_121 64
552 #define GPU_LOOPS_NV_122 64
553 #define GPU_LOOPS_NV_124 64
554 #define GPU_LOOPS_NV_130 64
555 #define GPU_LOOPS_NV_131 64
556 #define GPU_LOOPS_NV_132 64
557 #define GPU_LOOPS_NV_133 64
558 #define GPU_LOOPS_NV_140 64
559 #define GPU_LOOPS_NV_141 64
560 #define GPU_LOOPS_NV_150 32
561 #define GPU_LOOPS_NV_160 32
562 #define GPU_LOOPS_NV_190 64
563 #define GPU_LOOPS_NV_200 64
564 #define GPU_LOOPS_NV_300 64
565 #define GPU_LOOPS_NV_400 256
566 #define GPU_LOOPS_NV_500 200
567 #define GPU_LOOPS_NV_501 200
568 #define GPU_LOOPS_NV_900 512
569 #define GPU_LOOPS_NV_910 512
570 #define GPU_LOOPS_NV_1000 512
571 #define GPU_LOOPS_NV_1100 256
572 #define GPU_LOOPS_NV_1400 128
573 #define GPU_LOOPS_NV_1410 128
574 #define GPU_LOOPS_NV_1420 64
575 #define GPU_LOOPS_NV_1421 64
576 #define GPU_LOOPS_NV_1430 128
577 #define GPU_LOOPS_NV_1440 64
578 #define GPU_LOOPS_NV_1441 64
579 #define GPU_LOOPS_NV_1450 16
580 #define GPU_LOOPS_NV_1460 16
581 #define GPU_LOOPS_NV_1500 512
582 #define GPU_LOOPS_NV_1600 256
583 #define GPU_LOOPS_NV_1700 32
584 #define GPU_LOOPS_NV_1710 32
585 #define GPU_LOOPS_NV_1711 32
586 #define GPU_LOOPS_NV_1720 16
587 #define GPU_LOOPS_NV_1722 16
588 #define GPU_LOOPS_NV_1730 32
589 #define GPU_LOOPS_NV_1731 32
590 #define GPU_LOOPS_NV_1740 16
591 #define GPU_LOOPS_NV_1750 16
592 #define GPU_LOOPS_NV_1760 16
593 #define GPU_LOOPS_NV_1800 200
594 #define GPU_LOOPS_NV_2100 256
595 #define GPU_LOOPS_NV_2400 512
596 #define GPU_LOOPS_NV_2410 512
597 #define GPU_LOOPS_NV_2500 256
598 #define GPU_LOOPS_NV_2600 256
599 #define GPU_LOOPS_NV_2611 256
600 #define GPU_LOOPS_NV_2612 256
601 #define GPU_LOOPS_NV_2711 128
602 #define GPU_LOOPS_NV_2811 128
603 #define GPU_LOOPS_NV_3000 512
604 #define GPU_LOOPS_NV_3100 64
605 #define GPU_LOOPS_NV_3200 16
606 #define GPU_LOOPS_NV_3710 128
607 #define GPU_LOOPS_NV_3711 128
608 #define GPU_LOOPS_NV_3800 512
609 #define GPU_LOOPS_NV_4300 256
610 #define GPU_LOOPS_NV_4400 128
611 #define GPU_LOOPS_NV_4500 128
612 #define GPU_LOOPS_NV_4700 128
613 #define GPU_LOOPS_NV_4800 512
614 #define GPU_LOOPS_NV_4900 128
615 #define GPU_LOOPS_NV_5000 16
616 #define GPU_LOOPS_NV_5100 512
617 #define GPU_LOOPS_NV_5200 256
618 #define GPU_LOOPS_NV_5300 64
619 #define GPU_LOOPS_NV_5400 64
620 #define GPU_LOOPS_NV_5500 128
621 #define GPU_LOOPS_NV_5600 128
622 #define GPU_LOOPS_NV_5700 256
623 #define GPU_LOOPS_NV_5800 256
624 #define GPU_LOOPS_NV_6000 128
625 #define GPU_LOOPS_NV_6100 64
626 #define GPU_LOOPS_NV_6211 200
627 #define GPU_LOOPS_NV_6212 200
628 #define GPU_LOOPS_NV_6213 200
629 #define GPU_LOOPS_NV_6221 200
630 #define GPU_LOOPS_NV_6222 200
631 #define GPU_LOOPS_NV_6223 200
632 #define GPU_LOOPS_NV_6231 200
633 #define GPU_LOOPS_NV_6232 200
634 #define GPU_LOOPS_NV_6233 200
635 #define GPU_LOOPS_NV_6241 200
636 #define GPU_LOOPS_NV_6242 200
637 #define GPU_LOOPS_NV_6243 200
638 #define GPU_LOOPS_NV_6300 256
639 #define GPU_LOOPS_NV_6400 256
640 #define GPU_LOOPS_NV_6500 256
641 #define GPU_LOOPS_NV_6600 200
642 #define GPU_LOOPS_NV_6700 256
643 #define GPU_LOOPS_NV_6800 200
644 #define GPU_LOOPS_NV_6900 64
645 #define GPU_LOOPS_NV_7100 256
646 #define GPU_LOOPS_NV_7200 200
647 #define GPU_LOOPS_NV_7300 32
648 #define GPU_LOOPS_NV_7400 200
649 #define GPU_LOOPS_NV_7500 32
650 #define GPU_LOOPS_NV_7600 128
651 #define GPU_LOOPS_NV_7700 128
652 #define GPU_LOOPS_NV_7800 256
653 #define GPU_LOOPS_NV_7900 128
654 #define GPU_LOOPS_NV_8000 64
655 #define GPU_LOOPS_NV_8100 64
656 #define GPU_LOOPS_NV_8200 200
657 #define GPU_LOOPS_NV_8300 64
658 #define GPU_LOOPS_NV_8400 32
659 #define GPU_LOOPS_NV_8500 128
660 #define GPU_LOOPS_NV_8600 32
661 #define GPU_LOOPS_NV_8700 32
662 #define GPU_LOOPS_NV_8800 256
663 #define GPU_LOOPS_NV_8900 1
664 #define GPU_LOOPS_NV_9000 16
665 #define GPU_LOOPS_NV_9100 256
666 #define GPU_LOOPS_NV_9200 200
667 #define GPU_LOOPS_NV_9300 1
668 #define GPU_LOOPS_NV_9400 200
669 #define GPU_LOOPS_NV_9500 200
670 #define GPU_LOOPS_NV_9600 200
671 #define GPU_LOOPS_NV_9700 200
672 #define GPU_LOOPS_NV_9710 200
673 #define GPU_LOOPS_NV_9720 200
674 #define GPU_LOOPS_NV_9800 200
675 #define GPU_LOOPS_NV_9810 200
676 #define GPU_LOOPS_NV_9820 200
677 #define GPU_LOOPS_NV_9900 512
678 #define GPU_LOOPS_NV_10000 200
679 #define GPU_LOOPS_NV_10100 512
680 #define GPU_LOOPS_NV_10200 64
681 #define GPU_LOOPS_NV_10300 128
682 #define GPU_LOOPS_NV_10400 256
683 #define GPU_LOOPS_NV_10410 256
684 #define GPU_LOOPS_NV_10420 256
685 #define GPU_LOOPS_NV_10500 64
686 #define GPU_LOOPS_NV_10600 128
687 #define GPU_LOOPS_NV_10700 64
688 #define GPU_LOOPS_NV_10800 32
689 #define GPU_LOOPS_NV_10900 200
690 #define GPU_LOOPS_NV_11000 128
691 #define GPU_LOOPS_NV_11100 128
692 #define GPU_LOOPS_NV_11200 128
693 #define GPU_LOOPS_NV_11300 256
694 #define GPU_LOOPS_NV_11400 256
695 #define GPU_LOOPS_NV_11500 512
696 #define GPU_LOOPS_NV_11600 512
697 #define GPU_LOOPS_NV_11700 64
698 #define GPU_LOOPS_NV_11800 64
699 #define GPU_LOOPS_NV_11900 200
700 #define GPU_LOOPS_NV_12000 200
701 #define GPU_LOOPS_NV_12100 200
702 #define GPU_LOOPS_NV_12200 256
703 #define GPU_LOOPS_NV_12300 256
704 #define GPU_LOOPS_NV_12400 256
705 #define GPU_LOOPS_NV_12500 256
706 #define GPU_LOOPS_NV_12600 16
707 #define GPU_LOOPS_NV_12700 10
708 #define GPU_LOOPS_NV_12800 100
709
710 #define GPU_LOOPS_AMD_0 256
711 #define GPU_LOOPS_AMD_10 256
712 #define GPU_LOOPS_AMD_11 256
713 #define GPU_LOOPS_AMD_12 256
714 #define GPU_LOOPS_AMD_20 256
715 #define GPU_LOOPS_AMD_21 256
716 #define GPU_LOOPS_AMD_22 256
717 #define GPU_LOOPS_AMD_23 256
718 #define GPU_LOOPS_AMD_30 256
719 #define GPU_LOOPS_AMD_40 256
720 #define GPU_LOOPS_AMD_50 64
721 #define GPU_LOOPS_AMD_60 64
722 #define GPU_LOOPS_AMD_100 128
723 #define GPU_LOOPS_AMD_101 128
724 #define GPU_LOOPS_AMD_110 128
725 #define GPU_LOOPS_AMD_111 128
726 #define GPU_LOOPS_AMD_112 128
727 #define GPU_LOOPS_AMD_120 128
728 #define GPU_LOOPS_AMD_121 128
729 #define GPU_LOOPS_AMD_122 128
730 #define GPU_LOOPS_AMD_124 128
731 #define GPU_LOOPS_AMD_130 128
732 #define GPU_LOOPS_AMD_131 128
733 #define GPU_LOOPS_AMD_132 128
734 #define GPU_LOOPS_AMD_133 128
735 #define GPU_LOOPS_AMD_140 128
736 #define GPU_LOOPS_AMD_141 128
737 #define GPU_LOOPS_AMD_150 64
738 #define GPU_LOOPS_AMD_160 64
739 #define GPU_LOOPS_AMD_190 128
740 #define GPU_LOOPS_AMD_200 128
741 #define GPU_LOOPS_AMD_300 64
742 #define GPU_LOOPS_AMD_400 256
743 #define GPU_LOOPS_AMD_500 256
744 #define GPU_LOOPS_AMD_501 256
745 #define GPU_LOOPS_AMD_900 256
746 #define GPU_LOOPS_AMD_910 256
747 #define GPU_LOOPS_AMD_1000 256
748 #define GPU_LOOPS_AMD_1100 128
749 #define GPU_LOOPS_AMD_1400 64
750 #define GPU_LOOPS_AMD_1410 64
751 #define GPU_LOOPS_AMD_1420 64
752 #define GPU_LOOPS_AMD_1421 64
753 #define GPU_LOOPS_AMD_1430 64
754 #define GPU_LOOPS_AMD_1440 64
755 #define GPU_LOOPS_AMD_1441 64
756 #define GPU_LOOPS_AMD_1450 32
757 #define GPU_LOOPS_AMD_1460 32
758 #define GPU_LOOPS_AMD_1500 256
759 #define GPU_LOOPS_AMD_1600 256
760 #define GPU_LOOPS_AMD_1700 32
761 #define GPU_LOOPS_AMD_1710 32
762 #define GPU_LOOPS_AMD_1711 32
763 #define GPU_LOOPS_AMD_1720 32
764 #define GPU_LOOPS_AMD_1722 32
765 #define GPU_LOOPS_AMD_1730 32
766 #define GPU_LOOPS_AMD_1731 32
767 #define GPU_LOOPS_AMD_1740 32
768 #define GPU_LOOPS_AMD_1750 16
769 #define GPU_LOOPS_AMD_1760 16
770 #define GPU_LOOPS_AMD_1800 16
771 #define GPU_LOOPS_AMD_2100 256
772 #define GPU_LOOPS_AMD_2400 256
773 #define GPU_LOOPS_AMD_2410 256
774 #define GPU_LOOPS_AMD_2500 256
775 #define GPU_LOOPS_AMD_2600 128
776 #define GPU_LOOPS_AMD_2611 128
777 #define GPU_LOOPS_AMD_2612 128
778 #define GPU_LOOPS_AMD_2711 64
779 #define GPU_LOOPS_AMD_2811 64
780 #define GPU_LOOPS_AMD_3000 256
781 #define GPU_LOOPS_AMD_3100 16
782 #define GPU_LOOPS_AMD_3200 16
783 #define GPU_LOOPS_AMD_3710 128
784 #define GPU_LOOPS_AMD_3711 128
785 #define GPU_LOOPS_AMD_3800 256
786 #define GPU_LOOPS_AMD_4300 128
787 #define GPU_LOOPS_AMD_4400 128
788 #define GPU_LOOPS_AMD_4500 128
789 #define GPU_LOOPS_AMD_4700 128
790 #define GPU_LOOPS_AMD_4800 256
791 #define GPU_LOOPS_AMD_4900 128
792 #define GPU_LOOPS_AMD_5000 64
793 #define GPU_LOOPS_AMD_5100 256
794 #define GPU_LOOPS_AMD_5200 256
795 #define GPU_LOOPS_AMD_5300 32
796 #define GPU_LOOPS_AMD_5400 32
797 #define GPU_LOOPS_AMD_5500 128
798 #define GPU_LOOPS_AMD_5600 64
799 #define GPU_LOOPS_AMD_5700 64
800 #define GPU_LOOPS_AMD_5800 256
801 #define GPU_LOOPS_AMD_6000 64
802 #define GPU_LOOPS_AMD_6100 64
803 #define GPU_LOOPS_AMD_6211 200
804 #define GPU_LOOPS_AMD_6212 200
805 #define GPU_LOOPS_AMD_6213 200
806 #define GPU_LOOPS_AMD_6221 200
807 #define GPU_LOOPS_AMD_6222 200
808 #define GPU_LOOPS_AMD_6223 200
809 #define GPU_LOOPS_AMD_6231 200
810 #define GPU_LOOPS_AMD_6232 200
811 #define GPU_LOOPS_AMD_6233 200
812 #define GPU_LOOPS_AMD_6241 200
813 #define GPU_LOOPS_AMD_6242 200
814 #define GPU_LOOPS_AMD_6243 200
815 #define GPU_LOOPS_AMD_6300 256
816 #define GPU_LOOPS_AMD_6400 256
817 #define GPU_LOOPS_AMD_6500 256
818 #define GPU_LOOPS_AMD_6600 200
819 #define GPU_LOOPS_AMD_6700 256
820 #define GPU_LOOPS_AMD_6800 200
821 #define GPU_LOOPS_AMD_6900 64
822 #define GPU_LOOPS_AMD_7100 256
823 #define GPU_LOOPS_AMD_7200 200
824 #define GPU_LOOPS_AMD_7300 64
825 #define GPU_LOOPS_AMD_7400 200
826 #define GPU_LOOPS_AMD_7500 16
827 #define GPU_LOOPS_AMD_7600 128
828 #define GPU_LOOPS_AMD_7700 128
829 #define GPU_LOOPS_AMD_7800 64
830 #define GPU_LOOPS_AMD_7900 256
831 #define GPU_LOOPS_AMD_8000 64
832 #define GPU_LOOPS_AMD_8100 128
833 #define GPU_LOOPS_AMD_8200 200
834 #define GPU_LOOPS_AMD_8300 64
835 #define GPU_LOOPS_AMD_8400 64
836 #define GPU_LOOPS_AMD_8500 16
837 #define GPU_LOOPS_AMD_8600 16
838 #define GPU_LOOPS_AMD_8700 16
839 #define GPU_LOOPS_AMD_8800 256
840 #define GPU_LOOPS_AMD_8900 1
841 #define GPU_LOOPS_AMD_9000 16
842 #define GPU_LOOPS_AMD_9100 256
843 #define GPU_LOOPS_AMD_9200 200
844 #define GPU_LOOPS_AMD_9300 1
845 #define GPU_LOOPS_AMD_9400 200
846 #define GPU_LOOPS_AMD_9500 200
847 #define GPU_LOOPS_AMD_9600 200
848 #define GPU_LOOPS_AMD_9700 200
849 #define GPU_LOOPS_AMD_9710 200
850 #define GPU_LOOPS_AMD_9720 200
851 #define GPU_LOOPS_AMD_9800 200
852 #define GPU_LOOPS_AMD_9810 200
853 #define GPU_LOOPS_AMD_9820 200
854 #define GPU_LOOPS_AMD_9900 256
855 #define GPU_LOOPS_AMD_10000 200
856 #define GPU_LOOPS_AMD_10100 512
857 #define GPU_LOOPS_AMD_10200 64
858 #define GPU_LOOPS_AMD_10300 128
859 #define GPU_LOOPS_AMD_10400 256
860 #define GPU_LOOPS_AMD_10410 256
861 #define GPU_LOOPS_AMD_10420 256
862 #define GPU_LOOPS_AMD_10500 64
863 #define GPU_LOOPS_AMD_10600 64
864 #define GPU_LOOPS_AMD_10700 64
865 #define GPU_LOOPS_AMD_10800 32
866 #define GPU_LOOPS_AMD_10900 200
867 #define GPU_LOOPS_AMD_11000 256
868 #define GPU_LOOPS_AMD_11100 128
869 #define GPU_LOOPS_AMD_11200 128
870 #define GPU_LOOPS_AMD_11300 256
871 #define GPU_LOOPS_AMD_11400 128
872 #define GPU_LOOPS_AMD_11500 256
873 #define GPU_LOOPS_AMD_11600 512
874 #define GPU_LOOPS_AMD_11700 64
875 #define GPU_LOOPS_AMD_11800 64
876 #define GPU_LOOPS_AMD_11900 200
877 #define GPU_LOOPS_AMD_12000 200
878 #define GPU_LOOPS_AMD_12100 200
879 #define GPU_LOOPS_AMD_12200 256
880 #define GPU_LOOPS_AMD_12300 256
881 #define GPU_LOOPS_AMD_12400 256
882 #define GPU_LOOPS_AMD_12500 256
883 #define GPU_LOOPS_AMD_12600 32
884 #define GPU_LOOPS_AMD_12700 10
885 #define GPU_LOOPS_AMD_12800 100
886
887 /**
888 * Strings
889 */
890
891 #define HT_00000 "MD5"
892 #define HT_00010 "md5($pass.$salt)"
893 #define HT_00020 "md5($salt.$pass)"
894 #define HT_00030 "md5(unicode($pass).$salt)"
895 #define HT_00040 "md5($salt.unicode($pass))"
896 #define HT_00050 "HMAC-MD5 (key = $pass)"
897 #define HT_00060 "HMAC-MD5 (key = $salt)"
898 #define HT_00100 "SHA1"
899 #define HT_00110 "sha1($pass.$salt)"
900 #define HT_00120 "sha1($salt.$pass)"
901 #define HT_00130 "sha1(unicode($pass).$salt)"
902 #define HT_00140 "sha1($salt.unicode($pass))"
903 #define HT_00150 "HMAC-SHA1 (key = $pass)"
904 #define HT_00160 "HMAC-SHA1 (key = $salt)"
905 #define HT_00190 "sha1(LinkedIn)"
906 #define HT_00200 "MySQL323"
907 #define HT_00300 "MySQL4.1/MySQL5"
908 #define HT_00400 "phpass, MD5(Wordpress), MD5(phpBB3), MD5(Joomla)"
909 #define HT_00500 "md5crypt, MD5(Unix), FreeBSD MD5, Cisco-IOS MD5"
910 #define HT_00501 "Juniper IVE"
911 #define HT_00900 "MD4"
912 #define HT_00910 "md4($pass.$salt)"
913 #define HT_01000 "NTLM"
914 #define HT_01100 "Domain Cached Credentials (DCC), MS Cache"
915 #define HT_01400 "SHA256"
916 #define HT_01410 "sha256($pass.$salt)"
917 #define HT_01420 "sha256($salt.$pass)"
918 #define HT_01430 "sha256(unicode($pass).$salt)"
919 #define HT_01440 "sha256($salt.$pass)"
920 #define HT_01450 "HMAC-SHA256 (key = $pass)"
921 #define HT_01460 "HMAC-SHA256 (key = $salt)"
922 #define HT_01500 "descrypt, DES(Unix), Traditional DES"
923 #define HT_01600 "md5apr1, MD5(APR), Apache MD5"
924 #define HT_01700 "SHA512"
925 #define HT_01710 "sha512($pass.$salt)"
926 #define HT_01720 "sha512($salt.$pass)"
927 #define HT_01730 "sha512(unicode($pass).$salt)"
928 #define HT_01740 "sha512($salt.unicode($pass))"
929 #define HT_01750 "HMAC-SHA512 (key = $pass)"
930 #define HT_01760 "HMAC-SHA512 (key = $salt)"
931 #define HT_01800 "sha512crypt, SHA512(Unix)"
932 #define HT_02100 "Domain Cached Credentials 2 (DCC2), MS Cache 2"
933 #define HT_02400 "Cisco-PIX MD5"
934 #define HT_02410 "Cisco-ASA MD5"
935 #define HT_02500 "WPA/WPA2"
936 #define HT_02600 "Double MD5"
937 #define HT_03000 "LM"
938 #define HT_03100 "Oracle H: Type (Oracle 7+)"
939 #define HT_03200 "bcrypt, Blowfish(OpenBSD)"
940 #define HT_03710 "md5($salt.md5($pass))"
941 #define HT_03711 "Mediawiki B type"
942 #define HT_03800 "md5($salt.$pass.$salt)"
943 #define HT_04300 "md5(strtoupper(md5($pass)))"
944 #define HT_04400 "md5(sha1($pass))"
945 #define HT_04500 "Double SHA1"
946 #define HT_04700 "sha1(md5($pass))"
947 #define HT_04800 "MD5(Chap), iSCSI CHAP authentication"
948 #define HT_04900 "sha1($salt.$pass.$salt)"
949 #define HT_05000 "SHA-3(Keccak)"
950 #define HT_05100 "Half MD5"
951 #define HT_05200 "Password Safe v3"
952 #define HT_05300 "IKE-PSK MD5"
953 #define HT_05400 "IKE-PSK SHA1"
954 #define HT_05500 "NetNTLMv1-VANILLA / NetNTLMv1+ESS"
955 #define HT_05600 "NetNTLMv2"
956 #define HT_05700 "Cisco-IOS SHA256"
957 #define HT_05800 "Android PIN"
958 #define HT_06000 "RipeMD160"
959 #define HT_06100 "Whirlpool"
960 #define HT_06300 "AIX {smd5}"
961 #define HT_06400 "AIX {ssha256}"
962 #define HT_06500 "AIX {ssha512}"
963 #define HT_06600 "1Password, agilekeychain"
964 #define HT_06700 "AIX {ssha1}"
965 #define HT_06800 "Lastpass"
966 #define HT_06900 "GOST R 34.11-94"
967 #define HT_07100 "OSX v10.8+"
968 #define HT_07200 "GRUB 2"
969 #define HT_07300 "IPMI2 RAKP HMAC-SHA1"
970 #define HT_07400 "sha256crypt, SHA256(Unix)"
971 #define HT_07500 "Kerberos 5 AS-REQ Pre-Auth etype 23"
972 #define HT_07600 "Redmine Project Management Web App"
973 #define HT_07700 "SAP CODVN B (BCODE)"
974 #define HT_07800 "SAP CODVN F/G (PASSCODE)"
975 #define HT_07900 "Drupal7"
976 #define HT_08000 "Sybase ASE"
977 #define HT_08100 "Citrix NetScaler"
978 #define HT_08200 "1Password, cloudkeychain"
979 #define HT_08300 "DNSSEC (NSEC3)"
980 #define HT_08400 "WBB3, Woltlab Burning Board 3"
981 #define HT_08500 "RACF"
982 #define HT_08600 "Lotus Notes/Domino 5"
983 #define HT_08700 "Lotus Notes/Domino 6"
984 #define HT_08800 "Android FDE <= 4.3"
985 #define HT_08900 "scrypt"
986 #define HT_09000 "Password Safe v2"
987 #define HT_09100 "Lotus Notes/Domino 8"
988 #define HT_09200 "Cisco $8$"
989 #define HT_09300 "Cisco $9$"
990 #define HT_09400 "Office 2007"
991 #define HT_09500 "Office 2010"
992 #define HT_09600 "Office 2013"
993 #define HT_09700 "MS Office <= 2003 MD5 + RC4, oldoffice$0, oldoffice$1"
994 #define HT_09710 "MS Office <= 2003 MD5 + RC4, collision-mode #1"
995 #define HT_09720 "MS Office <= 2003 MD5 + RC4, collision-mode #2"
996 #define HT_09800 "MS Office <= 2003 SHA1 + RC4, oldoffice$3, oldoffice$4"
997 #define HT_09810 "MS Office <= 2003 SHA1 + RC4, collision-mode #1"
998 #define HT_09820 "MS Office <= 2003 SHA1 + RC4, collision-mode #2"
999 #define HT_09900 "Radmin2"
1000 #define HT_10000 "Django (PBKDF2-SHA256)"
1001 #define HT_10100 "SipHash"
1002 #define HT_10200 "Cram MD5"
1003 #define HT_10300 "SAP CODVN H (PWDSALTEDHASH) iSSHA-1"
1004 #define HT_10400 "PDF 1.1 - 1.3 (Acrobat 2 - 4)"
1005 #define HT_10410 "PDF 1.1 - 1.3 (Acrobat 2 - 4) + collider-mode #1"
1006 #define HT_10420 "PDF 1.1 - 1.3 (Acrobat 2 - 4) + collider-mode #2"
1007 #define HT_10500 "PDF 1.4 - 1.6 (Acrobat 5 - 8)"
1008 #define HT_10600 "PDF 1.7 Level 3 (Acrobat 9)"
1009 #define HT_10700 "PDF 1.7 Level 8 (Acrobat 10 - 11)"
1010 #define HT_10800 "SHA384"
1011 #define HT_10900 "PBKDF2-HMAC-SHA256"
1012 #define HT_11000 "PrestaShop"
1013 #define HT_11100 "PostgreSQL Challenge-Response Authentication (MD5)"
1014 #define HT_11200 "MySQL Challenge-Response Authentication (SHA1)"
1015 #define HT_11300 "Bitcoin/Litecoin wallet.dat"
1016 #define HT_11400 "SIP digest authentication (MD5)"
1017 #define HT_11500 "CRC32"
1018 #define HT_11600 "7-Zip"
1019 #define HT_11700 "GOST R 34.11-2012 (Streebog) 256-bit"
1020 #define HT_11800 "GOST R 34.11-2012 (Streebog) 512-bit"
1021 #define HT_11900 "PBKDF2-HMAC-MD5"
1022 #define HT_12000 "PBKDF2-HMAC-SHA1"
1023 #define HT_12100 "PBKDF2-HMAC-SHA512"
1024 #define HT_12200 "eCryptfs"
1025 #define HT_12300 "Oracle T: Type (Oracle 12+)"
1026 #define HT_12400 "BSDiCrypt, Extended DES"
1027 #define HT_12500 "RAR3-hp"
1028 #define HT_12600 "ColdFusion 10+"
1029 #define HT_12700 "Blockchain, My Wallet"
1030 #define HT_12800 "MS-AzureSync PBKDF2-HMAC-SHA256"
1031
1032 #define HT_00011 "Joomla < 2.5.18"
1033 #define HT_00012 "PostgreSQL"
1034 #define HT_00021 "osCommerce, xt:Commerce"
1035 #define HT_00022 "Juniper Netscreen/SSG (ScreenOS)"
1036 #define HT_00023 "Skype"
1037 #define HT_00101 "SHA-1(Base64), nsldap, Netscape LDAP SHA"
1038 #define HT_00111 "SSHA-1(Base64), nsldaps, Netscape LDAP SSHA"
1039 #define HT_00112 "Oracle S: Type (Oracle 11+)"
1040 #define HT_00121 "SMF > v1.1"
1041 #define HT_00122 "OSX v10.4, v10.5, v10.6"
1042 #define HT_00124 "Django (SHA-1)"
1043 #define HT_00131 "MSSQL(2000)"
1044 #define HT_00132 "MSSQL(2005)"
1045 #define HT_00133 "PeopleSoft"
1046 #define HT_00141 "EPiServer 6.x < v4"
1047 #define HT_01421 "hMailServer"
1048 #define HT_01441 "EPiServer 6.x > v4"
1049 #define HT_01711 "SSHA-512(Base64), LDAP {SSHA512}"
1050 #define HT_01722 "OSX v10.7"
1051 #define HT_01731 "MSSQL(2012)"
1052 #define HT_02611 "vBulletin < v3.8.5"
1053 #define HT_02612 "PHPS"
1054 #define HT_02711 "vBulletin > v3.8.5"
1055 #define HT_02811 "IPB2+, MyBB1.2+"
1056 #define HT_06211 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 512 bit"
1057 #define HT_06212 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1024 bit"
1058 #define HT_06213 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1536 bit"
1059 #define HT_06221 "TrueCrypt 5.0+ PBKDF2-HMAC-SHA512 + XTS 512 bit"
1060 #define HT_06222 "TrueCrypt 5.0+ PBKDF2-HMAC-SHA512 + XTS 1024 bit"
1061 #define HT_06223 "TrueCrypt 5.0+ PBKDF2-HMAC-SHA512 + XTS 1536 bit"
1062 #define HT_06231 "TrueCrypt 5.0+ PBKDF2-HMAC-Whirlpool + XTS 512 bit"
1063 #define HT_06232 "TrueCrypt 5.0+ PBKDF2-HMAC-Whirlpool + XTS 1024 bit"
1064 #define HT_06233 "TrueCrypt 5.0+ PBKDF2-HMAC-Whirlpool + XTS 1536 bit"
1065 #define HT_06241 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 512 bit + boot-mode"
1066 #define HT_06242 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1024 bit + boot-mode"
1067 #define HT_06243 "TrueCrypt 5.0+ PBKDF2-HMAC-RipeMD160 + XTS 1536 bit + boot-mode"
1068
1069 /**
1070 * Outfile formats
1071 */
1072
1073 #define OUTFILE_FMT_HASH (1 << 0)
1074 #define OUTFILE_FMT_PLAIN (1 << 1)
1075 #define OUTFILE_FMT_HEXPLAIN (1 << 2)
1076 #define OUTFILE_FMT_CRACKPOS (1 << 3)
1077
1078 /**
1079 * algo specific
1080 */
1081
1082 #define DISPLAY_LEN_MIN_0 32
1083 #define DISPLAY_LEN_MAX_0 32
1084 #define DISPLAY_LEN_MIN_10 32 + 1 + 0
1085 #define DISPLAY_LEN_MAX_10 32 + 1 + 51
1086 #define DISPLAY_LEN_MIN_10H 32 + 1 + 0
1087 #define DISPLAY_LEN_MAX_10H 32 + 1 + 102
1088 #define DISPLAY_LEN_MIN_20 32 + 1 + 0
1089 #define DISPLAY_LEN_MAX_20 32 + 1 + 31
1090 #define DISPLAY_LEN_MIN_20H 32 + 1 + 0
1091 #define DISPLAY_LEN_MAX_20H 32 + 1 + 62
1092 #define DISPLAY_LEN_MIN_50 32 + 1 + 0
1093 #define DISPLAY_LEN_MAX_50 32 + 1 + 51
1094 #define DISPLAY_LEN_MIN_50H 32 + 1 + 0
1095 #define DISPLAY_LEN_MAX_50H 32 + 1 + 102
1096 #define DISPLAY_LEN_MIN_100 40
1097 #define DISPLAY_LEN_MAX_100 40
1098 #define DISPLAY_LEN_MIN_110 40 + 1 + 0
1099 #define DISPLAY_LEN_MAX_110 40 + 1 + 51
1100 #define DISPLAY_LEN_MIN_110H 40 + 1 + 0
1101 #define DISPLAY_LEN_MAX_110H 40 + 1 + 102
1102 #define DISPLAY_LEN_MIN_120 40 + 1 + 0
1103 #define DISPLAY_LEN_MAX_120 40 + 1 + 31
1104 #define DISPLAY_LEN_MIN_120H 40 + 1 + 0
1105 #define DISPLAY_LEN_MAX_120H 40 + 1 + 62
1106 #define DISPLAY_LEN_MIN_150 40 + 1 + 0
1107 #define DISPLAY_LEN_MAX_150 40 + 1 + 51
1108 #define DISPLAY_LEN_MIN_150H 40 + 1 + 0
1109 #define DISPLAY_LEN_MAX_150H 40 + 1 + 102
1110 #define DISPLAY_LEN_MIN_190 40
1111 #define DISPLAY_LEN_MAX_190 40
1112 #define DISPLAY_LEN_MIN_200 16
1113 #define DISPLAY_LEN_MAX_200 16
1114 #define DISPLAY_LEN_MIN_300 40
1115 #define DISPLAY_LEN_MAX_300 40
1116 #define DISPLAY_LEN_MIN_400 34
1117 #define DISPLAY_LEN_MAX_400 34
1118 #define DISPLAY_LEN_MIN_500 3 + 1 + 0 + 22
1119 #define DISPLAY_LEN_MIN_501 104
1120 #define DISPLAY_LEN_MAX_500 3 + 1 + 8 + 22
1121 #define DISPLAY_LEN_MAX_501 104
1122 #define DISPLAY_LEN_MIN_900 32
1123 #define DISPLAY_LEN_MAX_900 32
1124 #define DISPLAY_LEN_MIN_910 32 + 1 + 0
1125 #define DISPLAY_LEN_MAX_910 32 + 1 + 51
1126 #define DISPLAY_LEN_MIN_910H 32 + 1 + 0
1127 #define DISPLAY_LEN_MAX_910H 32 + 1 + 102
1128 #define DISPLAY_LEN_MIN_1000 32
1129 #define DISPLAY_LEN_MAX_1000 32
1130 #define DISPLAY_LEN_MIN_1100 32 + 1 + 0
1131 #define DISPLAY_LEN_MAX_1100 32 + 1 + 19
1132 #define DISPLAY_LEN_MIN_1100H 32 + 1 + 0
1133 #define DISPLAY_LEN_MAX_1100H 32 + 1 + 38
1134 #define DISPLAY_LEN_MIN_1400 64
1135 #define DISPLAY_LEN_MAX_1400 64
1136 #define DISPLAY_LEN_MIN_1410 64 + 1 + 0
1137 #define DISPLAY_LEN_MAX_1410 64 + 1 + 51
1138 #define DISPLAY_LEN_MIN_1410H 64 + 1 + 0
1139 #define DISPLAY_LEN_MAX_1410H 64 + 1 + 102
1140 #define DISPLAY_LEN_MIN_1420 64 + 1 + 0
1141 #define DISPLAY_LEN_MAX_1420 64 + 1 + 16
1142 #define DISPLAY_LEN_MIN_1420H 64 + 1 + 0
1143 #define DISPLAY_LEN_MAX_1420H 64 + 1 + 32
1144 #define DISPLAY_LEN_MIN_1421 70
1145 #define DISPLAY_LEN_MAX_1421 70
1146 #define DISPLAY_LEN_MIN_1450 64 + 1 + 0
1147 #define DISPLAY_LEN_MAX_1450 64 + 1 + 51
1148 #define DISPLAY_LEN_MIN_1450H 64 + 1 + 0
1149 #define DISPLAY_LEN_MAX_1450H 64 + 1 + 102
1150 #define DISPLAY_LEN_MIN_1500 13
1151 #define DISPLAY_LEN_MAX_1500 13
1152 #define DISPLAY_LEN_MIN_1600 29 + 0
1153 #define DISPLAY_LEN_MAX_1600 29 + 8
1154 #define DISPLAY_LEN_MIN_1700 128
1155 #define DISPLAY_LEN_MAX_1700 128
1156 #define DISPLAY_LEN_MIN_1710 128 + 1 + 0
1157 #define DISPLAY_LEN_MAX_1710 128 + 1 + 51
1158 #define DISPLAY_LEN_MIN_1710H 128 + 1 + 0
1159 #define DISPLAY_LEN_MAX_1710H 128 + 1 + 102
1160 #define DISPLAY_LEN_MIN_1720 128 + 1 + 0
1161 #define DISPLAY_LEN_MAX_1720 128 + 1 + 16
1162 #define DISPLAY_LEN_MIN_1720H 128 + 1 + 0
1163 #define DISPLAY_LEN_MAX_1720H 128 + 1 + 32
1164 #define DISPLAY_LEN_MIN_1730 128 + 1 + 0
1165 #define DISPLAY_LEN_MAX_1730 128 + 1 + 16
1166 #define DISPLAY_LEN_MIN_1731 128 + 6 + 0
1167 #define DISPLAY_LEN_MAX_1731 128 + 6 + 16
1168 #define DISPLAY_LEN_MIN_1740 128 + 1 + 0
1169 #define DISPLAY_LEN_MAX_1740 128 + 1 + 16
1170 #define DISPLAY_LEN_MIN_1750 128 + 1 + 0
1171 #define DISPLAY_LEN_MAX_1750 128 + 1 + 51
1172 #define DISPLAY_LEN_MIN_1750H 128 + 1 + 0
1173 #define DISPLAY_LEN_MAX_1750H 128 + 1 + 102
1174 #define DISPLAY_LEN_MIN_1800 90 + 0
1175 #define DISPLAY_LEN_MAX_1800 90 + 16
1176 #define DISPLAY_LEN_MIN_2100 6 + 1 + 1 + 32 + 1 + 0
1177 #define DISPLAY_LEN_MAX_2100 6 + 5 + 1 + 32 + 1 + 19
1178 #define DISPLAY_LEN_MIN_2100H 6 + 1 + 1 + 32 + 1 + 0
1179 #define DISPLAY_LEN_MAX_2100H 6 + 5 + 1 + 32 + 1 + 38
1180 #define DISPLAY_LEN_MIN_2400 16
1181 #define DISPLAY_LEN_MAX_2400 16
1182 #define DISPLAY_LEN_MIN_2410 16 + 1 + 0
1183 #define DISPLAY_LEN_MAX_2410 16 + 1 + 16
1184 #define DISPLAY_LEN_MIN_2410H 16 + 1 + 0
1185 #define DISPLAY_LEN_MAX_2410H 16 + 1 + 32
1186 #define DISPLAY_LEN_MIN_2500 64 + 1 + 0
1187 #define DISPLAY_LEN_MAX_2500 64 + 1 + 15
1188 #define DISPLAY_LEN_MIN_2600 32
1189 #define DISPLAY_LEN_MAX_2600 32
1190 #define DISPLAY_LEN_MIN_3000 16
1191 #define DISPLAY_LEN_MAX_3000 16
1192 #define DISPLAY_LEN_MIN_3100 16 + 1 + 0
1193 #define DISPLAY_LEN_MAX_3100 16 + 1 + 30
1194 #define DISPLAY_LEN_MIN_3100H 16 + 1 + 0
1195 #define DISPLAY_LEN_MAX_3100H 16 + 1 + 60
1196 #define DISPLAY_LEN_MIN_3200 60
1197 #define DISPLAY_LEN_MAX_3200 60
1198 #define DISPLAY_LEN_MIN_3711 3 + 0 + 1 + 32
1199 #define DISPLAY_LEN_MAX_3711 3 + 31 + 1 + 32
1200 #define DISPLAY_LEN_MIN_4300 32
1201 #define DISPLAY_LEN_MAX_4300 32
1202 #define DISPLAY_LEN_MIN_4800 32 + 1 + 32 + 1 + 2
1203 #define DISPLAY_LEN_MAX_4800 32 + 1 + 32 + 1 + 2
1204 #define DISPLAY_LEN_MIN_5000 16
1205 #define DISPLAY_LEN_MAX_5000 400
1206 #define DISPLAY_LEN_MIN_5100 16
1207 #define DISPLAY_LEN_MAX_5100 16
1208 #define DISPLAY_LEN_MIN_5300 48
1209 #define DISPLAY_LEN_MAX_5300 1024
1210 #define DISPLAY_LEN_MIN_5400 56
1211 #define DISPLAY_LEN_MAX_5400 1024
1212 #define DISPLAY_LEN_MIN_5500 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 48 + 1 + 16
1213 #define DISPLAY_LEN_MAX_5500 60 + 1 + 0 + 1 + 45 + 1 + 48 + 1 + 48 + 1 + 16
1214 #define DISPLAY_LEN_MIN_5600 1 + 1 + 0 + 1 + 1 + 1 + 16 + 1 + 32 + 1 + 1
1215 #define DISPLAY_LEN_MAX_5600 60 + 1 + 0 + 1 + 45 + 1 + 16 + 1 + 32 + 1 + 1024
1216 #define DISPLAY_LEN_MIN_5700 43
1217 #define DISPLAY_LEN_MAX_5700 43
1218 #define DISPLAY_LEN_MIN_5800 40 + 1 + 1
1219 #define DISPLAY_LEN_MAX_5800 40 + 1 + 16
1220 #define DISPLAY_LEN_MIN_6000 40
1221 #define DISPLAY_LEN_MAX_6000 40
1222 #define DISPLAY_LEN_MIN_6100 128
1223 #define DISPLAY_LEN_MAX_6100 128
1224 #define DISPLAY_LEN_MIN_6300 6 + 1 + 8 + 22
1225 #define DISPLAY_LEN_MAX_6300 6 + 1 + 48 + 22
1226 #define DISPLAY_LEN_MIN_6400 9 + 2 + 1 + 16 + 1 + 43
1227 #define DISPLAY_LEN_MAX_6400 9 + 2 + 1 + 48 + 1 + 43
1228 #define DISPLAY_LEN_MIN_6500 9 + 2 + 1 + 16 + 1 + 86
1229 #define DISPLAY_LEN_MAX_6500 9 + 2 + 1 + 48 + 1 + 86
1230 #define DISPLAY_LEN_MIN_6600 1 + 1 + 16 + 1 + 2080
1231 #define DISPLAY_LEN_MAX_6600 6 + 1 + 16 + 1 + 2080
1232 #define DISPLAY_LEN_MIN_6700 7 + 2 + 1 + 16 + 1 + 27
1233 #define DISPLAY_LEN_MAX_6700 7 + 2 + 1 + 48 + 1 + 27
1234 #define DISPLAY_LEN_MIN_6800 32 + 1 + 1 + 1 + 0
1235 #define DISPLAY_LEN_MAX_6800 32 + 1 + 5 + 1 + 32
1236 #define DISPLAY_LEN_MIN_6900 64
1237 #define DISPLAY_LEN_MAX_6900 64
1238 #define DISPLAY_LEN_MIN_7100 4 + 2 + 1 + 64 + 1 + 128
1239 #define DISPLAY_LEN_MAX_7100 4 + 5 + 1 + 64 + 1 + 128
1240 #define DISPLAY_LEN_MIN_7200 19 + 1 + 1 + 1 + 128
1241 #define DISPLAY_LEN_MAX_7200 19 + 5 + 1 + 224 + 128
1242 #define DISPLAY_LEN_MIN_7300 64 + 1 + 40
1243 #define DISPLAY_LEN_MAX_7300 512 + 1 + 40
1244 #define DISPLAY_LEN_MIN_7400 47 + 0
1245 #define DISPLAY_LEN_MAX_7400 47 + 16
1246 #define DISPLAY_LEN_MIN_7500 1 + 6 + 1 + 2 + 1 + 0 + 1 + 0 + 1 + 0 + 1 + 72 + 32
1247 #define DISPLAY_LEN_MAX_7500 1 + 6 + 1 + 2 + 1 + 64 + 1 + 64 + 1 + 128 + 1 + 72 + 32
1248 #define DISPLAY_LEN_MIN_7700 1 + 1 + 16
1249 #define DISPLAY_LEN_MAX_7700 40 + 1 + 16
1250 #define DISPLAY_LEN_MIN_7800 1 + 1 + 40
1251 #define DISPLAY_LEN_MAX_7800 40 + 1 + 40
1252 #define DISPLAY_LEN_MIN_7900 3 + 1 + 8 + 43
1253 #define DISPLAY_LEN_MAX_7900 3 + 1 + 8 + 43
1254 #define DISPLAY_LEN_MIN_8000 2 + 4 + 16 + 64
1255 #define DISPLAY_LEN_MAX_8000 2 + 4 + 16 + 64
1256 #define DISPLAY_LEN_MIN_8100 1 + 8 + 40
1257 #define DISPLAY_LEN_MAX_8100 1 + 8 + 40
1258 #define DISPLAY_LEN_MIN_8200 64 + 1 + 32 + 1 + 1 + 1 + 1
1259 #define DISPLAY_LEN_MAX_8200 64 + 1 + 32 + 1 + 8 + 1 + 2048
1260 #define DISPLAY_LEN_MIN_8300 32 + 1 + 1 + 1 + 1 + 1 + 1
1261 #define DISPLAY_LEN_MAX_8300 32 + 1 + 32 + 1 + 32 + 1 + 5
1262 #define DISPLAY_LEN_MIN_8400 40 + 1 + 40
1263 #define DISPLAY_LEN_MAX_8400 40 + 1 + 40
1264 #define DISPLAY_LEN_MIN_8500 6 + 1 + 1 + 1 + 1
1265 #define DISPLAY_LEN_MAX_8500 6 + 1 + 8 + 1 + 16
1266 #define DISPLAY_LEN_MIN_8600 32
1267 #define DISPLAY_LEN_MAX_8600 32
1268 #define DISPLAY_LEN_MIN_8700 22
1269 #define DISPLAY_LEN_MAX_8700 22
1270 #define DISPLAY_LEN_MIN_8800 1 + 3 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 32 + 1 + 3072
1271 #define DISPLAY_LEN_MAX_8800 1 + 3 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 32 + 1 + 3072
1272 #define DISPLAY_LEN_MIN_8900 6 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 44
1273 #define DISPLAY_LEN_MAX_8900 6 + 1 + 6 + 1 + 2 + 1 + 2 + 1 + 45 + 1 + 44
1274 #define DISPLAY_LEN_MIN_9100 51
1275 #define DISPLAY_LEN_MAX_9100 51
1276 #define DISPLAY_LEN_MIN_9200 3 + 14 + 1 + 43
1277 #define DISPLAY_LEN_MAX_9200 3 + 14 + 1 + 43
1278 #define DISPLAY_LEN_MIN_9300 3 + 14 + 1 + 43
1279 #define DISPLAY_LEN_MAX_9300 3 + 14 + 1 + 43
1280 #define DISPLAY_LEN_MIN_9400 8 + 1 + 4 + 1 + 2 + 1 + 3 + 1 + 2 + 1 + 32 + 1 + 32 + 1 + 40
1281 #define DISPLAY_LEN_MAX_9400 8 + 1 + 4 + 1 + 2 + 1 + 3 + 1 + 2 + 1 + 32 + 1 + 32 + 1 + 40
1282 #define DISPLAY_LEN_MIN_9500 8 + 1 + 4 + 1 + 6 + 1 + 3 + 1 + 2 + 1 + 32 + 1 + 32 + 1 + 64
1283 #define DISPLAY_LEN_MAX_9500 8 + 1 + 4 + 1 + 6 + 1 + 3 + 1 + 2 + 1 + 32 + 1 + 32 + 1 + 64
1284 #define DISPLAY_LEN_MIN_9600 8 + 1 + 4 + 1 + 6 + 1 + 3 + 1 + 2 + 1 + 32 + 1 + 32 + 1 + 64
1285 #define DISPLAY_LEN_MAX_9600 8 + 1 + 4 + 1 + 6 + 1 + 3 + 1 + 2 + 1 + 32 + 1 + 32 + 1 + 64
1286 #define DISPLAY_LEN_MIN_9700 12 + 1 + 32 + 1 + 32 + 1 + 32
1287 #define DISPLAY_LEN_MAX_9700 12 + 1 + 32 + 1 + 32 + 1 + 32
1288 #define DISPLAY_LEN_MIN_9720 12 + 1 + 32 + 1 + 32 + 1 + 32 + 1 + 10
1289 #define DISPLAY_LEN_MAX_9720 12 + 1 + 32 + 1 + 32 + 1 + 32 + 1 + 10
1290 #define DISPLAY_LEN_MIN_9800 12 + 1 + 32 + 1 + 32 + 1 + 40
1291 #define DISPLAY_LEN_MAX_9800 12 + 1 + 32 + 1 + 32 + 1 + 40
1292 #define DISPLAY_LEN_MIN_9820 12 + 1 + 32 + 1 + 32 + 1 + 40 + 1 + 10
1293 #define DISPLAY_LEN_MAX_9820 12 + 1 + 32 + 1 + 32 + 1 + 40 + 1 + 10
1294 #define DISPLAY_LEN_MIN_9900 32
1295 #define DISPLAY_LEN_MAX_9900 32
1296 #define DISPLAY_LEN_MIN_10000 13 + 1 + 1 + 1 + 0 + 44
1297 #define DISPLAY_LEN_MAX_10000 13 + 1 + 6 + 1 + 15 + 44
1298 #define DISPLAY_LEN_MIN_10100 16 + 1 + 1 + 1 + 1 + 1 + 32
1299 #define DISPLAY_LEN_MAX_10100 16 + 1 + 1 + 1 + 1 + 1 + 32
1300 #define DISPLAY_LEN_MIN_10200 10 + 12 + 1 + 44
1301 #define DISPLAY_LEN_MAX_10200 10 + 76 + 1 + 132
1302 #define DISPLAY_LEN_MIN_10300 10 + 1 + 1 + 33
1303 #define DISPLAY_LEN_MAX_10300 10 + 5 + 1 + 49
1304 #define DISPLAY_LEN_MIN_10400 5 + 1 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64
1305 #define DISPLAY_LEN_MAX_10400 5 + 1 + 1 + 1 + 1 + 2 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64
1306 #define DISPLAY_LEN_MIN_10410 5 + 1 + 1 + 1 + 1 + 3 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64
1307 #define DISPLAY_LEN_MAX_10410 5 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64
1308 #define DISPLAY_LEN_MIN_10420 5 + 1 + 1 + 1 + 1 + 3 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64 + 1 + 10
1309 #define DISPLAY_LEN_MAX_10420 5 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64 + 1 + 10
1310 #define DISPLAY_LEN_MIN_10500 5 + 1 + 1 + 1 + 1 + 3 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64
1311 #define DISPLAY_LEN_MAX_10500 5 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64 + 1 + 2 + 1 + 64
1312 #define DISPLAY_LEN_MIN_10600 5 + 1 + 1 + 1 + 1 + 3 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 1
1313 #define DISPLAY_LEN_MAX_10600 5 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 1000
1314 #define DISPLAY_LEN_MIN_10700 5 + 1 + 1 + 1 + 1 + 3 + 1 + 1 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 1
1315 #define DISPLAY_LEN_MAX_10700 5 + 1 + 1 + 1 + 1 + 3 + 1 + 5 + 1 + 1 + 1 + 2 + 1 + 32 + 1 + 1000
1316 #define DISPLAY_LEN_MIN_10800 96
1317 #define DISPLAY_LEN_MAX_10800 96
1318 #define DISPLAY_LEN_MIN_10900 7 + 1 + 1 + 0 + 1 + 24
1319 #define DISPLAY_LEN_MAX_10900 7 + 6 + 1 + 64 + 1 + 88
1320 #define DISPLAY_LEN_MIN_11000 32 + 1 + 56
1321 #define DISPLAY_LEN_MAX_11000 32 + 1 + 56
1322 #define DISPLAY_LEN_MIN_11100 10 + 0 + 1 + 8 + 1 + 32
1323 #define DISPLAY_LEN_MAX_11100 10 + 32 + 1 + 8 + 1 + 32
1324 #define DISPLAY_LEN_MIN_11200 9 + 40 + 1 + 40
1325 #define DISPLAY_LEN_MAX_11200 9 + 40 + 1 + 40
1326 #define DISPLAY_LEN_MIN_11300 1 + 7 + 1 + 2 + 1 + 96 + 1 + 2 + 1 + 16 + 1 + 1 + 1 + 2 + 1 + 96 + 1 + 2 + 1 + 66
1327 #define DISPLAY_LEN_MAX_11300 1 + 7 + 1 + 2 + 1 + 96 + 1 + 2 + 1 + 16 + 1 + 6 + 1 + 2 + 1 + 96 + 1 + 2 + 1 + 66
1328 #define DISPLAY_LEN_MIN_11400 6 + 0 + 1 + 0 + 1 + 0 + 1 + 0 + 1 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 0 + 1 + 3 + 1 + 32
1329 #define DISPLAY_LEN_MAX_11400 6 + 512 + 1 + 512 + 1 + 116 + 1 + 116 + 1 + 246 + 1 + 245 + 1 + 246 + 1 + 245 + 1 + 50 + 1 + 50 + 1 + 50 + 1 + 50 + 1 + 3 + 1 + 32
1330 #define DISPLAY_LEN_MIN_11500 8 + 1 + 8
1331 #define DISPLAY_LEN_MAX_11500 8 + 1 + 8
1332 #define DISPLAY_LEN_MIN_11600 1 + 2 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 32 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 2
1333 #define DISPLAY_LEN_MAX_11600 1 + 2 + 1 + 1 + 1 + 2 + 1 + 1 + 1 + 64 + 1 + 1 + 1 + 32 + 1 + 10 + 1 + 3 + 1 + 3 + 1 + 768
1334 #define DISPLAY_LEN_MIN_11700 64
1335 #define DISPLAY_LEN_MAX_11700 64
1336 #define DISPLAY_LEN_MIN_11800 128
1337 #define DISPLAY_LEN_MAX_11800 128
1338 #define DISPLAY_LEN_MIN_11900 3 + 1 + 1 + 0 + 1 + 12
1339 #define DISPLAY_LEN_MAX_11900 3 + 6 + 1 + 64 + 1 + 88
1340 #define DISPLAY_LEN_MIN_12000 4 + 1 + 1 + 0 + 1 + 16
1341 #define DISPLAY_LEN_MAX_12000 4 + 6 + 1 + 64 + 1 + 88
1342 #define DISPLAY_LEN_MIN_12100 6 + 1 + 1 + 0 + 1 + 16
1343 #define DISPLAY_LEN_MAX_12100 6 + 6 + 1 + 64 + 1 + 88
1344 #define DISPLAY_LEN_MIN_12100 6 + 1 + 1 + 0 + 1 + 16
1345 #define DISPLAY_LEN_MAX_12100 6 + 6 + 1 + 64 + 1 + 88
1346 #define DISPLAY_LEN_MIN_12200 1 + 8 + 1 + 1 + 1 + 1 + 1 + 16 + 1 + 16
1347 #define DISPLAY_LEN_MAX_12200 1 + 8 + 1 + 1 + 1 + 1 + 1 + 16 + 1 + 16
1348 #define DISPLAY_LEN_MIN_12300 160
1349 #define DISPLAY_LEN_MAX_12300 160
1350 #define DISPLAY_LEN_MIN_12400 1 + 4 + 4 + 11
1351 #define DISPLAY_LEN_MAX_12400 1 + 4 + 4 + 11
1352 #define DISPLAY_LEN_MIN_12500 6 + 1 + 1 + 1 + 16 + 1 + 32
1353 #define DISPLAY_LEN_MAX_12500 6 + 1 + 1 + 1 + 16 + 1 + 32
1354 #define DISPLAY_LEN_MIN_12600 64 + 1 + 64
1355 #define DISPLAY_LEN_MAX_12600 64 + 1 + 64
1356 #define DISPLAY_LEN_MIN_12700 1 + 10 + 1 + 1 + 1 + 64
1357 #define DISPLAY_LEN_MAX_12700 1 + 10 + 1 + 5 + 1 + 20000
1358 #define DISPLAY_LEN_MIN_12800 11 + 1 + 20 + 1 + 1 + 1 + 64
1359 #define DISPLAY_LEN_MAX_12800 11 + 1 + 20 + 1 + 5 + 1 + 64
1360
1361 #define DISPLAY_LEN_MIN_11 32 + 1 + 16
1362 #define DISPLAY_LEN_MAX_11 32 + 1 + 32
1363 #define DISPLAY_LEN_MIN_11H 32 + 1 + 32
1364 #define DISPLAY_LEN_MAX_11H 32 + 1 + 64
1365 #define DISPLAY_LEN_MIN_12 32 + 1 + 1
1366 #define DISPLAY_LEN_MAX_12 32 + 1 + 32
1367 #define DISPLAY_LEN_MIN_12H 32 + 1 + 2
1368 #define DISPLAY_LEN_MAX_12H 32 + 1 + 64
1369 #define DISPLAY_LEN_MIN_21 32 + 1 + 1
1370 #define DISPLAY_LEN_MAX_21 32 + 1 + 15
1371 #define DISPLAY_LEN_MIN_21H 32 + 1 + 2
1372 #define DISPLAY_LEN_MAX_21H 32 + 1 + 30
1373 #define DISPLAY_LEN_MIN_22 30 + 1 + 1
1374 #define DISPLAY_LEN_MAX_22 30 + 1 + 15
1375 #define DISPLAY_LEN_MIN_22H 30 + 1 + 2
1376 #define DISPLAY_LEN_MAX_22H 30 + 1 + 30
1377 #define DISPLAY_LEN_MIN_23 32 + 1 + 0
1378 #define DISPLAY_LEN_MAX_23 32 + 1 + 23
1379 #define DISPLAY_LEN_MIN_101 5 + 28
1380 #define DISPLAY_LEN_MAX_101 5 + 28
1381 #define DISPLAY_LEN_MIN_111 6 + 28 + 0
1382 #define DISPLAY_LEN_MAX_111 6 + 28 + 40
1383 #define DISPLAY_LEN_MIN_112 40 + 1 + 20
1384 #define DISPLAY_LEN_MAX_112 40 + 1 + 20
1385 #define DISPLAY_LEN_MIN_121 40 + 1 + 1
1386 #define DISPLAY_LEN_MAX_121 40 + 1 + 32
1387 #define DISPLAY_LEN_MIN_121H 40 + 1 + 2
1388 #define DISPLAY_LEN_MAX_121H 40 + 1 + 64
1389 #define DISPLAY_LEN_MIN_122 8 + 40
1390 #define DISPLAY_LEN_MAX_122 8 + 40
1391 #define DISPLAY_LEN_MIN_124 4 + 1 + 0 + 1 + 40
1392 #define DISPLAY_LEN_MAX_124 4 + 1 + 32 + 1 + 40
1393 #define DISPLAY_LEN_MIN_131 6 + 8 + 80
1394 #define DISPLAY_LEN_MAX_131 6 + 8 + 80
1395 #define DISPLAY_LEN_MIN_132 6 + 8 + 40
1396 #define DISPLAY_LEN_MAX_132 6 + 8 + 40
1397 #define DISPLAY_LEN_MIN_133 28
1398 #define DISPLAY_LEN_MAX_133 28
1399 #define DISPLAY_LEN_MIN_141 14 + 0 + 1 + 28
1400 #define DISPLAY_LEN_MAX_141 14 + 44 + 1 + 28
1401 #define DISPLAY_LEN_MIN_1441 14 + 0 + 1 + 43
1402 #define DISPLAY_LEN_MAX_1441 14 + 24 + 1 + 43
1403 #define DISPLAY_LEN_MIN_1711 9 + 86 + 0
1404 #define DISPLAY_LEN_MAX_1711 9 + 86 + 68
1405 #define DISPLAY_LEN_MIN_1722 8 + 128
1406 #define DISPLAY_LEN_MAX_1722 8 + 128
1407 #define DISPLAY_LEN_MIN_2611 32 + 1 + 0
1408 #define DISPLAY_LEN_MAX_2611 32 + 1 + 23
1409 #define DISPLAY_LEN_MIN_2611H 32 + 1 + 0
1410 #define DISPLAY_LEN_MIN_2612 6 + 0 + 1 + 32
1411 #define DISPLAY_LEN_MAX_2611H 32 + 1 + 46
1412 #define DISPLAY_LEN_MAX_2612 6 + 46 + 1 + 32
1413 #define DISPLAY_LEN_MIN_2711 32 + 1 + 23
1414 #define DISPLAY_LEN_MAX_2711 32 + 1 + 31
1415 #define DISPLAY_LEN_MIN_2711H 32 + 1 + 46
1416 #define DISPLAY_LEN_MAX_2711H 32 + 1 + 62
1417 #define DISPLAY_LEN_MIN_2811 32 + 1 + 0
1418 #define DISPLAY_LEN_MAX_2811 32 + 1 + 31
1419 #define DISPLAY_LEN_MIN_2811H 32 + 1 + 0
1420 #define DISPLAY_LEN_MAX_2811H 32 + 1 + 62
1421 #define DISPLAY_LEN_MIN_7600 40 + 1 + 32
1422 #define DISPLAY_LEN_MAX_7600 40 + 1 + 32
1423
1424 #define HASH_TYPE_MD4 1
1425 #define HASH_TYPE_MD5 2
1426 #define HASH_TYPE_MD5H 3
1427 #define HASH_TYPE_SHA1 4
1428 #define HASH_TYPE_SHA256 5
1429 #define HASH_TYPE_SHA384 6
1430 #define HASH_TYPE_SHA512 7
1431 #define HASH_TYPE_DCC2 8
1432 #define HASH_TYPE_WPA 9
1433 #define HASH_TYPE_LM 10
1434 #define HASH_TYPE_DESCRYPT 11
1435 #define HASH_TYPE_ORACLEH 12
1436 #define HASH_TYPE_DESRACF 13
1437 #define HASH_TYPE_BCRYPT 14
1438 #define HASH_TYPE_KECCAK 15
1439 #define HASH_TYPE_NETNTLM 16
1440 #define HASH_TYPE_RIPEMD160 17
1441 #define HASH_TYPE_WHIRLPOOL 18
1442 #define HASH_TYPE_AES 19
1443 #define HASH_TYPE_GOST 20
1444 #define HASH_TYPE_KRB5PA 21
1445 #define HASH_TYPE_SAPB 22
1446 #define HASH_TYPE_SAPG 23
1447 #define HASH_TYPE_MYSQL 24
1448 #define HASH_TYPE_LOTUS5 25
1449 #define HASH_TYPE_LOTUS6 26
1450 #define HASH_TYPE_ANDROIDFDE 27
1451 #define HASH_TYPE_SCRYPT 28
1452 #define HASH_TYPE_LOTUS8 29
1453 #define HASH_TYPE_OFFICE2007 30
1454 #define HASH_TYPE_OFFICE2010 31
1455 #define HASH_TYPE_OFFICE2013 32
1456 #define HASH_TYPE_OLDOFFICE01 33
1457 #define HASH_TYPE_OLDOFFICE34 34
1458 #define HASH_TYPE_SIPHASH 35
1459 #define HASH_TYPE_PDFU16 36
1460 #define HASH_TYPE_PDFU32 37
1461 #define HASH_TYPE_PBKDF2_SHA256 38
1462 #define HASH_TYPE_BITCOIN_WALLET 39
1463 #define HASH_TYPE_CRC32 40
1464 #define HASH_TYPE_GOST_2012SBOG_256 41
1465 #define HASH_TYPE_GOST_2012SBOG_512 42
1466 #define HASH_TYPE_PBKDF2_MD5 43
1467 #define HASH_TYPE_PBKDF2_SHA1 44
1468 #define HASH_TYPE_PBKDF2_SHA512 45
1469 #define HASH_TYPE_ECRYPTFS 46
1470 #define HASH_TYPE_ORACLET 47
1471 #define HASH_TYPE_BSDICRYPT 48
1472 #define HASH_TYPE_RAR3HP 49
1473
1474 #define KERN_TYPE_MD5 0
1475 #define KERN_TYPE_MD5_PWSLT 10
1476 #define KERN_TYPE_MD5_SLTPW 20
1477 #define KERN_TYPE_MD5_PWUSLT 30
1478 #define KERN_TYPE_MD5_SLTPWU 40
1479 #define KERN_TYPE_HMACMD5_PW 50
1480 #define KERN_TYPE_HMACMD5_SLT 60
1481 #define KERN_TYPE_SHA1 100
1482 #define KERN_TYPE_SHA1_PWSLT 110
1483 #define KERN_TYPE_SHA1_SLTPW 120
1484 #define KERN_TYPE_SHA1_PWUSLT 130
1485 #define KERN_TYPE_SHA1_SLTPWU 140
1486 #define KERN_TYPE_HMACSHA1_PW 150
1487 #define KERN_TYPE_HMACSHA1_SLT 160
1488 #define KERN_TYPE_SHA1_LINKEDIN 190
1489 #define KERN_TYPE_MYSQL 200
1490 #define KERN_TYPE_MYSQL41 300
1491 #define KERN_TYPE_PHPASS 400
1492 #define KERN_TYPE_MD5CRYPT 500
1493 #define KERN_TYPE_MD4 900
1494 #define KERN_TYPE_MD4_PWU 1000
1495 #define KERN_TYPE_MD44_PWUSLT 1100
1496 #define KERN_TYPE_SHA256 1400
1497 #define KERN_TYPE_SHA256_PWSLT 1410
1498 #define KERN_TYPE_SHA256_SLTPW 1420
1499 #define KERN_TYPE_SHA256_PWUSLT 1430
1500 #define KERN_TYPE_SHA256_SLTPWU 1440
1501 #define KERN_TYPE_HMACSHA256_PW 1450
1502 #define KERN_TYPE_HMACSHA256_SLT 1460
1503 #define KERN_TYPE_DESCRYPT 1500
1504 #define KERN_TYPE_APR1CRYPT 1600
1505 #define KERN_TYPE_SHA512 1700
1506 #define KERN_TYPE_SHA512_PWSLT 1710
1507 #define KERN_TYPE_SHA512_SLTPW 1720
1508 #define KERN_TYPE_SHA512_PWSLTU 1730
1509 #define KERN_TYPE_SHA512_SLTPWU 1740
1510 #define KERN_TYPE_HMACSHA512_PW 1750
1511 #define KERN_TYPE_HMACSHA512_SLT 1760
1512 #define KERN_TYPE_SHA512CRYPT 1800
1513 #define KERN_TYPE_DCC2 2100
1514 #define KERN_TYPE_MD5PIX 2400
1515 #define KERN_TYPE_MD5ASA 2410
1516 #define KERN_TYPE_WPA 2500
1517 #define KERN_TYPE_MD55 2600
1518 #define KERN_TYPE_MD55_PWSLT1 2610
1519 #define KERN_TYPE_MD55_PWSLT2 2710
1520 #define KERN_TYPE_MD55_SLTPW 2810
1521 #define KERN_TYPE_LM 3000
1522 #define KERN_TYPE_ORACLEH 3100
1523 #define KERN_TYPE_BCRYPT 3200
1524 #define KERN_TYPE_MD5_SLT_MD5_PW 3710
1525 #define KERN_TYPE_MD5_SLT_PW_SLT 3800
1526 #define KERN_TYPE_MD5U5 4300
1527 #define KERN_TYPE_MD5U5_PWSLT1 4310
1528 #define KERN_TYPE_MD5_SHA1 4400
1529 #define KERN_TYPE_SHA11 4500
1530 #define KERN_TYPE_SHA1_MD5 4700
1531 #define KERN_TYPE_MD5_CHAP 4800
1532 #define KERN_TYPE_SHA1_SLT_PW_SLT 4900
1533 #define KERN_TYPE_KECCAK 5000
1534 #define KERN_TYPE_MD5H 5100
1535 #define KERN_TYPE_PSAFE3 5200
1536 #define KERN_TYPE_IKEPSK_MD5 5300
1537 #define KERN_TYPE_IKEPSK_SHA1 5400
1538 #define KERN_TYPE_NETNTLMv1 5500
1539 #define KERN_TYPE_NETNTLMv2 5600
1540 #define KERN_TYPE_ANDROIDPIN 5800
1541 #define KERN_TYPE_RIPEMD160 6000
1542 #define KERN_TYPE_WHIRLPOOL 6100
1543 #define KERN_TYPE_TCRIPEMD160_XTS512 6211
1544 #define KERN_TYPE_TCRIPEMD160_XTS1024 6212
1545 #define KERN_TYPE_TCRIPEMD160_XTS1536 6213
1546 #define KERN_TYPE_TCSHA512_XTS512 6221
1547 #define KERN_TYPE_TCSHA512_XTS1024 6222
1548 #define KERN_TYPE_TCSHA512_XTS1536 6223
1549 #define KERN_TYPE_TCWHIRLPOOL_XTS512 6231
1550 #define KERN_TYPE_TCWHIRLPOOL_XTS1024 6232
1551 #define KERN_TYPE_TCWHIRLPOOL_XTS1536 6233
1552 #define KERN_TYPE_MD5AIX 6300
1553 #define KERN_TYPE_SHA256AIX 6400
1554 #define KERN_TYPE_SHA512AIX 6500
1555 #define KERN_TYPE_AGILEKEY 6600
1556 #define KERN_TYPE_SHA1AIX 6700
1557 #define KERN_TYPE_LASTPASS 6800
1558 #define KERN_TYPE_GOST 6900
1559 #define KERN_TYPE_PBKDF2_SHA512 7100
1560 #define KERN_TYPE_RAKP 7300
1561 #define KERN_TYPE_SHA256CRYPT 7400
1562 #define KERN_TYPE_KRB5PA 7500
1563 #define KERN_TYPE_SHA1_SLT_SHA1_PW 7600
1564 #define KERN_TYPE_SAPB 7700
1565 #define KERN_TYPE_SAPG 7800
1566 #define KERN_TYPE_DRUPAL7 7900
1567 #define KERN_TYPE_SYBASEASE 8000
1568 #define KERN_TYPE_NETSCALER 8100
1569 #define KERN_TYPE_CLOUDKEY 8200
1570 #define KERN_TYPE_NSEC3 8300
1571 #define KERN_TYPE_WBB3 8400
1572 #define KERN_TYPE_RACF 8500
1573 #define KERN_TYPE_LOTUS5 8600
1574 #define KERN_TYPE_LOTUS6 8700
1575 #define KERN_TYPE_ANDROIDFDE 8800
1576 #define KERN_TYPE_SCRYPT 8900
1577 #define KERN_TYPE_PSAFE2 9000
1578 #define KERN_TYPE_LOTUS8 9100
1579 #define KERN_TYPE_OFFICE2007 9400
1580 #define KERN_TYPE_OFFICE2010 9500
1581 #define KERN_TYPE_OFFICE2013 9600
1582 #define KERN_TYPE_OLDOFFICE01 9700
1583 #define KERN_TYPE_OLDOFFICE01CM1 9710
1584 #define KERN_TYPE_OLDOFFICE01CM2 9720
1585 #define KERN_TYPE_OLDOFFICE34 9800
1586 #define KERN_TYPE_OLDOFFICE34CM1 9810
1587 #define KERN_TYPE_OLDOFFICE34CM2 9820
1588 #define KERN_TYPE_RADMIN2 9900
1589 #define KERN_TYPE_SIPHASH 10100
1590 #define KERN_TYPE_SAPH_SHA1 10300
1591 #define KERN_TYPE_PDF11 10400
1592 #define KERN_TYPE_PDF11CM1 10410
1593 #define KERN_TYPE_PDF11CM2 10420
1594 #define KERN_TYPE_PDF14 10500
1595 #define KERN_TYPE_PDF17L8 10700
1596 #define KERN_TYPE_SHA384 10800
1597 #define KERN_TYPE_PBKDF2_SHA256 10900
1598 #define KERN_TYPE_PRESTASHOP 11000
1599 #define KERN_TYPE_POSTGRESQL_AUTH 11100
1600 #define KERN_TYPE_MYSQL_AUTH 11200
1601 #define KERN_TYPE_BITCOIN_WALLET 11300
1602 #define KERN_TYPE_SIP_AUTH 11400
1603 #define KERN_TYPE_CRC32 11500
1604 #define KERN_TYPE_SEVEN_ZIP 11600
1605 #define KERN_TYPE_GOST_2012SBOG_256 11700
1606 #define KERN_TYPE_GOST_2012SBOG_512 11800
1607 #define KERN_TYPE_PBKDF2_MD5 11900
1608 #define KERN_TYPE_PBKDF2_SHA1 12000
1609 #define KERN_TYPE_ECRYPTFS 12200
1610 #define KERN_TYPE_ORACLET 12300
1611 #define KERN_TYPE_BSDICRYPT 12400
1612 #define KERN_TYPE_RAR3 12500
1613 #define KERN_TYPE_CF10 12600
1614 #define KERN_TYPE_MYWALLET 12700
1615 #define KERN_TYPE_MS_DRSR 12800
1616
1617 /**
1618 * signatures
1619 */
1620
1621 #define SIGNATURE_PHPASS1 "$P$"
1622 #define SIGNATURE_PHPASS2 "$H$"
1623 #define SIGNATURE_MD5CRYPT "$1$"
1624 #define SIGNATURE_BCRYPT1 "$2a$"
1625 #define SIGNATURE_BCRYPT2 "$2x$"
1626 #define SIGNATURE_BCRYPT3 "$2y$"
1627 #define SIGNATURE_SHA512CRYPT "$6$"
1628 #define SIGNATURE_MD5APR1 "$apr1$"
1629 #define SIGNATURE_MSSQL "0x0100"
1630 #define SIGNATURE_MSSQL2012 "0x0200"
1631 #define SIGNATURE_SHA1B64 "{SHA}"
1632 #define SIGNATURE_SSHA1B64_lower "{ssha}"
1633 #define SIGNATURE_SSHA1B64_upper "{SSHA}"
1634 #define SIGNATURE_EPISERVER "$episerver$*0*"
1635 #define SIGNATURE_EPISERVER4 "$episerver$*1*"
1636 #define SIGNATURE_PSAFE3 "PWS3"
1637 #define SIGNATURE_TRUECRYPT "TRUE"
1638 #define SIGNATURE_MD5AIX "{smd5}"
1639 #define SIGNATURE_SHA1AIX "{ssha1}"
1640 #define SIGNATURE_SHA256AIX "{ssha256}"
1641 #define SIGNATURE_SHA512AIX "{ssha512}"
1642 #define SIGNATURE_SHA256CRYPT "$5$"
1643 #define SIGNATURE_SHA512OSX "$ml$"
1644 #define SIGNATURE_SHA512GRUB "grub.pbkdf2.sha512."
1645 #define SIGNATURE_SHA512B64S "{SSHA512}"
1646 #define SIGNATURE_KRB5PA "$krb5pa$23"
1647 #define SIGNATURE_DRUPAL7 "$S$"
1648 #define SIGNATURE_SYBASEASE "0xc007"
1649 #define SIGNATURE_NETSCALER "1"
1650 #define SIGNATURE_DCC2 "$DCC2$"
1651 #define SIGNATURE_RACF "$racf$"
1652 #define SIGNATURE_PHPS "$PHPS$"
1653 #define SIGNATURE_MEDIAWIKI_B "$B$"
1654 #define SIGNATURE_ANDROIDFDE "$fde$"
1655 #define SIGNATURE_SCRYPT "SCRYPT"
1656 #define SIGNATURE_CISCO8 "$8$"
1657 #define SIGNATURE_CISCO9 "$9$"
1658 #define SIGNATURE_OFFICE2007 "$office$"
1659 #define SIGNATURE_OFFICE2010 "$office$"
1660 #define SIGNATURE_OFFICE2013 "$office$"
1661 #define SIGNATURE_OLDOFFICE0 "$oldoffice$0"
1662 #define SIGNATURE_OLDOFFICE1 "$oldoffice$1"
1663 #define SIGNATURE_OLDOFFICE3 "$oldoffice$3"
1664 #define SIGNATURE_OLDOFFICE4 "$oldoffice$4"
1665 #define SIGNATURE_DJANGOSHA1 "sha1$"
1666 #define SIGNATURE_DJANGOPBKDF2 "pbkdf2_sha256$"
1667 #define SIGNATURE_CRAM_MD5 "$cram_md5$"
1668 #define SIGNATURE_SAPH_SHA1 "{x-issha, "
1669 #define SIGNATURE_PDF "$pdf$"
1670 #define SIGNATURE_PBKDF2_SHA256 "sha256:"
1671 #define SIGNATURE_POSTGRESQL_AUTH "$postgres$"
1672 #define SIGNATURE_MYSQL_AUTH "$mysqlna$"
1673 #define SIGNATURE_BITCOIN_WALLET "$bitcoin$"
1674 #define SIGNATURE_SIP_AUTH "$sip$*"
1675 #define SIGNATURE_SEVEN_ZIP "$7z$"
1676 #define SIGNATURE_PBKDF2_MD5 "md5:"
1677 #define SIGNATURE_PBKDF2_SHA1 "sha1:"
1678 #define SIGNATURE_PBKDF2_SHA512 "sha512:"
1679 #define SIGNATURE_ECRYPTFS "$ecryptfs$"
1680 #define SIGNATURE_BSDICRYPT "_"
1681 #define SIGNATURE_RAR3 "$RAR3$"
1682 #define SIGNATURE_MYWALLET "$blockchain$"
1683 #define SIGNATURE_MS_DRSR "v1;PPH1_MD4"
1684
1685 /**
1686 * Default iteration numbers
1687 */
1688
1689 #define ROUNDS_PHPASS (1 << 11) // $P$B
1690 #define ROUNDS_DCC2 10240
1691 #define ROUNDS_WPA2 4096
1692 #define ROUNDS_BCRYPT (1 << 5)
1693 #define ROUNDS_PSAFE3 2048
1694 #define ROUNDS_ANDROIDPIN 1024
1695 #define ROUNDS_TRUECRYPT_1K 1000
1696 #define ROUNDS_TRUECRYPT_2K 2000
1697 #define ROUNDS_SHA1AIX (1 << 6)
1698 #define ROUNDS_SHA256AIX (1 << 6)
1699 #define ROUNDS_SHA512AIX (1 << 6)
1700 #define ROUNDS_MD5CRYPT 1000
1701 #define ROUNDS_SHA256CRYPT 5000
1702 #define ROUNDS_SHA512CRYPT 5000
1703 #define ROUNDS_GRUB 10000
1704 #define ROUNDS_SHA512OSX 35000
1705 #define ROUNDS_AGILEKEY 1000
1706 #define ROUNDS_LASTPASS 500
1707 #define ROUNDS_DRUPAL7 (1 << 14) // $S$C
1708 #define ROUNDS_CLOUDKEY 40000
1709 #define ROUNDS_NSEC3 1
1710 #define ROUNDS_ANDROIDFDE 2000
1711 #define ROUNDS_PSAFE2 1000
1712 #define ROUNDS_LOTUS8 5000
1713 #define ROUNDS_CISCO8 20000
1714 #define ROUNDS_OFFICE2007 50000
1715 #define ROUNDS_OFFICE2010 100000
1716 #define ROUNDS_OFFICE2013 100000
1717 #define ROUNDS_DJANGOPBKDF2 20000
1718 #define ROUNDS_SAPH_SHA1 1024
1719 #define ROUNDS_PDF14 (50 + 20)
1720 #define ROUNDS_PDF17L8 64
1721 #define ROUNDS_PBKDF2_SHA256 1000
1722 #define ROUNDS_BITCOIN_WALLET 200000
1723 #define ROUNDS_SEVEN_ZIP (1 << 19)
1724 #define ROUNDS_PBKDF2_MD5 1000
1725 #define ROUNDS_PBKDF2_SHA1 1000
1726 #define ROUNDS_PBKDF2_SHA512 1000
1727 #define ROUNDS_ECRYPTFS 65536
1728 #define ROUNDS_ORACLET 4096
1729 #define ROUNDS_BSDICRYPT 2900
1730 #define ROUNDS_RAR3 262144
1731 #define ROUNDS_MYWALLET 10
1732 #define ROUNDS_MS_DRSR 100
1733
1734 /**
1735 * salt types
1736 */
1737
1738 #define SALT_TYPE_NONE 1
1739 #define SALT_TYPE_EMBEDDED 2
1740 #define SALT_TYPE_INTERN 3
1741 #define SALT_TYPE_EXTERN 4
1742 #define SALT_TYPE_VIRTUAL 5
1743
1744 /**
1745 * optimizer options
1746 */
1747
1748 #define OPTI_TYPE_ZERO_BYTE (1 << 1)
1749 #define OPTI_TYPE_PRECOMPUTE_INIT (1 << 2)
1750 #define OPTI_TYPE_PRECOMPUTE_MERKLE (1 << 3)
1751 #define OPTI_TYPE_PRECOMPUTE_PERMUT (1 << 4)
1752 #define OPTI_TYPE_MEET_IN_MIDDLE (1 << 5)
1753 #define OPTI_TYPE_EARLY_SKIP (1 << 6)
1754 #define OPTI_TYPE_NOT_SALTED (1 << 7)
1755 #define OPTI_TYPE_NOT_ITERATED (1 << 8)
1756 #define OPTI_TYPE_PREPENDED_SALT (1 << 9)
1757 #define OPTI_TYPE_APPENDED_SALT (1 << 10)
1758 #define OPTI_TYPE_SINGLE_HASH (1 << 11)
1759 #define OPTI_TYPE_SINGLE_SALT (1 << 12)
1760 #define OPTI_TYPE_BRUTE_FORCE (1 << 13)
1761 #define OPTI_TYPE_RAW_HASH (1 << 15)
1762
1763 #define OPTI_STR_ZERO_BYTE "Zero-Byte"
1764 #define OPTI_STR_PRECOMPUTE_INIT "Precompute-Init"
1765 #define OPTI_STR_PRECOMPUTE_MERKLE "Precompute-Merkle-Demgard"
1766 #define OPTI_STR_PRECOMPUTE_PERMUT "Precompute-Final-Permutation"
1767 #define OPTI_STR_MEET_IN_MIDDLE "Meet-In-The-Middle"
1768 #define OPTI_STR_EARLY_SKIP "Early-Skip"
1769 #define OPTI_STR_NOT_SALTED "Not-Salted"
1770 #define OPTI_STR_NOT_ITERATED "Not-Iterated"
1771 #define OPTI_STR_PREPENDED_SALT "Prepended-Salt"
1772 #define OPTI_STR_APPENDED_SALT "Appended-Salt"
1773 #define OPTI_STR_SINGLE_HASH "Single-Hash"
1774 #define OPTI_STR_SINGLE_SALT "Single-Salt"
1775 #define OPTI_STR_BRUTE_FORCE "Brute-Force"
1776 #define OPTI_STR_RAW_HASH "Raw-Hash"
1777
1778 /**
1779 * hash options
1780 */
1781
1782 #define OPTS_TYPE_PT_UNICODE (1 << 0)
1783 #define OPTS_TYPE_PT_UPPER (1 << 1)
1784 #define OPTS_TYPE_PT_LOWER (1 << 2)
1785 #define OPTS_TYPE_PT_ADD01 (1 << 3)
1786 #define OPTS_TYPE_PT_ADD02 (1 << 4)
1787 #define OPTS_TYPE_PT_ADD80 (1 << 5)
1788 #define OPTS_TYPE_PT_ADDBITS14 (1 << 6)
1789 #define OPTS_TYPE_PT_ADDBITS15 (1 << 7)
1790 #define OPTS_TYPE_PT_GENERATE_LE (1 << 8)
1791 #define OPTS_TYPE_PT_GENERATE_BE (1 << 9)
1792 #define OPTS_TYPE_PT_NEVERCRACK (1 << 10) // if we want all possible results
1793 #define OPTS_TYPE_PT_BITSLICE (1 << 11)
1794 #define OPTS_TYPE_ST_UNICODE (1 << 12)
1795 #define OPTS_TYPE_ST_UPPER (1 << 13)
1796 #define OPTS_TYPE_ST_LOWER (1 << 14)
1797 #define OPTS_TYPE_ST_ADD01 (1 << 15)
1798 #define OPTS_TYPE_ST_ADD02 (1 << 16)
1799 #define OPTS_TYPE_ST_ADD80 (1 << 17)
1800 #define OPTS_TYPE_ST_ADDBITS14 (1 << 18)
1801 #define OPTS_TYPE_ST_ADDBITS15 (1 << 19)
1802 #define OPTS_TYPE_ST_GENERATE_LE (1 << 20)
1803 #define OPTS_TYPE_ST_GENERATE_BE (1 << 21)
1804 #define OPTS_TYPE_ST_HEX (1 << 22)
1805 #define OPTS_TYPE_ST_BASE64 (1 << 23)
1806 #define OPTS_TYPE_HASH_COPY (1 << 24)
1807 #define OPTS_TYPE_HOOK12 (1 << 25)
1808 #define OPTS_TYPE_HOOK23 (1 << 26)
1809
1810 /**
1811 * digests
1812 */
1813
1814 #define DGST_SIZE_0 0
1815 #define DGST_SIZE_4_2 (2 * sizeof (uint)) // 8
1816 #define DGST_SIZE_4_4 (4 * sizeof (uint)) // 16
1817 #define DGST_SIZE_4_5 (5 * sizeof (uint)) // 20
1818 #define DGST_SIZE_4_6 (6 * sizeof (uint)) // 24
1819 #define DGST_SIZE_4_8 (8 * sizeof (uint)) // 32
1820 #define DGST_SIZE_4_16 (16 * sizeof (uint)) // 64 !!!
1821 #define DGST_SIZE_4_32 (32 * sizeof (uint)) // 128 !!!
1822 #define DGST_SIZE_4_64 (64 * sizeof (uint)) // 256
1823 #define DGST_SIZE_8_8 (8 * sizeof (uint64_t)) // 64 !!!
1824 #define DGST_SIZE_8_16 (16 * sizeof (uint64_t)) // 128 !!!
1825 #define DGST_SIZE_8_25 (25 * sizeof (uint64_t)) // 200
1826
1827 /**
1828 * parser
1829 */
1830
1831 #define PARSER_OK 0
1832 #define PARSER_COMMENT -1
1833 #define PARSER_GLOBAL_ZERO -2
1834 #define PARSER_GLOBAL_LENGTH -3
1835 #define PARSER_HASH_LENGTH -4
1836 #define PARSER_HASH_VALUE -5
1837 #define PARSER_SALT_LENGTH -6
1838 #define PARSER_SALT_VALUE -7
1839 #define PARSER_SALT_ITERATION -8
1840 #define PARSER_SEPARATOR_UNMATCHED -9
1841 #define PARSER_SIGNATURE_UNMATCHED -10
1842 #define PARSER_HCCAP_FILE_SIZE -11
1843 #define PARSER_HCCAP_EAPOL_SIZE -12
1844 #define PARSER_PSAFE2_FILE_SIZE -13
1845 #define PARSER_PSAFE3_FILE_SIZE -14
1846 #define PARSER_TC_FILE_SIZE -15
1847 #define PARSER_SIP_AUTH_DIRECTIVE -16
1848 #define PARSER_UNKNOWN_ERROR -255
1849
1850 #define PA_000 "OK"
1851 #define PA_001 "Ignored due to comment"
1852 #define PA_002 "Ignored due to zero length"
1853 #define PA_003 "Line-length exception"
1854 #define PA_004 "Hash-length exception"
1855 #define PA_005 "Hash-value exception"
1856 #define PA_006 "Salt-length exception"
1857 #define PA_007 "Salt-value exception"
1858 #define PA_008 "Salt-iteration count exception"
1859 #define PA_009 "Separator unmatched"
1860 #define PA_010 "Signature unmatched"
1861 #define PA_011 "Invalid hccap filesize"
1862 #define PA_012 "Invalid eapol size"
1863 #define PA_013 "Invalid psafe2 filesize"
1864 #define PA_014 "Invalid psafe3 filesize"
1865 #define PA_015 "Invalid truecrypt filesize"
1866 #define PA_016 "Invalid SIP directive, only MD5 is supported"
1867 #define PA_255 "Unknown error"
1868
1869 /**
1870 * status
1871 */
1872
1873 #define STATUS_STARTING 0
1874 #define STATUS_INIT 1
1875 #define STATUS_RUNNING 2
1876 #define STATUS_PAUSED 3
1877 #define STATUS_EXHAUSTED 4
1878 #define STATUS_CRACKED 5
1879 #define STATUS_ABORTED 6
1880 #define STATUS_QUIT 7
1881 #define STATUS_BYPASS 8
1882 #define STATUS_STOP_AT_CHECKPOINT 9
1883
1884 #define ST_0000 "Initializing"
1885 #define ST_0001 "Starting"
1886 #define ST_0002 "Running"
1887 #define ST_0003 "Paused"
1888 #define ST_0004 "Exhausted"
1889 #define ST_0005 "Cracked"
1890 #define ST_0006 "Aborted"
1891 #define ST_0007 "Quit"
1892 #define ST_0008 "Bypass"
1893 #define ST_0009 "Running (stop at checkpoint)"
1894
1895 /**
1896 * kernel types
1897 */
1898
1899 #define KERN_RUN_MP 101
1900 #define KERN_RUN_MP_L 102
1901 #define KERN_RUN_MP_R 103
1902
1903 #define KERN_RUN_1 1000
1904 #define KERN_RUN_12 1500
1905 #define KERN_RUN_2 2000
1906 #define KERN_RUN_23 2500
1907 #define KERN_RUN_3 3000
1908
1909 /*
1910 * functions
1911 */
1912
1913 #define ROTATE_LEFT(a,n) rotl32 ((a), (n))
1914 #define ROTATE_RIGHT(a,n) rotr32 ((a), (n))
1915
1916 uint32_t rotl32 (const uint32_t a, const uint n);
1917 uint32_t rotr32 (const uint32_t a, const uint n);
1918 uint64_t rotl64 (const uint64_t a, const uint n);
1919 uint64_t rotr64 (const uint64_t a, const uint n);
1920
1921 void dump_hex (const char *s, size_t size);
1922
1923 void truecrypt_crc32 (char *file, unsigned char keytab[64]);
1924
1925 char *get_exec_path ();
1926 char *get_install_dir (const char *progname);
1927 char *get_profile_dir (const char *homedir);
1928 char *get_session_dir (const char *profile_dir);
1929
1930 uint get_vliw_by_compute_capability (const uint major, const uint minor);
1931 uint get_vliw_by_device_name (const char *device_name);
1932
1933 void *rulefind (const void *key, void *base, int nmemb, size_t size, int (*compar) (const void *, const void *));
1934
1935 int sort_by_mtime (const void *p1, const void *p2);
1936 int sort_by_cpu_rule (const void *p1, const void *p2);
1937 int sort_by_gpu_rule (const void *p1, const void *p2);
1938 int sort_by_stringptr (const void *p1, const void *p2);
1939 int sort_by_dictstat (const void *s1, const void *s2);
1940 int sort_by_bitmap (const void *s1, const void *s2);
1941
1942 int sort_by_pot (const void *v1, const void *v2);
1943 int sort_by_hash (const void *v1, const void *v2);
1944 int sort_by_hash_no_salt(const void *v1, const void *v2);
1945 int sort_by_salt (const void *v1, const void *v2);
1946 int sort_by_salt_buf (const void *v1, const void *v2);
1947 int sort_by_hash_t_salt (const void *v1, const void *v2);
1948 int sort_by_digest_4_2 (const void *v1, const void *v2);
1949 int sort_by_digest_4_4 (const void *v1, const void *v2);
1950 int sort_by_digest_4_5 (const void *v1, const void *v2);
1951 int sort_by_digest_4_6 (const void *v1, const void *v2);
1952 int sort_by_digest_4_8 (const void *v1, const void *v2);
1953 int sort_by_digest_4_16 (const void *v1, const void *v2);
1954 int sort_by_digest_4_32 (const void *v1, const void *v2);
1955 int sort_by_digest_4_64 (const void *v1, const void *v2);
1956 int sort_by_digest_8_8 (const void *v1, const void *v2);
1957 int sort_by_digest_8_16 (const void *v1, const void *v2);
1958 int sort_by_digest_8_25 (const void *v1, const void *v2);
1959 int sort_by_digest_p0p1 (const void *v1, const void *v2);
1960
1961 // special version for hccap (last 2 uints should be skipped where the digest is located)
1962 int sort_by_hash_t_salt_hccap (const void *v1, const void *v2);
1963
1964 char hex_convert (const char c);
1965 char hex_to_char (const char hex[2]);
1966 uint hex_to_uint (const char hex[8]);
1967 uint64_t hex_to_uint64_t (const char hex[16]);
1968
1969 void format_debug (char * debug_file, uint debug_mode, unsigned char *orig_plain_ptr, uint orig_plain_len, unsigned char *mod_plain_ptr, uint mod_plain_len, char *rule_buf, int rule_len);
1970 void format_plain (FILE *fp, unsigned char *plain_ptr, uint plain_len, uint outfile_autohex);
1971 void format_output (FILE *out_fp, char *out_buf, unsigned char *plain_ptr, const uint plain_len, const uint64_t crackpos, unsigned char *username, const uint user_len);
1972 void handle_show_request (pot_t *pot, uint pot_cnt, char *input_buf, int input_len, hash_t *hashes_buf, int (*sort_by_pot) (const void *, const void *), FILE *out_fp);
1973 void handle_left_request (pot_t *pot, uint pot_cnt, char *input_buf, int input_len, hash_t *hashes_buf, int (*sort_by_pot) (const void *, const void *), FILE *out_fp);
1974 void handle_show_request_lm (pot_t *pot, uint pot_cnt, char *input_buf, int input_len, hash_t *hash_left, hash_t *hash_right, int (*sort_by_pot) (const void *, const void *), FILE *out_fp);
1975 void handle_left_request_lm (pot_t *pot, uint pot_cnt, char *input_buf, int input_len, hash_t *hash_left, hash_t *hash_right, int (*sort_by_pot) (const void *, const void *), FILE *out_fp);
1976
1977 uint devices_to_devicemask (char *gpu_devices);
1978 uint get_random_num (uint min, uint max);
1979 uint32_t mydivc32 (const uint32_t dividend, const uint32_t divisor);
1980 uint64_t mydivc64 (const uint64_t dividend, const uint64_t divisor);
1981
1982 void ascii_digest (char out_buf[1024], uint salt_pos, uint digest_pos);
1983 void to_hccap_t (hccap_t *hccap, uint salt_pos, uint digest_pos);
1984
1985 void format_speed_display (float val, char *buf, size_t len);
1986 void format_timer_display (struct tm *tm, char *buf, size_t len);
1987 void lowercase (char *buf, int len);
1988 void uppercase (char *buf, int len);
1989 int fgetl (FILE *fp, char *line_buf);
1990 int in_superchop (char *buf);
1991 char **scan_directory (const char *path);
1992 int count_dictionaries (char **dictionary_files);
1993 char *strparser (const uint parser_status);
1994 char *stroptitype (const uint opti_type);
1995 char *strhashtype (const uint hash_mode);
1996 char *strstatus (const uint threads_status);
1997 void status ();
1998
1999 void *mycalloc (size_t nmemb, size_t size);
2000 void myfree (void *ptr);
2001 void *mymalloc (size_t size);
2002 void *myrealloc (void *ptr, size_t oldsz, size_t add);
2003 char *mystrdup (const char *s);
2004
2005 char *logfile_generate_topid ();
2006 char *logfile_generate_subid ();
2007 void logfile_append (const char *fmt, ...);
2008
2009 #ifdef _WIN
2010 void fsync (int fd);
2011 #endif
2012
2013 int hm_get_adapter_index_nv (HM_ADAPTER_NV nvGPUHandle[DEVICES_MAX]);
2014
2015 int get_adapters_num_amd (HM_LIB hm_dll, int *iNumberAdapters);
2016
2017 int hm_get_device_num (HM_LIB hm_dll, HM_ADAPTER_AMD hm_adapter_index, int *hm_device_num);
2018
2019 // void hm_get_opencl_busid_devid (hm_attrs_t *hm_device, uint opencl_num_devices, cl_device_id *devices);
2020
2021 int hm_get_adapter_index_amd (hm_attrs_t *hm_device, uint32_t *valid_adl_device_list, int num_adl_adapters, LPAdapterInfo lpAdapterInfo);
2022
2023 LPAdapterInfo hm_get_adapter_info_amd (HM_LIB hm_dll, int iNumberAdapters);
2024
2025 uint32_t *hm_get_list_valid_adl_adapters (int iNumberAdapters, int *num_adl_adapters, LPAdapterInfo lpAdapterInfo);
2026
2027 int hm_get_overdrive_version (HM_LIB hm_dll, hm_attrs_t *hm_device, uint32_t *valid_adl_device_list, int num_adl_adapters, LPAdapterInfo lpAdapterInfo);
2028 int hm_check_fanspeed_control (HM_LIB hm_dll, hm_attrs_t *hm_device, uint32_t *valid_adl_device_list, int num_adl_adapters, LPAdapterInfo lpAdapterInfo);
2029
2030 void hm_close (HM_LIB hm_dll);
2031
2032 HM_LIB hm_init ();
2033
2034 int hm_get_temperature_with_device_id (const uint device_id);
2035 int hm_get_fanspeed_with_device_id (const uint device_id);
2036 int hm_get_utilization_with_device_id (const uint device_id);
2037
2038 int hm_set_fanspeed_with_device_id_amd (const uint device_id, const int fanspeed);
2039
2040 void myabort ();
2041 void myquit ();
2042
2043 uint set_gpu_accel (uint hash_mode);
2044 uint set_gpu_loops (uint hash_mode);
2045 void set_cpu_affinity (char *cpu_affinity);
2046
2047 void eula_print (const char *progname);
2048 void usage_mini_print (const char *progname);
2049 void usage_big_print (const char *progname);
2050
2051 void mp_css_to_uniq_tbl (uint css_cnt, cs_t *css, uint uniq_tbls[SP_PW_MAX][CHARSIZ]);
2052 void mp_cut_at (char *mask, uint max);
2053 void mp_exec (uint64_t val, char *buf, cs_t *css, int css_cnt);
2054 cs_t *mp_gen_css (char *mask_buf, size_t mask_len, cs_t *mp_sys, cs_t *mp_usr, uint *css_cnt);
2055 uint64_t mp_get_sum (uint css_cnt, cs_t *css);
2056 void mp_setup_sys (cs_t *mp_sys);
2057 void mp_setup_usr (cs_t *mp_sys, cs_t *mp_usr, char *buf, uint index);
2058 void mp_reset_usr (cs_t *mp_usr, uint index);
2059 char *mp_get_truncated_mask (char *mask_buf, size_t mask_len, uint len);
2060
2061 uint64_t sp_get_sum (uint start, uint stop, cs_t *root_css_buf);
2062 void sp_exec (uint64_t ctx, char *pw_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint start, uint stop);
2063 int sp_comp_val (const void *p1, const void *p2);
2064 void sp_setup_tbl (const char *install_dir, char *hcstat, uint disable, uint classic, hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf);
2065 void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *markov_table_buf, cs_t *root_css_buf, cs_t *markov_css_buf, uint threshold, uint uniq_tbls[SP_PW_MAX][CHARSIZ]);
2066 void sp_stretch_markov (hcstat_table_t *in, hcstat_table_t *out);
2067 void sp_stretch_root (hcstat_table_t *in, hcstat_table_t *out);
2068
2069 uint byte_swap_32 (const uint n);
2070 uint64_t byte_swap_64 (const uint64_t n);
2071
2072 char hex_convert (const char c);
2073
2074 int bcrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2075 int cisco4_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2076 int dcc_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2077 int dcc2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2078 int descrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2079 int episerver_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2080 int ipb2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2081 int joomla_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2082 int postgresql_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2083 int netscreen_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2084 int keccak_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2085 int lm_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2086 int md4_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2087 int md4s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2088 int md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2089 int md5s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2090 int md5half_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2091 int md5md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2092 int md5pix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2093 int md5asa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2094 int md5apr1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2095 int md5crypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2096 int mssql2000_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2097 int mssql2005_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2098 int netntlmv1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2099 int netntlmv2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2100 int oracleh_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2101 int oracles_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2102 int oraclet_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2103 int osc_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2104 int osx1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2105 int osx512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2106 int phpass_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2107 int sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2108 int sha1linkedin_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2109 int sha1b64_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2110 int sha1b64s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2111 int sha1s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2112 int sha256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2113 int sha256s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2114 int sha384_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2115 int sha512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2116 int sha512s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2117 int sha512crypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2118 int smf_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2119 int vb3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2120 int vb30_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2121 int wpa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2122 int psafe2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2123 int psafe3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2124 int ikepsk_md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2125 int ikepsk_sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2126 int androidpin_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2127 int ripemd160_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2128 int whirlpool_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2129 int truecrypt_parse_hash_1k (char *input_buf, uint input_len, hash_t *hash_buf);
2130 int truecrypt_parse_hash_2k (char *input_buf, uint input_len, hash_t *hash_buf);
2131 int md5aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2132 int sha256aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2133 int sha512aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2134 int agilekey_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2135 int sha1aix_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2136 int lastpass_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2137 int gost_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2138 int sha256crypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2139 int mssql2012_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2140 int sha512osx_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2141 int episerver4_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2142 int sha512grub_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2143 int sha512b64s_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2144 int hmacsha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2145 int hmacsha256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2146 int hmacsha512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2147 int hmacmd5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2148 int krb5pa_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2149 int sapb_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2150 int sapg_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2151 int drupal7_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2152 int sybasease_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2153 int mysql323_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2154 int rakp_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2155 int netscaler_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2156 int chap_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2157 int cloudkey_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2158 int nsec3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2159 int wbb3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2160 int racf_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2161 int lotus5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2162 int lotus6_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2163 int lotus8_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2164 int hmailserver_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2165 int phps_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2166 int mediawiki_b_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2167 int peoplesoft_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2168 int skype_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2169 int androidfde_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2170 int scrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2171 int juniper_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2172 int cisco8_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2173 int cisco9_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2174 int office2007_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2175 int office2010_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2176 int office2013_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2177 int oldoffice01_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2178 int oldoffice01cm1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2179 int oldoffice01cm2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2180 int oldoffice34_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2181 int oldoffice34cm1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2182 int oldoffice34cm2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2183 int radmin2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2184 int djangosha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2185 int djangopbkdf2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2186 int siphash_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2187 int crammd5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2188 int saph_sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2189 int redmine_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2190 int pdf11_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2191 int pdf11cm1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2192 int pdf11cm2_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2193 int pdf14_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2194 int pdf17l3_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2195 int pdf17l8_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2196 int pbkdf2_sha256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2197 int prestashop_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2198 int postgresql_auth_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2199 int mysql_auth_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2200 int bitcoin_wallet_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2201 int sip_auth_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2202 int crc32_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2203 int seven_zip_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2204 int gost2012sbog_256_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2205 int gost2012sbog_512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2206 int pbkdf2_md5_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2207 int pbkdf2_sha1_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2208 int pbkdf2_sha512_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2209 int ecryptfs_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2210 int bsdicrypt_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2211 int rar3hp_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2212 int cf10_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2213 int mywallet_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2214 int ms_drsr_parse_hash (char *input_buf, uint input_len, hash_t *hash_buf);
2215
2216 void load_kernel (const char *kernel_file, int num_devices, size_t *kernel_lengths, const unsigned char **kernel_sources);
2217 void writeProgramBin (char *dst, unsigned char *binary, size_t binary_size);
2218
2219 uint64_t get_lowest_words_done ();
2220
2221 restore_data_t *init_restore (int argc, char **argv);
2222 void read_restore (const char *eff_restore_file, restore_data_t *rd);
2223 void write_restore (const char *new_restore_file, restore_data_t *rd);
2224 void cycle_restore ();
2225 void check_checkpoint ();
2226
2227 #ifdef WIN
2228
2229 BOOL WINAPI sigHandler_default (DWORD sig);
2230 BOOL WINAPI sigHandler_benchmark (DWORD sig);
2231 void hc_signal (BOOL WINAPI (callback) (DWORD sig));
2232
2233 #else
2234
2235 void sigHandler_default (int sig);
2236 void sigHandler_benchmark (int sig);
2237 void hc_signal (void c (int));
2238
2239 #endif
2240
2241 typedef int bool;
2242
2243 bool class_num (char c);
2244 bool class_lower (char c);
2245 bool class_upper (char c);
2246 bool class_alpha (char c);
2247
2248 int mangle_lrest (char arr[BLOCK_SIZE], int arr_len);
2249 int mangle_urest (char arr[BLOCK_SIZE], int arr_len);
2250 int mangle_trest (char arr[BLOCK_SIZE], int arr_len);
2251 int mangle_reverse (char arr[BLOCK_SIZE], int arr_len);
2252 int mangle_double (char arr[BLOCK_SIZE], int arr_len);
2253 int mangle_double_times (char arr[BLOCK_SIZE], int arr_len, int times);
2254 int mangle_reflect (char arr[BLOCK_SIZE], int arr_len);
2255 int mangle_rotate_left (char arr[BLOCK_SIZE], int arr_len);
2256 int mangle_rotate_right (char arr[BLOCK_SIZE], int arr_len);
2257 int mangle_append (char arr[BLOCK_SIZE], int arr_len, char c);
2258 int mangle_prepend (char arr[BLOCK_SIZE], int arr_len, char c);
2259 int mangle_delete_at (char arr[BLOCK_SIZE], int arr_len, int upos);
2260 int mangle_extract (char arr[BLOCK_SIZE], int arr_len, int upos, int ulen);
2261 int mangle_omit (char arr[BLOCK_SIZE], int arr_len, int upos, int ulen);
2262 int mangle_insert (char arr[BLOCK_SIZE], int arr_len, int upos, char c);
2263 int mangle_overstrike (char arr[BLOCK_SIZE], int arr_len, int upos, char c);
2264 int mangle_truncate_at (char arr[BLOCK_SIZE], int arr_len, int upos);
2265 int mangle_replace (char arr[BLOCK_SIZE], int arr_len, char oldc, char newc);
2266 int mangle_purgechar (char arr[BLOCK_SIZE], int arr_len, char c);
2267 int mangle_dupeblock_prepend (char arr[BLOCK_SIZE], int arr_len, int ulen);
2268 int mangle_dupeblock_append (char arr[BLOCK_SIZE], int arr_len, int ulen);
2269 int mangle_dupechar_at (char arr[BLOCK_SIZE], int arr_len, int upos, int ulen);
2270 int mangle_dupechar (char arr[BLOCK_SIZE], int arr_len);
2271 int mangle_switch_at_check (char arr[BLOCK_SIZE], int arr_len, int upos, int upos2);
2272 int mangle_switch_at (char arr[BLOCK_SIZE], int arr_len, int upos, int upos2);
2273 int mangle_chr_shiftl (uint8_t arr[BLOCK_SIZE], int arr_len, int upos);
2274 int mangle_chr_shiftr (uint8_t arr[BLOCK_SIZE], int arr_len, int upos);
2275 int mangle_chr_incr (uint8_t arr[BLOCK_SIZE], int arr_len, int upos);
2276 int mangle_chr_decr (uint8_t arr[BLOCK_SIZE], int arr_len, int upos);
2277 int mangle_title (char arr[BLOCK_SIZE], int arr_len);
2278
2279 int generate_random_rule (char rule_buf[RP_RULE_BUFSIZ], uint32_t rp_gen_func_min, uint32_t rp_gen_func_max);
2280 int _old_apply_rule (char *rule, int rule_len, char in[BLOCK_SIZE], int in_len, char out[BLOCK_SIZE]);
2281
2282 int cpu_rule_to_gpu_rule (char rule_buf[BUFSIZ], uint rule_len, gpu_rule_t *rule);
2283 int gpu_rule_to_cpu_rule (char rule_buf[BUFSIZ], gpu_rule_t *rule);
2284
2285 void *thread_gpu_watch (void *p);
2286 void *thread_keypress (void *p);
2287 void *thread_runtime (void *p);
2288
2289 /**
2290 * checksum for use on cpu
2291 */
2292
2293 #include "cpu-crc32.h"
2294
2295 /**
2296 * ciphers for use on cpu
2297 */
2298
2299 #include "cpu-aes.h"
2300
2301 #endif