2 * Authors.....: Jens Steube <jens.steube@gmail.com>
3 * magnum <john.magnum@hushmail.com>
12 #include "inc_vendor.cl"
13 #include "inc_hash_constants.h"
14 #include "inc_hash_functions.cl"
15 #include "inc_types.cl"
16 #include "inc_common.cl"
19 #include "inc_simd.cl"
22 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i)])
24 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
26 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
28 #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])
30 #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])
33 __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)
39 const u32 gid = get_global_id (0);
40 const u32 lid = get_local_id (0);
41 const u32 lsz = get_local_size (0);
47 __local u32 l_bin2asc[256];
49 for (u32 i = lid; i < 256; i += lsz)
51 const u32 i0 = (i >> 0) & 15;
52 const u32 i1 = (i >> 4) & 15;
54 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
55 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
58 barrier (CLK_LOCAL_MEM_FENCE);
60 if (gid >= gid_max) return;
69 pw_buf0[0] = pws[gid].i[0];
70 pw_buf0[1] = pws[gid].i[1];
71 pw_buf0[2] = pws[gid].i[2];
72 pw_buf0[3] = pws[gid].i[3];
73 pw_buf1[0] = pws[gid].i[4];
74 pw_buf1[1] = pws[gid].i[5];
75 pw_buf1[2] = pws[gid].i[6];
76 pw_buf1[3] = pws[gid].i[7];
78 const u32 pw_len = pws[gid].pw_len;
89 salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0];
90 salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1];
91 salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2];
92 salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3];
93 salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4];
94 salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5];
95 salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6];
96 salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7];
106 const u32 salt_len = salt_bufs[salt_pos].salt_len;
112 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
119 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
121 append_0x80_2x4_VV (w0, w1, out_len);
131 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
132 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
133 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
134 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
135 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
136 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
137 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
138 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
139 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
140 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
141 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
142 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
143 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
144 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
145 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
146 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
148 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
149 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
150 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
151 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
152 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
153 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
154 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
155 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
156 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
157 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
158 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
159 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
160 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
161 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
162 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
163 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
165 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
166 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
167 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
168 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
169 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
170 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
171 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
172 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
173 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
174 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
175 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
176 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
177 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
178 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
179 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
180 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
182 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
183 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
184 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
185 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
186 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
187 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
188 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
189 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
190 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
191 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
192 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
193 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
194 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
195 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
196 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
197 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
204 w0[0] = salt_buf0[0];
205 w0[1] = salt_buf0[1];
206 w0[2] = salt_buf0[2];
207 w0[3] = salt_buf0[3];
208 w1[0] = salt_buf1[0];
209 w1[1] = salt_buf1[1];
210 w1[2] = salt_buf1[2];
211 w1[3] = salt_buf1[3];
213 w2[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
214 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
215 w2[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
216 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
217 w2[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
218 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
219 w2[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
220 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
221 w3[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
222 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
223 w3[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
224 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
225 w3[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
226 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
227 w3[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
228 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
235 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
236 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
237 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
238 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
239 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
240 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
241 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
242 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
243 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
244 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
245 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
246 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
247 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
248 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
249 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
250 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
252 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
253 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
254 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
255 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
256 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
257 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
258 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
259 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
260 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
261 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
262 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
263 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
264 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
265 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
266 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
267 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
269 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
270 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
271 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
272 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
273 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
274 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
275 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
276 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
277 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
278 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
279 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
280 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
281 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
282 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
283 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
284 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
286 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
287 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
288 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
289 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
290 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
291 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
292 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
293 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
294 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
295 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
296 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
297 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
298 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
299 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
300 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
301 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
303 const u32x r_a = a + MD5M_A;
304 const u32x r_b = b + MD5M_B;
305 const u32x r_c = c + MD5M_C;
306 const u32x r_d = d + MD5M_D;
308 const u32x r_00 = 0x80;
309 const u32x r_14 = 64 * 8;
316 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
317 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
318 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
319 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
320 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
321 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
322 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
323 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
324 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
325 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
326 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
327 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
328 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
329 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
330 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
331 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
333 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
334 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
335 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
336 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
337 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
338 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
339 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
340 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
341 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
342 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
343 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
344 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
345 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
346 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
347 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
348 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
350 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
351 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
352 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
353 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
354 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
355 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
356 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
357 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
358 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
359 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
360 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
361 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
362 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
363 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
364 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
365 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
367 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
368 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
369 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
370 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
371 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
372 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
373 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
374 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
375 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
376 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
377 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
378 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
379 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
380 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
381 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
382 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
389 COMPARE_M_SIMD (a, d, c, b);
393 __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)
397 __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)
401 __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)
407 const u32 gid = get_global_id (0);
408 const u32 lid = get_local_id (0);
409 const u32 lsz = get_local_size (0);
415 __local u32 l_bin2asc[256];
417 for (u32 i = lid; i < 256; i += lsz)
419 const u32 i0 = (i >> 0) & 15;
420 const u32 i1 = (i >> 4) & 15;
422 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
423 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
426 barrier (CLK_LOCAL_MEM_FENCE);
428 if (gid >= gid_max) return;
437 pw_buf0[0] = pws[gid].i[0];
438 pw_buf0[1] = pws[gid].i[1];
439 pw_buf0[2] = pws[gid].i[2];
440 pw_buf0[3] = pws[gid].i[3];
441 pw_buf1[0] = pws[gid].i[4];
442 pw_buf1[1] = pws[gid].i[5];
443 pw_buf1[2] = pws[gid].i[6];
444 pw_buf1[3] = pws[gid].i[7];
446 const u32 pw_len = pws[gid].pw_len;
457 salt_buf0[0] = salt_bufs[salt_pos].salt_buf_pc[0];
458 salt_buf0[1] = salt_bufs[salt_pos].salt_buf_pc[1];
459 salt_buf0[2] = salt_bufs[salt_pos].salt_buf_pc[2];
460 salt_buf0[3] = salt_bufs[salt_pos].salt_buf_pc[3];
461 salt_buf1[0] = salt_bufs[salt_pos].salt_buf_pc[4];
462 salt_buf1[1] = salt_bufs[salt_pos].salt_buf_pc[5];
463 salt_buf1[2] = salt_bufs[salt_pos].salt_buf_pc[6];
464 salt_buf1[3] = salt_bufs[salt_pos].salt_buf_pc[7];
474 const u32 salt_len = salt_bufs[salt_pos].salt_len;
480 const u32 search[4] =
482 digests_buf[digests_offset].digest_buf[DGST_R0],
483 digests_buf[digests_offset].digest_buf[DGST_R1],
484 digests_buf[digests_offset].digest_buf[DGST_R2],
485 digests_buf[digests_offset].digest_buf[DGST_R3]
492 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
499 const u32x out_len = apply_rules_vect (pw_buf0, pw_buf1, pw_len, rules_buf, il_pos, w0, w1);
501 append_0x80_2x4_VV (w0, w1, out_len);
511 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
512 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
513 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
514 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
515 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
516 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
517 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
518 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
519 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
520 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
521 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
522 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
523 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
524 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
525 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
526 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
528 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
529 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
530 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
531 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
532 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
533 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
534 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
535 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
536 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
537 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
538 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
539 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
540 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
541 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
542 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
543 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
545 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
546 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
547 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
548 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
549 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
550 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
551 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
552 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
553 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
554 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
555 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
556 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
557 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
558 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
559 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
560 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
562 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
563 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
564 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
565 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
566 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
567 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
568 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
569 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
570 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
571 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
572 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
573 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
574 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
575 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
576 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
577 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
584 w0[0] = salt_buf0[0];
585 w0[1] = salt_buf0[1];
586 w0[2] = salt_buf0[2];
587 w0[3] = salt_buf0[3];
588 w1[0] = salt_buf1[0];
589 w1[1] = salt_buf1[1];
590 w1[2] = salt_buf1[2];
591 w1[3] = salt_buf1[3];
593 w2[0] = uint_to_hex_lower8 ((a >> 0) & 255) << 0
594 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
595 w2[1] = uint_to_hex_lower8 ((a >> 16) & 255) << 0
596 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
597 w2[2] = uint_to_hex_lower8 ((b >> 0) & 255) << 0
598 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
599 w2[3] = uint_to_hex_lower8 ((b >> 16) & 255) << 0
600 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
601 w3[0] = uint_to_hex_lower8 ((c >> 0) & 255) << 0
602 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
603 w3[1] = uint_to_hex_lower8 ((c >> 16) & 255) << 0
604 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
605 w3[2] = uint_to_hex_lower8 ((d >> 0) & 255) << 0
606 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
607 w3[3] = uint_to_hex_lower8 ((d >> 16) & 255) << 0
608 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
615 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
616 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
617 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
618 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
619 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
620 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
621 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
622 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
623 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
624 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
625 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
626 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
627 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
628 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
629 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
630 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
632 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
633 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
634 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
635 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
636 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
637 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
638 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
639 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
640 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
641 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
642 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
643 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
644 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
645 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
646 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
647 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
649 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
650 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
651 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
652 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
653 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
654 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
655 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
656 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
657 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
658 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
659 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
660 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
661 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
662 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
663 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
664 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
666 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
667 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
668 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
669 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
670 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
671 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
672 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
673 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
674 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
675 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
676 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
677 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
678 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
679 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
680 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
681 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
683 const u32x r_a = a + MD5M_A;
684 const u32x r_b = b + MD5M_B;
685 const u32x r_c = c + MD5M_C;
686 const u32x r_d = d + MD5M_D;
688 const u32x r_00 = 0x80;
689 const u32x r_14 = 64 * 8;
696 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
697 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
698 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
699 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
700 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
701 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
702 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
703 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
704 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
705 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
706 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
707 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
708 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
709 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
710 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
711 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
713 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
714 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
715 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
716 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
717 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
718 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
719 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
720 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
721 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
722 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
723 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
724 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
725 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
726 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
727 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
728 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
730 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
731 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
732 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
733 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
734 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
735 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
736 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
737 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
738 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
739 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
740 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
741 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
742 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
743 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
744 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
745 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
747 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
748 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
749 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
750 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
751 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
752 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
753 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
754 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
755 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
756 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
757 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
758 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
759 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
761 if (MATCHES_NONE_VS ((a + r_a), search[0])) continue;
763 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
764 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
765 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
772 COMPARE_S_SIMD (a, d, c, b);
776 __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)
780 __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)