2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
28 #include "include/kernel_functions.c"
29 #include "types_amd.c"
30 #include "common_amd.c"
33 #define VECT_COMPARE_S "check_single_vect1_comp4.c"
34 #define VECT_COMPARE_M "check_multi_vect1_comp4.c"
38 #define VECT_COMPARE_S "check_single_vect2_comp4.c"
39 #define VECT_COMPARE_M "check_multi_vect2_comp4.c"
43 #define VECT_COMPARE_S "check_single_vect4_comp4.c"
44 #define VECT_COMPARE_M "check_multi_vect4_comp4.c"
48 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
52 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1])
56 #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3])
59 static void m02610m (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, __global pw_t *pws, __global gpu_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
65 const u32 gid = get_global_id (0);
66 const u32 lid = get_local_id (0);
72 const u32 salt_len = salt_bufs[salt_pos].salt_len;
76 s[0] = salt_bufs[salt_pos].salt_buf[0];
77 s[1] = salt_bufs[salt_pos].salt_buf[1];
78 s[2] = salt_bufs[salt_pos].salt_buf[2];
79 s[3] = salt_bufs[salt_pos].salt_buf[3];
80 s[4] = salt_bufs[salt_pos].salt_buf[4];
81 s[5] = salt_bufs[salt_pos].salt_buf[5];
82 s[6] = (32 + salt_len) * 8;
91 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
93 const u32 w0r = bfs_buf[il_pos].i;
102 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
103 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
104 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
105 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
106 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
107 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
108 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
109 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
110 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
111 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
112 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
113 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
114 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
115 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
116 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
117 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
119 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
120 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
121 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
122 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
123 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
124 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
125 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
126 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
127 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
128 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
129 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
130 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
131 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
132 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
133 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
134 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
136 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
137 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
138 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
139 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
140 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
141 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
142 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
143 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
144 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
145 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
146 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
147 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
148 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
149 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
150 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
151 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
153 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
154 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
155 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
156 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
157 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
158 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
159 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
160 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
161 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
162 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
163 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
164 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
165 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
166 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
167 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
168 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
175 const u32x w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
176 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
177 const u32x w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
178 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
179 const u32x w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
180 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
181 const u32x w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
182 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
183 const u32x w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
184 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
185 const u32x w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
186 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
187 const u32x w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
188 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
189 const u32x w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
190 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
192 const u32 w8_t = s[0];
193 const u32 w9_t = s[1];
194 const u32 wa_t = s[2];
195 const u32 wb_t = s[3];
196 const u32 wc_t = s[4];
197 const u32 wd_t = s[5];
198 const u32 we_t = s[6];
199 const u32 wf_t = s[7];
206 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
207 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
208 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
209 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
210 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
211 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
212 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
213 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
214 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
215 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
216 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
217 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
218 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
219 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
220 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
221 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
223 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
224 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
225 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
226 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
227 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
228 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
229 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
230 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
231 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
232 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
233 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
234 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
235 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
236 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
237 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
238 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
240 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
241 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
242 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
243 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
244 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
245 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
246 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
247 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
248 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
249 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
250 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
251 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
252 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
253 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
254 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
255 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
257 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
258 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
259 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
260 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
261 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
262 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
263 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
264 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
265 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
266 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
267 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
268 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
269 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
270 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
271 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
272 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
279 #include VECT_COMPARE_M
283 static void m02610s (u32x w0[4], u32x w1[4], u32x w2[4], u32x w3[4], const u32 pw_len, __global pw_t *pws, __global gpu_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
289 const u32 gid = get_global_id (0);
290 const u32 lid = get_local_id (0);
296 const u32 search[4] =
298 digests_buf[digests_offset].digest_buf[DGST_R0],
299 digests_buf[digests_offset].digest_buf[DGST_R1],
300 digests_buf[digests_offset].digest_buf[DGST_R2],
301 digests_buf[digests_offset].digest_buf[DGST_R3]
308 const u32 salt_len = salt_bufs[salt_pos].salt_len;
312 s[0] = salt_bufs[salt_pos].salt_buf[0];
313 s[1] = salt_bufs[salt_pos].salt_buf[1];
314 s[2] = salt_bufs[salt_pos].salt_buf[2];
315 s[3] = salt_bufs[salt_pos].salt_buf[3];
316 s[4] = salt_bufs[salt_pos].salt_buf[4];
317 s[5] = salt_bufs[salt_pos].salt_buf[5];
318 s[6] = (32 + salt_len) * 8;
327 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
329 const u32 w0r = bfs_buf[il_pos].i;
338 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
339 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
340 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
341 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
342 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
343 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
344 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
345 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
346 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
347 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
348 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
349 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
350 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
351 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
352 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
353 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
355 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
356 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
357 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
358 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
359 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
360 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
361 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
362 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
363 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
364 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
365 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
366 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
367 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
368 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
369 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
370 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
372 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
373 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
374 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
375 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
376 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
377 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
378 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
379 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
380 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
381 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
382 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
383 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
384 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
385 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
386 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
387 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
389 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
390 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
391 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
392 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
393 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
394 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
395 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
396 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
397 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
398 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
399 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
400 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
401 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
402 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
403 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
404 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
411 const u32x w0_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
412 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
413 const u32x w1_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
414 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
415 const u32x w2_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
416 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
417 const u32x w3_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
418 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
419 const u32x w4_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
420 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
421 const u32x w5_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
422 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
423 const u32x w6_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
424 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
425 const u32x w7_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
426 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
428 const u32 w8_t = s[0];
429 const u32 w9_t = s[1];
430 const u32 wa_t = s[2];
431 const u32 wb_t = s[3];
432 const u32 wc_t = s[4];
433 const u32 wd_t = s[5];
434 const u32 we_t = s[6];
435 const u32 wf_t = s[7];
442 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
443 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
444 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
445 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
446 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
447 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
448 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
449 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
450 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
451 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
452 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
453 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
454 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
455 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
456 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
457 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
459 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
460 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
461 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
462 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
463 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
464 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
465 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
466 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
467 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
468 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
469 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
470 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
471 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
472 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
473 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
474 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
476 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
477 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
478 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
479 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
480 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
481 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
482 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
483 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
484 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
485 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
486 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
487 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
488 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
489 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
490 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
491 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
493 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
494 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
495 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
496 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
497 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
498 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
499 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
500 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
501 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
502 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
503 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
504 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
505 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
506 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
507 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
508 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
515 #include VECT_COMPARE_S
519 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02610_m04 (__global pw_t *pws, __global gpu_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
525 const u32 gid = get_global_id (0);
531 const u32 lid = get_local_id (0);
536 w0[0] = pws[gid].i[ 0];
537 w0[1] = pws[gid].i[ 1];
538 w0[2] = pws[gid].i[ 2];
539 w0[3] = pws[gid].i[ 3];
559 w3[2] = pws[gid].i[14];
562 const u32 pw_len = pws[gid].pw_len;
568 __local u32 l_bin2asc[256];
570 const u32 lid4 = lid * 4;
572 const u32 lid40 = lid4 + 0;
573 const u32 lid41 = lid4 + 1;
574 const u32 lid42 = lid4 + 2;
575 const u32 lid43 = lid4 + 3;
577 const u32 v400 = (lid40 >> 0) & 15;
578 const u32 v401 = (lid40 >> 4) & 15;
579 const u32 v410 = (lid41 >> 0) & 15;
580 const u32 v411 = (lid41 >> 4) & 15;
581 const u32 v420 = (lid42 >> 0) & 15;
582 const u32 v421 = (lid42 >> 4) & 15;
583 const u32 v430 = (lid43 >> 0) & 15;
584 const u32 v431 = (lid43 >> 4) & 15;
586 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
587 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
588 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
589 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
590 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
591 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
592 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
593 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
595 barrier (CLK_LOCAL_MEM_FENCE);
597 if (gid >= gid_max) return;
603 m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, l_bin2asc);
606 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02610_m08 (__global pw_t *pws, __global gpu_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
612 const u32 gid = get_global_id (0);
618 const u32 lid = get_local_id (0);
622 w0[0] = pws[gid].i[ 0];
623 w0[1] = pws[gid].i[ 1];
624 w0[2] = pws[gid].i[ 2];
625 w0[3] = pws[gid].i[ 3];
629 w1[0] = pws[gid].i[ 4];
630 w1[1] = pws[gid].i[ 5];
631 w1[2] = pws[gid].i[ 6];
632 w1[3] = pws[gid].i[ 7];
645 w3[2] = pws[gid].i[14];
648 const u32 pw_len = pws[gid].pw_len;
654 __local u32 l_bin2asc[256];
656 const u32 lid4 = lid * 4;
658 const u32 lid40 = lid4 + 0;
659 const u32 lid41 = lid4 + 1;
660 const u32 lid42 = lid4 + 2;
661 const u32 lid43 = lid4 + 3;
663 const u32 v400 = (lid40 >> 0) & 15;
664 const u32 v401 = (lid40 >> 4) & 15;
665 const u32 v410 = (lid41 >> 0) & 15;
666 const u32 v411 = (lid41 >> 4) & 15;
667 const u32 v420 = (lid42 >> 0) & 15;
668 const u32 v421 = (lid42 >> 4) & 15;
669 const u32 v430 = (lid43 >> 0) & 15;
670 const u32 v431 = (lid43 >> 4) & 15;
672 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
673 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
674 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
675 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
676 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
677 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
678 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
679 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
681 barrier (CLK_LOCAL_MEM_FENCE);
683 if (gid >= gid_max) return;
689 m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, l_bin2asc);
692 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02610_m16 (__global pw_t *pws, __global gpu_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 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);
704 const u32 lid = get_local_id (0);
708 w0[0] = pws[gid].i[ 0];
709 w0[1] = pws[gid].i[ 1];
710 w0[2] = pws[gid].i[ 2];
711 w0[3] = pws[gid].i[ 3];
715 w1[0] = pws[gid].i[ 4];
716 w1[1] = pws[gid].i[ 5];
717 w1[2] = pws[gid].i[ 6];
718 w1[3] = pws[gid].i[ 7];
722 w2[0] = pws[gid].i[ 8];
723 w2[1] = pws[gid].i[ 9];
724 w2[2] = pws[gid].i[10];
725 w2[3] = pws[gid].i[11];
729 w3[0] = pws[gid].i[12];
730 w3[1] = pws[gid].i[13];
731 w3[2] = pws[gid].i[14];
732 w3[3] = pws[gid].i[15];
734 const u32 pw_len = pws[gid].pw_len;
740 __local u32 l_bin2asc[256];
742 const u32 lid4 = lid * 4;
744 const u32 lid40 = lid4 + 0;
745 const u32 lid41 = lid4 + 1;
746 const u32 lid42 = lid4 + 2;
747 const u32 lid43 = lid4 + 3;
749 const u32 v400 = (lid40 >> 0) & 15;
750 const u32 v401 = (lid40 >> 4) & 15;
751 const u32 v410 = (lid41 >> 0) & 15;
752 const u32 v411 = (lid41 >> 4) & 15;
753 const u32 v420 = (lid42 >> 0) & 15;
754 const u32 v421 = (lid42 >> 4) & 15;
755 const u32 v430 = (lid43 >> 0) & 15;
756 const u32 v431 = (lid43 >> 4) & 15;
758 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
759 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
760 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
761 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
762 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
763 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
764 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
765 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
767 barrier (CLK_LOCAL_MEM_FENCE);
769 if (gid >= gid_max) return;
775 m02610m (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, l_bin2asc);
778 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02610_s04 (__global pw_t *pws, __global gpu_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
784 const u32 gid = get_global_id (0);
790 const u32 lid = get_local_id (0);
794 w0[0] = pws[gid].i[ 0];
795 w0[1] = pws[gid].i[ 1];
796 w0[2] = pws[gid].i[ 2];
797 w0[3] = pws[gid].i[ 3];
817 w3[2] = pws[gid].i[14];
820 const u32 pw_len = pws[gid].pw_len;
826 __local u32 l_bin2asc[256];
828 const u32 lid4 = lid * 4;
830 const u32 lid40 = lid4 + 0;
831 const u32 lid41 = lid4 + 1;
832 const u32 lid42 = lid4 + 2;
833 const u32 lid43 = lid4 + 3;
835 const u32 v400 = (lid40 >> 0) & 15;
836 const u32 v401 = (lid40 >> 4) & 15;
837 const u32 v410 = (lid41 >> 0) & 15;
838 const u32 v411 = (lid41 >> 4) & 15;
839 const u32 v420 = (lid42 >> 0) & 15;
840 const u32 v421 = (lid42 >> 4) & 15;
841 const u32 v430 = (lid43 >> 0) & 15;
842 const u32 v431 = (lid43 >> 4) & 15;
844 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
845 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
846 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
847 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
848 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
849 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
850 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
851 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
853 barrier (CLK_LOCAL_MEM_FENCE);
855 if (gid >= gid_max) return;
861 m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, l_bin2asc);
864 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02610_s08 (__global pw_t *pws, __global gpu_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
870 const u32 gid = get_global_id (0);
876 const u32 lid = get_local_id (0);
880 w0[0] = pws[gid].i[ 0];
881 w0[1] = pws[gid].i[ 1];
882 w0[2] = pws[gid].i[ 2];
883 w0[3] = pws[gid].i[ 3];
887 w1[0] = pws[gid].i[ 4];
888 w1[1] = pws[gid].i[ 5];
889 w1[2] = pws[gid].i[ 6];
890 w1[3] = pws[gid].i[ 7];
903 w3[2] = pws[gid].i[14];
906 const u32 pw_len = pws[gid].pw_len;
912 __local u32 l_bin2asc[256];
914 const u32 lid4 = lid * 4;
916 const u32 lid40 = lid4 + 0;
917 const u32 lid41 = lid4 + 1;
918 const u32 lid42 = lid4 + 2;
919 const u32 lid43 = lid4 + 3;
921 const u32 v400 = (lid40 >> 0) & 15;
922 const u32 v401 = (lid40 >> 4) & 15;
923 const u32 v410 = (lid41 >> 0) & 15;
924 const u32 v411 = (lid41 >> 4) & 15;
925 const u32 v420 = (lid42 >> 0) & 15;
926 const u32 v421 = (lid42 >> 4) & 15;
927 const u32 v430 = (lid43 >> 0) & 15;
928 const u32 v431 = (lid43 >> 4) & 15;
930 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
931 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
932 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
933 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
934 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
935 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
936 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
937 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
939 barrier (CLK_LOCAL_MEM_FENCE);
941 if (gid >= gid_max) return;
947 m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, l_bin2asc);
950 __kernel void __attribute__((reqd_work_group_size (64, 1, 1))) m02610_s16 (__global pw_t *pws, __global gpu_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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
956 const u32 gid = get_global_id (0);
962 const u32 lid = get_local_id (0);
966 w0[0] = pws[gid].i[ 0];
967 w0[1] = pws[gid].i[ 1];
968 w0[2] = pws[gid].i[ 2];
969 w0[3] = pws[gid].i[ 3];
973 w1[0] = pws[gid].i[ 4];
974 w1[1] = pws[gid].i[ 5];
975 w1[2] = pws[gid].i[ 6];
976 w1[3] = pws[gid].i[ 7];
980 w2[0] = pws[gid].i[ 8];
981 w2[1] = pws[gid].i[ 9];
982 w2[2] = pws[gid].i[10];
983 w2[3] = pws[gid].i[11];
987 w3[0] = pws[gid].i[12];
988 w3[1] = pws[gid].i[13];
989 w3[2] = pws[gid].i[14];
990 w3[3] = pws[gid].i[15];
992 const u32 pw_len = pws[gid].pw_len;
998 __local u32 l_bin2asc[256];
1000 const u32 lid4 = lid * 4;
1002 const u32 lid40 = lid4 + 0;
1003 const u32 lid41 = lid4 + 1;
1004 const u32 lid42 = lid4 + 2;
1005 const u32 lid43 = lid4 + 3;
1007 const u32 v400 = (lid40 >> 0) & 15;
1008 const u32 v401 = (lid40 >> 4) & 15;
1009 const u32 v410 = (lid41 >> 0) & 15;
1010 const u32 v411 = (lid41 >> 4) & 15;
1011 const u32 v420 = (lid42 >> 0) & 15;
1012 const u32 v421 = (lid42 >> 4) & 15;
1013 const u32 v430 = (lid43 >> 0) & 15;
1014 const u32 v431 = (lid43 >> 4) & 15;
1016 l_bin2asc[lid40] = ((v400 < 10) ? '0' + v400 : 'a' - 10 + v400) << 8
1017 | ((v401 < 10) ? '0' + v401 : 'a' - 10 + v401) << 0;
1018 l_bin2asc[lid41] = ((v410 < 10) ? '0' + v410 : 'a' - 10 + v410) << 8
1019 | ((v411 < 10) ? '0' + v411 : 'a' - 10 + v411) << 0;
1020 l_bin2asc[lid42] = ((v420 < 10) ? '0' + v420 : 'a' - 10 + v420) << 8
1021 | ((v421 < 10) ? '0' + v421 : 'a' - 10 + v421) << 0;
1022 l_bin2asc[lid43] = ((v430 < 10) ? '0' + v430 : 'a' - 10 + v430) << 8
1023 | ((v431 < 10) ? '0' + v431 : 'a' - 10 + v431) << 0;
1025 barrier (CLK_LOCAL_MEM_FENCE);
1027 if (gid >= gid_max) return;
1033 m02610s (w0, w1, w2, w3, pw_len, pws, rules_buf, combs_buf, bfs_buf, 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, l_bin2asc);