mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-22 05:31:11 +00:00
Speed up -m 19300 in general
This commit is contained in:
parent
44ecc83d82
commit
5920bd7f78
@ -43,22 +43,21 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_RULES_ESALT (sha1_double_salt_t))
|
||||
|
||||
COPY_PW (pws[gid]);
|
||||
|
||||
const int salt1_len = esalt_bufs[digests_offset].salt1_len;
|
||||
const int salt2_len = esalt_bufs[digests_offset].salt2_len;
|
||||
|
||||
u32 s1[64] = { 0 };
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt1_len; i += 4, idx += 1)
|
||||
{
|
||||
s1[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt1_buf[idx]);
|
||||
}
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]);
|
||||
}
|
||||
|
||||
sha1_ctx_t ctx0;
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
@ -69,11 +68,7 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_RULES_ESALT (sha1_double_salt_t))
|
||||
|
||||
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
|
||||
|
||||
sha1_ctx_t ctx;
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
sha1_update (&ctx, s1, salt1_len);
|
||||
sha1_ctx_t ctx = ctx0;
|
||||
|
||||
sha1_update_swap (&ctx, tmp.i, tmp.pw_len);
|
||||
|
||||
@ -119,22 +114,21 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_RULES_ESALT (sha1_double_salt_t))
|
||||
|
||||
COPY_PW (pws[gid]);
|
||||
|
||||
const int salt1_len = esalt_bufs[digests_offset].salt1_len;
|
||||
const int salt2_len = esalt_bufs[digests_offset].salt2_len;
|
||||
|
||||
u32 s1[64] = { 0 };
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt1_len; i += 4, idx += 1)
|
||||
{
|
||||
s1[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt1_buf[idx]);
|
||||
}
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]);
|
||||
}
|
||||
|
||||
sha1_ctx_t ctx0;
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
@ -145,11 +139,7 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_RULES_ESALT (sha1_double_salt_t))
|
||||
|
||||
tmp.pw_len = apply_rules (rules_buf[il_pos].cmds, tmp.i, tmp.pw_len);
|
||||
|
||||
sha1_ctx_t ctx;
|
||||
|
||||
sha1_init (&ctx);
|
||||
|
||||
sha1_update (&ctx, s1, salt1_len);
|
||||
sha1_ctx_t ctx = ctx0;
|
||||
|
||||
sha1_update_swap (&ctx, tmp.i, tmp.pw_len);
|
||||
|
||||
|
@ -39,19 +39,10 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_ESALT (sha1_double_salt_t))
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 salt_len = salt_bufs[salt_pos].salt_len;
|
||||
|
||||
const int salt1_len = esalt_bufs[digests_offset].salt1_len;
|
||||
const int salt2_len = esalt_bufs[digests_offset].salt2_len;
|
||||
|
||||
u32 s1[64] = { 0 };
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt1_len; i += 4, idx += 1)
|
||||
{
|
||||
s1[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt1_buf[idx]);
|
||||
}
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]);
|
||||
@ -61,7 +52,7 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_ESALT (sha1_double_salt_t))
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, s1, salt1_len);
|
||||
sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len);
|
||||
|
||||
sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len);
|
||||
|
||||
@ -115,19 +106,10 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_ESALT (sha1_double_salt_t))
|
||||
* base
|
||||
*/
|
||||
|
||||
const u32 salt_len = salt_bufs[salt_pos].salt_len;
|
||||
|
||||
const int salt1_len = esalt_bufs[digests_offset].salt1_len;
|
||||
const int salt2_len = esalt_bufs[digests_offset].salt2_len;
|
||||
|
||||
u32 s1[64] = { 0 };
|
||||
u32 s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt1_len; i += 4, idx += 1)
|
||||
{
|
||||
s1[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt1_buf[idx]);
|
||||
}
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]);
|
||||
@ -137,7 +119,7 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_ESALT (sha1_double_salt_t))
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update (&ctx0, s1, salt1_len);
|
||||
sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len);
|
||||
|
||||
sha1_update_global_swap (&ctx0, pws[gid].i, pws[gid].pw_len);
|
||||
|
||||
|
@ -48,22 +48,21 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t))
|
||||
w[idx] = pws[gid].i[idx];
|
||||
}
|
||||
|
||||
const int salt1_len = esalt_bufs[digests_offset].salt1_len;
|
||||
const int salt2_len = esalt_bufs[digests_offset].salt2_len;
|
||||
|
||||
u32x s1[64] = { 0 };
|
||||
u32x s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt1_len; i += 4, idx += 1)
|
||||
{
|
||||
s1[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt1_buf[idx]);
|
||||
}
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]);
|
||||
}
|
||||
|
||||
sha1_ctx_t ctx0;
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
@ -80,9 +79,7 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t))
|
||||
|
||||
sha1_ctx_vector_t ctx;
|
||||
|
||||
sha1_init_vector (&ctx);
|
||||
|
||||
sha1_update_vector (&ctx, s1, salt1_len);
|
||||
sha1_init_vector_from_scalar (&ctx, &ctx0);
|
||||
|
||||
sha1_update_vector (&ctx, w, pw_len);
|
||||
|
||||
@ -135,22 +132,21 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t))
|
||||
w[idx] = pws[gid].i[idx];
|
||||
}
|
||||
|
||||
const int salt1_len = esalt_bufs[digests_offset].salt1_len;
|
||||
const int salt2_len = esalt_bufs[digests_offset].salt2_len;
|
||||
|
||||
u32x s1[64] = { 0 };
|
||||
u32x s2[64] = { 0 };
|
||||
|
||||
for (int i = 0, idx = 0; i < salt1_len; i += 4, idx += 1)
|
||||
{
|
||||
s1[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt1_buf[idx]);
|
||||
}
|
||||
|
||||
for (int i = 0, idx = 0; i < salt2_len; i += 4, idx += 1)
|
||||
{
|
||||
s2[idx] = hc_swap32_S (esalt_bufs[digests_offset].salt2_buf[idx]);
|
||||
}
|
||||
|
||||
sha1_ctx_t ctx0;
|
||||
|
||||
sha1_init (&ctx0);
|
||||
|
||||
sha1_update_global_swap (&ctx0, esalt_bufs[digests_offset].salt1_buf, esalt_bufs[digests_offset].salt1_len);
|
||||
|
||||
/**
|
||||
* loop
|
||||
*/
|
||||
@ -167,9 +163,7 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t))
|
||||
|
||||
sha1_ctx_vector_t ctx;
|
||||
|
||||
sha1_init_vector (&ctx);
|
||||
|
||||
sha1_update_vector (&ctx, s1, salt1_len);
|
||||
sha1_init_vector_from_scalar (&ctx, &ctx0);
|
||||
|
||||
sha1_update_vector (&ctx, w, pw_len);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user