2 * Author......: Jens Steube <jens.steube@gmail.com>
9 #include "include/constants.h"
10 #include "include/kernel_vendor.h"
29 #include "include/kernel_functions.c"
30 #include "types_amd.c"
31 #include "common_amd.c"
34 #define VECT_COMPARE_S "check_single_vect1_comp4_warp.c"
35 #define VECT_COMPARE_M "check_multi_vect1_comp4_warp.c"
39 #define VECT_COMPARE_S "check_single_vect2_comp4_warp.c"
40 #define VECT_COMPARE_M "check_multi_vect2_comp4_warp.c"
44 #define VECT_COMPARE_S "check_single_vect4_comp4_warp.c"
45 #define VECT_COMPARE_M "check_multi_vect4_comp4_warp.c"
48 #define MD5_STEP_REV(f,a,b,c,d,x,t,s) \
57 #define MD5_STEP_REV1(f,a,b,c,d,x,t,s) \
65 static void m00010m (u32 w[16], const u32 pw_len, __global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
71 const u32 gid = get_global_id (0);
72 const u32 lid = get_local_id (0);
80 salt_buf0[0] = salt_bufs[salt_pos].salt_buf[ 0];
81 salt_buf0[1] = salt_bufs[salt_pos].salt_buf[ 1];
82 salt_buf0[2] = salt_bufs[salt_pos].salt_buf[ 2];
83 salt_buf0[3] = salt_bufs[salt_pos].salt_buf[ 3];
87 salt_buf1[0] = salt_bufs[salt_pos].salt_buf[ 4];
88 salt_buf1[1] = salt_bufs[salt_pos].salt_buf[ 5];
89 salt_buf1[2] = salt_bufs[salt_pos].salt_buf[ 6];
90 salt_buf1[3] = salt_bufs[salt_pos].salt_buf[ 7];
94 salt_buf2[0] = salt_bufs[salt_pos].salt_buf[ 8];
106 switch_buffer_by_offset (salt_buf0, salt_buf1, salt_buf2, salt_buf3, pw_len);
108 w[ 0] |= salt_buf0[0];
109 w[ 1] |= salt_buf0[1];
110 w[ 2] |= salt_buf0[2];
111 w[ 3] |= salt_buf0[3];
112 w[ 4] |= salt_buf1[0];
113 w[ 5] |= salt_buf1[1];
114 w[ 6] |= salt_buf1[2];
115 w[ 7] |= salt_buf1[3];
116 w[ 8] |= salt_buf2[0];
117 w[ 9] |= salt_buf2[1];
118 w[10] |= salt_buf2[2];
119 w[11] |= salt_buf2[3];
120 w[12] |= salt_buf3[0];
121 w[13] |= salt_buf3[1];
122 w[14] |= salt_buf3[2];
123 w[15] |= salt_buf3[3];
125 const u32 salt_len = salt_bufs[salt_pos].salt_len;
127 const u32 pw_salt_len = pw_len + salt_len;
129 w[14] = pw_salt_len * 8;
135 const u32 F_w0c00 = 0 + MD5C00;
136 const u32 F_w1c01 = w[ 1] + MD5C01;
137 const u32 F_w2c02 = w[ 2] + MD5C02;
138 const u32 F_w3c03 = w[ 3] + MD5C03;
139 const u32 F_w4c04 = w[ 4] + MD5C04;
140 const u32 F_w5c05 = w[ 5] + MD5C05;
141 const u32 F_w6c06 = w[ 6] + MD5C06;
142 const u32 F_w7c07 = w[ 7] + MD5C07;
143 const u32 F_w8c08 = w[ 8] + MD5C08;
144 const u32 F_w9c09 = w[ 9] + MD5C09;
145 const u32 F_wac0a = w[10] + MD5C0a;
146 const u32 F_wbc0b = w[11] + MD5C0b;
147 const u32 F_wcc0c = w[12] + MD5C0c;
148 const u32 F_wdc0d = w[13] + MD5C0d;
149 const u32 F_wec0e = w[14] + MD5C0e;
150 const u32 F_wfc0f = w[15] + MD5C0f;
152 const u32 G_w1c10 = w[ 1] + MD5C10;
153 const u32 G_w6c11 = w[ 6] + MD5C11;
154 const u32 G_wbc12 = w[11] + MD5C12;
155 const u32 G_w0c13 = 0 + MD5C13;
156 const u32 G_w5c14 = w[ 5] + MD5C14;
157 const u32 G_wac15 = w[10] + MD5C15;
158 const u32 G_wfc16 = w[15] + MD5C16;
159 const u32 G_w4c17 = w[ 4] + MD5C17;
160 const u32 G_w9c18 = w[ 9] + MD5C18;
161 const u32 G_wec19 = w[14] + MD5C19;
162 const u32 G_w3c1a = w[ 3] + MD5C1a;
163 const u32 G_w8c1b = w[ 8] + MD5C1b;
164 const u32 G_wdc1c = w[13] + MD5C1c;
165 const u32 G_w2c1d = w[ 2] + MD5C1d;
166 const u32 G_w7c1e = w[ 7] + MD5C1e;
167 const u32 G_wcc1f = w[12] + MD5C1f;
169 const u32 H_w5c20 = w[ 5] + MD5C20;
170 const u32 H_w8c21 = w[ 8] + MD5C21;
171 const u32 H_wbc22 = w[11] + MD5C22;
172 const u32 H_wec23 = w[14] + MD5C23;
173 const u32 H_w1c24 = w[ 1] + MD5C24;
174 const u32 H_w4c25 = w[ 4] + MD5C25;
175 const u32 H_w7c26 = w[ 7] + MD5C26;
176 const u32 H_wac27 = w[10] + MD5C27;
177 const u32 H_wdc28 = w[13] + MD5C28;
178 const u32 H_w0c29 = 0 + MD5C29;
179 const u32 H_w3c2a = w[ 3] + MD5C2a;
180 const u32 H_w6c2b = w[ 6] + MD5C2b;
181 const u32 H_w9c2c = w[ 9] + MD5C2c;
182 const u32 H_wcc2d = w[12] + MD5C2d;
183 const u32 H_wfc2e = w[15] + MD5C2e;
184 const u32 H_w2c2f = w[ 2] + MD5C2f;
186 const u32 I_w0c30 = 0 + MD5C30;
187 const u32 I_w7c31 = w[ 7] + MD5C31;
188 const u32 I_wec32 = w[14] + MD5C32;
189 const u32 I_w5c33 = w[ 5] + MD5C33;
190 const u32 I_wcc34 = w[12] + MD5C34;
191 const u32 I_w3c35 = w[ 3] + MD5C35;
192 const u32 I_wac36 = w[10] + MD5C36;
193 const u32 I_w1c37 = w[ 1] + MD5C37;
194 const u32 I_w8c38 = w[ 8] + MD5C38;
195 const u32 I_wfc39 = w[15] + MD5C39;
196 const u32 I_w6c3a = w[ 6] + MD5C3a;
197 const u32 I_wdc3b = w[13] + MD5C3b;
198 const u32 I_w4c3c = w[ 4] + MD5C3c;
199 const u32 I_wbc3d = w[11] + MD5C3d;
200 const u32 I_w2c3e = w[ 2] + MD5C3e;
201 const u32 I_w9c3f = w[ 9] + MD5C3f;
207 const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
211 for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
213 const u32x w0r = words_buf_r[il_pos];
215 const u32x w0 = w0l | w0r;
224 MD5_STEP (MD5_Fo, a, b, c, d, w0, F_w0c00, MD5S00);
225 MD5_STEP0(MD5_Fo, d, a, b, c, F_w1c01, MD5S01);
226 MD5_STEP0(MD5_Fo, c, d, a, b, F_w2c02, MD5S02);
227 MD5_STEP0(MD5_Fo, b, c, d, a, F_w3c03, MD5S03);
228 MD5_STEP0(MD5_Fo, a, b, c, d, F_w4c04, MD5S00);
229 MD5_STEP0(MD5_Fo, d, a, b, c, F_w5c05, MD5S01);
230 MD5_STEP0(MD5_Fo, c, d, a, b, F_w6c06, MD5S02);
231 MD5_STEP0(MD5_Fo, b, c, d, a, F_w7c07, MD5S03);
232 MD5_STEP0(MD5_Fo, a, b, c, d, F_w8c08, MD5S00);
233 MD5_STEP0(MD5_Fo, d, a, b, c, F_w9c09, MD5S01);
234 MD5_STEP0(MD5_Fo, c, d, a, b, F_wac0a, MD5S02);
235 MD5_STEP0(MD5_Fo, b, c, d, a, F_wbc0b, MD5S03);
236 MD5_STEP0(MD5_Fo, a, b, c, d, F_wcc0c, MD5S00);
237 MD5_STEP0(MD5_Fo, d, a, b, c, F_wdc0d, MD5S01);
238 MD5_STEP0(MD5_Fo, c, d, a, b, F_wec0e, MD5S02);
239 MD5_STEP0(MD5_Fo, b, c, d, a, F_wfc0f, MD5S03);
241 MD5_STEP0(MD5_Go, a, b, c, d, G_w1c10, MD5S10);
242 MD5_STEP0(MD5_Go, d, a, b, c, G_w6c11, MD5S11);
243 MD5_STEP0(MD5_Go, c, d, a, b, G_wbc12, MD5S12);
244 MD5_STEP (MD5_Go, b, c, d, a, w0, G_w0c13, MD5S13);
245 MD5_STEP0(MD5_Go, a, b, c, d, G_w5c14, MD5S10);
246 MD5_STEP0(MD5_Go, d, a, b, c, G_wac15, MD5S11);
247 MD5_STEP0(MD5_Go, c, d, a, b, G_wfc16, MD5S12);
248 MD5_STEP0(MD5_Go, b, c, d, a, G_w4c17, MD5S13);
249 MD5_STEP0(MD5_Go, a, b, c, d, G_w9c18, MD5S10);
250 MD5_STEP0(MD5_Go, d, a, b, c, G_wec19, MD5S11);
251 MD5_STEP0(MD5_Go, c, d, a, b, G_w3c1a, MD5S12);
252 MD5_STEP0(MD5_Go, b, c, d, a, G_w8c1b, MD5S13);
253 MD5_STEP0(MD5_Go, a, b, c, d, G_wdc1c, MD5S10);
254 MD5_STEP0(MD5_Go, d, a, b, c, G_w2c1d, MD5S11);
255 MD5_STEP0(MD5_Go, c, d, a, b, G_w7c1e, MD5S12);
256 MD5_STEP0(MD5_Go, b, c, d, a, G_wcc1f, MD5S13);
258 MD5_STEP0(MD5_H1, a, b, c, d, H_w5c20, MD5S20);
259 MD5_STEP0(MD5_H2, d, a, b, c, H_w8c21, MD5S21);
260 MD5_STEP0(MD5_H1, c, d, a, b, H_wbc22, MD5S22);
261 MD5_STEP0(MD5_H2, b, c, d, a, H_wec23, MD5S23);
262 MD5_STEP0(MD5_H1, a, b, c, d, H_w1c24, MD5S20);
263 MD5_STEP0(MD5_H2, d, a, b, c, H_w4c25, MD5S21);
264 MD5_STEP0(MD5_H1, c, d, a, b, H_w7c26, MD5S22);
265 MD5_STEP0(MD5_H2, b, c, d, a, H_wac27, MD5S23);
266 MD5_STEP0(MD5_H1, a, b, c, d, H_wdc28, MD5S20);
267 MD5_STEP (MD5_H2, d, a, b, c, w0, H_w0c29, MD5S21);
268 MD5_STEP0(MD5_H1, c, d, a, b, H_w3c2a, MD5S22);
269 MD5_STEP0(MD5_H2, b, c, d, a, H_w6c2b, MD5S23);
270 MD5_STEP0(MD5_H1, a, b, c, d, H_w9c2c, MD5S20);
271 MD5_STEP0(MD5_H2, d, a, b, c, H_wcc2d, MD5S21);
272 MD5_STEP0(MD5_H1, c, d, a, b, H_wfc2e, MD5S22);
273 MD5_STEP0(MD5_H2, b, c, d, a, H_w2c2f, MD5S23);
275 MD5_STEP (MD5_I , a, b, c, d, w0, I_w0c30, MD5S30);
276 MD5_STEP0(MD5_I , d, a, b, c, I_w7c31, MD5S31);
277 MD5_STEP0(MD5_I , c, d, a, b, I_wec32, MD5S32);
278 MD5_STEP0(MD5_I , b, c, d, a, I_w5c33, MD5S33);
279 MD5_STEP0(MD5_I , a, b, c, d, I_wcc34, MD5S30);
280 MD5_STEP0(MD5_I , d, a, b, c, I_w3c35, MD5S31);
281 MD5_STEP0(MD5_I , c, d, a, b, I_wac36, MD5S32);
282 MD5_STEP0(MD5_I , b, c, d, a, I_w1c37, MD5S33);
283 MD5_STEP0(MD5_I , a, b, c, d, I_w8c38, MD5S30);
284 MD5_STEP0(MD5_I , d, a, b, c, I_wfc39, MD5S31);
285 MD5_STEP0(MD5_I , c, d, a, b, I_w6c3a, MD5S32);
286 MD5_STEP0(MD5_I , b, c, d, a, I_wdc3b, MD5S33);
287 MD5_STEP0(MD5_I , a, b, c, d, I_w4c3c, MD5S30);
288 MD5_STEP0(MD5_I , d, a, b, c, I_wbc3d, MD5S31);
289 MD5_STEP0(MD5_I , c, d, a, b, I_w2c3e, MD5S32);
290 MD5_STEP0(MD5_I , b, c, d, a, I_w9c3f, MD5S33);
298 #include VECT_COMPARE_M
302 static void m00010s (u32 w[16], const u32 pw_len, __global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
308 const u32 gid = get_global_id (0);
309 const u32 lid = get_local_id (0);
315 const u32 F_w0c00 = 0 + MD5C00;
316 const u32 F_w1c01 = w[ 1] + MD5C01;
317 const u32 F_w2c02 = w[ 2] + MD5C02;
318 const u32 F_w3c03 = w[ 3] + MD5C03;
319 const u32 F_w4c04 = w[ 4] + MD5C04;
320 const u32 F_w5c05 = w[ 5] + MD5C05;
321 const u32 F_w6c06 = w[ 6] + MD5C06;
322 const u32 F_w7c07 = w[ 7] + MD5C07;
323 const u32 F_w8c08 = w[ 8] + MD5C08;
324 const u32 F_w9c09 = w[ 9] + MD5C09;
325 const u32 F_wac0a = w[10] + MD5C0a;
326 const u32 F_wbc0b = w[11] + MD5C0b;
327 const u32 F_wcc0c = w[12] + MD5C0c;
328 const u32 F_wdc0d = w[13] + MD5C0d;
329 const u32 F_wec0e = w[14] + MD5C0e;
330 const u32 F_wfc0f = w[15] + MD5C0f;
332 const u32 G_w1c10 = w[ 1] + MD5C10;
333 const u32 G_w6c11 = w[ 6] + MD5C11;
334 const u32 G_wbc12 = w[11] + MD5C12;
335 const u32 G_w0c13 = 0 + MD5C13;
336 const u32 G_w5c14 = w[ 5] + MD5C14;
337 const u32 G_wac15 = w[10] + MD5C15;
338 const u32 G_wfc16 = w[15] + MD5C16;
339 const u32 G_w4c17 = w[ 4] + MD5C17;
340 const u32 G_w9c18 = w[ 9] + MD5C18;
341 const u32 G_wec19 = w[14] + MD5C19;
342 const u32 G_w3c1a = w[ 3] + MD5C1a;
343 const u32 G_w8c1b = w[ 8] + MD5C1b;
344 const u32 G_wdc1c = w[13] + MD5C1c;
345 const u32 G_w2c1d = w[ 2] + MD5C1d;
346 const u32 G_w7c1e = w[ 7] + MD5C1e;
347 const u32 G_wcc1f = w[12] + MD5C1f;
349 const u32 H_w5c20 = w[ 5] + MD5C20;
350 const u32 H_w8c21 = w[ 8] + MD5C21;
351 const u32 H_wbc22 = w[11] + MD5C22;
352 const u32 H_wec23 = w[14] + MD5C23;
353 const u32 H_w1c24 = w[ 1] + MD5C24;
354 const u32 H_w4c25 = w[ 4] + MD5C25;
355 const u32 H_w7c26 = w[ 7] + MD5C26;
356 const u32 H_wac27 = w[10] + MD5C27;
357 const u32 H_wdc28 = w[13] + MD5C28;
358 const u32 H_w0c29 = 0 + MD5C29;
359 const u32 H_w3c2a = w[ 3] + MD5C2a;
360 const u32 H_w6c2b = w[ 6] + MD5C2b;
361 const u32 H_w9c2c = w[ 9] + MD5C2c;
362 const u32 H_wcc2d = w[12] + MD5C2d;
363 const u32 H_wfc2e = w[15] + MD5C2e;
364 const u32 H_w2c2f = w[ 2] + MD5C2f;
366 const u32 I_w0c30 = 0 + MD5C30;
367 const u32 I_w7c31 = w[ 7] + MD5C31;
368 const u32 I_wec32 = w[14] + MD5C32;
369 const u32 I_w5c33 = w[ 5] + MD5C33;
370 const u32 I_wcc34 = w[12] + MD5C34;
371 const u32 I_w3c35 = w[ 3] + MD5C35;
372 const u32 I_wac36 = w[10] + MD5C36;
373 const u32 I_w1c37 = w[ 1] + MD5C37;
374 const u32 I_w8c38 = w[ 8] + MD5C38;
375 const u32 I_wfc39 = w[15] + MD5C39;
376 const u32 I_w6c3a = w[ 6] + MD5C3a;
377 const u32 I_wdc3b = w[13] + MD5C3b;
378 const u32 I_w4c3c = w[ 4] + MD5C3c;
379 const u32 I_wbc3d = w[11] + MD5C3d;
380 const u32 I_w2c3e = w[ 2] + MD5C3e;
381 const u32 I_w9c3f = w[ 9] + MD5C3f;
387 const u32 search[4] =
389 digests_buf[digests_offset].digest_buf[DGST_R0],
390 digests_buf[digests_offset].digest_buf[DGST_R1],
391 digests_buf[digests_offset].digest_buf[DGST_R2],
392 digests_buf[digests_offset].digest_buf[DGST_R3]
399 u32 a_rev = digests_buf[digests_offset].digest_buf[0];
400 u32 b_rev = digests_buf[digests_offset].digest_buf[1];
401 u32 c_rev = digests_buf[digests_offset].digest_buf[2];
402 u32 d_rev = digests_buf[digests_offset].digest_buf[3];
404 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[ 9], MD5C3f, MD5S33);
405 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[ 2], MD5C3e, MD5S32);
406 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[11], MD5C3d, MD5S31);
407 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, w[ 4], MD5C3c, MD5S30);
408 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[13], MD5C3b, MD5S33);
409 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[ 6], MD5C3a, MD5S32);
410 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[15], MD5C39, MD5S31);
411 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, w[ 8], MD5C38, MD5S30);
412 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[ 1], MD5C37, MD5S33);
413 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[10], MD5C36, MD5S32);
414 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[ 3], MD5C35, MD5S31);
415 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, w[12], MD5C34, MD5S30);
416 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[ 5], MD5C33, MD5S33);
417 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[14], MD5C32, MD5S32);
418 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[ 7], MD5C31, MD5S31);
419 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, 0, MD5C30, MD5S30);
421 const u32x pre_cd = c_rev ^ d_rev;
423 MD5_STEP_REV1(MD5_H, b_rev, c_rev, d_rev, a_rev, w[ 2], MD5C2f, MD5S23);
424 MD5_STEP_REV1(MD5_H, c_rev, d_rev, a_rev, b_rev, w[15], MD5C2e, MD5S22);
430 const u32 bf_loops = ceil ((float) bfs_cnt / VECT_DIV);
434 for (u32 il_pos = 0; il_pos < bf_loops; il_pos++)
436 const u32x w0r = words_buf_r[il_pos];
438 const u32x w0 = w0l | w0r;
440 const u32x pre_d = d_rev;
441 const u32x pre_a = a_rev - w0;
442 const u32x pre_b = b_rev - (pre_a ^ pre_cd);
443 const u32x pre_c = c_rev - (pre_a ^ pre_b ^ pre_d);
452 MD5_STEP (MD5_Fo, a, b, c, d, w0, F_w0c00, MD5S00);
453 MD5_STEP0(MD5_Fo, d, a, b, c, F_w1c01, MD5S01);
454 MD5_STEP0(MD5_Fo, c, d, a, b, F_w2c02, MD5S02);
455 MD5_STEP0(MD5_Fo, b, c, d, a, F_w3c03, MD5S03);
456 MD5_STEP0(MD5_Fo, a, b, c, d, F_w4c04, MD5S00);
457 MD5_STEP0(MD5_Fo, d, a, b, c, F_w5c05, MD5S01);
458 MD5_STEP0(MD5_Fo, c, d, a, b, F_w6c06, MD5S02);
459 MD5_STEP0(MD5_Fo, b, c, d, a, F_w7c07, MD5S03);
460 MD5_STEP0(MD5_Fo, a, b, c, d, F_w8c08, MD5S00);
461 MD5_STEP0(MD5_Fo, d, a, b, c, F_w9c09, MD5S01);
462 MD5_STEP0(MD5_Fo, c, d, a, b, F_wac0a, MD5S02);
463 MD5_STEP0(MD5_Fo, b, c, d, a, F_wbc0b, MD5S03);
464 MD5_STEP0(MD5_Fo, a, b, c, d, F_wcc0c, MD5S00);
465 MD5_STEP0(MD5_Fo, d, a, b, c, F_wdc0d, MD5S01);
466 MD5_STEP0(MD5_Fo, c, d, a, b, F_wec0e, MD5S02);
467 MD5_STEP0(MD5_Fo, b, c, d, a, F_wfc0f, MD5S03);
469 MD5_STEP0(MD5_Go, a, b, c, d, G_w1c10, MD5S10);
470 MD5_STEP0(MD5_Go, d, a, b, c, G_w6c11, MD5S11);
471 MD5_STEP0(MD5_Go, c, d, a, b, G_wbc12, MD5S12);
472 MD5_STEP (MD5_Go, b, c, d, a, w0, G_w0c13, MD5S13);
473 MD5_STEP0(MD5_Go, a, b, c, d, G_w5c14, MD5S10);
474 MD5_STEP0(MD5_Go, d, a, b, c, G_wac15, MD5S11);
475 MD5_STEP0(MD5_Go, c, d, a, b, G_wfc16, MD5S12);
476 MD5_STEP0(MD5_Go, b, c, d, a, G_w4c17, MD5S13);
477 MD5_STEP0(MD5_Go, a, b, c, d, G_w9c18, MD5S10);
478 MD5_STEP0(MD5_Go, d, a, b, c, G_wec19, MD5S11);
479 MD5_STEP0(MD5_Go, c, d, a, b, G_w3c1a, MD5S12);
480 MD5_STEP0(MD5_Go, b, c, d, a, G_w8c1b, MD5S13);
481 MD5_STEP0(MD5_Go, a, b, c, d, G_wdc1c, MD5S10);
482 MD5_STEP0(MD5_Go, d, a, b, c, G_w2c1d, MD5S11);
483 MD5_STEP0(MD5_Go, c, d, a, b, G_w7c1e, MD5S12);
484 MD5_STEP0(MD5_Go, b, c, d, a, G_wcc1f, MD5S13);
486 MD5_STEP0(MD5_H1, a, b, c, d, H_w5c20, MD5S20);
487 MD5_STEP0(MD5_H2, d, a, b, c, H_w8c21, MD5S21);
488 MD5_STEP0(MD5_H1, c, d, a, b, H_wbc22, MD5S22);
489 MD5_STEP0(MD5_H2, b, c, d, a, H_wec23, MD5S23);
490 MD5_STEP0(MD5_H1, a, b, c, d, H_w1c24, MD5S20);
491 MD5_STEP0(MD5_H2, d, a, b, c, H_w4c25, MD5S21);
492 MD5_STEP0(MD5_H1, c, d, a, b, H_w7c26, MD5S22);
493 MD5_STEP0(MD5_H2, b, c, d, a, H_wac27, MD5S23);
494 MD5_STEP0(MD5_H1, a, b, c, d, H_wdc28, MD5S20);
495 MD5_STEP (MD5_H2, d, a, b, c, w0, H_w0c29, MD5S21);
496 MD5_STEP0(MD5_H1, c, d, a, b, H_w3c2a, MD5S22);
498 bool q_cond = allx (pre_c != c);
500 if (q_cond) continue;
502 MD5_STEP0(MD5_H2, b, c, d, a, H_w6c2b, MD5S23);
503 MD5_STEP0(MD5_H1, a, b, c, d, H_w9c2c, MD5S20);
504 MD5_STEP0(MD5_H2, d, a, b, c, H_wcc2d, MD5S21);
506 bool q_cond2 = allx (pre_d != d);
508 if (q_cond2) continue;
510 MD5_STEP0(MD5_H1, c, d, a, b, H_wfc2e, MD5S22);
511 MD5_STEP0(MD5_H2, b, c, d, a, H_w2c2f, MD5S23);
513 MD5_STEP (MD5_I , a, b, c, d, w0, I_w0c30, MD5S30);
514 MD5_STEP0(MD5_I , d, a, b, c, I_w7c31, MD5S31);
515 MD5_STEP0(MD5_I , c, d, a, b, I_wec32, MD5S32);
516 MD5_STEP0(MD5_I , b, c, d, a, I_w5c33, MD5S33);
517 MD5_STEP0(MD5_I , a, b, c, d, I_wcc34, MD5S30);
518 MD5_STEP0(MD5_I , d, a, b, c, I_w3c35, MD5S31);
519 MD5_STEP0(MD5_I , c, d, a, b, I_wac36, MD5S32);
520 MD5_STEP0(MD5_I , b, c, d, a, I_w1c37, MD5S33);
521 MD5_STEP0(MD5_I , a, b, c, d, I_w8c38, MD5S30);
522 MD5_STEP0(MD5_I , d, a, b, c, I_wfc39, MD5S31);
523 MD5_STEP0(MD5_I , c, d, a, b, I_w6c3a, MD5S32);
524 MD5_STEP0(MD5_I , b, c, d, a, I_wdc3b, MD5S33);
525 MD5_STEP0(MD5_I , a, b, c, d, I_w4c3c, MD5S30);
526 MD5_STEP0(MD5_I , d, a, b, c, I_wbc3d, MD5S31);
527 MD5_STEP0(MD5_I , c, d, a, b, I_w2c3e, MD5S32);
528 MD5_STEP0(MD5_I , b, c, d, a, I_w9c3f, MD5S33);
536 #include VECT_COMPARE_S
540 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_m04 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
546 const u32 gid = get_global_id (0);
548 if (gid >= gid_max) return;
552 w[ 0] = pws[gid].i[ 0];
553 w[ 1] = pws[gid].i[ 1];
554 w[ 2] = pws[gid].i[ 2];
555 w[ 3] = pws[gid].i[ 3];
566 w[14] = pws[gid].i[14];
569 const u32 pw_len = pws[gid].pw_len;
575 m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
578 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_m08 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
584 const u32 gid = get_global_id (0);
586 if (gid >= gid_max) return;
590 w[ 0] = pws[gid].i[ 0];
591 w[ 1] = pws[gid].i[ 1];
592 w[ 2] = pws[gid].i[ 2];
593 w[ 3] = pws[gid].i[ 3];
594 w[ 4] = pws[gid].i[ 4];
595 w[ 5] = pws[gid].i[ 5];
596 w[ 6] = pws[gid].i[ 6];
597 w[ 7] = pws[gid].i[ 7];
604 w[14] = pws[gid].i[14];
607 const u32 pw_len = pws[gid].pw_len;
613 m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
616 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_m16 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
622 const u32 gid = get_global_id (0);
624 if (gid >= gid_max) return;
628 w[ 0] = pws[gid].i[ 0];
629 w[ 1] = pws[gid].i[ 1];
630 w[ 2] = pws[gid].i[ 2];
631 w[ 3] = pws[gid].i[ 3];
632 w[ 4] = pws[gid].i[ 4];
633 w[ 5] = pws[gid].i[ 5];
634 w[ 6] = pws[gid].i[ 6];
635 w[ 7] = pws[gid].i[ 7];
636 w[ 8] = pws[gid].i[ 8];
637 w[ 9] = pws[gid].i[ 9];
638 w[10] = pws[gid].i[10];
639 w[11] = pws[gid].i[11];
640 w[12] = pws[gid].i[12];
641 w[13] = pws[gid].i[13];
642 w[14] = pws[gid].i[14];
643 w[15] = pws[gid].i[15];
645 const u32 pw_len = pws[gid].pw_len;
651 m00010m (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
654 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_s04 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
660 const u32 gid = get_global_id (0);
662 if (gid >= gid_max) return;
666 w[ 0] = pws[gid].i[ 0];
667 w[ 1] = pws[gid].i[ 1];
668 w[ 2] = pws[gid].i[ 2];
669 w[ 3] = pws[gid].i[ 3];
680 w[14] = pws[gid].i[14];
683 const u32 pw_len = pws[gid].pw_len;
689 m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
692 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_s08 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
698 const u32 gid = get_global_id (0);
700 if (gid >= gid_max) return;
704 w[ 0] = pws[gid].i[ 0];
705 w[ 1] = pws[gid].i[ 1];
706 w[ 2] = pws[gid].i[ 2];
707 w[ 3] = pws[gid].i[ 3];
708 w[ 4] = pws[gid].i[ 4];
709 w[ 5] = pws[gid].i[ 5];
710 w[ 6] = pws[gid].i[ 6];
711 w[ 7] = pws[gid].i[ 7];
718 w[14] = pws[gid].i[14];
721 const u32 pw_len = pws[gid].pw_len;
727 m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);
730 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m00010_s16 (__global pw_t *pws, __global gpu_rule_t *rules_buf, __global comb_t *combs_buf, __global u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
736 const u32 gid = get_global_id (0);
738 if (gid >= gid_max) return;
742 w[ 0] = pws[gid].i[ 0];
743 w[ 1] = pws[gid].i[ 1];
744 w[ 2] = pws[gid].i[ 2];
745 w[ 3] = pws[gid].i[ 3];
746 w[ 4] = pws[gid].i[ 4];
747 w[ 5] = pws[gid].i[ 5];
748 w[ 6] = pws[gid].i[ 6];
749 w[ 7] = pws[gid].i[ 7];
750 w[ 8] = pws[gid].i[ 8];
751 w[ 9] = pws[gid].i[ 9];
752 w[10] = pws[gid].i[10];
753 w[11] = pws[gid].i[11];
754 w[12] = pws[gid].i[12];
755 w[13] = pws[gid].i[13];
756 w[14] = pws[gid].i[14];
757 w[15] = pws[gid].i[15];
759 const u32 pw_len = pws[gid].pw_len;
765 m00010s (w, pw_len, pws, rules_buf, combs_buf, words_buf_r, tmps, hooks, bitmaps_buf_s1_a, bitmaps_buf_s1_b, bitmaps_buf_s1_c, bitmaps_buf_s1_d, bitmaps_buf_s2_a, bitmaps_buf_s2_b, bitmaps_buf_s2_c, bitmaps_buf_s2_d, plains_buf, digests_buf, hashes_shown, salt_bufs, esalt_bufs, d_return_buf, d_scryptV_buf, bitmap_mask, bitmap_shift1, bitmap_shift2, salt_pos, loop_pos, loop_cnt, bfs_cnt, digests_cnt, digests_offset);