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