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