2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
28 #include "include/kernel_functions.c"
29 #include "types_amd.c"
30 #include "common_amd.c"
33 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
34 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
38 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
39 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
43 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
44 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
47 __constant u64 k_sha512[80] =
49 SHA512C00, SHA512C01, SHA512C02, SHA512C03,
50 SHA512C04, SHA512C05, SHA512C06, SHA512C07,
51 SHA512C08, SHA512C09, SHA512C0a, SHA512C0b,
52 SHA512C0c, SHA512C0d, SHA512C0e, SHA512C0f,
53 SHA512C10, SHA512C11, SHA512C12, SHA512C13,
54 SHA512C14, SHA512C15, SHA512C16, SHA512C17,
55 SHA512C18, SHA512C19, SHA512C1a, SHA512C1b,
56 SHA512C1c, SHA512C1d, SHA512C1e, SHA512C1f,
57 SHA512C20, SHA512C21, SHA512C22, SHA512C23,
58 SHA512C24, SHA512C25, SHA512C26, SHA512C27,
59 SHA512C28, SHA512C29, SHA512C2a, SHA512C2b,
60 SHA512C2c, SHA512C2d, SHA512C2e, SHA512C2f,
61 SHA512C30, SHA512C31, SHA512C32, SHA512C33,
62 SHA512C34, SHA512C35, SHA512C36, SHA512C37,
63 SHA512C38, SHA512C39, SHA512C3a, SHA512C3b,
64 SHA512C3c, SHA512C3d, SHA512C3e, SHA512C3f,
65 SHA512C40, SHA512C41, SHA512C42, SHA512C43,
66 SHA512C44, SHA512C45, SHA512C46, SHA512C47,
67 SHA512C48, SHA512C49, SHA512C4a, SHA512C4b,
68 SHA512C4c, SHA512C4d, SHA512C4e, SHA512C4f,
71 static void sha512_transform (const u64x w0[4], const u64x w1[4], const u64x w2[4], const u64x w3[4], u64x digest[8])
99 #define ROUND_EXPAND() \
101 w0_t = SHA512_EXPAND (we_t, w9_t, w1_t, w0_t); \
102 w1_t = SHA512_EXPAND (wf_t, wa_t, w2_t, w1_t); \
103 w2_t = SHA512_EXPAND (w0_t, wb_t, w3_t, w2_t); \
104 w3_t = SHA512_EXPAND (w1_t, wc_t, w4_t, w3_t); \
105 w4_t = SHA512_EXPAND (w2_t, wd_t, w5_t, w4_t); \
106 w5_t = SHA512_EXPAND (w3_t, we_t, w6_t, w5_t); \
107 w6_t = SHA512_EXPAND (w4_t, wf_t, w7_t, w6_t); \
108 w7_t = SHA512_EXPAND (w5_t, w0_t, w8_t, w7_t); \
109 w8_t = SHA512_EXPAND (w6_t, w1_t, w9_t, w8_t); \
110 w9_t = SHA512_EXPAND (w7_t, w2_t, wa_t, w9_t); \
111 wa_t = SHA512_EXPAND (w8_t, w3_t, wb_t, wa_t); \
112 wb_t = SHA512_EXPAND (w9_t, w4_t, wc_t, wb_t); \
113 wc_t = SHA512_EXPAND (wa_t, w5_t, wd_t, wc_t); \
114 wd_t = SHA512_EXPAND (wb_t, w6_t, we_t, wd_t); \
115 we_t = SHA512_EXPAND (wc_t, w7_t, wf_t, we_t); \
116 wf_t = SHA512_EXPAND (wd_t, w8_t, w0_t, wf_t); \
119 #define ROUND_STEP(i) \
121 SHA512_STEP (SHA512_F0o, SHA512_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha512[i + 0]); \
122 SHA512_STEP (SHA512_F0o, SHA512_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha512[i + 1]); \
123 SHA512_STEP (SHA512_F0o, SHA512_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha512[i + 2]); \
124 SHA512_STEP (SHA512_F0o, SHA512_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha512[i + 3]); \
125 SHA512_STEP (SHA512_F0o, SHA512_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha512[i + 4]); \
126 SHA512_STEP (SHA512_F0o, SHA512_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha512[i + 5]); \
127 SHA512_STEP (SHA512_F0o, SHA512_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha512[i + 6]); \
128 SHA512_STEP (SHA512_F0o, SHA512_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha512[i + 7]); \
129 SHA512_STEP (SHA512_F0o, SHA512_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha512[i + 8]); \
130 SHA512_STEP (SHA512_F0o, SHA512_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha512[i + 9]); \
131 SHA512_STEP (SHA512_F0o, SHA512_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha512[i + 10]); \
132 SHA512_STEP (SHA512_F0o, SHA512_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha512[i + 11]); \
133 SHA512_STEP (SHA512_F0o, SHA512_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha512[i + 12]); \
134 SHA512_STEP (SHA512_F0o, SHA512_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha512[i + 13]); \
135 SHA512_STEP (SHA512_F0o, SHA512_F1o, c, d, e, f, g, h, a, b, we_t, k_sha512[i + 14]); \
136 SHA512_STEP (SHA512_F0o, SHA512_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha512[i + 15]); \
141 //#pragma unroll // kernel fails if used
142 for (int i = 16; i < 80; i += 16)
144 ROUND_EXPAND (); ROUND_STEP (i);
157 static void hmac_sha512_pad (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u64x ipad[8], u64x opad[8])
164 w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ 0x3636363636363636;
165 w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ 0x3636363636363636;
166 w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ 0x3636363636363636;
167 w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ 0x3636363636363636;
168 w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ 0x3636363636363636;
169 w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ 0x3636363636363636;
170 w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ 0x3636363636363636;
171 w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ 0x3636363636363636;
172 w2_t[0] = 0 ^ 0x3636363636363636;
173 w2_t[1] = 0 ^ 0x3636363636363636;
174 w2_t[2] = 0 ^ 0x3636363636363636;
175 w2_t[3] = 0 ^ 0x3636363636363636;
176 w3_t[0] = 0 ^ 0x3636363636363636;
177 w3_t[1] = 0 ^ 0x3636363636363636;
178 w3_t[2] = 0 ^ 0x3636363636363636;
179 w3_t[3] = 0 ^ 0x3636363636363636;
190 sha512_transform (w0_t, w1_t, w2_t, w3_t, ipad);
192 w0_t[0] = hl32_to_64 (w0[0], w0[1]) ^ 0x5c5c5c5c5c5c5c5c;
193 w0_t[1] = hl32_to_64 (w0[2], w0[3]) ^ 0x5c5c5c5c5c5c5c5c;
194 w0_t[2] = hl32_to_64 (w1[0], w1[1]) ^ 0x5c5c5c5c5c5c5c5c;
195 w0_t[3] = hl32_to_64 (w1[2], w1[3]) ^ 0x5c5c5c5c5c5c5c5c;
196 w1_t[0] = hl32_to_64 (w2[0], w2[1]) ^ 0x5c5c5c5c5c5c5c5c;
197 w1_t[1] = hl32_to_64 (w2[2], w2[3]) ^ 0x5c5c5c5c5c5c5c5c;
198 w1_t[2] = hl32_to_64 (w3[0], w3[1]) ^ 0x5c5c5c5c5c5c5c5c;
199 w1_t[3] = hl32_to_64 (w3[2], w3[3]) ^ 0x5c5c5c5c5c5c5c5c;
200 w2_t[0] = 0 ^ 0x5c5c5c5c5c5c5c5c;
201 w2_t[1] = 0 ^ 0x5c5c5c5c5c5c5c5c;
202 w2_t[2] = 0 ^ 0x5c5c5c5c5c5c5c5c;
203 w2_t[3] = 0 ^ 0x5c5c5c5c5c5c5c5c;
204 w3_t[0] = 0 ^ 0x5c5c5c5c5c5c5c5c;
205 w3_t[1] = 0 ^ 0x5c5c5c5c5c5c5c5c;
206 w3_t[2] = 0 ^ 0x5c5c5c5c5c5c5c5c;
207 w3_t[3] = 0 ^ 0x5c5c5c5c5c5c5c5c;
218 sha512_transform (w0_t, w1_t, w2_t, w3_t, opad);
221 static void hmac_sha512_run (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], u64x ipad[8], u64x opad[8], u64x digest[8])
228 w0_t[0] = hl32_to_64 (w0[0], w0[1]);
229 w0_t[1] = hl32_to_64 (w0[2], w0[3]);
230 w0_t[2] = hl32_to_64 (w1[0], w1[1]);
231 w0_t[3] = hl32_to_64 (w1[2], w1[3]);
232 w1_t[0] = hl32_to_64 (w2[0], w2[1]);
233 w1_t[1] = hl32_to_64 (w2[2], w2[3]);
234 w1_t[2] = hl32_to_64 (w3[0], w3[1]);
243 w3_t[3] = hl32_to_64 (w3[2], w3[3]);
254 sha512_transform (w0_t, w1_t, w2_t, w3_t, digest);
264 w2_t[0] = 0x8000000000000000;
271 w3_t[3] = (128 + 64) * 8;
282 sha512_transform (w0_t, w1_t, w2_t, w3_t, digest);
285 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01750_m04 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
291 const u32 lid = get_local_id (0);
297 const u32 gid = get_global_id (0);
299 if (gid >= gid_max) return;
303 wordl0[0] = pws[gid].i[ 0];
304 wordl0[1] = pws[gid].i[ 1];
305 wordl0[2] = pws[gid].i[ 2];
306 wordl0[3] = pws[gid].i[ 3];
310 wordl1[0] = pws[gid].i[ 4];
311 wordl1[1] = pws[gid].i[ 5];
312 wordl1[2] = pws[gid].i[ 6];
313 wordl1[3] = pws[gid].i[ 7];
329 const u32 pw_l_len = pws[gid].pw_len;
331 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
333 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
342 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
343 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
344 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
345 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
349 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
350 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
351 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
352 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
354 const u32 salt_len = salt_bufs[salt_pos].salt_len;
360 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
362 const u32 pw_r_len = combs_buf[il_pos].pw_len;
364 const u32 pw_len = pw_l_len + pw_r_len;
368 wordr0[0] = combs_buf[il_pos].i[0];
369 wordr0[1] = combs_buf[il_pos].i[1];
370 wordr0[2] = combs_buf[il_pos].i[2];
371 wordr0[3] = combs_buf[il_pos].i[3];
375 wordr1[0] = combs_buf[il_pos].i[4];
376 wordr1[1] = combs_buf[il_pos].i[5];
377 wordr1[2] = combs_buf[il_pos].i[6];
378 wordr1[3] = combs_buf[il_pos].i[7];
394 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
396 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
401 w0[0] = wordl0[0] | wordr0[0];
402 w0[1] = wordl0[1] | wordr0[1];
403 w0[2] = wordl0[2] | wordr0[2];
404 w0[3] = wordl0[3] | wordr0[3];
408 w1[0] = wordl1[0] | wordr1[0];
409 w1[1] = wordl1[1] | wordr1[1];
410 w1[2] = wordl1[2] | wordr1[2];
411 w1[3] = wordl1[3] | wordr1[3];
415 w2[0] = wordl2[0] | wordr2[0];
416 w2[1] = wordl2[1] | wordr2[1];
417 w2[2] = wordl2[2] | wordr2[2];
418 w2[3] = wordl2[3] | wordr2[3];
422 w3[0] = wordl3[0] | wordr3[0];
423 w3[1] = wordl3[1] | wordr3[1];
424 w3[2] = wordl3[2] | wordr3[2];
425 w3[3] = wordl3[3] | wordr3[3];
433 w0_t[0] = swap_workaround (w0[0]);
434 w0_t[1] = swap_workaround (w0[1]);
435 w0_t[2] = swap_workaround (w0[2]);
436 w0_t[3] = swap_workaround (w0[3]);
440 w1_t[0] = swap_workaround (w1[0]);
441 w1_t[1] = swap_workaround (w1[1]);
442 w1_t[2] = swap_workaround (w1[2]);
443 w1_t[3] = swap_workaround (w1[3]);
462 hmac_sha512_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
464 w0_t[0] = swap_workaround (salt_buf0[0]);
465 w0_t[1] = swap_workaround (salt_buf0[1]);
466 w0_t[2] = swap_workaround (salt_buf0[2]);
467 w0_t[3] = swap_workaround (salt_buf0[3]);
468 w1_t[0] = swap_workaround (salt_buf1[0]);
469 w1_t[1] = swap_workaround (salt_buf1[1]);
470 w1_t[2] = swap_workaround (salt_buf1[2]);
471 w1_t[3] = swap_workaround (salt_buf1[3]);
479 w3_t[3] = (128 + salt_len) * 8;
483 hmac_sha512_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
486 const u32x r0 = l32_from_64 (digest[7]);
487 const u32x r1 = h32_from_64 (digest[7]);
488 const u32x r2 = l32_from_64 (digest[3]);
489 const u32x r3 = h32_from_64 (digest[3]);
491 #include VECT_COMPARE_M
495 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01750_m08 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
499 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01750_m16 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
503 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01750_s04 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
509 const u32 lid = get_local_id (0);
515 const u32 gid = get_global_id (0);
517 if (gid >= gid_max) return;
521 wordl0[0] = pws[gid].i[ 0];
522 wordl0[1] = pws[gid].i[ 1];
523 wordl0[2] = pws[gid].i[ 2];
524 wordl0[3] = pws[gid].i[ 3];
528 wordl1[0] = pws[gid].i[ 4];
529 wordl1[1] = pws[gid].i[ 5];
530 wordl1[2] = pws[gid].i[ 6];
531 wordl1[3] = pws[gid].i[ 7];
547 const u32 pw_l_len = pws[gid].pw_len;
549 if (combs_mode == COMBINATOR_MODE_BASE_RIGHT)
551 switch_buffer_by_offset (wordl0, wordl1, wordl2, wordl3, combs_buf[0].pw_len);
560 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
561 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
562 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
563 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
567 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
568 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
569 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
570 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
572 const u32 salt_len = salt_bufs[salt_pos].salt_len;
578 const u32 search[4] =
580 digests_buf[digests_offset].digest_buf[DGST_R0],
581 digests_buf[digests_offset].digest_buf[DGST_R1],
582 digests_buf[digests_offset].digest_buf[DGST_R2],
583 digests_buf[digests_offset].digest_buf[DGST_R3]
590 for (u32 il_pos = 0; il_pos < combs_cnt; il_pos++)
592 const u32 pw_r_len = combs_buf[il_pos].pw_len;
594 const u32 pw_len = pw_l_len + pw_r_len;
598 wordr0[0] = combs_buf[il_pos].i[0];
599 wordr0[1] = combs_buf[il_pos].i[1];
600 wordr0[2] = combs_buf[il_pos].i[2];
601 wordr0[3] = combs_buf[il_pos].i[3];
605 wordr1[0] = combs_buf[il_pos].i[4];
606 wordr1[1] = combs_buf[il_pos].i[5];
607 wordr1[2] = combs_buf[il_pos].i[6];
608 wordr1[3] = combs_buf[il_pos].i[7];
624 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
626 switch_buffer_by_offset (wordr0, wordr1, wordr2, wordr3, pw_l_len);
631 w0[0] = wordl0[0] | wordr0[0];
632 w0[1] = wordl0[1] | wordr0[1];
633 w0[2] = wordl0[2] | wordr0[2];
634 w0[3] = wordl0[3] | wordr0[3];
638 w1[0] = wordl1[0] | wordr1[0];
639 w1[1] = wordl1[1] | wordr1[1];
640 w1[2] = wordl1[2] | wordr1[2];
641 w1[3] = wordl1[3] | wordr1[3];
645 w2[0] = wordl2[0] | wordr2[0];
646 w2[1] = wordl2[1] | wordr2[1];
647 w2[2] = wordl2[2] | wordr2[2];
648 w2[3] = wordl2[3] | wordr2[3];
652 w3[0] = wordl3[0] | wordr3[0];
653 w3[1] = wordl3[1] | wordr3[1];
654 w3[2] = wordl3[2] | wordr3[2];
655 w3[3] = wordl3[3] | wordr3[3];
663 w0_t[0] = swap_workaround (w0[0]);
664 w0_t[1] = swap_workaround (w0[1]);
665 w0_t[2] = swap_workaround (w0[2]);
666 w0_t[3] = swap_workaround (w0[3]);
670 w1_t[0] = swap_workaround (w1[0]);
671 w1_t[1] = swap_workaround (w1[1]);
672 w1_t[2] = swap_workaround (w1[2]);
673 w1_t[3] = swap_workaround (w1[3]);
692 hmac_sha512_pad (w0_t, w1_t, w2_t, w3_t, ipad, opad);
694 w0_t[0] = swap_workaround (salt_buf0[0]);
695 w0_t[1] = swap_workaround (salt_buf0[1]);
696 w0_t[2] = swap_workaround (salt_buf0[2]);
697 w0_t[3] = swap_workaround (salt_buf0[3]);
698 w1_t[0] = swap_workaround (salt_buf1[0]);
699 w1_t[1] = swap_workaround (salt_buf1[1]);
700 w1_t[2] = swap_workaround (salt_buf1[2]);
701 w1_t[3] = swap_workaround (salt_buf1[3]);
709 w3_t[3] = (128 + salt_len) * 8;
713 hmac_sha512_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest);
716 const u32x r0 = l32_from_64 (digest[7]);
717 const u32x r1 = h32_from_64 (digest[7]);
718 const u32x r2 = l32_from_64 (digest[3]);
719 const u32x r3 = h32_from_64 (digest[3]);
721 #include VECT_COMPARE_S
725 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01750_s08 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
729 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m01750_s16 (__global pw_t *pws, __global gpu_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 combs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)