2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 __constant u64 k_sha512[80] =
25 SHA512C00, SHA512C01, SHA512C02, SHA512C03,
26 SHA512C04, SHA512C05, SHA512C06, SHA512C07,
27 SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
28 SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
29 SHA512C10, SHA512C11, SHA512C12, SHA512C13,
30 SHA512C14, SHA512C15, SHA512C16, SHA512C17,
31 SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
32 SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
33 SHA512C20, SHA512C21, SHA512C22, SHA512C23,
34 SHA512C24, SHA512C25, SHA512C26, SHA512C27,
35 SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
36 SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
37 SHA512C30, SHA512C31, SHA512C32, SHA512C33,
38 SHA512C34, SHA512C35, SHA512C36, SHA512C37,
39 SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
40 SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
41 SHA512C40, SHA512C41, SHA512C42, SHA512C43,
42 SHA512C44, SHA512C45, SHA512C46, SHA512C47,
43 SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
44 SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
47 static void sha512_transform (const u64 w0[4], const u64 w1[4], const u64 w2[4], const u64 w3[4], u64 digest[8])
75 #define ROUND_EXPAND() \
77 w0_t = SHA512_EXPAND (we_t, w9_t, w1_t, w0_t); \
78 w1_t = SHA512_EXPAND (wf_t, wa_t, w2_t, w1_t); \
79 w2_t = SHA512_EXPAND (w0_t, wb_t, w3_t, w2_t); \
80 w3_t = SHA512_EXPAND (w1_t, wc_t, w4_t, w3_t); \
81 w4_t = SHA512_EXPAND (w2_t, wd_t, w5_t, w4_t); \
82 w5_t = SHA512_EXPAND (w3_t, we_t, w6_t, w5_t); \
83 w6_t = SHA512_EXPAND (w4_t, wf_t, w7_t, w6_t); \
84 w7_t = SHA512_EXPAND (w5_t, w0_t, w8_t, w7_t); \
85 w8_t = SHA512_EXPAND (w6_t, w1_t, w9_t, w8_t); \
86 w9_t = SHA512_EXPAND (w7_t, w2_t, wa_t, w9_t); \
87 wa_t = SHA512_EXPAND (w8_t, w3_t, wb_t, wa_t); \
88 wb_t = SHA512_EXPAND (w9_t, w4_t, wc_t, wb_t); \
89 wc_t = SHA512_EXPAND (wa_t, w5_t, wd_t, wc_t); \
90 wd_t = SHA512_EXPAND (wb_t, w6_t, we_t, wd_t); \
91 we_t = SHA512_EXPAND (wc_t, w7_t, wf_t, we_t); \
92 wf_t = SHA512_EXPAND (wd_t, w8_t, w0_t, wf_t); \
95 #define ROUND_STEP(i) \
97 SHA512_STEP (SHA512_F0o, SHA512_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha512[i + 0]); \
98 SHA512_STEP (SHA512_F0o, SHA512_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha512[i + 1]); \
99 SHA512_STEP (SHA512_F0o, SHA512_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha512[i + 2]); \
100 SHA512_STEP (SHA512_F0o, SHA512_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha512[i + 3]); \
101 SHA512_STEP (SHA512_F0o, SHA512_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha512[i + 4]); \
102 SHA512_STEP (SHA512_F0o, SHA512_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha512[i + 5]); \
103 SHA512_STEP (SHA512_F0o, SHA512_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha512[i + 6]); \
104 SHA512_STEP (SHA512_F0o, SHA512_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha512[i + 7]); \
105 SHA512_STEP (SHA512_F0o, SHA512_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha512[i + 8]); \
106 SHA512_STEP (SHA512_F0o, SHA512_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha512[i + 9]); \
107 SHA512_STEP (SHA512_F0o, SHA512_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha512[i + 10]); \
108 SHA512_STEP (SHA512_F0o, SHA512_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha512[i + 11]); \
109 SHA512_STEP (SHA512_F0o, SHA512_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha512[i + 12]); \
110 SHA512_STEP (SHA512_F0o, SHA512_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha512[i + 13]); \
111 SHA512_STEP (SHA512_F0o, SHA512_F1o, c, d, e, f, g, h, a, b, we_t, k_sha512[i + 14]); \
112 SHA512_STEP (SHA512_F0o, SHA512_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha512[i + 15]); \
118 for (int i = 16; i < 80; i += 16)
120 ROUND_EXPAND (); ROUND_STEP (i);
133 static void hmac_sha512_pad (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u64 ipad[8], u64 opad[8])
140 w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ 0x3636363636363636;
141 w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ 0x3636363636363636;
142 w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ 0x3636363636363636;
143 w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ 0x3636363636363636;
144 w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ 0x3636363636363636;
145 w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ 0x3636363636363636;
146 w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ 0x3636363636363636;
147 w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ 0x3636363636363636;
148 w2_t[0] = 0 ^ 0x3636363636363636;
149 w2_t[1] = 0 ^ 0x3636363636363636;
150 w2_t[2] = 0 ^ 0x3636363636363636;
151 w2_t[3] = 0 ^ 0x3636363636363636;
152 w3_t[0] = 0 ^ 0x3636363636363636;
153 w3_t[1] = 0 ^ 0x3636363636363636;
154 w3_t[2] = 0 ^ 0x3636363636363636;
155 w3_t[3] = 0 ^ 0x3636363636363636;
166 sha512_transform (w0_t, w1_t, w2_t, w3_t, ipad);
168 w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ 0x5c5c5c5c5c5c5c5c;
169 w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ 0x5c5c5c5c5c5c5c5c;
170 w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ 0x5c5c5c5c5c5c5c5c;
171 w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ 0x5c5c5c5c5c5c5c5c;
172 w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ 0x5c5c5c5c5c5c5c5c;
173 w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ 0x5c5c5c5c5c5c5c5c;
174 w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ 0x5c5c5c5c5c5c5c5c;
175 w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ 0x5c5c5c5c5c5c5c5c;
176 w2_t[0] = 0 ^ 0x5c5c5c5c5c5c5c5c;
177 w2_t[1] = 0 ^ 0x5c5c5c5c5c5c5c5c;
178 w2_t[2] = 0 ^ 0x5c5c5c5c5c5c5c5c;
179 w2_t[3] = 0 ^ 0x5c5c5c5c5c5c5c5c;
180 w3_t[0] = 0 ^ 0x5c5c5c5c5c5c5c5c;
181 w3_t[1] = 0 ^ 0x5c5c5c5c5c5c5c5c;
182 w3_t[2] = 0 ^ 0x5c5c5c5c5c5c5c5c;
183 w3_t[3] = 0 ^ 0x5c5c5c5c5c5c5c5c;
194 sha512_transform (w0_t, w1_t, w2_t, w3_t, opad);
197 static void hmac_sha512_run (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], u64 ipad[8], u64 opad[8], u64 digest[8])
204 w0_t[0] = hl32_to_64 (w0[0], w0[1]);
205 w0_t[1] = hl32_to_64 (w0[2], w0[3]);
206 w0_t[2] = hl32_to_64 (w1[0], w1[1]);
207 w0_t[3] = hl32_to_64 (w1[2], w1[3]);
208 w1_t[0] = hl32_to_64 (w2[0], w2[1]);
209 w1_t[1] = hl32_to_64 (w2[2], w2[3]);
210 w1_t[2] = hl32_to_64 (w3[0], w3[1]);
219 w3_t[3] = hl32_to_64 (w3[2], w3[3]);
230 sha512_transform (w0_t, w1_t, w2_t, w3_t, digest);
240 w2_t[0] = 0x8000000000000000;
247 w3_t[3] = (128 + 64) * 8;
258 sha512_transform (w0_t, w1_t, w2_t, w3_t, digest);
261 __kernel void m01760_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
267 const u32 lid = get_local_id (0);
273 const u32 gid = get_global_id (0);
275 if (gid >= gid_max) return;
279 wordl0[0] = pws[gid].i[ 0];
280 wordl0[1] = pws[gid].i[ 1];
281 wordl0[2] = pws[gid].i[ 2];
282 wordl0[3] = pws[gid].i[ 3];
286 wordl1[0] = pws[gid].i[ 4];
287 wordl1[1] = pws[gid].i[ 5];
288 wordl1[2] = pws[gid].i[ 6];
289 wordl1[3] = pws[gid].i[ 7];
305 const u32 pw_l_len = pws[gid].pw_len;
307 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
309 switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
318 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
319 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
320 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
321 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
325 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
326 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
327 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
328 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
336 w0_t[0] = swap32 (salt_buf0[0]);
337 w0_t[1] = swap32 (salt_buf0[1]);
338 w0_t[2] = swap32 (salt_buf0[2]);
339 w0_t[3] = swap32 (salt_buf0[3]);
343 w1_t[0] = swap32 (salt_buf1[0]);
344 w1_t[1] = swap32 (salt_buf1[1]);
345 w1_t[2] = swap32 (salt_buf1[2]);
346 w1_t[3] = swap32 (salt_buf1[3]);
365 hmac_sha512_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
371 for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
373 const u32 pw_r_len = combs_buf[il_pos].pw_len;
375 const u32 pw_len = pw_l_len + pw_r_len;
379 wordr0[0] = combs_buf[il_pos].i[0];
380 wordr0[1] = combs_buf[il_pos].i[1];
381 wordr0[2] = combs_buf[il_pos].i[2];
382 wordr0[3] = combs_buf[il_pos].i[3];
386 wordr1[0] = combs_buf[il_pos].i[4];
387 wordr1[1] = combs_buf[il_pos].i[5];
388 wordr1[2] = combs_buf[il_pos].i[6];
389 wordr1[3] = combs_buf[il_pos].i[7];
405 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
407 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
412 w0[0] = wordl0[0] | wordr0[0];
413 w0[1] = wordl0[1] | wordr0[1];
414 w0[2] = wordl0[2] | wordr0[2];
415 w0[3] = wordl0[3] | wordr0[3];
419 w1[0] = wordl1[0] | wordr1[0];
420 w1[1] = wordl1[1] | wordr1[1];
421 w1[2] = wordl1[2] | wordr1[2];
422 w1[3] = wordl1[3] | wordr1[3];
426 w2[0] = wordl2[0] | wordr2[0];
427 w2[1] = wordl2[1] | wordr2[1];
428 w2[2] = wordl2[2] | wordr2[2];
429 w2[3] = wordl2[3] | wordr2[3];
433 w3[0] = wordl3[0] | wordr3[0];
434 w3[1] = wordl3[1] | wordr3[1];
438 append_0x80_4x4 (w0, w1, w2, w3, pw_len);
440 w0_t[0] = swap32 (w0[0]);
441 w0_t[1] = swap32 (w0[1]);
442 w0_t[2] = swap32 (w0[2]);
443 w0_t[3] = swap32 (w0[3]);
444 w1_t[0] = swap32 (w1[0]);
445 w1_t[1] = swap32 (w1[1]);
446 w1_t[2] = swap32 (w1[2]);
447 w1_t[3] = swap32 (w1[3]);
448 w2_t[0] = swap32 (w2[0]);
449 w2_t[1] = swap32 (w2[1]);
450 w2_t[2] = swap32 (w2[2]);
451 w2_t[3] = swap32 (w2[3]);
452 w3_t[0] = swap32 (w3[0]);
453 w3_t[1] = swap32 (w3[1]);
455 w3_t[3] = (128 + pw_len) * 8;
459 hmac_sha512_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
462 const u32 r0 = l32_from_64 (digest[7]);
463 const u32 r1 = h32_from_64 (digest[7]);
464 const u32 r2 = l32_from_64 (digest[3]);
465 const u32 r3 = h32_from_64 (digest[3]);
471 __kernel void m01760_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
475 __kernel void m01760_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
479 __kernel void m01760_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
485 const u32 lid = get_local_id (0);
491 const u32 gid = get_global_id (0);
493 if (gid >= gid_max) return;
497 wordl0[0] = pws[gid].i[ 0];
498 wordl0[1] = pws[gid].i[ 1];
499 wordl0[2] = pws[gid].i[ 2];
500 wordl0[3] = pws[gid].i[ 3];
504 wordl1[0] = pws[gid].i[ 4];
505 wordl1[1] = pws[gid].i[ 5];
506 wordl1[2] = pws[gid].i[ 6];
507 wordl1[3] = pws[gid].i[ 7];
523 const u32 pw_l_len = pws[gid].pw_len;
525 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
527 switch_buffer_by_offset_le (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
536 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
537 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
538 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
539 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
543 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
544 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
545 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
546 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
554 w0_t[0] = swap32 (salt_buf0[0]);
555 w0_t[1] = swap32 (salt_buf0[1]);
556 w0_t[2] = swap32 (salt_buf0[2]);
557 w0_t[3] = swap32 (salt_buf0[3]);
561 w1_t[0] = swap32 (salt_buf1[0]);
562 w1_t[1] = swap32 (salt_buf1[1]);
563 w1_t[2] = swap32 (salt_buf1[2]);
564 w1_t[3] = swap32 (salt_buf1[3]);
583 hmac_sha512_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
589 const u32 search[4] =
591 digests_buf[digests_offset].digest_buf[DGST_R0],
592 digests_buf[digests_offset].digest_buf[DGST_R1],
593 digests_buf[digests_offset].digest_buf[DGST_R2],
594 digests_buf[digests_offset].digest_buf[DGST_R3]
601 for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
603 const u32 pw_r_len = combs_buf[il_pos].pw_len;
605 const u32 pw_len = pw_l_len + pw_r_len;
609 wordr0[0] = combs_buf[il_pos].i[0];
610 wordr0[1] = combs_buf[il_pos].i[1];
611 wordr0[2] = combs_buf[il_pos].i[2];
612 wordr0[3] = combs_buf[il_pos].i[3];
616 wordr1[0] = combs_buf[il_pos].i[4];
617 wordr1[1] = combs_buf[il_pos].i[5];
618 wordr1[2] = combs_buf[il_pos].i[6];
619 wordr1[3] = combs_buf[il_pos].i[7];
635 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
637 switch_buffer_by_offset_le (wordr0, wordr1, wordr2, wordr3, pw_l_len);
642 w0[0] = wordl0[0] | wordr0[0];
643 w0[1] = wordl0[1] | wordr0[1];
644 w0[2] = wordl0[2] | wordr0[2];
645 w0[3] = wordl0[3] | wordr0[3];
649 w1[0] = wordl1[0] | wordr1[0];
650 w1[1] = wordl1[1] | wordr1[1];
651 w1[2] = wordl1[2] | wordr1[2];
652 w1[3] = wordl1[3] | wordr1[3];
656 w2[0] = wordl2[0] | wordr2[0];
657 w2[1] = wordl2[1] | wordr2[1];
658 w2[2] = wordl2[2] | wordr2[2];
659 w2[3] = wordl2[3] | wordr2[3];
663 w3[0] = wordl3[0] | wordr3[0];
664 w3[1] = wordl3[1] | wordr3[1];
668 append_0x80_4x4 (w0, w1, w2, w3, pw_len);
670 w0_t[0] = swap32 (w0[0]);
671 w0_t[1] = swap32 (w0[1]);
672 w0_t[2] = swap32 (w0[2]);
673 w0_t[3] = swap32 (w0[3]);
674 w1_t[0] = swap32 (w1[0]);
675 w1_t[1] = swap32 (w1[1]);
676 w1_t[2] = swap32 (w1[2]);
677 w1_t[3] = swap32 (w1[3]);
678 w2_t[0] = swap32 (w2[0]);
679 w2_t[1] = swap32 (w2[1]);
680 w2_t[2] = swap32 (w2[2]);
681 w2_t[3] = swap32 (w2[3]);
682 w3_t[0] = swap32 (w3[0]);
683 w3_t[1] = swap32 (w3[1]);
685 w3_t[3] = (128 + pw_len) * 8;
689 hmac_sha512_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
692 const u32 r0 = l32_from_64 (digest[7]);
693 const u32 r1 = h32_from_64 (digest[7]);
694 const u32 r2 = l32_from_64 (digest[3]);
695 const u32 r3 = h32_from_64 (digest[3]);
701 __kernel void m01760_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
705 __kernel void m01760_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __global bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)