mirror of
https://github.com/hashcat/hashcat
synced 2024-11-20 23:27:31 +01:00
Fix errors and make recommended changes, set pw_max to 9 for opti kernel
This commit is contained in:
parent
045f6d034e
commit
8711072838
@ -39,7 +39,11 @@ KERNEL_FQ void m27200_mxx (KERN_ATTR_RULES ())
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
ctx0.w0[0] = dash[0];
|
||||
ctx0.w0[1] = dash[1];
|
||||
|
||||
ctx0.len = 2;
|
||||
|
||||
sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len);
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
|
||||
@ -103,7 +107,11 @@ KERNEL_FQ void m27200_sxx (KERN_ATTR_RULES ())
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
ctx0.w0[0] = dash[0];
|
||||
ctx0.w0[1] = dash[1];
|
||||
|
||||
ctx0.len = 2;
|
||||
|
||||
sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len);
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
|
||||
|
@ -35,7 +35,11 @@ KERNEL_FQ void m27200_mxx (KERN_ATTR_BASIC ())
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
ctx0.w0[0] = dash[0];
|
||||
ctx0.w0[1] = dash[1];
|
||||
|
||||
ctx0.len = 2;
|
||||
|
||||
sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len);
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
|
||||
@ -95,7 +99,11 @@ KERNEL_FQ void m27200_sxx (KERN_ATTR_BASIC ())
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
ctx0.w0[0] = dash[0];
|
||||
ctx0.w0[1] = dash[1];
|
||||
|
||||
ctx0.len = 2;
|
||||
|
||||
sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len);
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
|
||||
|
@ -338,7 +338,7 @@ DECLSPEC void m27200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER
|
||||
* salt
|
||||
*/
|
||||
|
||||
u32 salt_buf0[4] = { 0x2d2d, 0, 0, 0 };
|
||||
u32 salt_buf0[4] = { 0x2d2d0000, 0, 0, 0 };
|
||||
u32 salt_buf1[4];
|
||||
u32 salt_buf2[4];
|
||||
u32 salt_buf3[4] = { 0 };
|
||||
@ -354,7 +354,7 @@ DECLSPEC void m27200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KER
|
||||
salt_buf2[0] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 7] >> 16 | salt_bufs[SALT_POS].salt_buf[ 8] << 16);
|
||||
salt_buf2[1] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 8] >> 16 | salt_bufs[SALT_POS].salt_buf[ 9] << 16);
|
||||
salt_buf2[2] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[ 9] >> 16 | 0x2d2d0000);
|
||||
salt_buf2[3] = hc_swap32_S (salt_bufs[SALT_POS].salt_buf[10]);
|
||||
salt_buf2[3] = 0;
|
||||
|
||||
const u32 salt_len = 44;
|
||||
|
||||
|
@ -25,7 +25,8 @@ KERNEL_FQ void m27200_mxx (KERN_ATTR_VECTOR ())
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
const u32x dash[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
const u32x dash_vector[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
const u32 dash_scalar[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
/**
|
||||
* base
|
||||
@ -44,9 +45,13 @@ KERNEL_FQ void m27200_mxx (KERN_ATTR_VECTOR ())
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
ctx0.w0[0] = dash_scalar[0];
|
||||
ctx0.w0[1] = dash_scalar[1];
|
||||
|
||||
ctx0.len = 2;
|
||||
|
||||
sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len);
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
sha1_update (&ctx0, dash_scalar, 2);
|
||||
|
||||
/**
|
||||
* loop
|
||||
@ -67,7 +72,7 @@ KERNEL_FQ void m27200_mxx (KERN_ATTR_VECTOR ())
|
||||
sha1_init_vector_from_scalar (&ctx, &ctx0);
|
||||
|
||||
sha1_update_vector (&ctx, w, pw_len);
|
||||
sha1_update_vector (&ctx, dash, 2);
|
||||
sha1_update_vector (&ctx, dash_vector, 2);
|
||||
|
||||
sha1_final_vector (&ctx);
|
||||
|
||||
@ -91,7 +96,8 @@ KERNEL_FQ void m27200_sxx (KERN_ATTR_VECTOR ())
|
||||
|
||||
if (gid >= gid_max) return;
|
||||
|
||||
const u32x dash[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
const u32x dash_vector[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
const u32 dash_scalar[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||
|
||||
/**
|
||||
* digest
|
||||
@ -122,9 +128,13 @@ KERNEL_FQ void m27200_sxx (KERN_ATTR_VECTOR ())
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
ctx0.w0[0] = dash_scalar[0];
|
||||
ctx0.w0[1] = dash_scalar[1];
|
||||
|
||||
ctx0.len = 2;
|
||||
|
||||
sha1_update_global_swap (&ctx0, salt_bufs[SALT_POS].salt_buf, salt_bufs[SALT_POS].salt_len);
|
||||
sha1_update (&ctx0, dash, 2);
|
||||
sha1_update (&ctx0, dash_scalar, 2);
|
||||
|
||||
/**
|
||||
* loop
|
||||
@ -145,7 +155,7 @@ KERNEL_FQ void m27200_sxx (KERN_ATTR_VECTOR ())
|
||||
sha1_init_vector_from_scalar (&ctx, &ctx0);
|
||||
|
||||
sha1_update_vector (&ctx, w, pw_len);
|
||||
sha1_update_vector (&ctx, dash, 2);
|
||||
sha1_update_vector (&ctx, dash_vector, 2);
|
||||
|
||||
sha1_final_vector (&ctx);
|
||||
|
||||
|
@ -53,7 +53,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
|
||||
|
||||
if (optimized_kernel == true)
|
||||
{
|
||||
pw_max = 29;
|
||||
pw_max = 9;
|
||||
}
|
||||
|
||||
return pw_max;
|
||||
|
@ -10,7 +10,7 @@ use warnings;
|
||||
|
||||
use Digest::SHA qw (sha1_hex);
|
||||
|
||||
sub module_constraints { [[0, 256], [40, 40], [0, 29], [40, 40], [-1, -1]] }
|
||||
sub module_constraints { [[0, 256], [40, 40], [0, 9], [40, 40], [-1, -1]] }
|
||||
|
||||
sub module_generate_hash
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user