2 * Author......: Jens Steube <jens.steube@gmail.com>
8 #include "include/constants.h"
9 #include "include/kernel_vendor.h"
16 #include "include/kernel_functions.c"
17 #include "OpenCL/types_ocl.c"
18 #include "OpenCL/common.c"
20 #define COMPARE_S "OpenCL/check_single_comp4.c"
21 #define COMPARE_M "OpenCL/check_multi_comp4.c"
23 #define uint_to_hex_lower8(i) l_bin2asc[(i)]
25 static void m02810m (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
31 const u32 gid = get_global_id (0);
32 const u32 lid = get_local_id (0);
40 s[0] = salt_bufs[salt_pos].salt_buf_pc[0];
41 s[1] = salt_bufs[salt_pos].salt_buf_pc[1];
42 s[2] = salt_bufs[salt_pos].salt_buf_pc[2];
43 s[3] = salt_bufs[salt_pos].salt_buf_pc[3];
44 s[4] = salt_bufs[salt_pos].salt_buf_pc[4];
45 s[5] = salt_bufs[salt_pos].salt_buf_pc[5];
46 s[6] = salt_bufs[salt_pos].salt_buf_pc[6];
47 s[7] = salt_bufs[salt_pos].salt_buf_pc[7];
49 const u32 r_00 = 0x80;
50 const u32 r_14 = 64 * 8;
58 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
60 const u32 w0r = bfs_buf[il_pos].i;
69 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
70 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
71 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
72 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
73 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
74 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
75 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
76 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
77 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
78 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
79 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
80 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
81 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
82 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
83 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
84 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
86 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
87 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
88 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
89 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
90 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
91 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
92 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
93 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
94 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
95 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
96 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
97 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
98 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
99 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
100 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
101 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
103 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
104 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
105 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
106 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
107 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
108 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
109 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
110 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
111 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
112 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
113 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
114 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
115 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
116 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
117 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
118 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
120 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
121 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
122 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
123 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
124 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
125 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
126 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
127 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
128 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
129 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
130 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
131 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
132 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
133 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
134 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
135 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
142 const u32 w0_t = s[0];
143 const u32 w1_t = s[1];
144 const u32 w2_t = s[2];
145 const u32 w3_t = s[3];
146 const u32 w4_t = s[4];
147 const u32 w5_t = s[5];
148 const u32 w6_t = s[6];
149 const u32 w7_t = s[7];
151 const u32 w8_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
152 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
153 const u32 w9_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
154 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
155 const u32 wa_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
156 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
157 const u32 wb_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
158 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
159 const u32 wc_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
160 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
161 const u32 wd_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
162 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
163 const u32 we_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
164 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
165 const u32 wf_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
166 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
173 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
174 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
175 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
176 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
177 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
178 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
179 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
180 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
181 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
182 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
183 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
184 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
185 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
186 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
187 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
188 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
190 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
191 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
192 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
193 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
194 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
195 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
196 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
197 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
198 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
199 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
200 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
201 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
202 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
203 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
204 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
205 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
207 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
208 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
209 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
210 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
211 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
212 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
213 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
214 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
215 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
216 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
217 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
218 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
219 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
220 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
221 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
222 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
224 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
225 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
226 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
227 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
228 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
229 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
230 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
231 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
232 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
233 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
234 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
235 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
236 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
237 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
238 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
239 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
241 const u32 r_a = a + MD5M_A;
242 const u32 r_b = b + MD5M_B;
243 const u32 r_c = c + MD5M_C;
244 const u32 r_d = d + MD5M_D;
251 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
252 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
253 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
254 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
255 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
256 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
257 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
258 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
259 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
260 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
261 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
262 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
263 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
264 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
265 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
266 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
268 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
269 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
270 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
271 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
272 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
273 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
274 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
275 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
276 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
277 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
278 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
279 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
280 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
281 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
282 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
283 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
285 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
286 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
287 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
288 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
289 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
290 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
291 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
292 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
293 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
294 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
295 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
296 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
297 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
298 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
299 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
300 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
302 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
303 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
304 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
305 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
306 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
307 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
308 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
309 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
310 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
311 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
312 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
313 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
314 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
315 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
316 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
317 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
333 static void m02810s (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 pw_len, __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, __local u32 l_bin2asc[256])
339 const u32 gid = get_global_id (0);
340 const u32 lid = get_local_id (0);
346 const u32 search[4] =
348 digests_buf[digests_offset].digest_buf[DGST_R0],
349 digests_buf[digests_offset].digest_buf[DGST_R1],
350 digests_buf[digests_offset].digest_buf[DGST_R2],
351 digests_buf[digests_offset].digest_buf[DGST_R3]
360 s[0] = salt_bufs[salt_pos].salt_buf_pc[0];
361 s[1] = salt_bufs[salt_pos].salt_buf_pc[1];
362 s[2] = salt_bufs[salt_pos].salt_buf_pc[2];
363 s[3] = salt_bufs[salt_pos].salt_buf_pc[3];
364 s[4] = salt_bufs[salt_pos].salt_buf_pc[4];
365 s[5] = salt_bufs[salt_pos].salt_buf_pc[5];
366 s[6] = salt_bufs[salt_pos].salt_buf_pc[6];
367 s[7] = salt_bufs[salt_pos].salt_buf_pc[7];
369 const u32 r_00 = 0x80;
370 const u32 r_14 = 64 * 8;
378 for (u32 il_pos = 0; il_pos < bfs_cnt; il_pos++)
380 const u32 w0r = bfs_buf[il_pos].i;
389 MD5_STEP (MD5_Fo, a, b, c, d, w0[0], MD5C00, MD5S00);
390 MD5_STEP (MD5_Fo, d, a, b, c, w0[1], MD5C01, MD5S01);
391 MD5_STEP (MD5_Fo, c, d, a, b, w0[2], MD5C02, MD5S02);
392 MD5_STEP (MD5_Fo, b, c, d, a, w0[3], MD5C03, MD5S03);
393 MD5_STEP (MD5_Fo, a, b, c, d, w1[0], MD5C04, MD5S00);
394 MD5_STEP (MD5_Fo, d, a, b, c, w1[1], MD5C05, MD5S01);
395 MD5_STEP (MD5_Fo, c, d, a, b, w1[2], MD5C06, MD5S02);
396 MD5_STEP (MD5_Fo, b, c, d, a, w1[3], MD5C07, MD5S03);
397 MD5_STEP (MD5_Fo, a, b, c, d, w2[0], MD5C08, MD5S00);
398 MD5_STEP (MD5_Fo, d, a, b, c, w2[1], MD5C09, MD5S01);
399 MD5_STEP (MD5_Fo, c, d, a, b, w2[2], MD5C0a, MD5S02);
400 MD5_STEP (MD5_Fo, b, c, d, a, w2[3], MD5C0b, MD5S03);
401 MD5_STEP (MD5_Fo, a, b, c, d, w3[0], MD5C0c, MD5S00);
402 MD5_STEP (MD5_Fo, d, a, b, c, w3[1], MD5C0d, MD5S01);
403 MD5_STEP (MD5_Fo, c, d, a, b, w3[2], MD5C0e, MD5S02);
404 MD5_STEP (MD5_Fo, b, c, d, a, w3[3], MD5C0f, MD5S03);
406 MD5_STEP (MD5_Go, a, b, c, d, w0[1], MD5C10, MD5S10);
407 MD5_STEP (MD5_Go, d, a, b, c, w1[2], MD5C11, MD5S11);
408 MD5_STEP (MD5_Go, c, d, a, b, w2[3], MD5C12, MD5S12);
409 MD5_STEP (MD5_Go, b, c, d, a, w0[0], MD5C13, MD5S13);
410 MD5_STEP (MD5_Go, a, b, c, d, w1[1], MD5C14, MD5S10);
411 MD5_STEP (MD5_Go, d, a, b, c, w2[2], MD5C15, MD5S11);
412 MD5_STEP (MD5_Go, c, d, a, b, w3[3], MD5C16, MD5S12);
413 MD5_STEP (MD5_Go, b, c, d, a, w1[0], MD5C17, MD5S13);
414 MD5_STEP (MD5_Go, a, b, c, d, w2[1], MD5C18, MD5S10);
415 MD5_STEP (MD5_Go, d, a, b, c, w3[2], MD5C19, MD5S11);
416 MD5_STEP (MD5_Go, c, d, a, b, w0[3], MD5C1a, MD5S12);
417 MD5_STEP (MD5_Go, b, c, d, a, w2[0], MD5C1b, MD5S13);
418 MD5_STEP (MD5_Go, a, b, c, d, w3[1], MD5C1c, MD5S10);
419 MD5_STEP (MD5_Go, d, a, b, c, w0[2], MD5C1d, MD5S11);
420 MD5_STEP (MD5_Go, c, d, a, b, w1[3], MD5C1e, MD5S12);
421 MD5_STEP (MD5_Go, b, c, d, a, w3[0], MD5C1f, MD5S13);
423 MD5_STEP (MD5_H , a, b, c, d, w1[1], MD5C20, MD5S20);
424 MD5_STEP (MD5_H , d, a, b, c, w2[0], MD5C21, MD5S21);
425 MD5_STEP (MD5_H , c, d, a, b, w2[3], MD5C22, MD5S22);
426 MD5_STEP (MD5_H , b, c, d, a, w3[2], MD5C23, MD5S23);
427 MD5_STEP (MD5_H , a, b, c, d, w0[1], MD5C24, MD5S20);
428 MD5_STEP (MD5_H , d, a, b, c, w1[0], MD5C25, MD5S21);
429 MD5_STEP (MD5_H , c, d, a, b, w1[3], MD5C26, MD5S22);
430 MD5_STEP (MD5_H , b, c, d, a, w2[2], MD5C27, MD5S23);
431 MD5_STEP (MD5_H , a, b, c, d, w3[1], MD5C28, MD5S20);
432 MD5_STEP (MD5_H , d, a, b, c, w0[0], MD5C29, MD5S21);
433 MD5_STEP (MD5_H , c, d, a, b, w0[3], MD5C2a, MD5S22);
434 MD5_STEP (MD5_H , b, c, d, a, w1[2], MD5C2b, MD5S23);
435 MD5_STEP (MD5_H , a, b, c, d, w2[1], MD5C2c, MD5S20);
436 MD5_STEP (MD5_H , d, a, b, c, w3[0], MD5C2d, MD5S21);
437 MD5_STEP (MD5_H , c, d, a, b, w3[3], MD5C2e, MD5S22);
438 MD5_STEP (MD5_H , b, c, d, a, w0[2], MD5C2f, MD5S23);
440 MD5_STEP (MD5_I , a, b, c, d, w0[0], MD5C30, MD5S30);
441 MD5_STEP (MD5_I , d, a, b, c, w1[3], MD5C31, MD5S31);
442 MD5_STEP (MD5_I , c, d, a, b, w3[2], MD5C32, MD5S32);
443 MD5_STEP (MD5_I , b, c, d, a, w1[1], MD5C33, MD5S33);
444 MD5_STEP (MD5_I , a, b, c, d, w3[0], MD5C34, MD5S30);
445 MD5_STEP (MD5_I , d, a, b, c, w0[3], MD5C35, MD5S31);
446 MD5_STEP (MD5_I , c, d, a, b, w2[2], MD5C36, MD5S32);
447 MD5_STEP (MD5_I , b, c, d, a, w0[1], MD5C37, MD5S33);
448 MD5_STEP (MD5_I , a, b, c, d, w2[0], MD5C38, MD5S30);
449 MD5_STEP (MD5_I , d, a, b, c, w3[3], MD5C39, MD5S31);
450 MD5_STEP (MD5_I , c, d, a, b, w1[2], MD5C3a, MD5S32);
451 MD5_STEP (MD5_I , b, c, d, a, w3[1], MD5C3b, MD5S33);
452 MD5_STEP (MD5_I , a, b, c, d, w1[0], MD5C3c, MD5S30);
453 MD5_STEP (MD5_I , d, a, b, c, w2[3], MD5C3d, MD5S31);
454 MD5_STEP (MD5_I , c, d, a, b, w0[2], MD5C3e, MD5S32);
455 MD5_STEP (MD5_I , b, c, d, a, w2[1], MD5C3f, MD5S33);
462 const u32 w0_t = s[0];
463 const u32 w1_t = s[1];
464 const u32 w2_t = s[2];
465 const u32 w3_t = s[3];
466 const u32 w4_t = s[4];
467 const u32 w5_t = s[5];
468 const u32 w6_t = s[6];
469 const u32 w7_t = s[7];
471 const u32 w8_t = uint_to_hex_lower8 ((a >> 0) & 255) << 0
472 | uint_to_hex_lower8 ((a >> 8) & 255) << 16;
473 const u32 w9_t = uint_to_hex_lower8 ((a >> 16) & 255) << 0
474 | uint_to_hex_lower8 ((a >> 24) & 255) << 16;
475 const u32 wa_t = uint_to_hex_lower8 ((b >> 0) & 255) << 0
476 | uint_to_hex_lower8 ((b >> 8) & 255) << 16;
477 const u32 wb_t = uint_to_hex_lower8 ((b >> 16) & 255) << 0
478 | uint_to_hex_lower8 ((b >> 24) & 255) << 16;
479 const u32 wc_t = uint_to_hex_lower8 ((c >> 0) & 255) << 0
480 | uint_to_hex_lower8 ((c >> 8) & 255) << 16;
481 const u32 wd_t = uint_to_hex_lower8 ((c >> 16) & 255) << 0
482 | uint_to_hex_lower8 ((c >> 24) & 255) << 16;
483 const u32 we_t = uint_to_hex_lower8 ((d >> 0) & 255) << 0
484 | uint_to_hex_lower8 ((d >> 8) & 255) << 16;
485 const u32 wf_t = uint_to_hex_lower8 ((d >> 16) & 255) << 0
486 | uint_to_hex_lower8 ((d >> 24) & 255) << 16;
493 MD5_STEP (MD5_Fo, a, b, c, d, w0_t, MD5C00, MD5S00);
494 MD5_STEP (MD5_Fo, d, a, b, c, w1_t, MD5C01, MD5S01);
495 MD5_STEP (MD5_Fo, c, d, a, b, w2_t, MD5C02, MD5S02);
496 MD5_STEP (MD5_Fo, b, c, d, a, w3_t, MD5C03, MD5S03);
497 MD5_STEP (MD5_Fo, a, b, c, d, w4_t, MD5C04, MD5S00);
498 MD5_STEP (MD5_Fo, d, a, b, c, w5_t, MD5C05, MD5S01);
499 MD5_STEP (MD5_Fo, c, d, a, b, w6_t, MD5C06, MD5S02);
500 MD5_STEP (MD5_Fo, b, c, d, a, w7_t, MD5C07, MD5S03);
501 MD5_STEP (MD5_Fo, a, b, c, d, w8_t, MD5C08, MD5S00);
502 MD5_STEP (MD5_Fo, d, a, b, c, w9_t, MD5C09, MD5S01);
503 MD5_STEP (MD5_Fo, c, d, a, b, wa_t, MD5C0a, MD5S02);
504 MD5_STEP (MD5_Fo, b, c, d, a, wb_t, MD5C0b, MD5S03);
505 MD5_STEP (MD5_Fo, a, b, c, d, wc_t, MD5C0c, MD5S00);
506 MD5_STEP (MD5_Fo, d, a, b, c, wd_t, MD5C0d, MD5S01);
507 MD5_STEP (MD5_Fo, c, d, a, b, we_t, MD5C0e, MD5S02);
508 MD5_STEP (MD5_Fo, b, c, d, a, wf_t, MD5C0f, MD5S03);
510 MD5_STEP (MD5_Go, a, b, c, d, w1_t, MD5C10, MD5S10);
511 MD5_STEP (MD5_Go, d, a, b, c, w6_t, MD5C11, MD5S11);
512 MD5_STEP (MD5_Go, c, d, a, b, wb_t, MD5C12, MD5S12);
513 MD5_STEP (MD5_Go, b, c, d, a, w0_t, MD5C13, MD5S13);
514 MD5_STEP (MD5_Go, a, b, c, d, w5_t, MD5C14, MD5S10);
515 MD5_STEP (MD5_Go, d, a, b, c, wa_t, MD5C15, MD5S11);
516 MD5_STEP (MD5_Go, c, d, a, b, wf_t, MD5C16, MD5S12);
517 MD5_STEP (MD5_Go, b, c, d, a, w4_t, MD5C17, MD5S13);
518 MD5_STEP (MD5_Go, a, b, c, d, w9_t, MD5C18, MD5S10);
519 MD5_STEP (MD5_Go, d, a, b, c, we_t, MD5C19, MD5S11);
520 MD5_STEP (MD5_Go, c, d, a, b, w3_t, MD5C1a, MD5S12);
521 MD5_STEP (MD5_Go, b, c, d, a, w8_t, MD5C1b, MD5S13);
522 MD5_STEP (MD5_Go, a, b, c, d, wd_t, MD5C1c, MD5S10);
523 MD5_STEP (MD5_Go, d, a, b, c, w2_t, MD5C1d, MD5S11);
524 MD5_STEP (MD5_Go, c, d, a, b, w7_t, MD5C1e, MD5S12);
525 MD5_STEP (MD5_Go, b, c, d, a, wc_t, MD5C1f, MD5S13);
527 MD5_STEP (MD5_H , a, b, c, d, w5_t, MD5C20, MD5S20);
528 MD5_STEP (MD5_H , d, a, b, c, w8_t, MD5C21, MD5S21);
529 MD5_STEP (MD5_H , c, d, a, b, wb_t, MD5C22, MD5S22);
530 MD5_STEP (MD5_H , b, c, d, a, we_t, MD5C23, MD5S23);
531 MD5_STEP (MD5_H , a, b, c, d, w1_t, MD5C24, MD5S20);
532 MD5_STEP (MD5_H , d, a, b, c, w4_t, MD5C25, MD5S21);
533 MD5_STEP (MD5_H , c, d, a, b, w7_t, MD5C26, MD5S22);
534 MD5_STEP (MD5_H , b, c, d, a, wa_t, MD5C27, MD5S23);
535 MD5_STEP (MD5_H , a, b, c, d, wd_t, MD5C28, MD5S20);
536 MD5_STEP (MD5_H , d, a, b, c, w0_t, MD5C29, MD5S21);
537 MD5_STEP (MD5_H , c, d, a, b, w3_t, MD5C2a, MD5S22);
538 MD5_STEP (MD5_H , b, c, d, a, w6_t, MD5C2b, MD5S23);
539 MD5_STEP (MD5_H , a, b, c, d, w9_t, MD5C2c, MD5S20);
540 MD5_STEP (MD5_H , d, a, b, c, wc_t, MD5C2d, MD5S21);
541 MD5_STEP (MD5_H , c, d, a, b, wf_t, MD5C2e, MD5S22);
542 MD5_STEP (MD5_H , b, c, d, a, w2_t, MD5C2f, MD5S23);
544 MD5_STEP (MD5_I , a, b, c, d, w0_t, MD5C30, MD5S30);
545 MD5_STEP (MD5_I , d, a, b, c, w7_t, MD5C31, MD5S31);
546 MD5_STEP (MD5_I , c, d, a, b, we_t, MD5C32, MD5S32);
547 MD5_STEP (MD5_I , b, c, d, a, w5_t, MD5C33, MD5S33);
548 MD5_STEP (MD5_I , a, b, c, d, wc_t, MD5C34, MD5S30);
549 MD5_STEP (MD5_I , d, a, b, c, w3_t, MD5C35, MD5S31);
550 MD5_STEP (MD5_I , c, d, a, b, wa_t, MD5C36, MD5S32);
551 MD5_STEP (MD5_I , b, c, d, a, w1_t, MD5C37, MD5S33);
552 MD5_STEP (MD5_I , a, b, c, d, w8_t, MD5C38, MD5S30);
553 MD5_STEP (MD5_I , d, a, b, c, wf_t, MD5C39, MD5S31);
554 MD5_STEP (MD5_I , c, d, a, b, w6_t, MD5C3a, MD5S32);
555 MD5_STEP (MD5_I , b, c, d, a, wd_t, MD5C3b, MD5S33);
556 MD5_STEP (MD5_I , a, b, c, d, w4_t, MD5C3c, MD5S30);
557 MD5_STEP (MD5_I , d, a, b, c, wb_t, MD5C3d, MD5S31);
558 MD5_STEP (MD5_I , c, d, a, b, w2_t, MD5C3e, MD5S32);
559 MD5_STEP (MD5_I , b, c, d, a, w9_t, MD5C3f, MD5S33);
561 const u32 r_a = a + MD5M_A;
562 const u32 r_b = b + MD5M_B;
563 const u32 r_c = c + MD5M_C;
564 const u32 r_d = d + MD5M_D;
571 MD5_STEP (MD5_Fo, a, b, c, d, r_00, MD5C00, MD5S00);
572 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C01, MD5S01);
573 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C02, MD5S02);
574 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C03, MD5S03);
575 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C04, MD5S00);
576 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C05, MD5S01);
577 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C06, MD5S02);
578 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C07, MD5S03);
579 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C08, MD5S00);
580 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C09, MD5S01);
581 MD5_STEP0(MD5_Fo, c, d, a, b, MD5C0a, MD5S02);
582 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0b, MD5S03);
583 MD5_STEP0(MD5_Fo, a, b, c, d, MD5C0c, MD5S00);
584 MD5_STEP0(MD5_Fo, d, a, b, c, MD5C0d, MD5S01);
585 MD5_STEP (MD5_Fo, c, d, a, b, r_14, MD5C0e, MD5S02);
586 MD5_STEP0(MD5_Fo, b, c, d, a, MD5C0f, MD5S03);
588 MD5_STEP0(MD5_Go, a, b, c, d, MD5C10, MD5S10);
589 MD5_STEP0(MD5_Go, d, a, b, c, MD5C11, MD5S11);
590 MD5_STEP0(MD5_Go, c, d, a, b, MD5C12, MD5S12);
591 MD5_STEP (MD5_Go, b, c, d, a, r_00, MD5C13, MD5S13);
592 MD5_STEP0(MD5_Go, a, b, c, d, MD5C14, MD5S10);
593 MD5_STEP0(MD5_Go, d, a, b, c, MD5C15, MD5S11);
594 MD5_STEP0(MD5_Go, c, d, a, b, MD5C16, MD5S12);
595 MD5_STEP0(MD5_Go, b, c, d, a, MD5C17, MD5S13);
596 MD5_STEP0(MD5_Go, a, b, c, d, MD5C18, MD5S10);
597 MD5_STEP (MD5_Go, d, a, b, c, r_14, MD5C19, MD5S11);
598 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1a, MD5S12);
599 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1b, MD5S13);
600 MD5_STEP0(MD5_Go, a, b, c, d, MD5C1c, MD5S10);
601 MD5_STEP0(MD5_Go, d, a, b, c, MD5C1d, MD5S11);
602 MD5_STEP0(MD5_Go, c, d, a, b, MD5C1e, MD5S12);
603 MD5_STEP0(MD5_Go, b, c, d, a, MD5C1f, MD5S13);
605 MD5_STEP0(MD5_H , a, b, c, d, MD5C20, MD5S20);
606 MD5_STEP0(MD5_H , d, a, b, c, MD5C21, MD5S21);
607 MD5_STEP0(MD5_H , c, d, a, b, MD5C22, MD5S22);
608 MD5_STEP (MD5_H , b, c, d, a, r_14, MD5C23, MD5S23);
609 MD5_STEP0(MD5_H , a, b, c, d, MD5C24, MD5S20);
610 MD5_STEP0(MD5_H , d, a, b, c, MD5C25, MD5S21);
611 MD5_STEP0(MD5_H , c, d, a, b, MD5C26, MD5S22);
612 MD5_STEP0(MD5_H , b, c, d, a, MD5C27, MD5S23);
613 MD5_STEP0(MD5_H , a, b, c, d, MD5C28, MD5S20);
614 MD5_STEP (MD5_H , d, a, b, c, r_00, MD5C29, MD5S21);
615 MD5_STEP0(MD5_H , c, d, a, b, MD5C2a, MD5S22);
616 MD5_STEP0(MD5_H , b, c, d, a, MD5C2b, MD5S23);
617 MD5_STEP0(MD5_H , a, b, c, d, MD5C2c, MD5S20);
618 MD5_STEP0(MD5_H , d, a, b, c, MD5C2d, MD5S21);
619 MD5_STEP0(MD5_H , c, d, a, b, MD5C2e, MD5S22);
620 MD5_STEP0(MD5_H , b, c, d, a, MD5C2f, MD5S23);
622 MD5_STEP (MD5_I , a, b, c, d, r_00, MD5C30, MD5S30);
623 MD5_STEP0(MD5_I , d, a, b, c, MD5C31, MD5S31);
624 MD5_STEP (MD5_I , c, d, a, b, r_14, MD5C32, MD5S32);
625 MD5_STEP0(MD5_I , b, c, d, a, MD5C33, MD5S33);
626 MD5_STEP0(MD5_I , a, b, c, d, MD5C34, MD5S30);
627 MD5_STEP0(MD5_I , d, a, b, c, MD5C35, MD5S31);
628 MD5_STEP0(MD5_I , c, d, a, b, MD5C36, MD5S32);
629 MD5_STEP0(MD5_I , b, c, d, a, MD5C37, MD5S33);
630 MD5_STEP0(MD5_I , a, b, c, d, MD5C38, MD5S30);
631 MD5_STEP0(MD5_I , d, a, b, c, MD5C39, MD5S31);
632 MD5_STEP0(MD5_I , c, d, a, b, MD5C3a, MD5S32);
633 MD5_STEP0(MD5_I , b, c, d, a, MD5C3b, MD5S33);
634 MD5_STEP0(MD5_I , a, b, c, d, MD5C3c, MD5S30);
636 if (allx ((a + r_a) != search[0])) continue;
638 MD5_STEP0(MD5_I , d, a, b, c, MD5C3d, MD5S31);
639 MD5_STEP0(MD5_I , c, d, a, b, MD5C3e, MD5S32);
640 MD5_STEP0(MD5_I , b, c, d, a, MD5C3f, MD5S33);
656 __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
662 const u32 gid = get_global_id (0);
663 const u32 lid = get_local_id (0);
664 const u32 lsz = get_local_size (0);
672 w0[0] = pws[gid].i[ 0];
673 w0[1] = pws[gid].i[ 1];
674 w0[2] = pws[gid].i[ 2];
675 w0[3] = pws[gid].i[ 3];
695 w3[2] = pws[gid].i[14];
698 const u32 pw_len = pws[gid].pw_len;
704 __local u32 l_bin2asc[256];
706 for (u32 i = lid; i < 256; i += lsz)
708 const u32 i0 = (i >> 0) & 15;
709 const u32 i1 = (i >> 4) & 15;
711 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
712 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
715 barrier (CLK_LOCAL_MEM_FENCE);
717 if (gid >= gid_max) return;
723 m02810m (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);
726 __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
732 const u32 gid = get_global_id (0);
733 const u32 lid = get_local_id (0);
734 const u32 lsz = get_local_size (0);
742 w0[0] = pws[gid].i[ 0];
743 w0[1] = pws[gid].i[ 1];
744 w0[2] = pws[gid].i[ 2];
745 w0[3] = pws[gid].i[ 3];
749 w1[0] = pws[gid].i[ 4];
750 w1[1] = pws[gid].i[ 5];
751 w1[2] = pws[gid].i[ 6];
752 w1[3] = pws[gid].i[ 7];
765 w3[2] = pws[gid].i[14];
768 const u32 pw_len = pws[gid].pw_len;
774 __local u32 l_bin2asc[256];
776 for (u32 i = lid; i < 256; i += lsz)
778 const u32 i0 = (i >> 0) & 15;
779 const u32 i1 = (i >> 4) & 15;
781 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
782 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
785 barrier (CLK_LOCAL_MEM_FENCE);
787 if (gid >= gid_max) return;
793 m02810m (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);
796 __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
802 const u32 gid = get_global_id (0);
803 const u32 lid = get_local_id (0);
804 const u32 lsz = get_local_size (0);
812 w0[0] = pws[gid].i[ 0];
813 w0[1] = pws[gid].i[ 1];
814 w0[2] = pws[gid].i[ 2];
815 w0[3] = pws[gid].i[ 3];
819 w1[0] = pws[gid].i[ 4];
820 w1[1] = pws[gid].i[ 5];
821 w1[2] = pws[gid].i[ 6];
822 w1[3] = pws[gid].i[ 7];
826 w2[0] = pws[gid].i[ 8];
827 w2[1] = pws[gid].i[ 9];
828 w2[2] = pws[gid].i[10];
829 w2[3] = pws[gid].i[11];
833 w3[0] = pws[gid].i[12];
834 w3[1] = pws[gid].i[13];
835 w3[2] = pws[gid].i[14];
836 w3[3] = pws[gid].i[15];
838 const u32 pw_len = pws[gid].pw_len;
844 __local u32 l_bin2asc[256];
846 for (u32 i = lid; i < 256; i += lsz)
848 const u32 i0 = (i >> 0) & 15;
849 const u32 i1 = (i >> 4) & 15;
851 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
852 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
855 barrier (CLK_LOCAL_MEM_FENCE);
857 if (gid >= gid_max) return;
863 m02810m (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);
866 __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
872 const u32 gid = get_global_id (0);
873 const u32 lid = get_local_id (0);
874 const u32 lsz = get_local_size (0);
882 w0[0] = pws[gid].i[ 0];
883 w0[1] = pws[gid].i[ 1];
884 w0[2] = pws[gid].i[ 2];
885 w0[3] = pws[gid].i[ 3];
905 w3[2] = pws[gid].i[14];
908 const u32 pw_len = pws[gid].pw_len;
914 __local u32 l_bin2asc[256];
916 for (u32 i = lid; i < 256; i += lsz)
918 const u32 i0 = (i >> 0) & 15;
919 const u32 i1 = (i >> 4) & 15;
921 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
922 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
925 barrier (CLK_LOCAL_MEM_FENCE);
927 if (gid >= gid_max) return;
933 m02810s (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);
936 __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
942 const u32 gid = get_global_id (0);
943 const u32 lid = get_local_id (0);
944 const u32 lsz = get_local_size (0);
952 w0[0] = pws[gid].i[ 0];
953 w0[1] = pws[gid].i[ 1];
954 w0[2] = pws[gid].i[ 2];
955 w0[3] = pws[gid].i[ 3];
959 w1[0] = pws[gid].i[ 4];
960 w1[1] = pws[gid].i[ 5];
961 w1[2] = pws[gid].i[ 6];
962 w1[3] = pws[gid].i[ 7];
975 w3[2] = pws[gid].i[14];
978 const u32 pw_len = pws[gid].pw_len;
984 __local u32 l_bin2asc[256];
986 for (u32 i = lid; i < 256; i += lsz)
988 const u32 i0 = (i >> 0) & 15;
989 const u32 i1 = (i >> 4) & 15;
991 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
992 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
995 barrier (CLK_LOCAL_MEM_FENCE);
997 if (gid >= gid_max) return;
1003 m02810s (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);
1006 __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 bfs_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max)
1012 const u32 gid = get_global_id (0);
1013 const u32 lid = get_local_id (0);
1014 const u32 lsz = get_local_size (0);
1022 w0[0] = pws[gid].i[ 0];
1023 w0[1] = pws[gid].i[ 1];
1024 w0[2] = pws[gid].i[ 2];
1025 w0[3] = pws[gid].i[ 3];
1029 w1[0] = pws[gid].i[ 4];
1030 w1[1] = pws[gid].i[ 5];
1031 w1[2] = pws[gid].i[ 6];
1032 w1[3] = pws[gid].i[ 7];
1036 w2[0] = pws[gid].i[ 8];
1037 w2[1] = pws[gid].i[ 9];
1038 w2[2] = pws[gid].i[10];
1039 w2[3] = pws[gid].i[11];
1043 w3[0] = pws[gid].i[12];
1044 w3[1] = pws[gid].i[13];
1045 w3[2] = pws[gid].i[14];
1046 w3[3] = pws[gid].i[15];
1048 const u32 pw_len = pws[gid].pw_len;
1054 __local u32 l_bin2asc[256];
1056 for (u32 i = lid; i < 256; i += lsz)
1058 const u32 i0 = (i >> 0) & 15;
1059 const u32 i1 = (i >> 4) & 15;
1061 l_bin2asc[i] = ((i0 < 10) ? '0' + i0 : 'a' - 10 + i0) << 8
1062 | ((i1 < 10) ? '0' + i1 : 'a' - 10 + i1) << 0;
1065 barrier (CLK_LOCAL_MEM_FENCE);
1067 if (gid >= gid_max) return;
1073 m02810s (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);