2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "include/constants.h"
11 #include "include/kernel_vendor.h"
18 #include "include/kernel_functions.c"
19 #include "OpenCL/types_ocl.c"
20 #include "OpenCL/common.c"
21 #include "OpenCL/simd.c"
23 #define MD5_STEP_REV(f,a,b,c,d,x,t,s) \
32 #define MD5_STEP_REV1(f,a,b,c,d,x,t,s) \
40 static void m00000m (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
46 const u32 gid = get_global_id (0);
47 const u32 lid = get_local_id (0);
53 const u32 F_w0c00 = 0 + MD5C00;
54 const u32 F_w1c01 = w[ 1] + MD5C01;
55 const u32 F_w2c02 = w[ 2] + MD5C02;
56 const u32 F_w3c03 = w[ 3] + MD5C03;
57 const u32 F_w4c04 = w[ 4] + MD5C04;
58 const u32 F_w5c05 = w[ 5] + MD5C05;
59 const u32 F_w6c06 = w[ 6] + MD5C06;
60 const u32 F_w7c07 = w[ 7] + MD5C07;
61 const u32 F_w8c08 = w[ 8] + MD5C08;
62 const u32 F_w9c09 = w[ 9] + MD5C09;
63 const u32 F_wac0a = w[10] + MD5C0a;
64 const u32 F_wbc0b = w[11] + MD5C0b;
65 const u32 F_wcc0c = w[12] + MD5C0c;
66 const u32 F_wdc0d = w[13] + MD5C0d;
67 const u32 F_wec0e = w[14] + MD5C0e;
68 const u32 F_wfc0f = w[15] + MD5C0f;
70 const u32 G_w1c10 = w[ 1] + MD5C10;
71 const u32 G_w6c11 = w[ 6] + MD5C11;
72 const u32 G_wbc12 = w[11] + MD5C12;
73 const u32 G_w0c13 = 0 + MD5C13;
74 const u32 G_w5c14 = w[ 5] + MD5C14;
75 const u32 G_wac15 = w[10] + MD5C15;
76 const u32 G_wfc16 = w[15] + MD5C16;
77 const u32 G_w4c17 = w[ 4] + MD5C17;
78 const u32 G_w9c18 = w[ 9] + MD5C18;
79 const u32 G_wec19 = w[14] + MD5C19;
80 const u32 G_w3c1a = w[ 3] + MD5C1a;
81 const u32 G_w8c1b = w[ 8] + MD5C1b;
82 const u32 G_wdc1c = w[13] + MD5C1c;
83 const u32 G_w2c1d = w[ 2] + MD5C1d;
84 const u32 G_w7c1e = w[ 7] + MD5C1e;
85 const u32 G_wcc1f = w[12] + MD5C1f;
87 const u32 H_w5c20 = w[ 5] + MD5C20;
88 const u32 H_w8c21 = w[ 8] + MD5C21;
89 const u32 H_wbc22 = w[11] + MD5C22;
90 const u32 H_wec23 = w[14] + MD5C23;
91 const u32 H_w1c24 = w[ 1] + MD5C24;
92 const u32 H_w4c25 = w[ 4] + MD5C25;
93 const u32 H_w7c26 = w[ 7] + MD5C26;
94 const u32 H_wac27 = w[10] + MD5C27;
95 const u32 H_wdc28 = w[13] + MD5C28;
96 const u32 H_w0c29 = 0 + MD5C29;
97 const u32 H_w3c2a = w[ 3] + MD5C2a;
98 const u32 H_w6c2b = w[ 6] + MD5C2b;
99 const u32 H_w9c2c = w[ 9] + MD5C2c;
100 const u32 H_wcc2d = w[12] + MD5C2d;
101 const u32 H_wfc2e = w[15] + MD5C2e;
102 const u32 H_w2c2f = w[ 2] + MD5C2f;
104 const u32 I_w0c30 = 0 + MD5C30;
105 const u32 I_w7c31 = w[ 7] + MD5C31;
106 const u32 I_wec32 = w[14] + MD5C32;
107 const u32 I_w5c33 = w[ 5] + MD5C33;
108 const u32 I_wcc34 = w[12] + MD5C34;
109 const u32 I_w3c35 = w[ 3] + MD5C35;
110 const u32 I_wac36 = w[10] + MD5C36;
111 const u32 I_w1c37 = w[ 1] + MD5C37;
112 const u32 I_w8c38 = w[ 8] + MD5C38;
113 const u32 I_wfc39 = w[15] + MD5C39;
114 const u32 I_w6c3a = w[ 6] + MD5C3a;
115 const u32 I_wdc3b = w[13] + MD5C3b;
116 const u32 I_w4c3c = w[ 4] + MD5C3c;
117 const u32 I_wbc3d = w[11] + MD5C3d;
118 const u32 I_w2c3e = w[ 2] + MD5C3e;
119 const u32 I_w9c3f = w[ 9] + MD5C3f;
127 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
129 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
131 const u32x w0 = w0l | w0r;
140 MD5_STEP (MD5_Fo, a, b, c, d, w0, F_w0c00, MD5S00);
141 MD5_STEP0(MD5_Fo, d, a, b, c, F_w1c01, MD5S01);
142 MD5_STEP0(MD5_Fo, c, d, a, b, F_w2c02, MD5S02);
143 MD5_STEP0(MD5_Fo, b, c, d, a, F_w3c03, MD5S03);
144 MD5_STEP0(MD5_Fo, a, b, c, d, F_w4c04, MD5S00);
145 MD5_STEP0(MD5_Fo, d, a, b, c, F_w5c05, MD5S01);
146 MD5_STEP0(MD5_Fo, c, d, a, b, F_w6c06, MD5S02);
147 MD5_STEP0(MD5_Fo, b, c, d, a, F_w7c07, MD5S03);
148 MD5_STEP0(MD5_Fo, a, b, c, d, F_w8c08, MD5S00);
149 MD5_STEP0(MD5_Fo, d, a, b, c, F_w9c09, MD5S01);
150 MD5_STEP0(MD5_Fo, c, d, a, b, F_wac0a, MD5S02);
151 MD5_STEP0(MD5_Fo, b, c, d, a, F_wbc0b, MD5S03);
152 MD5_STEP0(MD5_Fo, a, b, c, d, F_wcc0c, MD5S00);
153 MD5_STEP0(MD5_Fo, d, a, b, c, F_wdc0d, MD5S01);
154 MD5_STEP0(MD5_Fo, c, d, a, b, F_wec0e, MD5S02);
155 MD5_STEP0(MD5_Fo, b, c, d, a, F_wfc0f, MD5S03);
157 MD5_STEP0(MD5_Go, a, b, c, d, G_w1c10, MD5S10);
158 MD5_STEP0(MD5_Go, d, a, b, c, G_w6c11, MD5S11);
159 MD5_STEP0(MD5_Go, c, d, a, b, G_wbc12, MD5S12);
160 MD5_STEP (MD5_Go, b, c, d, a, w0, G_w0c13, MD5S13);
161 MD5_STEP0(MD5_Go, a, b, c, d, G_w5c14, MD5S10);
162 MD5_STEP0(MD5_Go, d, a, b, c, G_wac15, MD5S11);
163 MD5_STEP0(MD5_Go, c, d, a, b, G_wfc16, MD5S12);
164 MD5_STEP0(MD5_Go, b, c, d, a, G_w4c17, MD5S13);
165 MD5_STEP0(MD5_Go, a, b, c, d, G_w9c18, MD5S10);
166 MD5_STEP0(MD5_Go, d, a, b, c, G_wec19, MD5S11);
167 MD5_STEP0(MD5_Go, c, d, a, b, G_w3c1a, MD5S12);
168 MD5_STEP0(MD5_Go, b, c, d, a, G_w8c1b, MD5S13);
169 MD5_STEP0(MD5_Go, a, b, c, d, G_wdc1c, MD5S10);
170 MD5_STEP0(MD5_Go, d, a, b, c, G_w2c1d, MD5S11);
171 MD5_STEP0(MD5_Go, c, d, a, b, G_w7c1e, MD5S12);
172 MD5_STEP0(MD5_Go, b, c, d, a, G_wcc1f, MD5S13);
174 MD5_STEP0(MD5_H1, a, b, c, d, H_w5c20, MD5S20);
175 MD5_STEP0(MD5_H2, d, a, b, c, H_w8c21, MD5S21);
176 MD5_STEP0(MD5_H1, c, d, a, b, H_wbc22, MD5S22);
177 MD5_STEP0(MD5_H2, b, c, d, a, H_wec23, MD5S23);
178 MD5_STEP0(MD5_H1, a, b, c, d, H_w1c24, MD5S20);
179 MD5_STEP0(MD5_H2, d, a, b, c, H_w4c25, MD5S21);
180 MD5_STEP0(MD5_H1, c, d, a, b, H_w7c26, MD5S22);
181 MD5_STEP0(MD5_H2, b, c, d, a, H_wac27, MD5S23);
182 MD5_STEP0(MD5_H1, a, b, c, d, H_wdc28, MD5S20);
183 MD5_STEP (MD5_H2, d, a, b, c, w0, H_w0c29, MD5S21);
184 MD5_STEP0(MD5_H1, c, d, a, b, H_w3c2a, MD5S22);
185 MD5_STEP0(MD5_H2, b, c, d, a, H_w6c2b, MD5S23);
186 MD5_STEP0(MD5_H1, a, b, c, d, H_w9c2c, MD5S20);
187 MD5_STEP0(MD5_H2, d, a, b, c, H_wcc2d, MD5S21);
188 MD5_STEP0(MD5_H1, c, d, a, b, H_wfc2e, MD5S22);
189 MD5_STEP0(MD5_H2, b, c, d, a, H_w2c2f, MD5S23);
191 MD5_STEP (MD5_I , a, b, c, d, w0, I_w0c30, MD5S30);
192 MD5_STEP0(MD5_I , d, a, b, c, I_w7c31, MD5S31);
193 MD5_STEP0(MD5_I , c, d, a, b, I_wec32, MD5S32);
194 MD5_STEP0(MD5_I , b, c, d, a, I_w5c33, MD5S33);
195 MD5_STEP0(MD5_I , a, b, c, d, I_wcc34, MD5S30);
196 MD5_STEP0(MD5_I , d, a, b, c, I_w3c35, MD5S31);
197 MD5_STEP0(MD5_I , c, d, a, b, I_wac36, MD5S32);
198 MD5_STEP0(MD5_I , b, c, d, a, I_w1c37, MD5S33);
199 MD5_STEP0(MD5_I , a, b, c, d, I_w8c38, MD5S30);
200 MD5_STEP0(MD5_I , d, a, b, c, I_wfc39, MD5S31);
201 MD5_STEP0(MD5_I , c, d, a, b, I_w6c3a, MD5S32);
202 MD5_STEP0(MD5_I , b, c, d, a, I_wdc3b, MD5S33);
203 MD5_STEP0(MD5_I , a, b, c, d, I_w4c3c, MD5S30);
204 MD5_STEP0(MD5_I , d, a, b, c, I_wbc3d, MD5S31);
205 MD5_STEP0(MD5_I , c, d, a, b, I_w2c3e, MD5S32);
206 MD5_STEP0(MD5_I , b, c, d, a, I_w9c3f, MD5S33);
208 COMPARE_M_SIMD (a, d, c, b);
212 static void m00000s (u32 w[16], const u32 pw_len, __global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset)
218 const u32 gid = get_global_id (0);
219 const u32 lid = get_local_id (0);
225 const u32 F_w0c00 = 0 + MD5C00;
226 const u32 F_w1c01 = w[ 1] + MD5C01;
227 const u32 F_w2c02 = w[ 2] + MD5C02;
228 const u32 F_w3c03 = w[ 3] + MD5C03;
229 const u32 F_w4c04 = w[ 4] + MD5C04;
230 const u32 F_w5c05 = w[ 5] + MD5C05;
231 const u32 F_w6c06 = w[ 6] + MD5C06;
232 const u32 F_w7c07 = w[ 7] + MD5C07;
233 const u32 F_w8c08 = w[ 8] + MD5C08;
234 const u32 F_w9c09 = w[ 9] + MD5C09;
235 const u32 F_wac0a = w[10] + MD5C0a;
236 const u32 F_wbc0b = w[11] + MD5C0b;
237 const u32 F_wcc0c = w[12] + MD5C0c;
238 const u32 F_wdc0d = w[13] + MD5C0d;
239 const u32 F_wec0e = w[14] + MD5C0e;
240 const u32 F_wfc0f = w[15] + MD5C0f;
242 const u32 G_w1c10 = w[ 1] + MD5C10;
243 const u32 G_w6c11 = w[ 6] + MD5C11;
244 const u32 G_wbc12 = w[11] + MD5C12;
245 const u32 G_w0c13 = 0 + MD5C13;
246 const u32 G_w5c14 = w[ 5] + MD5C14;
247 const u32 G_wac15 = w[10] + MD5C15;
248 const u32 G_wfc16 = w[15] + MD5C16;
249 const u32 G_w4c17 = w[ 4] + MD5C17;
250 const u32 G_w9c18 = w[ 9] + MD5C18;
251 const u32 G_wec19 = w[14] + MD5C19;
252 const u32 G_w3c1a = w[ 3] + MD5C1a;
253 const u32 G_w8c1b = w[ 8] + MD5C1b;
254 const u32 G_wdc1c = w[13] + MD5C1c;
255 const u32 G_w2c1d = w[ 2] + MD5C1d;
256 const u32 G_w7c1e = w[ 7] + MD5C1e;
257 const u32 G_wcc1f = w[12] + MD5C1f;
259 const u32 H_w5c20 = w[ 5] + MD5C20;
260 const u32 H_w8c21 = w[ 8] + MD5C21;
261 const u32 H_wbc22 = w[11] + MD5C22;
262 const u32 H_wec23 = w[14] + MD5C23;
263 const u32 H_w1c24 = w[ 1] + MD5C24;
264 const u32 H_w4c25 = w[ 4] + MD5C25;
265 const u32 H_w7c26 = w[ 7] + MD5C26;
266 const u32 H_wac27 = w[10] + MD5C27;
267 const u32 H_wdc28 = w[13] + MD5C28;
268 const u32 H_w0c29 = 0 + MD5C29;
269 const u32 H_w3c2a = w[ 3] + MD5C2a;
270 const u32 H_w6c2b = w[ 6] + MD5C2b;
271 const u32 H_w9c2c = w[ 9] + MD5C2c;
272 const u32 H_wcc2d = w[12] + MD5C2d;
273 const u32 H_wfc2e = w[15] + MD5C2e;
274 const u32 H_w2c2f = w[ 2] + MD5C2f;
276 const u32 I_w0c30 = 0 + MD5C30;
277 const u32 I_w7c31 = w[ 7] + MD5C31;
278 const u32 I_wec32 = w[14] + MD5C32;
279 const u32 I_w5c33 = w[ 5] + MD5C33;
280 const u32 I_wcc34 = w[12] + MD5C34;
281 const u32 I_w3c35 = w[ 3] + MD5C35;
282 const u32 I_wac36 = w[10] + MD5C36;
283 const u32 I_w1c37 = w[ 1] + MD5C37;
284 const u32 I_w8c38 = w[ 8] + MD5C38;
285 const u32 I_wfc39 = w[15] + MD5C39;
286 const u32 I_w6c3a = w[ 6] + MD5C3a;
287 const u32 I_wdc3b = w[13] + MD5C3b;
288 const u32 I_w4c3c = w[ 4] + MD5C3c;
289 const u32 I_wbc3d = w[11] + MD5C3d;
290 const u32 I_w2c3e = w[ 2] + MD5C3e;
291 const u32 I_w9c3f = w[ 9] + MD5C3f;
297 const u32 search[4] =
299 digests_buf[digests_offset].digest_buf[DGST_R0],
300 digests_buf[digests_offset].digest_buf[DGST_R1],
301 digests_buf[digests_offset].digest_buf[DGST_R2],
302 digests_buf[digests_offset].digest_buf[DGST_R3]
309 u32x a_rev = digests_buf[digests_offset].digest_buf[0];
310 u32x b_rev = digests_buf[digests_offset].digest_buf[1];
311 u32x c_rev = digests_buf[digests_offset].digest_buf[2];
312 u32x d_rev = digests_buf[digests_offset].digest_buf[3];
314 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[ 9], MD5C3f, MD5S33);
315 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[ 2], MD5C3e, MD5S32);
316 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[11], MD5C3d, MD5S31);
317 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, w[ 4], MD5C3c, MD5S30);
318 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[13], MD5C3b, MD5S33);
319 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[ 6], MD5C3a, MD5S32);
320 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[15], MD5C39, MD5S31);
321 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, w[ 8], MD5C38, MD5S30);
322 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[ 1], MD5C37, MD5S33);
323 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[10], MD5C36, MD5S32);
324 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[ 3], MD5C35, MD5S31);
325 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, w[12], MD5C34, MD5S30);
326 MD5_STEP_REV (MD5_I, b_rev, c_rev, d_rev, a_rev, w[ 5], MD5C33, MD5S33);
327 MD5_STEP_REV (MD5_I, c_rev, d_rev, a_rev, b_rev, w[14], MD5C32, MD5S32);
328 MD5_STEP_REV (MD5_I, d_rev, a_rev, b_rev, c_rev, w[ 7], MD5C31, MD5S31);
329 MD5_STEP_REV (MD5_I, a_rev, b_rev, c_rev, d_rev, 0, MD5C30, MD5S30);
331 const u32x pre_cd = c_rev ^ d_rev;
333 MD5_STEP_REV1(MD5_H, b_rev, c_rev, d_rev, a_rev, w[ 2], MD5C2f, MD5S23);
334 MD5_STEP_REV1(MD5_H, c_rev, d_rev, a_rev, b_rev, w[15], MD5C2e, MD5S22);
342 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos += VECT_SIZE)
344 const u32x w0r = words_buf_r[il_pos / VECT_SIZE];
346 const u32x w0 = w0l | w0r;
348 const u32x pre_d = d_rev;
349 const u32x pre_a = a_rev - w0;
350 const u32x pre_b = b_rev - (pre_a ^ pre_cd);
351 const u32x pre_c = c_rev - (pre_a ^ pre_b ^ pre_d);
360 MD5_STEP (MD5_Fo, a, b, c, d, w0, F_w0c00, MD5S00);
361 MD5_STEP0(MD5_Fo, d, a, b, c, F_w1c01, MD5S01);
362 MD5_STEP0(MD5_Fo, c, d, a, b, F_w2c02, MD5S02);
363 MD5_STEP0(MD5_Fo, b, c, d, a, F_w3c03, MD5S03);
364 MD5_STEP0(MD5_Fo, a, b, c, d, F_w4c04, MD5S00);
365 MD5_STEP0(MD5_Fo, d, a, b, c, F_w5c05, MD5S01);
366 MD5_STEP0(MD5_Fo, c, d, a, b, F_w6c06, MD5S02);
367 MD5_STEP0(MD5_Fo, b, c, d, a, F_w7c07, MD5S03);
368 MD5_STEP0(MD5_Fo, a, b, c, d, F_w8c08, MD5S00);
369 MD5_STEP0(MD5_Fo, d, a, b, c, F_w9c09, MD5S01);
370 MD5_STEP0(MD5_Fo, c, d, a, b, F_wac0a, MD5S02);
371 MD5_STEP0(MD5_Fo, b, c, d, a, F_wbc0b, MD5S03);
372 MD5_STEP0(MD5_Fo, a, b, c, d, F_wcc0c, MD5S00);
373 MD5_STEP0(MD5_Fo, d, a, b, c, F_wdc0d, MD5S01);
374 MD5_STEP0(MD5_Fo, c, d, a, b, F_wec0e, MD5S02);
375 MD5_STEP0(MD5_Fo, b, c, d, a, F_wfc0f, MD5S03);
377 MD5_STEP0(MD5_Go, a, b, c, d, G_w1c10, MD5S10);
378 MD5_STEP0(MD5_Go, d, a, b, c, G_w6c11, MD5S11);
379 MD5_STEP0(MD5_Go, c, d, a, b, G_wbc12, MD5S12);
380 MD5_STEP (MD5_Go, b, c, d, a, w0, G_w0c13, MD5S13);
381 MD5_STEP0(MD5_Go, a, b, c, d, G_w5c14, MD5S10);
382 MD5_STEP0(MD5_Go, d, a, b, c, G_wac15, MD5S11);
383 MD5_STEP0(MD5_Go, c, d, a, b, G_wfc16, MD5S12);
384 MD5_STEP0(MD5_Go, b, c, d, a, G_w4c17, MD5S13);
385 MD5_STEP0(MD5_Go, a, b, c, d, G_w9c18, MD5S10);
386 MD5_STEP0(MD5_Go, d, a, b, c, G_wec19, MD5S11);
387 MD5_STEP0(MD5_Go, c, d, a, b, G_w3c1a, MD5S12);
388 MD5_STEP0(MD5_Go, b, c, d, a, G_w8c1b, MD5S13);
389 MD5_STEP0(MD5_Go, a, b, c, d, G_wdc1c, MD5S10);
390 MD5_STEP0(MD5_Go, d, a, b, c, G_w2c1d, MD5S11);
391 MD5_STEP0(MD5_Go, c, d, a, b, G_w7c1e, MD5S12);
392 MD5_STEP0(MD5_Go, b, c, d, a, G_wcc1f, MD5S13);
394 MD5_STEP0(MD5_H1, a, b, c, d, H_w5c20, MD5S20);
395 MD5_STEP0(MD5_H2, d, a, b, c, H_w8c21, MD5S21);
396 MD5_STEP0(MD5_H1, c, d, a, b, H_wbc22, MD5S22);
397 MD5_STEP0(MD5_H2, b, c, d, a, H_wec23, MD5S23);
398 MD5_STEP0(MD5_H1, a, b, c, d, H_w1c24, MD5S20);
399 MD5_STEP0(MD5_H2, d, a, b, c, H_w4c25, MD5S21);
400 MD5_STEP0(MD5_H1, c, d, a, b, H_w7c26, MD5S22);
401 MD5_STEP0(MD5_H2, b, c, d, a, H_wac27, MD5S23);
402 MD5_STEP0(MD5_H1, a, b, c, d, H_wdc28, MD5S20);
403 MD5_STEP (MD5_H2, d, a, b, c, w0, H_w0c29, MD5S21);
404 MD5_STEP0(MD5_H1, c, d, a, b, H_w3c2a, MD5S22);
406 if (MATCHES_NONE_VV (pre_c, c)) continue;
408 MD5_STEP0(MD5_H2, b, c, d, a, H_w6c2b, MD5S23);
409 MD5_STEP0(MD5_H1, a, b, c, d, H_w9c2c, MD5S20);
410 MD5_STEP0(MD5_H2, d, a, b, c, H_wcc2d, MD5S21);
412 if (MATCHES_NONE_VV (pre_d, d)) continue;
414 MD5_STEP0(MD5_H1, c, d, a, b, H_wfc2e, MD5S22);
415 MD5_STEP0(MD5_H2, b, c, d, a, H_w2c2f, MD5S23);
417 MD5_STEP (MD5_I , a, b, c, d, w0, I_w0c30, MD5S30);
418 MD5_STEP0(MD5_I , d, a, b, c, I_w7c31, MD5S31);
419 MD5_STEP0(MD5_I , c, d, a, b, I_wec32, MD5S32);
420 MD5_STEP0(MD5_I , b, c, d, a, I_w5c33, MD5S33);
421 MD5_STEP0(MD5_I , a, b, c, d, I_wcc34, MD5S30);
422 MD5_STEP0(MD5_I , d, a, b, c, I_w3c35, MD5S31);
423 MD5_STEP0(MD5_I , c, d, a, b, I_wac36, MD5S32);
424 MD5_STEP0(MD5_I , b, c, d, a, I_w1c37, MD5S33);
425 MD5_STEP0(MD5_I , a, b, c, d, I_w8c38, MD5S30);
426 MD5_STEP0(MD5_I , d, a, b, c, I_wfc39, MD5S31);
427 MD5_STEP0(MD5_I , c, d, a, b, I_w6c3a, MD5S32);
428 MD5_STEP0(MD5_I , b, c, d, a, I_wdc3b, MD5S33);
429 MD5_STEP0(MD5_I , a, b, c, d, I_w4c3c, MD5S30);
430 MD5_STEP0(MD5_I , d, a, b, c, I_wbc3d, MD5S31);
431 MD5_STEP0(MD5_I , c, d, a, b, I_w2c3e, MD5S32);
432 MD5_STEP0(MD5_I , b, c, d, a, I_w9c3f, MD5S33);
434 COMPARE_S_SIMD (a, d, c, b);
438 __kernel void m00000_m04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
444 const u32 gid = get_global_id (0);
446 if (gid >= gid_max) return;
450 w[ 0] = pws[gid].i[ 0];
451 w[ 1] = pws[gid].i[ 1];
452 w[ 2] = pws[gid].i[ 2];
453 w[ 3] = pws[gid].i[ 3];
464 w[14] = pws[gid].i[14];
467 const u32 pw_len = pws[gid].pw_len;
473 m00000m (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);
476 __kernel void m00000_m08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
482 const u32 gid = get_global_id (0);
484 if (gid >= gid_max) return;
488 w[ 0] = pws[gid].i[ 0];
489 w[ 1] = pws[gid].i[ 1];
490 w[ 2] = pws[gid].i[ 2];
491 w[ 3] = pws[gid].i[ 3];
492 w[ 4] = pws[gid].i[ 4];
493 w[ 5] = pws[gid].i[ 5];
494 w[ 6] = pws[gid].i[ 6];
495 w[ 7] = pws[gid].i[ 7];
502 w[14] = pws[gid].i[14];
505 const u32 pw_len = pws[gid].pw_len;
511 m00000m (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);
514 __kernel void m00000_m16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
520 const u32 gid = get_global_id (0);
522 if (gid >= gid_max) return;
526 w[ 0] = pws[gid].i[ 0];
527 w[ 1] = pws[gid].i[ 1];
528 w[ 2] = pws[gid].i[ 2];
529 w[ 3] = pws[gid].i[ 3];
530 w[ 4] = pws[gid].i[ 4];
531 w[ 5] = pws[gid].i[ 5];
532 w[ 6] = pws[gid].i[ 6];
533 w[ 7] = pws[gid].i[ 7];
534 w[ 8] = pws[gid].i[ 8];
535 w[ 9] = pws[gid].i[ 9];
536 w[10] = pws[gid].i[10];
537 w[11] = pws[gid].i[11];
538 w[12] = pws[gid].i[12];
539 w[13] = pws[gid].i[13];
540 w[14] = pws[gid].i[14];
541 w[15] = pws[gid].i[15];
543 const u32 pw_len = pws[gid].pw_len;
549 m00000m (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);
552 __kernel void m00000_s04 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
558 const u32 gid = get_global_id (0);
560 if (gid >= gid_max) return;
564 w[ 0] = pws[gid].i[ 0];
565 w[ 1] = pws[gid].i[ 1];
566 w[ 2] = pws[gid].i[ 2];
567 w[ 3] = pws[gid].i[ 3];
578 w[14] = pws[gid].i[14];
581 const u32 pw_len = pws[gid].pw_len;
587 m00000s (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);
590 __kernel void m00000_s08 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
596 const u32 gid = get_global_id (0);
598 if (gid >= gid_max) return;
602 w[ 0] = pws[gid].i[ 0];
603 w[ 1] = pws[gid].i[ 1];
604 w[ 2] = pws[gid].i[ 2];
605 w[ 3] = pws[gid].i[ 3];
606 w[ 4] = pws[gid].i[ 4];
607 w[ 5] = pws[gid].i[ 5];
608 w[ 6] = pws[gid].i[ 6];
609 w[ 7] = pws[gid].i[ 7];
616 w[14] = pws[gid].i[14];
619 const u32 pw_len = pws[gid].pw_len;
625 m00000s (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);
628 __kernel void m00000_s16 (__global pw_t *pws, __global kernel_rule_t *rules_buf, __global comb_t *combs_buf, __constant u32x * words_buf_r, __global void *tmps, __global void *hooks, __global u32 *bitmaps_buf_s1_a, __global u32 *bitmaps_buf_s1_b, __global u32 *bitmaps_buf_s1_c, __global u32 *bitmaps_buf_s1_d, __global u32 *bitmaps_buf_s2_a, __global u32 *bitmaps_buf_s2_b, __global u32 *bitmaps_buf_s2_c, __global u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global digest_t *digests_buf, __global u32 *hashes_shown, __global salt_t *salt_bufs, __global void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
634 const u32 gid = get_global_id (0);
636 if (gid >= gid_max) return;
640 w[ 0] = pws[gid].i[ 0];
641 w[ 1] = pws[gid].i[ 1];
642 w[ 2] = pws[gid].i[ 2];
643 w[ 3] = pws[gid].i[ 3];
644 w[ 4] = pws[gid].i[ 4];
645 w[ 5] = pws[gid].i[ 5];
646 w[ 6] = pws[gid].i[ 6];
647 w[ 7] = pws[gid].i[ 7];
648 w[ 8] = pws[gid].i[ 8];
649 w[ 9] = pws[gid].i[ 9];
650 w[10] = pws[gid].i[10];
651 w[11] = pws[gid].i[11];
652 w[12] = pws[gid].i[12];
653 w[13] = pws[gid].i[13];
654 w[14] = pws[gid].i[14];
655 w[15] = pws[gid].i[15];
657 const u32 pw_len = pws[gid].pw_len;
663 m00000s (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);