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 "include/rp_kernel.h"
24 #include "OpenCL/rp.c"
25 #include "OpenCL/simd.c"
28 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
30 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
32 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
34 #define uint_to_hex_lower8(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])
36 #define uint_to_hex_lower8(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])
39 __kernel void m02810_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)
45 const u32 gid = get_global_id (0);
46 const u32 lid = get_local_id (0);
47 const u32 lsz = get_local_size (0);
53 __local u32 l_bin2asc[256];
55 for (u32 i = lid; i < 256; i += lsz)
57 const u32 i0 = (i >> 0) & 15;
58 const u32 i1 = (i >> 4) & 15;
60 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
61 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
64 barrier (CLK_LOCAL_MEM_FENCE);
66 if (gid >= gid_max) return;
75 pw_buf0[0] = pws[gid].i[0];
76 pw_buf0[1] = pws[gid].i[1];
77 pw_buf0[2] = pws[gid].i[2];
78 pw_buf0[3] = pws[gid].i[3];
79 pw_buf1[0] = pws[gid].i[4];
80 pw_buf1[1] = pws[gid].i[5];
81 pw_buf1[2] = pws[gid].i[6];
82 pw_buf1[3] = pws[gid].i[7];
84 const u32 pw_len = pws[gid].pw_len;
95 salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0];
96 salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1];
97 salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2];
98 salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3];
99 salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4];
100 salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5];
101 salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6];
102 salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7];
112 const u32 salt_len = salt_bufs[salt_pos].salt_len;
118 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
125 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
127 append_0x80_2x4_VV (w0, w1, out_len);
137 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
138 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
139 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
140 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
141 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
142 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
143 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
144 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
145 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
146 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
147 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
148 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
149 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
150 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
151 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
152 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
154 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
155 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
156 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
157 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
158 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
159 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
160 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
161 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
162 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
163 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
164 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
165 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
166 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
167 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
168 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
169 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
171 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
172 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
173 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
174 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
175 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
176 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
177 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
178 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
179 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
180 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
181 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
182 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
183 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
184 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
185 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
186 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
188 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
189 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
190 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
191 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
192 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
193 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
194 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
195 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
196 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
197 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
198 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
199 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
200 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
201 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
202 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
203 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
210 w0[0] = salt_buf0[0];
211 w0[1] = salt_buf0[1];
212 w0[2] = salt_buf0[2];
213 w0[3] = salt_buf0[3];
214 w1[0] = salt_buf1[0];
215 w1[1] = salt_buf1[1];
216 w1[2] = salt_buf1[2];
217 w1[3] = salt_buf1[3];
219 w2[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
220 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
221 w2[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
222 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
223 w2[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
224 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
225 w2[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
226 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
227 w3[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
228 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
229 w3[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
230 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
231 w3[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
232 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
233 w3[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
234 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
241 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
242 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
243 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
244 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
245 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
246 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
247 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
248 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
249 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
250 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
251 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
252 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
253 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
254 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
255 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
256 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
258 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
259 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
260 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
261 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
262 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
263 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
264 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
265 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
266 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
267 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
268 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
269 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
270 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
271 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
272 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
273 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
275 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
276 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
277 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
278 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
279 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
280 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
281 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
282 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
283 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
284 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
285 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
286 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
287 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
288 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
289 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
290 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
292 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
293 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
294 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
295 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
296 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
297 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
298 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
299 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
300 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
301 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
302 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
303 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
304 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
305 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
306 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
307 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
309 const u32x r_a = a + MD5M_A;
310 const u32x r_b = b + MD5M_B;
311 const u32x r_c = c + MD5M_C;
312 const u32x r_d = d + MD5M_D;
314 const u32x r_00 = 0x80;
315 const u32x r_14 = 64 * 8;
322 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
323 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
324 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
325 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
326 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
327 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
328 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
329 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
330 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
331 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
332 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
333 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
334 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
335 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
336 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
337 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
339 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
340 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
341 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
342 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
343 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
344 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
345 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
346 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
347 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
348 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
349 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
350 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
351 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
352 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
353 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
354 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
356 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
357 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
358 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
359 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
360 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
361 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
362 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
363 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
364 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
365 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
366 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
367 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
368 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
369 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
370 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
371 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
373 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
374 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
375 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
376 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
377 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
378 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
379 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
380 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
381 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
382 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
383 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
384 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
385 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
386 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
387 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
388 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
395 COMPARE_M_SIMD (a, d, c, b);
399 __kernel void m02810_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)
403 __kernel void m02810_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)
407 __kernel void m02810_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)
413 const u32 gid = get_global_id (0);
414 const u32 lid = get_local_id (0);
415 const u32 lsz = get_local_size (0);
421 __local u32 l_bin2asc[256];
423 for (u32 i = lid; i < 256; i += lsz)
425 const u32 i0 = (i >> 0) & 15;
426 const u32 i1 = (i >> 4) & 15;
428 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
429 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
432 barrier (CLK_LOCAL_MEM_FENCE);
434 if (gid >= gid_max) return;
443 pw_buf0[0] = pws[gid].i[0];
444 pw_buf0[1] = pws[gid].i[1];
445 pw_buf0[2] = pws[gid].i[2];
446 pw_buf0[3] = pws[gid].i[3];
447 pw_buf1[0] = pws[gid].i[4];
448 pw_buf1[1] = pws[gid].i[5];
449 pw_buf1[2] = pws[gid].i[6];
450 pw_buf1[3] = pws[gid].i[7];
452 const u32 pw_len = pws[gid].pw_len;
463 salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0];
464 salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1];
465 salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2];
466 salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3];
467 salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4];
468 salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5];
469 salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6];
470 salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7];
480 const u32 salt_len = salt_bufs[salt_pos].salt_len;
486 const u32 search[4] =
488 digests_buf[digests_offset].digest_buf[DGST_R0],
489 digests_buf[digests_offset].digest_buf[DGST_R1],
490 digests_buf[digests_offset].digest_buf[DGST_R2],
491 digests_buf[digests_offset].digest_buf[DGST_R3]
498 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
505 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
507 append_0x80_2x4_VV (w0, w1, out_len);
517 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
518 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
519 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
520 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
521 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
522 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
523 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
524 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
525 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
526 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
527 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
528 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
529 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
530 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
531 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
532 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
534 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
535 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
536 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
537 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
538 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
539 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
540 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
541 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
542 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
543 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
544 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
545 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
546 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
547 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
548 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
549 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
551 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
552 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
553 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
554 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
555 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
556 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
557 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
558 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
559 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
560 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
561 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
562 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
563 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
564 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
565 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
566 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
568 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
569 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
570 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
571 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
572 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
573 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
574 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
575 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
576 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
577 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
578 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
579 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
580 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
581 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
582 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
583 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
590 w0[0] = salt_buf0[0];
591 w0[1] = salt_buf0[1];
592 w0[2] = salt_buf0[2];
593 w0[3] = salt_buf0[3];
594 w1[0] = salt_buf1[0];
595 w1[1] = salt_buf1[1];
596 w1[2] = salt_buf1[2];
597 w1[3] = salt_buf1[3];
599 w2[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
600 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
601 w2[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
602 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
603 w2[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
604 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
605 w2[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
606 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
607 w3[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
608 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
609 w3[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
610 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
611 w3[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
612 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
613 w3[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
614 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
621 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
622 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
623 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
624 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
625 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
626 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
627 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
628 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
629 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
630 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
631 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
632 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
633 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
634 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
635 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
636 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
638 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
639 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
640 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
641 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
642 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
643 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
644 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
645 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
646 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
647 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
648 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
649 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
650 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
651 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
652 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
653 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
655 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
656 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
657 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
658 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
659 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
660 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
661 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
662 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
663 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
664 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
665 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
666 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
667 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
668 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
669 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
670 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
672 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
673 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
674 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
675 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
676 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
677 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
678 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
679 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
680 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
681 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
682 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
683 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
684 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
685 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
686 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
687 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
689 const u32x r_a = a + MD5M_A;
690 const u32x r_b = b + MD5M_B;
691 const u32x r_c = c + MD5M_C;
692 const u32x r_d = d + MD5M_D;
694 const u32x r_00 = 0x80;
695 const u32x r_14 = 64 * 8;
702 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
703 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
704 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
705 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
706 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
707 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
708 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
709 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
710 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
711 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
712 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
713 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
714 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
715 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
716 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
717 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
719 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
720 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
721 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
722 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
723 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
724 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
725 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
726 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
727 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
728 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
729 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
730 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
731 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
732 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
733 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
734 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
736 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
737 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
738 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
739 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
740 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
741 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
742 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
743 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
744 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
745 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
746 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
747 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
748 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
749 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
750 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
751 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
753 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
754 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
755 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
756 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
757 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
758 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
759 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
760 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
761 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
762 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
763 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
764 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
765 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
767 if (MATCHES_NONE_VS ((a + r_a), search[0])) continue;
769 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
770 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
771 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
778 COMPARE_S_SIMD (a, d, c, b);
782 __kernel void m02810_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)
786 __kernel void m02810_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)