2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * Gabriele Gristina <matrix@hashcat.net>
12 #include "inc_hash_constants.h"
13 #include "inc_vendor.cl"
20 #include "inc_hash_functions.cl"
21 #include "inc_types.cl"
22 #include "inc_common.cl"
23 #include "inc_simd.cl"
25 __constant u32 k_sha256[64] =
27 SHA256C00, SHA256C01, SHA256C02, SHA256C03,
28 SHA256C04, SHA256C05, SHA256C06, SHA256C07,
29 SHA256C08, SHA256C09, SHA256C0a, SHA256C0b,
30 SHA256C0c, SHA256C0d, SHA256C0e, SHA256C0f,
31 SHA256C10, SHA256C11, SHA256C12, SHA256C13,
32 SHA256C14, SHA256C15, SHA256C16, SHA256C17,
33 SHA256C18, SHA256C19, SHA256C1a, SHA256C1b,
34 SHA256C1c, SHA256C1d, SHA256C1e, SHA256C1f,
35 SHA256C20, SHA256C21, SHA256C22, SHA256C23,
36 SHA256C24, SHA256C25, SHA256C26, SHA256C27,
37 SHA256C28, SHA256C29, SHA256C2a, SHA256C2b,
38 SHA256C2c, SHA256C2d, SHA256C2e, SHA256C2f,
39 SHA256C30, SHA256C31, SHA256C32, SHA256C33,
40 SHA256C34, SHA256C35, SHA256C36, SHA256C37,
41 SHA256C38, SHA256C39, SHA256C3a, SHA256C3b,
42 SHA256C3c, SHA256C3d, SHA256C3e, SHA256C3f,
45 #define SHA256_S0_S(x) (rotl32_S ((x), 25u) ^ rotl32_S ((x), 14u) ^ SHIFT_RIGHT_32 ((x), 3u))
46 #define SHA256_S1_S(x) (rotl32_S ((x), 15u) ^ rotl32_S ((x), 13u) ^ SHIFT_RIGHT_32 ((x), 10u))
48 #define SHA256_EXPAND_S(x,y,z,w) (SHA256_S1_S (x) + y + SHA256_S0_S (z) + w)
50 void sha256_transform (u32x digest[8], const u32x w[16])
78 #define ROUND_EXPAND() \
80 w0_t = SHA256_EXPAND (we_t, w9_t, w1_t, w0_t); \
81 w1_t = SHA256_EXPAND (wf_t, wa_t, w2_t, w1_t); \
82 w2_t = SHA256_EXPAND (w0_t, wb_t, w3_t, w2_t); \
83 w3_t = SHA256_EXPAND (w1_t, wc_t, w4_t, w3_t); \
84 w4_t = SHA256_EXPAND (w2_t, wd_t, w5_t, w4_t); \
85 w5_t = SHA256_EXPAND (w3_t, we_t, w6_t, w5_t); \
86 w6_t = SHA256_EXPAND (w4_t, wf_t, w7_t, w6_t); \
87 w7_t = SHA256_EXPAND (w5_t, w0_t, w8_t, w7_t); \
88 w8_t = SHA256_EXPAND (w6_t, w1_t, w9_t, w8_t); \
89 w9_t = SHA256_EXPAND (w7_t, w2_t, wa_t, w9_t); \
90 wa_t = SHA256_EXPAND (w8_t, w3_t, wb_t, wa_t); \
91 wb_t = SHA256_EXPAND (w9_t, w4_t, wc_t, wb_t); \
92 wc_t = SHA256_EXPAND (wa_t, w5_t, wd_t, wc_t); \
93 wd_t = SHA256_EXPAND (wb_t, w6_t, we_t, wd_t); \
94 we_t = SHA256_EXPAND (wc_t, w7_t, wf_t, we_t); \
95 wf_t = SHA256_EXPAND (wd_t, w8_t, w0_t, wf_t); \
98 #define ROUND_STEP(i) \
100 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w0_t, k_sha256[i + 0]); \
101 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w1_t, k_sha256[i + 1]); \
102 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w2_t, k_sha256[i + 2]); \
103 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w3_t, k_sha256[i + 3]); \
104 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w4_t, k_sha256[i + 4]); \
105 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w5_t, k_sha256[i + 5]); \
106 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w6_t, k_sha256[i + 6]); \
107 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w7_t, k_sha256[i + 7]); \
108 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w8_t, k_sha256[i + 8]); \
109 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w9_t, k_sha256[i + 9]); \
110 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, wa_t, k_sha256[i + 10]); \
111 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, wb_t, k_sha256[i + 11]); \
112 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, wc_t, k_sha256[i + 12]); \
113 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, wd_t, k_sha256[i + 13]); \
114 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, we_t, k_sha256[i + 14]); \
115 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, wf_t, k_sha256[i + 15]); \
123 for (int i = 16; i < 64; i += 16)
125 ROUND_EXPAND (); ROUND_STEP (i);
138 void sha256_transform_z (u32x digest[8])
149 #define ROUND_STEP_Z(i) \
151 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, 0, k_sha256[i + 0]); \
152 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, 0, k_sha256[i + 1]); \
153 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, 0, k_sha256[i + 2]); \
154 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, 0, k_sha256[i + 3]); \
155 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, 0, k_sha256[i + 4]); \
156 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, 0, k_sha256[i + 5]); \
157 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, 0, k_sha256[i + 6]); \
158 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, 0, k_sha256[i + 7]); \
159 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, 0, k_sha256[i + 8]); \
160 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, 0, k_sha256[i + 9]); \
161 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, 0, k_sha256[i + 10]); \
162 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, 0, k_sha256[i + 11]); \
163 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, 0, k_sha256[i + 12]); \
164 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, 0, k_sha256[i + 13]); \
165 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, 0, k_sha256[i + 14]); \
166 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, 0, k_sha256[i + 15]); \
174 for (int i = 16; i < 64; i += 16)
189 void sha256_transform_s (u32x digest[8], __local u32 *w)
200 #define ROUND_STEP_S(i) \
202 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w[i + 0], k_sha256[i + 0]); \
203 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w[i + 1], k_sha256[i + 1]); \
204 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w[i + 2], k_sha256[i + 2]); \
205 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w[i + 3], k_sha256[i + 3]); \
206 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w[i + 4], k_sha256[i + 4]); \
207 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w[i + 5], k_sha256[i + 5]); \
208 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w[i + 6], k_sha256[i + 6]); \
209 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w[i + 7], k_sha256[i + 7]); \
210 SHA256_STEP (SHA256_F0o, SHA256_F1o, a, b, c, d, e, f, g, h, w[i + 8], k_sha256[i + 8]); \
211 SHA256_STEP (SHA256_F0o, SHA256_F1o, h, a, b, c, d, e, f, g, w[i + 9], k_sha256[i + 9]); \
212 SHA256_STEP (SHA256_F0o, SHA256_F1o, g, h, a, b, c, d, e, f, w[i + 10], k_sha256[i + 10]); \
213 SHA256_STEP (SHA256_F0o, SHA256_F1o, f, g, h, a, b, c, d, e, w[i + 11], k_sha256[i + 11]); \
214 SHA256_STEP (SHA256_F0o, SHA256_F1o, e, f, g, h, a, b, c, d, w[i + 12], k_sha256[i + 12]); \
215 SHA256_STEP (SHA256_F0o, SHA256_F1o, d, e, f, g, h, a, b, c, w[i + 13], k_sha256[i + 13]); \
216 SHA256_STEP (SHA256_F0o, SHA256_F1o, c, d, e, f, g, h, a, b, w[i + 14], k_sha256[i + 14]); \
217 SHA256_STEP (SHA256_F0o, SHA256_F1o, b, c, d, e, f, g, h, a, w[i + 15], k_sha256[i + 15]); \
225 for (int i = 16; i < 64; i += 16)
240 void m08000m (__local u32 *w_s1, __local u32 *w_s2, u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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 gid_max)
246 const u32 gid = get_global_id (0);
247 const u32 lid = get_local_id (0);
248 const u32 lsz = get_local_size (0);
254 const u32 salt_buf0 = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]);
255 const u32 salt_buf1 = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]);
256 const u32 salt_buf2 = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80
259 * precompute final msg blocks
262 for (u32 i = lid; i < 64; i += lsz)
268 barrier (CLK_LOCAL_MEM_FENCE);
272 w_s1[15] = 0 | salt_buf0 >> 16;
277 for (int i = 16; i < 64; i++)
279 w_s1[i] = SHA256_EXPAND_S (w_s1[i - 2], w_s1[i - 7], w_s1[i - 15], w_s1[i - 16]);
282 w_s2[ 0] = salt_buf0 << 16 | salt_buf1 >> 16;
283 w_s2[ 1] = salt_buf1 << 16 | salt_buf2 >> 16;
284 w_s2[ 2] = salt_buf2 << 16 | 0;
285 w_s2[15] = (510 + 8) * 8;
290 for (int i = 16; i < 64; i++)
292 w_s2[i] = SHA256_EXPAND_S (w_s2[i - 2], w_s2[i - 7], w_s2[i - 15], w_s2[i - 16]);
296 barrier (CLK_LOCAL_MEM_FENCE);
298 if (gid >= gid_max) return;
306 w_t[ 0] = w[ 0] >> 8;
307 w_t[ 1] = w[ 1] >> 8;
308 w_t[ 2] = w[ 2] >> 8;
309 w_t[ 3] = w[ 3] >> 8;
310 w_t[ 4] = w[ 4] >> 8;
311 w_t[ 5] = w[ 5] >> 8;
312 w_t[ 6] = w[ 6] >> 8;
313 w_t[ 7] = w[ 7] >> 8;
314 w_t[ 8] = w[ 8] >> 8;
315 w_t[ 9] = w[ 9] >> 8;
316 w_t[10] = w[10] >> 8;
317 w_t[11] = w[11] >> 8;
318 w_t[12] = w[12] >> 8;
319 w_t[13] = w[13] >> 8;
320 w_t[14] = w[14] >> 8;
321 w_t[15] = w[15] >> 8;
329 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
331 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
333 const u32x w0lr = w0l | w0r;
339 digest[0] = SHA256M_A;
340 digest[1] = SHA256M_B;
341 digest[2] = SHA256M_C;
342 digest[3] = SHA256M_D;
343 digest[4] = SHA256M_E;
344 digest[5] = SHA256M_F;
345 digest[6] = SHA256M_G;
346 digest[7] = SHA256M_H;
348 sha256_transform (digest, w_t); // 0 - 64
349 sha256_transform_z (digest); // 64 - 128
350 sha256_transform_z (digest); // 128 - 192
351 sha256_transform_z (digest); // 192 - 256
352 sha256_transform_z (digest); // 256 - 320
353 sha256_transform_z (digest); // 320 - 384
354 sha256_transform_z (digest); // 384 - 448
355 sha256_transform_s (digest, w_s1); // 448 - 512
356 sha256_transform_s (digest, w_s2); // 512 - 576
358 COMPARE_M_SIMD (digest[3], digest[7], digest[2], digest[6]);
362 void m08000s (__local u32 *w_s1, __local u32 *w_s2, u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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 gid_max)
368 const u32 gid = get_global_id (0);
369 const u32 lid = get_local_id (0);
370 const u32 lsz = get_local_size (0);
376 const u32 salt_buf0 = swap32_S (salt_bufs[salt_pos].salt_buf[ 0]);
377 const u32 salt_buf1 = swap32_S (salt_bufs[salt_pos].salt_buf[ 1]);
378 const u32 salt_buf2 = swap32_S (salt_bufs[salt_pos].salt_buf[ 2]); // 0x80
381 * precompute final msg blocks
384 for (u32 i = lid; i < 64; i += lsz)
390 barrier (CLK_LOCAL_MEM_FENCE);
394 w_s1[15] = 0 | salt_buf0 >> 16;
399 for (int i = 16; i < 64; i++)
401 w_s1[i] = SHA256_EXPAND_S (w_s1[i - 2], w_s1[i - 7], w_s1[i - 15], w_s1[i - 16]);
404 w_s2[ 0] = salt_buf0 << 16 | salt_buf1 >> 16;
405 w_s2[ 1] = salt_buf1 << 16 | salt_buf2 >> 16;
406 w_s2[ 2] = salt_buf2 << 16 | 0;
407 w_s2[15] = (510 + 8) * 8;
412 for (int i = 16; i < 64; i++)
414 w_s2[i] = SHA256_EXPAND_S (w_s2[i - 2], w_s2[i - 7], w_s2[i - 15], w_s2[i - 16]);
418 barrier (CLK_LOCAL_MEM_FENCE);
420 if (gid >= gid_max) return;
428 w_t[ 0] = w[ 0] >> 8;
429 w_t[ 1] = w[ 1] >> 8;
430 w_t[ 2] = w[ 2] >> 8;
431 w_t[ 3] = w[ 3] >> 8;
432 w_t[ 4] = w[ 4] >> 8;
433 w_t[ 5] = w[ 5] >> 8;
434 w_t[ 6] = w[ 6] >> 8;
435 w_t[ 7] = w[ 7] >> 8;
436 w_t[ 8] = w[ 8] >> 8;
437 w_t[ 9] = w[ 9] >> 8;
438 w_t[10] = w[10] >> 8;
439 w_t[11] = w[11] >> 8;
440 w_t[12] = w[12] >> 8;
441 w_t[13] = w[13] >> 8;
442 w_t[14] = w[14] >> 8;
443 w_t[15] = w[15] >> 8;
449 const u32 search[4] =
451 digests_buf[digests_offset].digest_buf[DGST_R0],
452 digests_buf[digests_offset].digest_buf[DGST_R1],
453 digests_buf[digests_offset].digest_buf[DGST_R2],
454 digests_buf[digests_offset].digest_buf[DGST_R3]
463 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
465 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
467 const u32x w0lr = w0l | w0r;
473 digest[0] = SHA256M_A;
474 digest[1] = SHA256M_B;
475 digest[2] = SHA256M_C;
476 digest[3] = SHA256M_D;
477 digest[4] = SHA256M_E;
478 digest[5] = SHA256M_F;
479 digest[6] = SHA256M_G;
480 digest[7] = SHA256M_H;
482 sha256_transform (digest, w_t); // 0 - 64
483 sha256_transform_z (digest); // 64 - 128
484 sha256_transform_z (digest); // 128 - 192
485 sha256_transform_z (digest); // 192 - 256
486 sha256_transform_z (digest); // 256 - 320
487 sha256_transform_z (digest); // 320 - 384
488 sha256_transform_z (digest); // 384 - 448
489 sha256_transform_s (digest, w_s1); // 448 - 512
490 sha256_transform_s (digest, w_s2); // 512 - 576
492 COMPARE_S_SIMD (digest[3], digest[7], digest[2], digest[6]);
496 __kernel void m08000_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
502 const u32 gid = get_global_id (0);
506 w[ 0] = pws[gid].i[ 0];
507 w[ 1] = pws[gid].i[ 1];
508 w[ 2] = pws[gid].i[ 2];
509 w[ 3] = pws[gid].i[ 3];
523 const u32 pw_len = pws[gid].pw_len;
525 __local u32 w_s1[64];
526 __local u32 w_s2[64];
532 m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, gid_max);
535 __kernel void m08000_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
541 const u32 gid = get_global_id (0);
545 w[ 0] = pws[gid].i[ 0];
546 w[ 1] = pws[gid].i[ 1];
547 w[ 2] = pws[gid].i[ 2];
548 w[ 3] = pws[gid].i[ 3];
549 w[ 4] = pws[gid].i[ 4];
550 w[ 5] = pws[gid].i[ 5];
551 w[ 6] = pws[gid].i[ 6];
552 w[ 7] = pws[gid].i[ 7];
562 const u32 pw_len = pws[gid].pw_len;
564 __local u32 w_s1[64];
565 __local u32 w_s2[64];
571 m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, gid_max);
574 __kernel void m08000_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
580 const u32 gid = get_global_id (0);
584 w[ 0] = pws[gid].i[ 0];
585 w[ 1] = pws[gid].i[ 1];
586 w[ 2] = pws[gid].i[ 2];
587 w[ 3] = pws[gid].i[ 3];
588 w[ 4] = pws[gid].i[ 4];
589 w[ 5] = pws[gid].i[ 5];
590 w[ 6] = pws[gid].i[ 6];
591 w[ 7] = pws[gid].i[ 7];
592 w[ 8] = pws[gid].i[ 8];
593 w[ 9] = pws[gid].i[ 9];
594 w[10] = pws[gid].i[10];
595 w[11] = pws[gid].i[11];
596 w[12] = pws[gid].i[12];
597 w[13] = pws[gid].i[13];
598 w[14] = pws[gid].i[14];
599 w[15] = pws[gid].i[15];
601 const u32 pw_len = pws[gid].pw_len;
603 __local u32 w_s1[64];
604 __local u32 w_s2[64];
610 m08000m (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, gid_max);
613 __kernel void m08000_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
619 const u32 gid = get_global_id (0);
623 w[ 0] = pws[gid].i[ 0];
624 w[ 1] = pws[gid].i[ 1];
625 w[ 2] = pws[gid].i[ 2];
626 w[ 3] = pws[gid].i[ 3];
640 const u32 pw_len = pws[gid].pw_len;
642 __local u32 w_s1[64];
643 __local u32 w_s2[64];
649 m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, gid_max);
652 __kernel void m08000_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
658 const u32 gid = get_global_id (0);
662 w[ 0] = pws[gid].i[ 0];
663 w[ 1] = pws[gid].i[ 1];
664 w[ 2] = pws[gid].i[ 2];
665 w[ 3] = pws[gid].i[ 3];
666 w[ 4] = pws[gid].i[ 4];
667 w[ 5] = pws[gid].i[ 5];
668 w[ 6] = pws[gid].i[ 6];
669 w[ 7] = pws[gid].i[ 7];
679 const u32 pw_len = pws[gid].pw_len;
681 __local u32 w_s1[64];
682 __local u32 w_s2[64];
688 m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, gid_max);
691 __kernel void m08000_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __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)
697 const u32 gid = get_global_id (0);
701 w[ 0] = pws[gid].i[ 0];
702 w[ 1] = pws[gid].i[ 1];
703 w[ 2] = pws[gid].i[ 2];
704 w[ 3] = pws[gid].i[ 3];
705 w[ 4] = pws[gid].i[ 4];
706 w[ 5] = pws[gid].i[ 5];
707 w[ 6] = pws[gid].i[ 6];
708 w[ 7] = pws[gid].i[ 7];
709 w[ 8] = pws[gid].i[ 8];
710 w[ 9] = pws[gid].i[ 9];
711 w[10] = pws[gid].i[10];
712 w[11] = pws[gid].i[11];
713 w[12] = pws[gid].i[12];
714 w[13] = pws[gid].i[13];
715 w[14] = pws[gid].i[14];
716 w[15] = pws[gid].i[15];
718 const u32 pw_len = pws[gid].pw_len;
720 __local u32 w_s1[64];
721 __local u32 w_s2[64];
727 m08000s (w_s1, w_s2, w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, il_cnt, digests_cnt, digests_offset, gid_max);