1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 22:58:30 +00:00

Removed unnecessary changes made to inc_common.h and made the proper adjustments in the OpenCL kernels to inflict the changes

This commit is contained in:
Pikachu 2022-10-23 14:58:15 +03:00
parent 2a19e0c0bd
commit 2abe512634
6 changed files with 22 additions and 32 deletions

View File

@ -92,7 +92,6 @@
#if defined IS_CUDA || defined IS_HIP
#define _KERN_ATTR_BASIC() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, void)
#define _KERN_ATTR_BASIC_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, e)
#define _KERN_ATTR_BITSLICE() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bs_word_t *g_words_buf_s, void, void, void)
#define _KERN_ATTR_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, e)
#define _KERN_ATTR_RULES() KERN_ATTR (GLOBAL_AS, GLOBAL_AS const bf_t *g_bfs_buf, void, void, void)
@ -105,7 +104,6 @@
#define _KERN_ATTR_VECTOR_ESALT(e) KERN_ATTR (GLOBAL_AS, GLOBAL_AS const u32x *g_words_buf_r, void, void, e)
#else
#define _KERN_ATTR_BASIC() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, void, void, void)
#define _KERN_ATTR_BASIC_ESALT(e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, void, void, e)
#define _KERN_ATTR_BITSLICE() KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bs_word_t *words_buf_s, void, void, void)
#define _KERN_ATTR_ESALT(e) KERN_ATTR (GLOBAL_AS, CONSTANT_AS const bf_t *bfs_buf, void, void, e)
#define _KERN_ATTR_RULES() KERN_ATTR (CONSTANT_AS, GLOBAL_AS const bf_t *bfs_buf, void, void, void)
@ -147,7 +145,6 @@
#if defined IS_METAL
#define KERN_ATTR_BASIC() _KERN_ATTR_BASIC(), KERN_ATTR_MAIN_PARAMS
#define KERN_ATTR_BASIC_ESALT(e) _KERN_ATTR_BASIC_ESALT(e), KERN_ATTR_MAIN_PARAMS
#define KERN_ATTR_BITSLICE() _KERN_ATTR_BITSLICE(), KERN_ATTR_MAIN_PARAMS
#define KERN_ATTR_ESALT(e) _KERN_ATTR_ESALT(e), KERN_ATTR_MAIN_PARAMS
#define KERN_ATTR_RULES() _KERN_ATTR_RULES(), KERN_ATTR_MAIN_PARAMS
@ -161,7 +158,6 @@
#define KERN_ATTR_TM _KERN_ATTR_TM, KERN_ATTR_MAIN_PARAMS
#else // CUDA, HIP and OpenCL
#define KERN_ATTR_BASIC() _KERN_ATTR_BASIC()
#define KERN_ATTR_BASIC_ESALT(e) _KERN_ATTR_BASIC_ESALT(e)
#define KERN_ATTR_BITSLICE() _KERN_ATTR_BITSLICE()
#define KERN_ATTR_ESALT(e) _KERN_ATTR_ESALT(e)
#define KERN_ATTR_RULES() _KERN_ATTR_RULES()
@ -188,7 +184,6 @@
MAYBE_UNUSED const u64 lsz
#define KERN_ATTR_FUNC_BASIC() _KERN_ATTR_BASIC(), KERN_ATTR_FUNC_PARAMS
#define KERN_ATTR_FUNC_BASIC_ESALT(e) _KERN_ATTR_BASIC_ESALT(e), KERN_ATTR_FUNC_PARAMS
#define KERN_ATTR_FUNC_BITSLICE() _KERN_ATTR_BITSLICE(), KERN_ATTR_FUNC_PARAMS
#define KERN_ATTR_FUNC_ESALT(e) _KERN_ATTR_ESALT(e), KERN_ATTR_FUNC_PARAMS
#define KERN_ATTR_FUNC_RULES() _KERN_ATTR_RULES(), KERN_ATTR_FUNC_PARAMS

View File

@ -38,7 +38,7 @@ typedef struct md5_double_salt
} md5_double_salt_t;
KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_mxx (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* modifier
@ -96,12 +96,10 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
{
pw_t tmp = PASTE_PW;
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
md5_ctx_t ctx1 = ctx0;
md5_update (&ctx1, tmp.i, tmp.pw_len);
md5_update(&ctx1, pws[gid].i, pws[gid].pw_len);
md5_final (&ctx1);
const u32 a = ctx1.h[0];
@ -158,7 +156,7 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
}
}
KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_sxx (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* modifier
@ -228,11 +226,9 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
{
pw_t tmp = PASTE_PW;
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
md5_ctx_t ctx1 = ctx0;
md5_update (&ctx1, tmp.i, tmp.pw_len);
md5_update (&ctx1, pws[gid].i, pws[gid].pw_len);
md5_final (&ctx1);
@ -288,4 +284,4 @@ KERNEL_FQ void m03730_sxx (KERN_ATTR_RULES_ESALT (md5_double_salt_t))
COMPARE_S_SCALAR (r0, r1, r2, r3);
}
}
}

View File

@ -36,7 +36,7 @@ typedef struct md5_double_salt
} md5_double_salt_t;
KERNEL_FQ void m03730_m04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_m04 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* modifier
@ -455,15 +455,15 @@ KERNEL_FQ void m03730_m04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
}
}
KERNEL_FQ void m03730_m08 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_m08 (KERN_ATTR_ESALT (md5_double_salt_t))
{
}
KERNEL_FQ void m03730_m16 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_m16 (KERN_ATTR_ESALT (md5_double_salt_t))
{
}
KERNEL_FQ void m03730_s04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_s04 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* modifier
@ -897,10 +897,10 @@ KERNEL_FQ void m03730_s04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
}
}
KERNEL_FQ void m03730_s08 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_s08 (KERN_ATTR_ESALT (md5_double_salt_t))
{
}
KERNEL_FQ void m03730_s16 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_s16 (KERN_ATTR_ESALT (md5_double_salt_t))
{
}

View File

@ -36,7 +36,7 @@ typedef struct md5_double_salt
} md5_double_salt_t;
KERNEL_FQ void m03730_mxx (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_mxx (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* modifier
@ -152,7 +152,7 @@ KERNEL_FQ void m03730_mxx (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
}
}
KERNEL_FQ void m03730_sxx (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_sxx (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* modifier

View File

@ -36,7 +36,7 @@ typedef struct md5_double_salt
} md5_double_salt_t;
DECLSPEC void m03730m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC_ESALT (md5_double_salt_t), LOCAL_AS u32 *u_bin2asc)
DECLSPEC void m03730m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (md5_double_salt_t), LOCAL_AS u32 *u_bin2asc)
{
/**
* modifiers are taken from args
@ -370,7 +370,7 @@ DECLSPEC void m03730m (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w
}
}
DECLSPEC void m03730s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_BASIC_ESALT (md5_double_salt_t), LOCAL_AS u32 *u_bin2asc)
DECLSPEC void m03730s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w2, PRIVATE_AS u32 *w3, const u32 pw_len, KERN_ATTR_FUNC_ESALT (md5_double_salt_t), LOCAL_AS u32 *u_bin2asc)
{
/**
* modifiers are taken from args
@ -719,7 +719,7 @@ DECLSPEC void m03730s (PRIVATE_AS u32 *w0, PRIVATE_AS u32 *w1, PRIVATE_AS u32 *w
}
}
KERNEL_FQ void m03730_m04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_m04 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* base
@ -788,7 +788,7 @@ KERNEL_FQ void m03730_m04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
m03730m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, u_bin2asc);
}
KERNEL_FQ void m03730_m08 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_m08 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* base
@ -857,7 +857,7 @@ KERNEL_FQ void m03730_m08 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
m03730m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, u_bin2asc);
}
KERNEL_FQ void m03730_m16 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_m16 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* base
@ -927,7 +927,7 @@ KERNEL_FQ void m03730_m16 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
m03730m (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, u_bin2asc);
}
KERNEL_FQ void m03730_s04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_s04 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* base
@ -997,7 +997,7 @@ KERNEL_FQ void m03730_s04 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
m03730s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, u_bin2asc);
}
KERNEL_FQ void m03730_s08 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_s08 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* base
@ -1067,7 +1067,7 @@ KERNEL_FQ void m03730_s08 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
m03730s (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_extra0_buf, d_extra1_buf, d_extra2_buf, d_extra3_buf, kernel_param, gid, lid, lsz, u_bin2asc);
}
KERNEL_FQ void m03730_s16 (KERN_ATTR_BASIC_ESALT (md5_double_salt_t))
KERNEL_FQ void m03730_s16 (KERN_ATTR_ESALT (md5_double_salt_t))
{
/**
* base

View File

@ -200,7 +200,6 @@ void module_init (module_ctx_t *module_ctx)
{
module_ctx->module_context_size = MODULE_CONTEXT_SIZE_CURRENT;
module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT;
module_ctx->module_attack_exec = module_attack_exec;
module_ctx->module_benchmark_esalt = MODULE_DEFAULT;
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;