Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions module_code/module_19850.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE

u32 *digest = (u32 *) digest_buf;
u32 payload[4];
token_t token;
hc_token_t token;

memset (&token, 0, sizeof (hc_token_t));

token.token_cnt = 5;
/* 40 byte header
Expand Down Expand Up @@ -133,6 +135,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_interface_version = MODULE_INTERFACE_VERSION_CURRENT;

module_ctx->module_attack_exec = module_attack_exec;
module_ctx->module_benchmark_charset = MODULE_DEFAULT;
module_ctx->module_benchmark_esalt = MODULE_DEFAULT;
module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT;
module_ctx->module_benchmark_mask = MODULE_DEFAULT;
Expand All @@ -154,6 +157,7 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_hash_binary_count = MODULE_DEFAULT;
module_ctx->module_hash_binary_parse = MODULE_DEFAULT;
module_ctx->module_hash_binary_save = MODULE_DEFAULT;
module_ctx->module_hash_decode_postprocess = MODULE_DEFAULT;
module_ctx->module_hash_decode_potfile = MODULE_DEFAULT;
module_ctx->module_hash_decode_zero_hash = MODULE_DEFAULT;
module_ctx->module_hash_decode = module_hash_decode;
Expand Down Expand Up @@ -203,4 +207,4 @@ void module_init (module_ctx_t *module_ctx)
module_ctx->module_tmp_size = MODULE_DEFAULT;
module_ctx->module_unstable_warning = MODULE_DEFAULT;
module_ctx->module_warmup_disable = MODULE_DEFAULT;
}
}
34 changes: 17 additions & 17 deletions opencl_code/m19850_a0-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
*/

#ifdef KERNEL_STATIC
#include "inc_vendor.h"
#include "inc_types.h"
#include "inc_platform.cl"
#include "inc_common.cl"
#include "inc_rp.h"
#include "inc_rp.cl"
#include "inc_hash_sha1.cl"
#include "inc_cipher_aes.cl"
#include "inc_scalar.cl"
#include M2S(INCLUDE_PATH/inc_vendor.h)
#include M2S(INCLUDE_PATH/inc_types.h)
#include M2S(INCLUDE_PATH/inc_platform.cl)
#include M2S(INCLUDE_PATH/inc_common.cl)
#include M2S(INCLUDE_PATH/inc_rp.h)
#include M2S(INCLUDE_PATH/inc_rp.cl)
#include M2S(INCLUDE_PATH/inc_hash_sha1.cl)
#include M2S(INCLUDE_PATH/inc_cipher_aes.cl)
#include M2S(INCLUDE_PATH/inc_scalar.cl)
#endif

DECLSPEC void crypt_derive_key_password_derivation (sha1_hmac_ctx_t *ctx, const u32 *w, const int len)
Expand Down Expand Up @@ -139,15 +139,15 @@ KERNEL_FQ void m19850_mxx (KERN_ATTR_RULES())

#endif

if (gid >= gid_max) return;
if (gid >= GID_CNT) return;

COPY_PW (pws[gid]);

/**
* loop
*/

for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos++)
{
pw_t tmp = PASTE_PW;

Expand Down Expand Up @@ -196,7 +196,7 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_RULES())
const u64 lid = get_local_id (0);
const u64 lsz = get_local_size (0);

if (gid >= gid_max) return;
if (gid >= GID_CNT) return;

/**
* aes shared
Expand Down Expand Up @@ -251,10 +251,10 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_RULES())

const u32 search[4] =
{
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3]
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R0],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R1],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R2],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R3]
};

COPY_PW (pws[gid]);
Expand All @@ -263,7 +263,7 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_RULES())
* loop
*/

for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos++)
{
pw_t tmp = PASTE_PW;

Expand Down
34 changes: 17 additions & 17 deletions opencl_code/m19850_a1-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
*/

#ifdef KERNEL_STATIC
#include "inc_vendor.h"
#include "inc_types.h"
#include "inc_platform.cl"
#include "inc_common.cl"
#include "inc_rp.h"
#include "inc_rp.cl"
#include "inc_hash_sha1.cl"
#include "inc_cipher_aes.cl"
#include "inc_scalar.cl"
#include M2S(INCLUDE_PATH/inc_vendor.h)
#include M2S(INCLUDE_PATH/inc_types.h)
#include M2S(INCLUDE_PATH/inc_platform.cl)
#include M2S(INCLUDE_PATH/inc_common.cl)
#include M2S(INCLUDE_PATH/inc_rp.h)
#include M2S(INCLUDE_PATH/inc_rp.cl)
#include M2S(INCLUDE_PATH/inc_hash_sha1.cl)
#include M2S(INCLUDE_PATH/inc_cipher_aes.cl)
#include M2S(INCLUDE_PATH/inc_scalar.cl)
#endif

//CryptDeriveKey is basically sha1hmac if the input is forced to be greater than 64. Based on the code from sha1_hmac_init_vector and ipad from sha1_hmac_init_vector_64.
Expand Down Expand Up @@ -141,7 +141,7 @@ KERNEL_FQ void m19850_mxx (KERN_ATTR_BASIC())

#endif

if (gid >= gid_max) return;
if (gid >= GID_CNT) return;

//First call to sha1_update_global_utf16le_swap for the left hand side password (pws)
sha1_ctx_t tmp;
Expand All @@ -154,7 +154,7 @@ KERNEL_FQ void m19850_mxx (KERN_ATTR_BASIC())
* loop
*/

for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos++)
{
sha1_hmac_ctx_t sha1_hmac_ctx;
sha1_ctx_t pwsorig = tmp; //Make a copy of the existing sha1_ctx_t object already calculated for pws, per loop iteration
Expand Down Expand Up @@ -252,14 +252,14 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_BASIC())

#endif

if (gid >= gid_max) return;
if (gid >= GID_CNT) return;

const u32 search[4] =
{
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3]
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R0],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R1],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R2],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R3]
};

sha1_ctx_t tmp;
Expand All @@ -272,7 +272,7 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_BASIC())
* loop
*/

for (u32 il_pos = 0; il_pos < il_cnt; il_pos++)
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos++)
{
sha1_hmac_ctx_t sha1_hmac_ctx;
sha1_ctx_t pwsorig = tmp;
Expand Down
32 changes: 16 additions & 16 deletions opencl_code/m19850_a3-pure.cl
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#define NEW_SIMD_CODE

#ifdef KERNEL_STATIC
#include "inc_vendor.h"
#include "inc_types.h"
#include "inc_platform.cl"
#include "inc_common.cl"
#include "inc_simd.cl"
#include "inc_hash_sha1.cl"
#include "inc_cipher_aes.cl"
#include "inc_scalar.cl"
#include M2S(INCLUDE_PATH/inc_vendor.h)
#include M2S(INCLUDE_PATH/inc_types.h)
#include M2S(INCLUDE_PATH/inc_platform.cl)
#include M2S(INCLUDE_PATH/inc_common.cl)
#include M2S(INCLUDE_PATH/inc_simd.cl)
#include M2S(INCLUDE_PATH/inc_hash_sha1.cl)
#include M2S(INCLUDE_PATH/inc_cipher_aes.cl)
#include M2S(INCLUDE_PATH/inc_scalar.cl)
#endif

//CryptDeriveKey is basically sha1hmac if the input is forced to be greater than 64. Based on the code from sha1_hmac_init_vector and ipad from sha1_hmac_init_vector_64.
Expand Down Expand Up @@ -91,7 +91,7 @@ KERNEL_FQ void m19850_mxx (KERN_ATTR_VECTOR ())
const u64 gid = get_global_id (0);
const u64 lsz = get_local_size (0);

if (gid >= gid_max) return;
if (gid >= GID_CNT) return;
/**
* aes shared
*/
Expand Down Expand Up @@ -159,7 +159,7 @@ KERNEL_FQ void m19850_mxx (KERN_ATTR_VECTOR ())

u32x w0l = w[0];

for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos += VECT_SIZE)
{
const u32x w0r = words_buf_r[il_pos / VECT_SIZE];

Expand Down Expand Up @@ -213,7 +213,7 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_VECTOR ())
const u64 gid = get_global_id (0);
const u64 lsz = get_local_size (0);

if (gid >= gid_max) return;
if (gid >= GID_CNT) return;

/**
* aes shared
Expand Down Expand Up @@ -269,10 +269,10 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_VECTOR ())
//The compare_s code macro uses the search array to compare against
const u32 search[4] =
{
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R0],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R1],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R2],
digests_buf[DIGESTS_OFFSET].digest_buf[DGST_R3]
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R0],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R1],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R2],
digests_buf[DIGESTS_OFFSET_HOST].digest_buf[DGST_R3]
};


Expand All @@ -292,7 +292,7 @@ KERNEL_FQ void m19850_sxx (KERN_ATTR_VECTOR ())

u32x w0l = w[0];

for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE)
for (u32 il_pos = 0; il_pos < IL_CNT; il_pos += VECT_SIZE)
{
const u32x w0r = words_buf_r[il_pos / VECT_SIZE];

Expand Down