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

Backport changes to md4_update_vector_utf16le() in -m 1000 to -m 1100 and -m 5500

This commit is contained in:
jsteube 2023-02-09 15:18:58 +00:00
parent 079d5d5b97
commit 19b3ca87bc
2 changed files with 86 additions and 0 deletions

View File

@ -61,6 +61,33 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_VECTOR ())
w[0] = w0;
#if VECT_SIZE == 1
md4_ctx_t ctx0;
md4_init (&ctx0);
md4_update_utf16le (&ctx0, w, pw_len);
md4_final (&ctx0);
md4_ctx_t ctx;
md4_init (&ctx);
ctx.w0[0] = ctx0.h[0];
ctx.w0[1] = ctx0.h[1];
ctx.w0[2] = ctx0.h[2];
ctx.w0[3] = ctx0.h[3];
ctx.len = 16;
md4_update_utf16le (&ctx, s, salt_len);
md4_final (&ctx);
#else
md4_ctx_vector_t ctx0;
md4_init_vector (&ctx0);
@ -84,6 +111,8 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_VECTOR ())
md4_final_vector (&ctx);
#endif
const u32x r0 = ctx.h[DGST_R0];
const u32x r1 = ctx.h[DGST_R1];
const u32x r2 = ctx.h[DGST_R2];
@ -152,6 +181,33 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_VECTOR ())
w[0] = w0;
#if VECT_SIZE == 1
md4_ctx_t ctx0;
md4_init (&ctx0);
md4_update_utf16le (&ctx0, w, pw_len);
md4_final (&ctx0);
md4_ctx_t ctx;
md4_init (&ctx);
ctx.w0[0] = ctx0.h[0];
ctx.w0[1] = ctx0.h[1];
ctx.w0[2] = ctx0.h[2];
ctx.w0[3] = ctx0.h[3];
ctx.len = 16;
md4_update_utf16le (&ctx, s, salt_len);
md4_final (&ctx);
#else
md4_ctx_vector_t ctx0;
md4_init_vector (&ctx0);
@ -175,6 +231,8 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_VECTOR ())
md4_final_vector (&ctx);
#endif
const u32x r0 = ctx.h[DGST_R0];
const u32x r1 = ctx.h[DGST_R1];
const u32x r2 = ctx.h[DGST_R2];

View File

@ -586,6 +586,18 @@ KERNEL_FQ void m05500_mxx (KERN_ATTR_VECTOR ())
w[0] = w0;
#if VECT_SIZE == 1
md4_ctx_t ctx;
md4_init (&ctx);
md4_update_utf16le (&ctx, w, pw_len);
md4_final (&ctx);
#else
md4_ctx_vector_t ctx;
md4_init_vector (&ctx);
@ -594,6 +606,8 @@ KERNEL_FQ void m05500_mxx (KERN_ATTR_VECTOR ())
md4_final_vector (&ctx);
#endif
const u32x a = ctx.h[0];
const u32x b = ctx.h[1];
const u32x c = ctx.h[2];
@ -742,6 +756,18 @@ KERNEL_FQ void m05500_sxx (KERN_ATTR_VECTOR ())
w[0] = w0;
#if VECT_SIZE == 1
md4_ctx_t ctx;
md4_init (&ctx);
md4_update_utf16le (&ctx, w, pw_len);
md4_final (&ctx);
#else
md4_ctx_vector_t ctx;
md4_init_vector (&ctx);
@ -750,6 +776,8 @@ KERNEL_FQ void m05500_sxx (KERN_ATTR_VECTOR ())
md4_final_vector (&ctx);
#endif
const u32x a = ctx.h[0];
const u32x b = ctx.h[1];
const u32x c = ctx.h[2];