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 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
25 static void m04310m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
31 const u32 gid = get_global_id (0);
32 const u32 lid = get_local_id (0);
38 const u32 salt_len = salt_bufs[salt_pos].salt_len;
42 s[0] = salt_bufs[salt_pos].salt_buf[0];
43 s[1] = salt_bufs[salt_pos].salt_buf[1];
44 s[2] = salt_bufs[salt_pos].salt_buf[2];
45 s[3] = salt_bufs[salt_pos].salt_buf[3];
46 s[4] = salt_bufs[salt_pos].salt_buf[4];
47 s[5] = salt_bufs[salt_pos].salt_buf[5];
48 s[6] = (32 + salt_len) * 8;
57 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
59 const u32 w0r = bfs_buf[il_pos].i;
68 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
69 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
70 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
71 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
72 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
73 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
74 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
75 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
76 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
77 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
78 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
79 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
80 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
81 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
82 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
83 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
85 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
86 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
87 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
88 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
89 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
90 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
91 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
92 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
93 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
94 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
95 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
96 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
97 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
98 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
99 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
100 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
102 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
103 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
104 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
105 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
106 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
107 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
108 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
109 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
110 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
111 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
112 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
113 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
114 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
115 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
116 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
117 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
119 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
120 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
121 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
122 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
123 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
124 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
125 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
126 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
127 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
128 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
129 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
130 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
131 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
132 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
133 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
134 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
141 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
142 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
143 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
144 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
145 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
146 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
147 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
148 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
149 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
150 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
151 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
152 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
153 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
154 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
155 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
156 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
158 const u32 w8_t = s[0];
159 const u32 w9_t = s[1];
160 const u32 wa_t = s[2];
161 const u32 wb_t = s[3];
162 const u32 wc_t = s[4];
163 const u32 wd_t = s[5];
164 const u32 we_t = s[6];
165 const u32 wf_t = s[7];
172 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
173 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
174 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
175 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
176 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
177 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
178 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
179 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
180 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
181 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
182 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
183 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
184 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
185 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
186 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
187 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
189 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
190 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
191 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
192 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
193 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
194 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
195 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
196 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
197 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
198 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
199 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
200 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
201 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
202 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
203 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
204 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
206 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
207 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
208 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
209 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
210 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
211 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
212 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
213 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
214 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
215 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
216 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
217 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
218 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
219 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
220 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
221 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
223 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
224 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
225 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
226 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
227 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
228 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
229 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
230 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
231 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
232 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
233 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
234 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
235 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
236 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
237 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
238 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
249 static void m04310s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
255 const u32 gid = get_global_id (0);
256 const u32 lid = get_local_id (0);
262 const u32 search[4] =
264 digests_buf[digests_offset].digest_buf[DGST_R0],
265 digests_buf[digests_offset].digest_buf[DGST_R1],
266 digests_buf[digests_offset].digest_buf[DGST_R2],
267 digests_buf[digests_offset].digest_buf[DGST_R3]
274 const u32 salt_len = salt_bufs[salt_pos].salt_len;
278 s[0] = salt_bufs[salt_pos].salt_buf[0];
279 s[1] = salt_bufs[salt_pos].salt_buf[1];
280 s[2] = salt_bufs[salt_pos].salt_buf[2];
281 s[3] = salt_bufs[salt_pos].salt_buf[3];
282 s[4] = salt_bufs[salt_pos].salt_buf[4];
283 s[5] = salt_bufs[salt_pos].salt_buf[5];
284 s[6] = (32 + salt_len) * 8;
293 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
295 const u32 w0r = bfs_buf[il_pos].i;
304 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
305 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
306 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
307 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
308 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
309 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
310 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
311 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
312 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
313 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
314 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
315 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
316 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
317 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
318 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
319 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
321 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
322 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
323 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
324 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
325 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
326 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
327 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
328 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
329 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
330 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
331 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
332 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
333 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
334 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
335 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
336 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
338 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
339 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
340 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
341 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
342 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
343 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
344 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
345 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
346 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
347 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
348 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
349 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
350 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
351 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
352 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
353 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
355 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
356 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
357 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
358 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
359 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
360 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
361 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
362 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
363 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
364 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
365 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
366 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
367 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
368 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
369 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
370 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
377 const u32 w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
378 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
379 const u32 w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
380 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
381 const u32 w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
382 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
383 const u32 w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
384 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
385 const u32 w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
386 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
387 const u32 w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
388 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
389 const u32 w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
390 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
391 const u32 w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
392 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
394 const u32 w8_t = s[0];
395 const u32 w9_t = s[1];
396 const u32 wa_t = s[2];
397 const u32 wb_t = s[3];
398 const u32 wc_t = s[4];
399 const u32 wd_t = s[5];
400 const u32 we_t = s[6];
401 const u32 wf_t = s[7];
408 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
409 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
410 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
411 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
412 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
413 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
414 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
415 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
416 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
417 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
418 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
419 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
420 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
421 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
422 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
423 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
425 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
426 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
427 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
428 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
429 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
430 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
431 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
432 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
433 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
434 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
435 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
436 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
437 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
438 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
439 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
440 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
442 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
443 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
444 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
445 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
446 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
447 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
448 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
449 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
450 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
451 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
452 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
453 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
454 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
455 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
456 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
457 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
459 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
460 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
461 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
462 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
463 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
464 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
465 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
466 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
467 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
468 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
469 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
470 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
471 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
472 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
473 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
474 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
485 __kernel void m04310_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
491 const u32 gid = get_global_id (0);
492 const u32 lid = get_local_id (0);
493 const u32 lsz = get_local_size (0);
499 __local u32 l_bin2asc[256];
501 for (u32 i = lid; i < 256; i += lsz)
503 const u32 i0 = (i >> 0) & 15;
504 const u32 i1 = (i >> 4) & 15;
506 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
507 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
510 barrier (CLK_LOCAL_MEM_FENCE);
512 if (gid >= gid_max) return;
520 w0[0] = pws[gid].i[ 0];
521 w0[1] = pws[gid].i[ 1];
522 w0[2] = pws[gid].i[ 2];
523 w0[3] = pws[gid].i[ 3];
543 w3[2] = pws[gid].i[14];
546 const u32 pw_len = pws[gid].pw_len;
552 m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
555 __kernel void m04310_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
561 const u32 gid = get_global_id (0);
562 const u32 lid = get_local_id (0);
563 const u32 lsz = get_local_size (0);
569 __local u32 l_bin2asc[256];
571 for (u32 i = lid; i < 256; i += lsz)
573 const u32 i0 = (i >> 0) & 15;
574 const u32 i1 = (i >> 4) & 15;
576 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
577 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
580 barrier (CLK_LOCAL_MEM_FENCE);
582 if (gid >= gid_max) return;
590 w0[0] = pws[gid].i[ 0];
591 w0[1] = pws[gid].i[ 1];
592 w0[2] = pws[gid].i[ 2];
593 w0[3] = pws[gid].i[ 3];
597 w1[0] = pws[gid].i[ 4];
598 w1[1] = pws[gid].i[ 5];
599 w1[2] = pws[gid].i[ 6];
600 w1[3] = pws[gid].i[ 7];
613 w3[2] = pws[gid].i[14];
616 const u32 pw_len = pws[gid].pw_len;
622 m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
625 __kernel void m04310_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
631 const u32 gid = get_global_id (0);
632 const u32 lid = get_local_id (0);
633 const u32 lsz = get_local_size (0);
639 __local u32 l_bin2asc[256];
641 for (u32 i = lid; i < 256; i += lsz)
643 const u32 i0 = (i >> 0) & 15;
644 const u32 i1 = (i >> 4) & 15;
646 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
647 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
650 barrier (CLK_LOCAL_MEM_FENCE);
652 if (gid >= gid_max) return;
660 w0[0] = pws[gid].i[ 0];
661 w0[1] = pws[gid].i[ 1];
662 w0[2] = pws[gid].i[ 2];
663 w0[3] = pws[gid].i[ 3];
667 w1[0] = pws[gid].i[ 4];
668 w1[1] = pws[gid].i[ 5];
669 w1[2] = pws[gid].i[ 6];
670 w1[3] = pws[gid].i[ 7];
674 w2[0] = pws[gid].i[ 8];
675 w2[1] = pws[gid].i[ 9];
676 w2[2] = pws[gid].i[10];
677 w2[3] = pws[gid].i[11];
681 w3[0] = pws[gid].i[12];
682 w3[1] = pws[gid].i[13];
683 w3[2] = pws[gid].i[14];
684 w3[3] = pws[gid].i[15];
686 const u32 pw_len = pws[gid].pw_len;
692 m04310m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
695 __kernel void m04310_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
701 const u32 gid = get_global_id (0);
702 const u32 lid = get_local_id (0);
703 const u32 lsz = get_local_size (0);
709 __local u32 l_bin2asc[256];
711 for (u32 i = lid; i < 256; i += lsz)
713 const u32 i0 = (i >> 0) & 15;
714 const u32 i1 = (i >> 4) & 15;
716 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
717 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
720 barrier (CLK_LOCAL_MEM_FENCE);
722 if (gid >= gid_max) return;
730 w0[0] = pws[gid].i[ 0];
731 w0[1] = pws[gid].i[ 1];
732 w0[2] = pws[gid].i[ 2];
733 w0[3] = pws[gid].i[ 3];
753 w3[2] = pws[gid].i[14];
756 const u32 pw_len = pws[gid].pw_len;
762 m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
765 __kernel void m04310_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
771 const u32 gid = get_global_id (0);
772 const u32 lid = get_local_id (0);
773 const u32 lsz = get_local_size (0);
779 __local u32 l_bin2asc[256];
781 for (u32 i = lid; i < 256; i += lsz)
783 const u32 i0 = (i >> 0) & 15;
784 const u32 i1 = (i >> 4) & 15;
786 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
787 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
790 barrier (CLK_LOCAL_MEM_FENCE);
792 if (gid >= gid_max) return;
800 w0[0] = pws[gid].i[ 0];
801 w0[1] = pws[gid].i[ 1];
802 w0[2] = pws[gid].i[ 2];
803 w0[3] = pws[gid].i[ 3];
807 w1[0] = pws[gid].i[ 4];
808 w1[1] = pws[gid].i[ 5];
809 w1[2] = pws[gid].i[ 6];
810 w1[3] = pws[gid].i[ 7];
823 w3[2] = pws[gid].i[14];
826 const u32 pw_len = pws[gid].pw_len;
832 m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);
835 __kernel void m04310_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
841 const u32 gid = get_global_id (0);
842 const u32 lid = get_local_id (0);
843 const u32 lsz = get_local_size (0);
849 __local u32 l_bin2asc[256];
851 for (u32 i = lid; i < 256; i += lsz)
853 const u32 i0 = (i >> 0) & 15;
854 const u32 i1 = (i >> 4) & 15;
856 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
857 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
860 barrier (CLK_LOCAL_MEM_FENCE);
862 if (gid >= gid_max) return;
870 w0[0] = pws[gid].i[ 0];
871 w0[1] = pws[gid].i[ 1];
872 w0[2] = pws[gid].i[ 2];
873 w0[3] = pws[gid].i[ 3];
877 w1[0] = pws[gid].i[ 4];
878 w1[1] = pws[gid].i[ 5];
879 w1[2] = pws[gid].i[ 6];
880 w1[3] = pws[gid].i[ 7];
884 w2[0] = pws[gid].i[ 8];
885 w2[1] = pws[gid].i[ 9];
886 w2[2] = pws[gid].i[10];
887 w2[3] = pws[gid].i[11];
891 w3[0] = pws[gid].i[12];
892 w3[1] = pws[gid].i[13];
893 w3[2] = pws[gid].i[14];
894 w3[3] = pws[gid].i[15];
896 const u32 pw_len = pws[gid].pw_len;
902 m04310s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, bfs_cnt, digests_cnt, digests_offset, l_bin2asc);