mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-22 16:18:09 +00:00
rename function mul_mod to mul_mod128 for BigNum lib
This commit is contained in:
parent
8f365216e0
commit
9cfb2abc97
@ -846,7 +846,7 @@ DECLSPEC void mul_masked (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *x, PRIVATE_AS
|
|||||||
// m [128], modulo
|
// m [128], modulo
|
||||||
// fact[ 64], our m' (actually it is fact[65])
|
// fact[ 64], our m' (actually it is fact[65])
|
||||||
|
|
||||||
DECLSPEC void mul_mod (PRIVATE_AS u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact)
|
DECLSPEC void mul_mod128 (PRIVATE_AS u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact)
|
||||||
{
|
{
|
||||||
// 1st multiplication
|
// 1st multiplication
|
||||||
// p = x * y
|
// p = x * y
|
||||||
@ -1411,7 +1411,7 @@ DECLSPEC void pow_mod_precomp_g (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *b_pre,
|
|||||||
|
|
||||||
const u32 bit_set = (y[div] >> mod) & 1;
|
const u32 bit_set = (y[div] >> mod) & 1;
|
||||||
|
|
||||||
if (bit_set == 1) mul_mod (r, b_pre + i * 64, m, fact);
|
if (bit_set == 1) mul_mod128 (r, b_pre + i * 64, m, fact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1445,9 +1445,9 @@ DECLSPEC void pow_mod (PRIVATE_AS u32 *r, PRIVATE_AS u32 *x, PRIVATE_AS const u3
|
|||||||
|
|
||||||
const u32 bit_set = (y[div] >> mod) & 1;
|
const u32 bit_set = (y[div] >> mod) & 1;
|
||||||
|
|
||||||
if (bit_set == 1) mul_mod (r, x, m, fact);
|
if (bit_set == 1) mul_mod128 (r, x, m, fact);
|
||||||
|
|
||||||
mul_mod (x, x, m, fact);
|
mul_mod128 (x, x, m, fact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
DECLSPEC void mod_4096 (PRIVATE_AS u32 *n, PRIVATE_AS const u32 *m);
|
DECLSPEC void mod_4096 (PRIVATE_AS u32 *n, PRIVATE_AS const u32 *m);
|
||||||
DECLSPEC void mul (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y);
|
DECLSPEC void mul (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y);
|
||||||
DECLSPEC void mul_masked (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y);
|
DECLSPEC void mul_masked (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *x, PRIVATE_AS const u32 *y);
|
||||||
DECLSPEC void mul_mod (PRIVATE_AS u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact);
|
DECLSPEC void mul_mod128 (PRIVATE_AS u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact);
|
||||||
|
|
||||||
DECLSPEC void pow_mod_precomp_g (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *b_pre, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact);
|
DECLSPEC void pow_mod_precomp_g (PRIVATE_AS u32 *r, PRIVATE_AS const u32 *b_pre, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact);
|
||||||
DECLSPEC void pow_mod (PRIVATE_AS u32 *r, PRIVATE_AS u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact);
|
DECLSPEC void pow_mod (PRIVATE_AS u32 *r, PRIVATE_AS u32 *x, PRIVATE_AS const u32 *y, PRIVATE_AS const u32 *m, PRIVATE_AS const u32 *fact);
|
||||||
|
@ -276,7 +276,7 @@ KERNEL_FQ void m29200_mxx (KERN_ATTR_RULES_ESALT (radmin3_t))
|
|||||||
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
||||||
};
|
};
|
||||||
|
|
||||||
mul_mod (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
mul_mod128 (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 r0 = r_t[0];
|
const u32 r0 = r_t[0];
|
||||||
@ -544,7 +544,7 @@ KERNEL_FQ void m29200_sxx (KERN_ATTR_RULES_ESALT (radmin3_t))
|
|||||||
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
||||||
};
|
};
|
||||||
|
|
||||||
mul_mod (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
mul_mod128 (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 r0 = r_t[0];
|
const u32 r0 = r_t[0];
|
||||||
|
@ -279,7 +279,7 @@ KERNEL_FQ void m29200_mxx (KERN_ATTR_ESALT (radmin3_t))
|
|||||||
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
||||||
};
|
};
|
||||||
|
|
||||||
mul_mod (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
mul_mod128 (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 r0 = r_t[0];
|
const u32 r0 = r_t[0];
|
||||||
@ -552,7 +552,7 @@ KERNEL_FQ void m29200_sxx (KERN_ATTR_ESALT (radmin3_t))
|
|||||||
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
||||||
};
|
};
|
||||||
|
|
||||||
mul_mod (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
mul_mod128 (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 r0 = r_t[0];
|
const u32 r0 = r_t[0];
|
||||||
|
@ -286,7 +286,7 @@ KERNEL_FQ void m29200_mxx (KERN_ATTR_VECTOR_ESALT (radmin3_t))
|
|||||||
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
||||||
};
|
};
|
||||||
|
|
||||||
mul_mod (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
mul_mod128 (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 r0 = r_t[0];
|
const u32 r0 = r_t[0];
|
||||||
@ -567,7 +567,7 @@ KERNEL_FQ void m29200_sxx (KERN_ATTR_VECTOR_ESALT (radmin3_t))
|
|||||||
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
esalt_bufs[DIGESTS_OFFSET_HOST].pre[pre_idx + 63],
|
||||||
};
|
};
|
||||||
|
|
||||||
mul_mod (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
mul_mod128 (r_t, pre, m, fact); // r_t = (r_t * RADMIN3_PRE[n]) % m
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 r0 = r_t[0];
|
const u32 r0 = r_t[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user