2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * magnum <john.magnum@hushmail.com>
12 #include "include/constants.h"
13 #include "include/kernel_vendor.h"
20 #include "include/kernel_functions.c"
21 #include "OpenCL/types_ocl.c"
22 #include "OpenCL/common.c"
23 #include "OpenCL/simd.c"
26 #define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i)])
28 #define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
30 #define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
32 #define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7])
34 #define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf])
37 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 il_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
43 const u32 gid = get_global_id (0);
44 const u32 lid = get_local_id (0);
50 const u32 salt_len = salt_bufs[salt_pos].salt_len;
54 s[0] = salt_bufs[salt_pos].salt_buf[0];
55 s[1] = salt_bufs[salt_pos].salt_buf[1];
56 s[2] = salt_bufs[salt_pos].salt_buf[2];
57 s[3] = salt_bufs[salt_pos].salt_buf[3];
58 s[4] = salt_bufs[salt_pos].salt_buf[4];
59 s[5] = salt_bufs[salt_pos].salt_buf[5];
60 s[6] = (32 + salt_len) * 8;
69 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
71 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
73 const u32x w0lr = w0l | w0r;
108 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
109 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
110 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
111 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
112 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
113 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
114 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
115 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
116 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
117 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
118 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
119 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
120 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
121 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
122 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
123 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
125 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
126 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
127 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
128 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
129 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
130 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
131 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
132 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
133 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
134 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
135 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
136 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
137 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
138 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
139 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
140 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
142 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
143 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
144 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
145 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
146 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
147 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
148 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
149 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
150 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
151 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
152 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
153 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
154 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
155 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
156 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
157 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
159 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
160 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
161 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
162 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
163 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
164 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
165 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
166 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
167 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
168 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
169 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
170 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
171 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
172 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
173 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
174 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
181 w0_t[0] = uint_to_hex_upper8 ((a >> 0) & 255) << 0
182 | uint_to_hex_upper8 ((a >> 8) & 255) << 16;
183 w0_t[1] = uint_to_hex_upper8 ((a >> 16) & 255) << 0
184 | uint_to_hex_upper8 ((a >> 24) & 255) << 16;
185 w0_t[2] = uint_to_hex_upper8 ((b >> 0) & 255) << 0
186 | uint_to_hex_upper8 ((b >> 8) & 255) << 16;
187 w0_t[3] = uint_to_hex_upper8 ((b >> 16) & 255) << 0
188 | uint_to_hex_upper8 ((b >> 24) & 255) << 16;
189 w1_t[0] = uint_to_hex_upper8 ((c >> 0) & 255) << 0
190 | uint_to_hex_upper8 ((c >> 8) & 255) << 16;
191 w1_t[1] = uint_to_hex_upper8 ((c >> 16) & 255) << 0
192 | uint_to_hex_upper8 ((c >> 24) & 255) << 16;
193 w1_t[2] = uint_to_hex_upper8 ((d >> 0) & 255) << 0
194 | uint_to_hex_upper8 ((d >> 8) & 255) << 16;
195 w1_t[3] = uint_to_hex_upper8 ((d >> 16) & 255) << 0
196 | uint_to_hex_upper8 ((d >> 24) & 255) << 16;
213 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
214 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
215 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
216 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
217 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
218 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
219 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
220 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
221 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
222 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
223 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
224 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
225 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
226 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
227 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
228 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
230 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
231 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
232 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
233 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
234 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
235 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
236 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
237 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
238 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
239 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
240 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
241 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
242 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
243 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
244 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
245 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
247 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
248 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
249 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
250 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
251 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
252 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
253 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
254 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
255 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
256 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
257 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
258 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
259 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
260 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
261 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
262 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
264 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
265 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
266 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
267 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
268 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
269 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
270 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
271 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
272 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
273 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
274 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
275 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
276 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
277 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
278 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
279 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
281 COMPARE_M_SIMD (a, d, c, b);
285 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 il_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
291 const u32 gid = get_global_id (0);
292 const u32 lid = get_local_id (0);
298 const u32 search[4] =
300 digests_buf[digests_offset].digest_buf[DGST_R0],
301 digests_buf[digests_offset].digest_buf[DGST_R1],
302 digests_buf[digests_offset].digest_buf[DGST_R2],
303 digests_buf[digests_offset].digest_buf[DGST_R3]
310 const u32 salt_len = salt_bufs[salt_pos].salt_len;
314 s[0] = salt_bufs[salt_pos].salt_buf[0];
315 s[1] = salt_bufs[salt_pos].salt_buf[1];
316 s[2] = salt_bufs[salt_pos].salt_buf[2];
317 s[3] = salt_bufs[salt_pos].salt_buf[3];
318 s[4] = salt_bufs[salt_pos].salt_buf[4];
319 s[5] = salt_bufs[salt_pos].salt_buf[5];
320 s[6] = (32 + salt_len) * 8;
329 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
331 const u32x w0r = ix_create_bft (bfs_buf, il_pos);
333 const u32x w0lr = w0l | w0r;
368 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
369 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
370 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
371 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
372 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
373 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
374 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
375 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
376 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
377 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
378 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
379 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
380 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
381 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
382 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
383 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
385 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
386 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
387 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
388 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
389 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
390 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
391 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
392 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
393 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
394 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
395 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
396 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
397 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
398 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
399 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
400 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
402 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
403 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
404 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
405 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
406 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
407 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
408 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
409 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
410 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
411 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
412 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
413 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
414 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
415 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
416 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
417 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
419 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
420 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
421 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
422 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
423 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
424 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
425 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
426 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
427 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
428 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
429 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
430 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
431 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
432 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
433 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
434 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
441 w0_t[0] = uint_to_hex_upper8 ((a >> 0) & 255) << 0
442 | uint_to_hex_upper8 ((a >> 8) & 255) << 16;
443 w0_t[1] = uint_to_hex_upper8 ((a >> 16) & 255) << 0
444 | uint_to_hex_upper8 ((a >> 24) & 255) << 16;
445 w0_t[2] = uint_to_hex_upper8 ((b >> 0) & 255) << 0
446 | uint_to_hex_upper8 ((b >> 8) & 255) << 16;
447 w0_t[3] = uint_to_hex_upper8 ((b >> 16) & 255) << 0
448 | uint_to_hex_upper8 ((b >> 24) & 255) << 16;
449 w1_t[0] = uint_to_hex_upper8 ((c >> 0) & 255) << 0
450 | uint_to_hex_upper8 ((c >> 8) & 255) << 16;
451 w1_t[1] = uint_to_hex_upper8 ((c >> 16) & 255) << 0
452 | uint_to_hex_upper8 ((c >> 24) & 255) << 16;
453 w1_t[2] = uint_to_hex_upper8 ((d >> 0) & 255) << 0
454 | uint_to_hex_upper8 ((d >> 8) & 255) << 16;
455 w1_t[3] = uint_to_hex_upper8 ((d >> 16) & 255) << 0
456 | uint_to_hex_upper8 ((d >> 24) & 255) << 16;
473 MD5_STEP (MD5_Fo, a, b, c, d, w0_t[0], MD5C00, MD5S00);
474 MD5_STEP (MD5_Fo, d, a, b, c, w0_t[1], MD5C01, MD5S01);
475 MD5_STEP (MD5_Fo, c, d, a, b, w0_t[2], MD5C02, MD5S02);
476 MD5_STEP (MD5_Fo, b, c, d, a, w0_t[3], MD5C03, MD5S03);
477 MD5_STEP (MD5_Fo, a, b, c, d, w1_t[0], MD5C04, MD5S00);
478 MD5_STEP (MD5_Fo, d, a, b, c, w1_t[1], MD5C05, MD5S01);
479 MD5_STEP (MD5_Fo, c, d, a, b, w1_t[2], MD5C06, MD5S02);
480 MD5_STEP (MD5_Fo, b, c, d, a, w1_t[3], MD5C07, MD5S03);
481 MD5_STEP (MD5_Fo, a, b, c, d, w2_t[0], MD5C08, MD5S00);
482 MD5_STEP (MD5_Fo, d, a, b, c, w2_t[1], MD5C09, MD5S01);
483 MD5_STEP (MD5_Fo, c, d, a, b, w2_t[2], MD5C0a, MD5S02);
484 MD5_STEP (MD5_Fo, b, c, d, a, w2_t[3], MD5C0b, MD5S03);
485 MD5_STEP (MD5_Fo, a, b, c, d, w3_t[0], MD5C0c, MD5S00);
486 MD5_STEP (MD5_Fo, d, a, b, c, w3_t[1], MD5C0d, MD5S01);
487 MD5_STEP (MD5_Fo, c, d, a, b, w3_t[2], MD5C0e, MD5S02);
488 MD5_STEP (MD5_Fo, b, c, d, a, w3_t[3], MD5C0f, MD5S03);
490 MD5_STEP (MD5_Go, a, b, c, d, w0_t[1], MD5C10, MD5S10);
491 MD5_STEP (MD5_Go, d, a, b, c, w1_t[2], MD5C11, MD5S11);
492 MD5_STEP (MD5_Go, c, d, a, b, w2_t[3], MD5C12, MD5S12);
493 MD5_STEP (MD5_Go, b, c, d, a, w0_t[0], MD5C13, MD5S13);
494 MD5_STEP (MD5_Go, a, b, c, d, w1_t[1], MD5C14, MD5S10);
495 MD5_STEP (MD5_Go, d, a, b, c, w2_t[2], MD5C15, MD5S11);
496 MD5_STEP (MD5_Go, c, d, a, b, w3_t[3], MD5C16, MD5S12);
497 MD5_STEP (MD5_Go, b, c, d, a, w1_t[0], MD5C17, MD5S13);
498 MD5_STEP (MD5_Go, a, b, c, d, w2_t[1], MD5C18, MD5S10);
499 MD5_STEP (MD5_Go, d, a, b, c, w3_t[2], MD5C19, MD5S11);
500 MD5_STEP (MD5_Go, c, d, a, b, w0_t[3], MD5C1a, MD5S12);
501 MD5_STEP (MD5_Go, b, c, d, a, w2_t[0], MD5C1b, MD5S13);
502 MD5_STEP (MD5_Go, a, b, c, d, w3_t[1], MD5C1c, MD5S10);
503 MD5_STEP (MD5_Go, d, a, b, c, w0_t[2], MD5C1d, MD5S11);
504 MD5_STEP (MD5_Go, c, d, a, b, w1_t[3], MD5C1e, MD5S12);
505 MD5_STEP (MD5_Go, b, c, d, a, w3_t[0], MD5C1f, MD5S13);
507 MD5_STEP (MD5_H , a, b, c, d, w1_t[1], MD5C20, MD5S20);
508 MD5_STEP (MD5_H , d, a, b, c, w2_t[0], MD5C21, MD5S21);
509 MD5_STEP (MD5_H , c, d, a, b, w2_t[3], MD5C22, MD5S22);
510 MD5_STEP (MD5_H , b, c, d, a, w3_t[2], MD5C23, MD5S23);
511 MD5_STEP (MD5_H , a, b, c, d, w0_t[1], MD5C24, MD5S20);
512 MD5_STEP (MD5_H , d, a, b, c, w1_t[0], MD5C25, MD5S21);
513 MD5_STEP (MD5_H , c, d, a, b, w1_t[3], MD5C26, MD5S22);
514 MD5_STEP (MD5_H , b, c, d, a, w2_t[2], MD5C27, MD5S23);
515 MD5_STEP (MD5_H , a, b, c, d, w3_t[1], MD5C28, MD5S20);
516 MD5_STEP (MD5_H , d, a, b, c, w0_t[0], MD5C29, MD5S21);
517 MD5_STEP (MD5_H , c, d, a, b, w0_t[3], MD5C2a, MD5S22);
518 MD5_STEP (MD5_H , b, c, d, a, w1_t[2], MD5C2b, MD5S23);
519 MD5_STEP (MD5_H , a, b, c, d, w2_t[1], MD5C2c, MD5S20);
520 MD5_STEP (MD5_H , d, a, b, c, w3_t[0], MD5C2d, MD5S21);
521 MD5_STEP (MD5_H , c, d, a, b, w3_t[3], MD5C2e, MD5S22);
522 MD5_STEP (MD5_H , b, c, d, a, w0_t[2], MD5C2f, MD5S23);
524 MD5_STEP (MD5_I , a, b, c, d, w0_t[0], MD5C30, MD5S30);
525 MD5_STEP (MD5_I , d, a, b, c, w1_t[3], MD5C31, MD5S31);
526 MD5_STEP (MD5_I , c, d, a, b, w3_t[2], MD5C32, MD5S32);
527 MD5_STEP (MD5_I , b, c, d, a, w1_t[1], MD5C33, MD5S33);
528 MD5_STEP (MD5_I , a, b, c, d, w3_t[0], MD5C34, MD5S30);
529 MD5_STEP (MD5_I , d, a, b, c, w0_t[3], MD5C35, MD5S31);
530 MD5_STEP (MD5_I , c, d, a, b, w2_t[2], MD5C36, MD5S32);
531 MD5_STEP (MD5_I , b, c, d, a, w0_t[1], MD5C37, MD5S33);
532 MD5_STEP (MD5_I , a, b, c, d, w2_t[0], MD5C38, MD5S30);
533 MD5_STEP (MD5_I , d, a, b, c, w3_t[3], MD5C39, MD5S31);
534 MD5_STEP (MD5_I , c, d, a, b, w1_t[2], MD5C3a, MD5S32);
535 MD5_STEP (MD5_I , b, c, d, a, w3_t[1], MD5C3b, MD5S33);
536 MD5_STEP (MD5_I , a, b, c, d, w1_t[0], MD5C3c, MD5S30);
537 MD5_STEP (MD5_I , d, a, b, c, w2_t[3], MD5C3d, MD5S31);
538 MD5_STEP (MD5_I , c, d, a, b, w0_t[2], MD5C3e, MD5S32);
539 MD5_STEP (MD5_I , b, c, d, a, w2_t[1], MD5C3f, MD5S33);
541 COMPARE_S_SIMD (a, d, c, b);
545 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
551 const u32 gid = get_global_id (0);
552 const u32 lid = get_local_id (0);
553 const u32 lsz = get_local_size (0);
559 __local u32 l_bin2asc[256];
561 for (u32 i = lid; i < 256; i += lsz)
563 const u32 i0 = (i >> 0) & 15;
564 const u32 i1 = (i >> 4) & 15;
566 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
567 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
570 barrier (CLK_LOCAL_MEM_FENCE);
572 if (gid >= gid_max) return;
580 w0[0] = pws[gid].i[ 0];
581 w0[1] = pws[gid].i[ 1];
582 w0[2] = pws[gid].i[ 2];
583 w0[3] = pws[gid].i[ 3];
603 w3[2] = pws[gid].i[14];
606 const u32 pw_len = pws[gid].pw_len;
612 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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
615 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
621 const u32 gid = get_global_id (0);
622 const u32 lid = get_local_id (0);
623 const u32 lsz = get_local_size (0);
629 __local u32 l_bin2asc[256];
631 for (u32 i = lid; i < 256; i += lsz)
633 const u32 i0 = (i >> 0) & 15;
634 const u32 i1 = (i >> 4) & 15;
636 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
637 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
640 barrier (CLK_LOCAL_MEM_FENCE);
642 if (gid >= gid_max) return;
650 w0[0] = pws[gid].i[ 0];
651 w0[1] = pws[gid].i[ 1];
652 w0[2] = pws[gid].i[ 2];
653 w0[3] = pws[gid].i[ 3];
657 w1[0] = pws[gid].i[ 4];
658 w1[1] = pws[gid].i[ 5];
659 w1[2] = pws[gid].i[ 6];
660 w1[3] = pws[gid].i[ 7];
673 w3[2] = pws[gid].i[14];
676 const u32 pw_len = pws[gid].pw_len;
682 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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
685 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
691 const u32 gid = get_global_id (0);
692 const u32 lid = get_local_id (0);
693 const u32 lsz = get_local_size (0);
699 __local u32 l_bin2asc[256];
701 for (u32 i = lid; i < 256; i += lsz)
703 const u32 i0 = (i >> 0) & 15;
704 const u32 i1 = (i >> 4) & 15;
706 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
707 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
710 barrier (CLK_LOCAL_MEM_FENCE);
712 if (gid >= gid_max) return;
720 w0[0] = pws[gid].i[ 0];
721 w0[1] = pws[gid].i[ 1];
722 w0[2] = pws[gid].i[ 2];
723 w0[3] = pws[gid].i[ 3];
727 w1[0] = pws[gid].i[ 4];
728 w1[1] = pws[gid].i[ 5];
729 w1[2] = pws[gid].i[ 6];
730 w1[3] = pws[gid].i[ 7];
734 w2[0] = pws[gid].i[ 8];
735 w2[1] = pws[gid].i[ 9];
736 w2[2] = pws[gid].i[10];
737 w2[3] = pws[gid].i[11];
741 w3[0] = pws[gid].i[12];
742 w3[1] = pws[gid].i[13];
743 w3[2] = pws[gid].i[14];
744 w3[3] = pws[gid].i[15];
746 const u32 pw_len = pws[gid].pw_len;
752 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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
755 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
761 const u32 gid = get_global_id (0);
762 const u32 lid = get_local_id (0);
763 const u32 lsz = get_local_size (0);
769 __local u32 l_bin2asc[256];
771 for (u32 i = lid; i < 256; i += lsz)
773 const u32 i0 = (i >> 0) & 15;
774 const u32 i1 = (i >> 4) & 15;
776 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
777 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
780 barrier (CLK_LOCAL_MEM_FENCE);
782 if (gid >= gid_max) return;
790 w0[0] = pws[gid].i[ 0];
791 w0[1] = pws[gid].i[ 1];
792 w0[2] = pws[gid].i[ 2];
793 w0[3] = pws[gid].i[ 3];
813 w3[2] = pws[gid].i[14];
816 const u32 pw_len = pws[gid].pw_len;
822 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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
825 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
831 const u32 gid = get_global_id (0);
832 const u32 lid = get_local_id (0);
833 const u32 lsz = get_local_size (0);
839 __local u32 l_bin2asc[256];
841 for (u32 i = lid; i < 256; i += lsz)
843 const u32 i0 = (i >> 0) & 15;
844 const u32 i1 = (i >> 4) & 15;
846 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
847 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
850 barrier (CLK_LOCAL_MEM_FENCE);
852 if (gid >= gid_max) return;
860 w0[0] = pws[gid].i[ 0];
861 w0[1] = pws[gid].i[ 1];
862 w0[2] = pws[gid].i[ 2];
863 w0[3] = pws[gid].i[ 3];
867 w1[0] = pws[gid].i[ 4];
868 w1[1] = pws[gid].i[ 5];
869 w1[2] = pws[gid].i[ 6];
870 w1[3] = pws[gid].i[ 7];
883 w3[2] = pws[gid].i[14];
886 const u32 pw_len = pws[gid].pw_len;
892 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, il_cnt, digests_cnt, digests_offset, l_bin2asc);
895 __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 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
901 const u32 gid = get_global_id (0);
902 const u32 lid = get_local_id (0);
903 const u32 lsz = get_local_size (0);
909 __local u32 l_bin2asc[256];
911 for (u32 i = lid; i < 256; i += lsz)
913 const u32 i0 = (i >> 0) & 15;
914 const u32 i1 = (i >> 4) & 15;
916 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'A' - 10 + i0) << 8
917 | ((i1 < 10) ? '0' + i1 : 'A' - 10 + i1) << 0;
920 barrier (CLK_LOCAL_MEM_FENCE);
922 if (gid >= gid_max) return;
930 w0[0] = pws[gid].i[ 0];
931 w0[1] = pws[gid].i[ 1];
932 w0[2] = pws[gid].i[ 2];
933 w0[3] = pws[gid].i[ 3];
937 w1[0] = pws[gid].i[ 4];
938 w1[1] = pws[gid].i[ 5];
939 w1[2] = pws[gid].i[ 6];
940 w1[3] = pws[gid].i[ 7];
944 w2[0] = pws[gid].i[ 8];
945 w2[1] = pws[gid].i[ 9];
946 w2[2] = pws[gid].i[10];
947 w2[3] = pws[gid].i[11];
951 w3[0] = pws[gid].i[12];
952 w3[1] = pws[gid].i[13];
953 w3[2] = pws[gid].i[14];
954 w3[3] = pws[gid].i[15];
956 const u32 pw_len = pws[gid].pw_len;
962 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, il_cnt, digests_cnt, digests_offset, l_bin2asc);