2 * Author......: Jens Steube <jens.steube@gmail.com>
10 #include "inc_hash_constants.h"
11 #include "inc_vendor.cl"
18 #include "inc_hash_functions.cl"
19 #include "inc_types.cl"
20 #include "inc_common.cl"
21 #include "inc_simd.cl"
23 __kernel void m09900_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)
29 const u32 lid = get_local_id (0);
35 const u32 gid = get_global_id (0);
37 if (gid >= gid_max) return;
42 pw_buf0[0] = pws[gid].i[0];
43 pw_buf0[1] = pws[gid].i[1];
44 pw_buf0[2] = pws[gid].i[2];
45 pw_buf0[3] = pws[gid].i[3];
46 pw_buf1[0] = pws[gid].i[4];
47 pw_buf1[1] = pws[gid].i[5];
48 pw_buf1[2] = pws[gid].i[6];
49 pw_buf1[3] = pws[gid].i[7];
51 const u32 pw_l_len = pws[gid].pw_len;
57 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
59 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
61 const u32x pw_len = pw_l_len + pw_r_len;
64 * concat password candidate
67 u32x wordl0[4] = { 0 };
68 u32x wordl1[4] = { 0 };
69 u32x wordl2[4] = { 0 };
70 u32x wordl3[4] = { 0 };
72 wordl0[0] = pw_buf0[0];
73 wordl0[1] = pw_buf0[1];
74 wordl0[2] = pw_buf0[2];
75 wordl0[3] = pw_buf0[3];
76 wordl1[0] = pw_buf1[0];
77 wordl1[1] = pw_buf1[1];
78 wordl1[2] = pw_buf1[2];
79 wordl1[3] = pw_buf1[3];
81 u32x wordr0[4] = { 0 };
82 u32x wordr1[4] = { 0 };
83 u32x wordr2[4] = { 0 };
84 u32x wordr3[4] = { 0 };
86 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
87 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
88 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
89 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
90 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
91 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
92 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
93 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
95 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
97 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
101 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
109 w0[0] = wordl0[0] | wordr0[0];
110 w0[1] = wordl0[1] | wordr0[1];
111 w0[2] = wordl0[2] | wordr0[2];
112 w0[3] = wordl0[3] | wordr0[3];
113 w1[0] = wordl1[0] | wordr1[0];
114 w1[1] = wordl1[1] | wordr1[1];
115 w1[2] = wordl1[2] | wordr1[2];
116 w1[3] = wordl1[3] | wordr1[3];
117 w2[0] = wordl2[0] | wordr2[0];
118 w2[1] = wordl2[1] | wordr2[1];
119 w2[2] = wordl2[2] | wordr2[2];
120 w2[3] = wordl2[3] | wordr2[3];
121 w3[0] = wordl3[0] | wordr3[0];
122 w3[1] = wordl3[1] | wordr3[1];
123 w3[2] = wordl3[2] | wordr3[2];
124 w3[3] = wordl3[3] | wordr3[3];
135 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
136 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
137 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
138 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
139 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
140 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
141 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
142 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
143 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
144 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
145 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
146 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
147 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
148 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
149 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
150 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
152 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
153 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
154 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
155 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
156 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
157 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
158 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
159 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
160 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
161 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
162 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
163 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
164 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
165 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
166 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
167 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
169 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
170 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
171 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
172 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
173 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
174 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
175 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
176 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
177 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
178 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
179 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
180 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
181 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
182 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
183 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
184 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
186 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
187 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
188 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
189 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
190 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
191 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
192 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
193 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
194 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
195 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
196 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
197 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
198 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
199 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
200 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
201 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
230 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
231 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
232 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
233 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
234 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
235 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
236 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
237 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
238 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
239 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
240 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
241 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
242 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
243 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
244 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
245 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
247 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
248 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
249 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
250 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
251 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
252 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
253 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
254 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
255 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
256 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
257 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
258 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
259 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
260 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
261 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
262 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
264 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
265 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
266 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
267 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
268 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
269 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
270 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
271 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
272 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
273 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
274 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
275 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
276 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
277 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
278 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
279 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
281 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
282 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
283 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
284 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
285 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
286 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
287 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
288 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
289 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
290 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
291 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
292 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
293 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
294 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
295 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
296 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
303 COMPARE_M_SIMD (a, d, c, b);
307 __kernel void m09900_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)
311 __kernel void m09900_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)
315 __kernel void m09900_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)
321 const u32 lid = get_local_id (0);
327 const u32 gid = get_global_id (0);
329 if (gid >= gid_max) return;
334 pw_buf0[0] = pws[gid].i[0];
335 pw_buf0[1] = pws[gid].i[1];
336 pw_buf0[2] = pws[gid].i[2];
337 pw_buf0[3] = pws[gid].i[3];
338 pw_buf1[0] = pws[gid].i[4];
339 pw_buf1[1] = pws[gid].i[5];
340 pw_buf1[2] = pws[gid].i[6];
341 pw_buf1[3] = pws[gid].i[7];
343 const u32 pw_l_len = pws[gid].pw_len;
349 const u32 search[4] =
351 digests_buf[digests_offset].digest_buf[DGST_R0],
352 digests_buf[digests_offset].digest_buf[DGST_R1],
353 digests_buf[digests_offset].digest_buf[DGST_R2],
354 digests_buf[digests_offset].digest_buf[DGST_R3]
361 for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
363 const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos);
365 const u32x pw_len = pw_l_len + pw_r_len;
368 * concat password candidate
371 u32x wordl0[4] = { 0 };
372 u32x wordl1[4] = { 0 };
373 u32x wordl2[4] = { 0 };
374 u32x wordl3[4] = { 0 };
376 wordl0[0] = pw_buf0[0];
377 wordl0[1] = pw_buf0[1];
378 wordl0[2] = pw_buf0[2];
379 wordl0[3] = pw_buf0[3];
380 wordl1[0] = pw_buf1[0];
381 wordl1[1] = pw_buf1[1];
382 wordl1[2] = pw_buf1[2];
383 wordl1[3] = pw_buf1[3];
385 u32x wordr0[4] = { 0 };
386 u32x wordr1[4] = { 0 };
387 u32x wordr2[4] = { 0 };
388 u32x wordr3[4] = { 0 };
390 wordr0[0] = ix_create_combt (combs_buf, il_pos, 0);
391 wordr0[1] = ix_create_combt (combs_buf, il_pos, 1);
392 wordr0[2] = ix_create_combt (combs_buf, il_pos, 2);
393 wordr0[3] = ix_create_combt (combs_buf, il_pos, 3);
394 wordr1[0] = ix_create_combt (combs_buf, il_pos, 4);
395 wordr1[1] = ix_create_combt (combs_buf, il_pos, 5);
396 wordr1[2] = ix_create_combt (combs_buf, il_pos, 6);
397 wordr1[3] = ix_create_combt (combs_buf, il_pos, 7);
399 if (combs_mode == COMBINATOR_MODE_BASE_LEFT)
401 switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len);
405 switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len);
413 w0[0] = wordl0[0] | wordr0[0];
414 w0[1] = wordl0[1] | wordr0[1];
415 w0[2] = wordl0[2] | wordr0[2];
416 w0[3] = wordl0[3] | wordr0[3];
417 w1[0] = wordl1[0] | wordr1[0];
418 w1[1] = wordl1[1] | wordr1[1];
419 w1[2] = wordl1[2] | wordr1[2];
420 w1[3] = wordl1[3] | wordr1[3];
421 w2[0] = wordl2[0] | wordr2[0];
422 w2[1] = wordl2[1] | wordr2[1];
423 w2[2] = wordl2[2] | wordr2[2];
424 w2[3] = wordl2[3] | wordr2[3];
425 w3[0] = wordl3[0] | wordr3[0];
426 w3[1] = wordl3[1] | wordr3[1];
427 w3[2] = wordl3[2] | wordr3[2];
428 w3[3] = wordl3[3] | wordr3[3];
439 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
440 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
441 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
442 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
443 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
444 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
445 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
446 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
447 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
448 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
449 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
450 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
451 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
452 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
453 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
454 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
456 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
457 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
458 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
459 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
460 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
461 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
462 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
463 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
464 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
465 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
466 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
467 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
468 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
469 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
470 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
471 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
473 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
474 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
475 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
476 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
477 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
478 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
479 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
480 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
481 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
482 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
483 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
484 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
485 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
486 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
487 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
488 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
490 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
491 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
492 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
493 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
494 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
495 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
496 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
497 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
498 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
499 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
500 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
501 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
502 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
503 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
504 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
505 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
534 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
535 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
536 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
537 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
538 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
539 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
540 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
541 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
542 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
543 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
544 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
545 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
546 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
547 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
548 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
549 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
551 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
552 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
553 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
554 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
555 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
556 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
557 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
558 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
559 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
560 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
561 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
562 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
563 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
564 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
565 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
566 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
568 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
569 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
570 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
571 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
572 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
573 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
574 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
575 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
576 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
577 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
578 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
579 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
580 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
581 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
582 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
583 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
585 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
586 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
587 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
588 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
589 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
590 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
591 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
592 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
593 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
594 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
595 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
596 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
597 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
599 if (MATCHES_NONE_VS ((a + r_a), search[0])) continue;
601 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
602 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
603 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
610 COMPARE_S_SIMD (a, d, c, b);
614 __kernel void m09900_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)
618 __kernel void m09900_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)