11-17-2022, 10:59 AM
I'm new to hashcat and recently working on DES BITSLICE (hashmode 14000-a3).
I've already known about the usage for these buffers:
salt_buf_pc for salted(or raw) plaintext;
digest_buf for digest(namely cipher);
I don't have a clue what should I supposed to put into these buffers:
mod buffer for modifier;
pws buffer for base password;
As far as I know, they are bounded to gid which is obtained from current GPU thread.
But I'm not sure how to combine mod and pws to expand to whole keyspace 2^56.
Here's the code for modifier:
Here's part of the code for combination:
I've already known about the usage for these buffers:
salt_buf_pc for salted(or raw) plaintext;
digest_buf for digest(namely cipher);
I don't have a clue what should I supposed to put into these buffers:
mod buffer for modifier;
pws buffer for base password;
As far as I know, they are bounded to gid which is obtained from current GPU thread.
But I'm not sure how to combine mod and pws to expand to whole keyspace 2^56.
Here's the code for modifier:
Code:
KERNEL_FQ void m14000_tm (GLOBAL_AS u32 *mod, GLOBAL_AS bs_word_t *words_buf_b)
{
const u64 gid = get_global_id (0);
const u32 block = gid / 32;
const u32 slice = gid % 32;
const u32 w0 = mod[gid];
#ifdef _unroll
#pragma unroll
#endif
for (int i = 0, j = 0; i < 32; i += 8, j += 7)
{
hc_atomic_or (&words_buf_b[block].b[j + 0], (((w0 >> (i + 7)) & 1) << slice));
hc_atomic_or (&words_buf_b[block].b[j + 1], (((w0 >> (i + 6)) & 1) << slice));
hc_atomic_or (&words_buf_b[block].b[j + 2], (((w0 >> (i + 5)) & 1) << slice));
hc_atomic_or (&words_buf_b[block].b[j + 3], (((w0 >> (i + 4)) & 1) << slice));
hc_atomic_or (&words_buf_b[block].b[j + 4], (((w0 >> (i + 3)) & 1) << slice));
hc_atomic_or (&words_buf_b[block].b[j + 5], (((w0 >> (i + 2)) & 1) << slice));
hc_atomic_or (&words_buf_b[block].b[j + 6], (((w0 >> (i + 1)) & 1) << slice));
}
}
Here's part of the code for combination:
Code:
const u32 w0 = pws[gid].i[0];
const u32 w1 = pws[gid].i[1];
#define K00 (((w0 >> ( 0 + 7)) & 1) ? -1 : 0)
#define K01 (((w0 >> ( 0 + 6)) & 1) ? -1 : 0)
#define K02 (((w0 >> ( 0 + 5)) & 1) ? -1 : 0)
#define K03 (((w0 >> ( 0 + 4)) & 1) ? -1 : 0)
#define K04 (((w0 >> ( 0 + 3)) & 1) ? -1 : 0)
#define K05 (((w0 >> ( 0 + 2)) & 1) ? -1 : 0)
#define K06 (((w0 >> ( 0 + 1)) & 1) ? -1 : 0)
#define K07 (((w0 >> ( 8 + 7)) & 1) ? -1 : 0)
#define K08 (((w0 >> ( 8 + 6)) & 1) ? -1 : 0)
#define K09 (((w0 >> ( 8 + 5)) & 1) ? -1 : 0)
#define K10 (((w0 >> ( 8 + 4)) & 1) ? -1 : 0)
#define K11 (((w0 >> ( 8 + 3)) & 1) ? -1 : 0)
#define K12 (((w0 >> ( 8 + 2)) & 1) ? -1 : 0)
#define K13 (((w0 >> ( 8 + 1)) & 1) ? -1 : 0)
#define K14 (((w0 >> (16 + 7)) & 1) ? -1 : 0)
#define K15 (((w0 >> (16 + 6)) & 1) ? -1 : 0)
#define K16 (((w0 >> (16 + 5)) & 1) ? -1 : 0)
#define K17 (((w0 >> (16 + 4)) & 1) ? -1 : 0)
#define K18 (((w0 >> (16 + 3)) & 1) ? -1 : 0)
#define K19 (((w0 >> (16 + 2)) & 1) ? -1 : 0)
#define K20 (((w0 >> (16 + 1)) & 1) ? -1 : 0)
#define K21 (((w0 >> (24 + 7)) & 1) ? -1 : 0)
#define K22 (((w0 >> (24 + 6)) & 1) ? -1 : 0)
#define K23 (((w0 >> (24 + 5)) & 1) ? -1 : 0)
#define K24 (((w0 >> (24 + 4)) & 1) ? -1 : 0)
#define K25 (((w0 >> (24 + 3)) & 1) ? -1 : 0)
#define K26 (((w0 >> (24 + 2)) & 1) ? -1 : 0)
#define K27 (((w0 >> (24 + 1)) & 1) ? -1 : 0)
...
k00 |= words_buf_s[pc_pos].b[ 0];
k01 |= words_buf_s[pc_pos].b[ 1];
k02 |= words_buf_s[pc_pos].b[ 2];
k03 |= words_buf_s[pc_pos].b[ 3];
k04 |= words_buf_s[pc_pos].b[ 4];
k05 |= words_buf_s[pc_pos].b[ 5];
k06 |= words_buf_s[pc_pos].b[ 6];
k07 |= words_buf_s[pc_pos].b[ 7];
k08 |= words_buf_s[pc_pos].b[ 8];
k09 |= words_buf_s[pc_pos].b[ 9];
k10 |= words_buf_s[pc_pos].b[10];
k11 |= words_buf_s[pc_pos].b[11];
k12 |= words_buf_s[pc_pos].b[12];
k13 |= words_buf_s[pc_pos].b[13];
k14 |= words_buf_s[pc_pos].b[14];
k15 |= words_buf_s[pc_pos].b[15];
k16 |= words_buf_s[pc_pos].b[16];
k17 |= words_buf_s[pc_pos].b[17];
k18 |= words_buf_s[pc_pos].b[18];
k19 |= words_buf_s[pc_pos].b[19];
k20 |= words_buf_s[pc_pos].b[20];
k21 |= words_buf_s[pc_pos].b[21];
k22 |= words_buf_s[pc_pos].b[22];
k23 |= words_buf_s[pc_pos].b[23];
k24 |= words_buf_s[pc_pos].b[24];
k25 |= words_buf_s[pc_pos].b[25];
k26 |= words_buf_s[pc_pos].b[26];
k27 |= words_buf_s[pc_pos].b[27];