Added new hash mode -m 13000 = RAR5
[hashcat.git] / OpenCL / types_ocl.c
1 /**
2 * Author......: Jens Steube <jens.steube@gmail.com>
3 * License.....: MIT
4 */
5
6 typedef uchar u8;
7 typedef ushort u16;
8 typedef uint u32;
9 typedef ulong u64;
10
11 #define allx(r) r
12
13 /*
14 static u32 allx (const u32 r)
15 {
16 return r;
17 }
18 */
19
20 static inline u32 l32_from_64 (u64 a)
21 {
22 const u32 r = (uint) (a);
23
24 return r;
25 }
26
27 static inline u32 h32_from_64 (u64 a)
28 {
29 a >>= 32;
30
31 const u32 r = (uint) (a);
32
33 return r;
34 }
35
36 static inline u64 hl32_to_64 (const u32 a, const u32 b)
37 {
38 return as_ulong ((uint2) (b, a));
39 }
40
41 #ifdef IS_AMD
42 static inline u32 swap32 (const u32 v)
43 {
44 return (as_uint (as_uchar4 (v).s3210));
45 }
46
47 static inline u64 swap64 (const u64 v)
48 {
49 return (as_ulong (as_uchar8 (v).s76543210));
50 }
51 #endif
52
53 #ifdef IS_NV
54 static inline u32 swap32 (const u32 v)
55 {
56 u32 r;
57
58 asm ("prmt.b32 %0, %1, 0, 0x0123;" : "=r"(r) : "r"(v));
59
60 return r;
61 }
62
63 static inline u64 swap64 (const u64 v)
64 {
65 u32 il;
66 u32 ir;
67
68 asm ("mov.b64 {%0, %1}, %2;" : "=r"(il), "=r"(ir) : "l"(v));
69
70 u32 tl;
71 u32 tr;
72
73 asm ("prmt.b32 %0, %1, 0, 0x0123;" : "=r"(tl) : "r"(il));
74 asm ("prmt.b32 %0, %1, 0, 0x0123;" : "=r"(tr) : "r"(ir));
75
76 u64 r;
77
78 asm ("mov.b64 %0, {%1, %2};" : "=l"(r) : "r"(tr), "r"(tl));
79
80 return r;
81 }
82 #endif
83
84 #ifdef IS_GENERIC
85 static inline u32 swap32 (const u32 v)
86 {
87 return (as_uint (as_uchar4 (v).s3210));
88 }
89
90 static inline u64 swap64 (const u64 v)
91 {
92 return (as_ulong (as_uchar8 (v).s76543210));
93 }
94 #endif
95
96 #ifdef IS_AMD
97 static inline u32 __bfe (const u32 a, const u32 b, const u32 c)
98 {
99 return amd_bfe (a, b, c);
100 }
101 #endif
102
103 #ifdef IS_NV
104 static inline u32 __byte_perm (const u32 a, const u32 b, const u32 c)
105 {
106 u32 r;
107
108 asm ("prmt.b32 %0, %1, %2, %3;" : "=r"(r) : "r"(a), "r"(b), "r"(c));
109
110 return r;
111 }
112
113 static inline u32 __bfe (const u32 a, const u32 b, const u32 c)
114 {
115 u32 r;
116
117 asm ("bfe.u32 %0, %1, %2, %3;" : "=r"(r) : "r"(a), "r"(b), "r"(c));
118
119 return r;
120 }
121 #if CUDA_ARCH >= 350
122 static inline u32 amd_bytealign (const u32 a, const u32 b, const u32 c)
123 {
124 u32 r;
125
126 asm ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(r) : "r"(b), "r"(a), "r"((c & 3) * 8));
127
128 return r;
129 }
130 #else
131 static inline u32 amd_bytealign (const u32 a, const u32 b, const u32 c)
132 {
133 return __byte_perm (b, a, (0x76543210 >> ((c & 3) * 4)) & 0xffff);
134 }
135 #endif
136 #endif
137
138 #ifdef IS_GENERIC
139 static inline u32 __bfe (const u32 a, const u32 b, const u32 c)
140 {
141 #define BIT(x) (1 << (x))
142 #define BIT_MASK(x) (BIT (x) - 1)
143 #define BFE(x,y,z) (((x) >> (y)) & BIT_MASK (z))
144
145 return BFE (a, b, c);
146 }
147
148 static inline u32 amd_bytealign (const u32 a, const u32 b, const u32 c)
149 {
150 return (u32) (((((u64) a) << 32) | (u64) b) >> ((c & 3) * 8));
151 }
152 #endif
153
154 #ifdef IS_AMD
155 static inline u32 rotr32 (const u32 a, const u32 n)
156 {
157 return rotate (a, 32 - n);
158 }
159
160 static inline u32 rotl32 (const u32 a, const u32 n)
161 {
162 return rotate (a, n);
163 }
164
165 static inline u64 rotr64 (const u64 a, const u32 n)
166 {
167 uint2 a2 = as_uint2 (a);
168
169 uint2 t;
170
171 t.s0 = (n >= 32) ? amd_bitalign (a2.s0, a2.s1, n - 32)
172 : amd_bitalign (a2.s1, a2.s0, n);
173 t.s1 = (n >= 32) ? amd_bitalign (a2.s1, a2.s0, n - 32)
174 : amd_bitalign (a2.s0, a2.s1, n);
175
176 return as_ulong (t);
177 }
178
179 static inline u64 rotl64 (const u64 a, const u32 n)
180 {
181 return rotr64 (a, 64 - n);
182 }
183 #endif
184
185 #ifdef IS_NV
186 #if CUDA_ARCH >= 350
187 /*
188 this version reduced the number of registers but for some unknown reason the whole kernel become slower.. instruction cache monster?
189 static inline u32 rotr32 (const u32 a, const u32 n)
190 {
191 u32 r;
192
193 switch (n & 31)
194 {
195 case 0: asm ("shf.r.wrap.b32 %0, %1, %1, 0;" : "=r"(r) : "r"(a)); break;
196 case 1: asm ("shf.r.wrap.b32 %0, %1, %1, 1;" : "=r"(r) : "r"(a)); break;
197 case 2: asm ("shf.r.wrap.b32 %0, %1, %1, 2;" : "=r"(r) : "r"(a)); break;
198 case 3: asm ("shf.r.wrap.b32 %0, %1, %1, 3;" : "=r"(r) : "r"(a)); break;
199 case 4: asm ("shf.r.wrap.b32 %0, %1, %1, 4;" : "=r"(r) : "r"(a)); break;
200 case 5: asm ("shf.r.wrap.b32 %0, %1, %1, 5;" : "=r"(r) : "r"(a)); break;
201 case 6: asm ("shf.r.wrap.b32 %0, %1, %1, 6;" : "=r"(r) : "r"(a)); break;
202 case 7: asm ("shf.r.wrap.b32 %0, %1, %1, 7;" : "=r"(r) : "r"(a)); break;
203 case 8: asm ("shf.r.wrap.b32 %0, %1, %1, 8;" : "=r"(r) : "r"(a)); break;
204 case 9: asm ("shf.r.wrap.b32 %0, %1, %1, 9;" : "=r"(r) : "r"(a)); break;
205 case 10: asm ("shf.r.wrap.b32 %0, %1, %1, 10;" : "=r"(r) : "r"(a)); break;
206 case 11: asm ("shf.r.wrap.b32 %0, %1, %1, 11;" : "=r"(r) : "r"(a)); break;
207 case 12: asm ("shf.r.wrap.b32 %0, %1, %1, 12;" : "=r"(r) : "r"(a)); break;
208 case 13: asm ("shf.r.wrap.b32 %0, %1, %1, 13;" : "=r"(r) : "r"(a)); break;
209 case 14: asm ("shf.r.wrap.b32 %0, %1, %1, 14;" : "=r"(r) : "r"(a)); break;
210 case 15: asm ("shf.r.wrap.b32 %0, %1, %1, 15;" : "=r"(r) : "r"(a)); break;
211 case 16: asm ("shf.r.wrap.b32 %0, %1, %1, 16;" : "=r"(r) : "r"(a)); break;
212 case 17: asm ("shf.r.wrap.b32 %0, %1, %1, 17;" : "=r"(r) : "r"(a)); break;
213 case 18: asm ("shf.r.wrap.b32 %0, %1, %1, 18;" : "=r"(r) : "r"(a)); break;
214 case 19: asm ("shf.r.wrap.b32 %0, %1, %1, 19;" : "=r"(r) : "r"(a)); break;
215 case 20: asm ("shf.r.wrap.b32 %0, %1, %1, 20;" : "=r"(r) : "r"(a)); break;
216 case 21: asm ("shf.r.wrap.b32 %0, %1, %1, 21;" : "=r"(r) : "r"(a)); break;
217 case 22: asm ("shf.r.wrap.b32 %0, %1, %1, 22;" : "=r"(r) : "r"(a)); break;
218 case 23: asm ("shf.r.wrap.b32 %0, %1, %1, 23;" : "=r"(r) : "r"(a)); break;
219 case 24: asm ("shf.r.wrap.b32 %0, %1, %1, 24;" : "=r"(r) : "r"(a)); break;
220 case 25: asm ("shf.r.wrap.b32 %0, %1, %1, 25;" : "=r"(r) : "r"(a)); break;
221 case 26: asm ("shf.r.wrap.b32 %0, %1, %1, 26;" : "=r"(r) : "r"(a)); break;
222 case 27: asm ("shf.r.wrap.b32 %0, %1, %1, 27;" : "=r"(r) : "r"(a)); break;
223 case 28: asm ("shf.r.wrap.b32 %0, %1, %1, 28;" : "=r"(r) : "r"(a)); break;
224 case 29: asm ("shf.r.wrap.b32 %0, %1, %1, 29;" : "=r"(r) : "r"(a)); break;
225 case 30: asm ("shf.r.wrap.b32 %0, %1, %1, 30;" : "=r"(r) : "r"(a)); break;
226 case 31: asm ("shf.r.wrap.b32 %0, %1, %1, 31;" : "=r"(r) : "r"(a)); break;
227 }
228
229 return r;
230 }
231 */
232
233 static inline u32 rotr32 (const u32 a, const u32 n)
234 {
235 u32 r;
236
237 asm ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(r) : "r"(a), "r"(a), "r"(n));
238
239 return r;
240 }
241
242 static inline u32 rotl32 (const u32 a, const u32 n)
243 {
244 return rotr32 (a, 32 - n);
245 }
246
247 static inline u64 rotr64 (const u64 a, const u32 n)
248 {
249 u32 il;
250 u32 ir;
251
252 asm ("mov.b64 {%0, %1}, %2;" : "=r"(il), "=r"(ir) : "l"(a));
253
254 u32 tl;
255 u32 tr;
256
257 if (n >= 32)
258 {
259 asm ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(tl) : "r"(ir), "r"(il), "r"(n - 32));
260 asm ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(tr) : "r"(il), "r"(ir), "r"(n - 32));
261 }
262 else
263 {
264 asm ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(tl) : "r"(il), "r"(ir), "r"(n));
265 asm ("shf.r.wrap.b32 %0, %1, %2, %3;" : "=r"(tr) : "r"(ir), "r"(il), "r"(n));
266 }
267
268 u64 r;
269
270 asm ("mov.b64 %0, {%1, %2};" : "=l"(r) : "r"(tl), "r"(tr));
271
272 return r;
273 }
274
275 static inline u64 rotl64 (const u64 a, const u32 n)
276 {
277 return rotr64 (a, 64 - n);
278 }
279 #else
280 static inline u32 rotr32 (const u32 a, const u32 n)
281 {
282 return rotate (a, 32 - n);
283 }
284
285 static inline u32 rotl32 (const u32 a, const u32 n)
286 {
287 return rotate (a, n);
288 }
289
290 static inline u64 rotr64 (const u64 a, const u32 n)
291 {
292 return rotate (a, (u64) 64 - n);
293 }
294
295 static inline u64 rotl64 (const u64 a, const u32 n)
296 {
297 return rotate (a, (u64) n);
298 }
299 #endif
300 #endif
301
302 #ifdef IS_GENERIC
303 static inline u32 rotr32 (const u32 a, const u32 n)
304 {
305 return rotate (a, 32 - n);
306 }
307
308 static inline u32 rotl32 (const u32 a, const u32 n)
309 {
310 return rotate (a, n);
311 }
312
313 static inline u64 rotr64 (const u64 a, const u32 n)
314 {
315 return rotate (a, (u64) 64 - n);
316 }
317
318 static inline u64 rotl64 (const u64 a, const u32 n)
319 {
320 return rotate (a, (u64) n);
321 }
322 #endif
323
324 #ifdef IS_NV
325 #if CUDA_ARCH >= 500
326 static inline u32 lut3_2d (const u32 a, const u32 b, const u32 c)
327 {
328 u32 r;
329
330 asm ("lop3.b32 %0, %1, %2, %3, 0x2d;" : "=r" (r) : "r" (a), "r" (b), "r" (c));
331
332 return r;
333 }
334
335 static inline u32 lut3_39 (const u32 a, const u32 b, const u32 c)
336 {
337 u32 r;
338
339 asm ("lop3.b32 %0, %1, %2, %3, 0x39;" : "=r" (r) : "r" (a), "r" (b), "r" (c));
340
341 return r;
342 }
343
344 static inline u32 lut3_59 (const u32 a, const u32 b, const u32 c)
345 {
346 u32 r;
347
348 asm ("lop3.b32 %0, %1, %2, %3, 0x59;" : "=r" (r) : "r" (a), "r" (b), "r" (c));
349
350 return r;
351 }
352
353 static inline u32 lut3_96 (const u32 a, const u32 b, const u32 c)
354 {
355 u32 r;
356
357 asm ("lop3.b32 %0, %1, %2, %3, 0x96;" : "=r" (r) : "r" (a), "r" (b), "r" (c));
358
359 return r;
360 }
361
362 static inline u32 lut3_e4 (const u32 a, const u32 b, const u32 c)
363 {
364 u32 r;
365
366 asm ("lop3.b32 %0, %1, %2, %3, 0xe4;" : "=r" (r) : "r" (a), "r" (b), "r" (c));
367
368 return r;
369 }
370
371 static inline u32 lut3_e8 (const u32 a, const u32 b, const u32 c)
372 {
373 u32 r;
374
375 asm ("lop3.b32 %0, %1, %2, %3, 0xe8;" : "=r" (r) : "r" (a), "r" (b), "r" (c));
376
377 return r;
378 }
379
380 static inline u32 lut3_ca (const u32 a, const u32 b, const u32 c)
381 {
382 u32 r;
383
384 asm ("lop3.b32 %0, %1, %2, %3, 0xca;" : "=r" (r) : "r" (a), "r" (b), "r" (c));
385
386 return r;
387 }
388 #endif
389 #endif
390
391 typedef struct
392 {
393 #if defined _DES_
394 u32 digest_buf[4];
395 #elif defined _MD4_
396 u32 digest_buf[4];
397 #elif defined _MD5_
398 u32 digest_buf[4];
399 #elif defined _MD5H_
400 u32 digest_buf[4];
401 #elif defined _SHA1_
402 u32 digest_buf[5];
403 #elif defined _BCRYPT_
404 u32 digest_buf[6];
405 #elif defined _SHA256_
406 u32 digest_buf[8];
407 #elif defined _SHA384_
408 u32 digest_buf[16];
409 #elif defined _SHA512_
410 u32 digest_buf[16];
411 #elif defined _KECCAK_
412 u32 digest_buf[50];
413 #elif defined _RIPEMD160_
414 u32 digest_buf[5];
415 #elif defined _WHIRLPOOL_
416 u32 digest_buf[16];
417 #elif defined _GOST_
418 u32 digest_buf[8];
419 #elif defined _GOST2012_256_
420 u32 digest_buf[8];
421 #elif defined _GOST2012_512_
422 u32 digest_buf[16];
423 #elif defined _SAPB_
424 u32 digest_buf[4];
425 #elif defined _SAPG_
426 u32 digest_buf[5];
427 #elif defined _MYSQL323_
428 u32 digest_buf[4];
429 #elif defined _LOTUS5_
430 u32 digest_buf[4];
431 #elif defined _LOTUS6_
432 u32 digest_buf[4];
433 #elif defined _SCRYPT_
434 u32 digest_buf[8];
435 #elif defined _LOTUS8_
436 u32 digest_buf[4];
437 #elif defined _OFFICE2007_
438 u32 digest_buf[4];
439 #elif defined _OFFICE2010_
440 u32 digest_buf[4];
441 #elif defined _OFFICE2013_
442 u32 digest_buf[4];
443 #elif defined _OLDOFFICE01_
444 u32 digest_buf[4];
445 #elif defined _OLDOFFICE34_
446 u32 digest_buf[4];
447 #elif defined _SIPHASH_
448 u32 digest_buf[4];
449 #elif defined _PBKDF2_MD5_
450 u32 digest_buf[32];
451 #elif defined _PBKDF2_SHA1_
452 u32 digest_buf[32];
453 #elif defined _PBKDF2_SHA256_
454 u32 digest_buf[32];
455 #elif defined _PBKDF2_SHA512_
456 u32 digest_buf[32];
457 #elif defined _PDF17L8_
458 u32 digest_buf[8];
459 #elif defined _CRC32_
460 u32 digest_buf[4];
461 #elif defined _SEVEN_ZIP_
462 u32 digest_buf[4];
463 #elif defined _ANDROIDFDE_
464 u32 digest_buf[4];
465 #elif defined _DCC2_
466 u32 digest_buf[4];
467 #elif defined _WPA_
468 u32 digest_buf[4];
469 #elif defined _MD5_SHA1_
470 u32 digest_buf[4];
471 #elif defined _SHA1_MD5_
472 u32 digest_buf[5];
473 #elif defined _NETNTLMV2_
474 u32 digest_buf[4];
475 #elif defined _KRB5PA_
476 u32 digest_buf[4];
477 #elif defined _CLOUDKEY_
478 u32 digest_buf[8];
479 #elif defined _SCRYPT_
480 u32 digest_buf[4];
481 #elif defined _PSAFE2_
482 u32 digest_buf[5];
483 #elif defined _LOTUS8_
484 u32 digest_buf[4];
485 #elif defined _RAR3_
486 u32 digest_buf[4];
487 #elif defined _SHA256_SHA1_
488 u32 digest_buf[8];
489 #elif defined _MS_DRSR_
490 u32 digest_buf[8];
491 #elif defined _ANDROIDFDE_SAMSUNG_
492 u32 digest_buf[8];
493 #elif defined _RAR5_
494 u32 digest_buf[4];
495 #endif
496
497 } digest_t;
498
499 typedef struct
500 {
501 u32 salt_buf[16];
502 u32 salt_buf_pc[8];
503
504 u32 salt_len;
505 u32 salt_iter;
506 u32 salt_sign[2];
507
508 u32 keccak_mdlen;
509 u32 truecrypt_mdlen;
510
511 u32 digests_cnt;
512 u32 digests_done;
513
514 u32 digests_offset;
515
516 u32 scrypt_N;
517 u32 scrypt_r;
518 u32 scrypt_p;
519 u32 scrypt_tmto;
520 u32 scrypt_phy;
521
522 } salt_t;
523
524 typedef struct
525 {
526 int V;
527 int R;
528 int P;
529
530 int enc_md;
531
532 u32 id_buf[8];
533 u32 u_buf[32];
534 u32 o_buf[32];
535
536 int id_len;
537 int o_len;
538 int u_len;
539
540 u32 rc4key[2];
541 u32 rc4data[2];
542
543 } pdf_t;
544
545 typedef struct
546 {
547 u32 pke[25];
548 u32 eapol[64];
549 int eapol_size;
550 int keyver;
551
552 } wpa_t;
553
554 typedef struct
555 {
556 u32 cry_master_buf[64];
557 u32 ckey_buf[64];
558 u32 public_key_buf[64];
559
560 u32 cry_master_len;
561 u32 ckey_len;
562 u32 public_key_len;
563
564 } bitcoin_wallet_t;
565
566 typedef struct
567 {
568 u32 salt_buf[30];
569 u32 salt_len;
570
571 u32 esalt_buf[38];
572 u32 esalt_len;
573
574 } sip_t;
575
576 typedef struct
577 {
578 u32 data[384];
579
580 } androidfde_t;
581
582 typedef struct
583 {
584 u32 nr_buf[16];
585 u32 nr_len;
586
587 u32 msg_buf[128];
588 u32 msg_len;
589
590 } ikepsk_t;
591
592 typedef struct
593 {
594 u32 user_len;
595 u32 domain_len;
596 u32 srvchall_len;
597 u32 clichall_len;
598
599 u32 userdomain_buf[64];
600 u32 chall_buf[256];
601
602 } netntlm_t;
603
604 typedef struct
605 {
606 u32 user[16];
607 u32 realm[16];
608 u32 salt[32];
609 u32 timestamp[16];
610 u32 checksum[4];
611
612 } krb5pa_t;
613
614 typedef struct
615 {
616 u32 salt_buf[16];
617 u32 data_buf[112];
618 u32 keyfile_buf[16];
619
620 } tc_t;
621
622 typedef struct
623 {
624 u32 salt_buf[16];
625
626 } pbkdf2_md5_t;
627
628 typedef struct
629 {
630 u32 salt_buf[16];
631
632 } pbkdf2_sha1_t;
633
634 typedef struct
635 {
636 u32 salt_buf[16];
637
638 } pbkdf2_sha256_t;
639
640 typedef struct
641 {
642 u32 salt_buf[32];
643
644 } pbkdf2_sha512_t;
645
646 typedef struct
647 {
648 u32 salt_buf[128];
649 u32 salt_len;
650
651 } rakp_t;
652
653 typedef struct
654 {
655 u32 data_len;
656 u32 data_buf[512];
657
658 } cloudkey_t;
659
660 typedef struct
661 {
662 u32 encryptedVerifier[4];
663 u32 encryptedVerifierHash[5];
664
665 u32 keySize;
666
667 } office2007_t;
668
669 typedef struct
670 {
671 u32 encryptedVerifier[4];
672 u32 encryptedVerifierHash[8];
673
674 } office2010_t;
675
676 typedef struct
677 {
678 u32 encryptedVerifier[4];
679 u32 encryptedVerifierHash[8];
680
681 } office2013_t;
682
683 typedef struct
684 {
685 u32 version;
686 u32 encryptedVerifier[4];
687 u32 encryptedVerifierHash[4];
688 u32 rc4key[2];
689
690 } oldoffice01_t;
691
692 typedef struct
693 {
694 u32 version;
695 u32 encryptedVerifier[4];
696 u32 encryptedVerifierHash[5];
697 u32 rc4key[2];
698
699 } oldoffice34_t;
700
701 typedef struct
702 {
703 u32 digest[4];
704 u32 out[4];
705
706 } pdf14_tmp_t;
707
708 typedef struct
709 {
710 union
711 {
712 u32 dgst32[16];
713 u64 dgst64[8];
714 };
715
716 u32 dgst_len;
717 u32 W_len;
718
719 } pdf17l8_tmp_t;
720
721 typedef struct
722 {
723 u32 digest_buf[4];
724
725 } phpass_tmp_t;
726
727 typedef struct
728 {
729 u32 digest_buf[4];
730
731 } md5crypt_tmp_t;
732
733 typedef struct
734 {
735 u32 alt_result[8];
736
737 u32 p_bytes[4];
738 u32 s_bytes[4];
739
740 } sha256crypt_tmp_t;
741
742 typedef struct
743 {
744 u64 l_alt_result[8];
745
746 u64 l_p_bytes[2];
747 u64 l_s_bytes[2];
748
749 } sha512crypt_tmp_t;
750
751 typedef struct
752 {
753 u32 ipad[5];
754 u32 opad[5];
755
756 u32 dgst[10];
757 u32 out[10];
758
759 } wpa_tmp_t;
760
761 typedef struct
762 {
763 u64 dgst[8];
764
765 } bitcoin_wallet_tmp_t;
766
767 typedef struct
768 {
769 u32 ipad[5];
770 u32 opad[5];
771
772 u32 dgst[5];
773 u32 out[4];
774
775 } dcc2_tmp_t;
776
777 typedef struct
778 {
779 u32 E[18];
780
781 u32 P[18];
782
783 u32 S0[256];
784 u32 S1[256];
785 u32 S2[256];
786 u32 S3[256];
787
788 } bcrypt_tmp_t;
789
790 typedef struct
791 {
792 u32 digest[2];
793
794 u32 P[18];
795
796 u32 S0[256];
797 u32 S1[256];
798 u32 S2[256];
799 u32 S3[256];
800
801 } pwsafe2_tmp_t;
802
803 typedef struct
804 {
805 u32 digest_buf[8];
806
807 } pwsafe3_tmp_t;
808
809 typedef struct
810 {
811 u32 digest_buf[5];
812
813 } androidpin_tmp_t;
814
815 typedef struct
816 {
817 u32 ipad[5];
818 u32 opad[5];
819
820 u32 dgst[10];
821 u32 out[10];
822
823 } androidfde_tmp_t;
824
825 typedef struct
826 {
827 u32 ipad[16];
828 u32 opad[16];
829
830 u32 dgst[64];
831 u32 out[64];
832
833 } tc_tmp_t;
834
835 typedef struct
836 {
837 u64 ipad[8];
838 u64 opad[8];
839
840 u64 dgst[32];
841 u64 out[32];
842
843 } tc64_tmp_t;
844
845 typedef struct
846 {
847 u32 ipad[4];
848 u32 opad[4];
849
850 u32 dgst[32];
851 u32 out[32];
852
853 } pbkdf2_md5_tmp_t;
854
855 typedef struct
856 {
857 u32 ipad[5];
858 u32 opad[5];
859
860 u32 dgst[32];
861 u32 out[32];
862
863 } pbkdf2_sha1_tmp_t;
864
865 typedef struct
866 {
867 u32 ipad[8];
868 u32 opad[8];
869
870 u32 dgst[32];
871 u32 out[32];
872
873 } pbkdf2_sha256_tmp_t;
874
875 typedef struct
876 {
877 u64 ipad[8];
878 u64 opad[8];
879
880 u64 dgst[16];
881 u64 out[16];
882
883 } pbkdf2_sha512_tmp_t;
884
885 typedef struct
886 {
887 u64 out[8];
888
889 } ecryptfs_tmp_t;
890
891 typedef struct
892 {
893 u64 ipad[8];
894 u64 opad[8];
895
896 u64 dgst[16];
897 u64 out[16];
898
899 } oraclet_tmp_t;
900
901 typedef struct
902 {
903 u32 ipad[5];
904 u32 opad[5];
905
906 u32 dgst[5];
907 u32 out[5];
908
909 } agilekey_tmp_t;
910
911 typedef struct
912 {
913 u32 ipad[5];
914 u32 opad[5];
915
916 u32 dgst1[5];
917 u32 out1[5];
918
919 u32 dgst2[5];
920 u32 out2[5];
921
922 } mywallet_tmp_t;
923
924 typedef struct
925 {
926 u32 ipad[5];
927 u32 opad[5];
928
929 u32 dgst[5];
930 u32 out[5];
931
932 } sha1aix_tmp_t;
933
934 typedef struct
935 {
936 u32 ipad[8];
937 u32 opad[8];
938
939 u32 dgst[8];
940 u32 out[8];
941
942 } sha256aix_tmp_t;
943
944 typedef struct
945 {
946 u64 ipad[8];
947 u64 opad[8];
948
949 u64 dgst[8];
950 u64 out[8];
951
952 } sha512aix_tmp_t;
953
954 typedef struct
955 {
956 u32 ipad[8];
957 u32 opad[8];
958
959 u32 dgst[8];
960 u32 out[8];
961
962 } lastpass_tmp_t;
963
964 typedef struct
965 {
966 u64 digest_buf[8];
967
968 } drupal7_tmp_t;
969
970 typedef struct
971 {
972 u32 ipad[5];
973 u32 opad[5];
974
975 u32 dgst[5];
976 u32 out[5];
977
978 } lotus8_tmp_t;
979
980 typedef struct
981 {
982 u32 out[5];
983
984 } office2007_tmp_t;
985
986 typedef struct
987 {
988 u32 out[5];
989
990 } office2010_tmp_t;
991
992 typedef struct
993 {
994 u64 out[8];
995
996 } office2013_tmp_t;
997
998 typedef struct
999 {
1000 u32 digest_buf[5];
1001
1002 } saph_sha1_tmp_t;
1003
1004 typedef struct
1005 {
1006 u32 block[16];
1007
1008 u32 dgst[8];
1009
1010 u32 block_len;
1011 u32 final_len;
1012
1013 } seven_zip_tmp_t;
1014
1015 typedef struct
1016 {
1017 u32 Kc[16];
1018 u32 Kd[16];
1019
1020 u32 iv[2];
1021
1022 } bsdicrypt_tmp_t;
1023
1024 typedef struct
1025 {
1026 u32 dgst[17][5];
1027
1028 } rar3_tmp_t;
1029
1030 typedef struct
1031 {
1032 u32 user[16];
1033
1034 } cram_md5_t;
1035
1036 typedef struct
1037 {
1038 u32 iv_buf[4];
1039 u32 iv_len;
1040
1041 u32 salt_buf[4];
1042 u32 salt_len;
1043
1044 u32 crc;
1045
1046 u32 data_buf[96];
1047 u32 data_len;
1048
1049 u32 unpack_size;
1050
1051 } seven_zip_t;
1052
1053 typedef struct
1054 {
1055 u32 key;
1056 u64 val;
1057
1058 } hcstat_table_t;
1059
1060 typedef struct
1061 {
1062 u32 cs_buf[0x100];
1063 u32 cs_len;
1064
1065 } cs_t;
1066
1067 typedef struct
1068 {
1069 u32 cmds[0x100];
1070
1071 } kernel_rule_t;
1072
1073 typedef struct
1074 {
1075 u32 gidvid;
1076 u32 il_pos;
1077
1078 } plain_t;
1079
1080 typedef struct
1081 {
1082 u32 i[64];
1083
1084 u32 pw_len;
1085
1086 u32 alignment_placeholder_1;
1087 u32 alignment_placeholder_2;
1088 u32 alignment_placeholder_3;
1089
1090 } pw_t;
1091
1092 typedef struct
1093 {
1094 u32 i;
1095
1096 } bf_t;
1097
1098 typedef struct
1099 {
1100 u32 i[8];
1101
1102 u32 pw_len;
1103
1104 } comb_t;
1105
1106 typedef struct
1107 {
1108 u32 b[32];
1109
1110 } bs_word_t;
1111
1112 typedef struct
1113 {
1114 uint4 P[64];
1115
1116 } scrypt_tmp_t;