1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-22 06:38:11 +00:00

More fixes for IS_UNKNOWN in kernels

This commit is contained in:
jsteube 2016-01-05 23:05:06 +01:00
parent 8e3a72f911
commit bacc1049e3
12 changed files with 35 additions and 35 deletions

View File

@ -9,7 +9,7 @@
static void switch_buffer_by_offset (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset)
{
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_mod_4 = offset & 3;
const int offset_minus_4 = 4 - offset;

View File

@ -144,7 +144,7 @@ static void make_unicode (const u32 in[4], u32 out1[4], u32 out2[4])
out1[0] = __byte_perm (in[0], 0, 0x7170);
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
out2[3] = ((in[3] >> 8) & 0x00FF0000) | ((in[3] >> 16) & 0x000000FF);
out2[2] = ((in[3] << 8) & 0x00FF0000) | ((in[3] >> 0) & 0x000000FF);
out2[1] = ((in[2] >> 8) & 0x00FF0000) | ((in[2] >> 16) & 0x000000FF);
@ -165,7 +165,7 @@ static void undo_unicode (const u32 in1[4], const u32 in2[4], u32 out[4])
out[3] = __byte_perm (in2[2], in2[3], 0x6420);
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
out[0] = ((in1[0] & 0x000000ff) >> 0) | ((in1[0] & 0x00ff0000) >> 8)
| ((in1[1] & 0x000000ff) << 16) | ((in1[1] & 0x00ff0000) << 8);
out[1] = ((in1[2] & 0x000000ff) >> 0) | ((in1[2] & 0x00ff0000) >> 8)
@ -3987,7 +3987,7 @@ static void append_0x80_1x16 (u32 w[16], const u32 offset)
static void switch_buffer_by_offset (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset)
{
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_mod_4 = offset & 3;
const int offset_minus_4 = 4 - offset;
@ -4701,7 +4701,7 @@ static void switch_buffer_by_offset (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4],
static void switch_buffer_by_offset_be (u32 w0[4], u32 w1[4], u32 w2[4], u32 w3[4], const u32 offset)
{
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
switch (offset / 4)
{
case 0:

View File

@ -131,7 +131,7 @@ static void memcat16 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4]
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - (block_len & 3);
@ -243,7 +243,7 @@ static void memcat16_x80 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - (block_len & 3);
@ -353,7 +353,7 @@ static void memcat8 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4],
u32 tmp1;
u32 tmp2;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - (block_len & 3);

View File

@ -1098,7 +1098,7 @@ static void append_salt (u32 w0[4], u32 w1[4], u32 w2[4], const u32 append[5], c
u32 tmp4;
u32 tmp5;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - (offset & 3);

View File

@ -128,7 +128,7 @@ static void memcat16 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4]
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - (block_len & 3);
@ -240,7 +240,7 @@ static void memcat16_x80 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - (block_len & 3);
@ -350,7 +350,7 @@ static void memcat8 (u32 block0[4], u32 block1[4], u32 block2[4], u32 block3[4],
u32 tmp1;
u32 tmp2;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - (block_len & 3);

View File

@ -205,7 +205,7 @@ static u32 memcat16 (u32 block[16], const u32 block_len, const u32 append[4], co
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - block_len;
tmp0 = amd_bytealign (append[0], 0, offset_minus_4);
@ -342,7 +342,7 @@ static u32 memcat16c (u32 block[16], const u32 block_len, const u32 append[4], c
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - block_len;
tmp0 = amd_bytealign (append[0], 0, offset_minus_4);
@ -505,7 +505,7 @@ static u32 memcat20 (u32 block[20], const u32 block_len, const u32 append[4], co
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - block_len;
tmp0 = amd_bytealign (append[0], 0, offset_minus_4);
@ -650,7 +650,7 @@ static u32 memcat20_x80 (u32 block[20], const u32 block_len, const u32 append[4]
u32 tmp3;
u32 tmp4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - block_len;
tmp0 = amd_bytealign (append[0], 0, offset_minus_4);

View File

@ -1198,7 +1198,7 @@ static void make_sc (u32 *sc, const u32 *pw, const u32 pw_len, const u32 *bl, co
u32 i;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
for (i = 0; i < pd; i++) sc[idx++] = pw[i];
sc[idx++] = pw[i]
| amd_bytealign (bl[0], 0, pm4);
@ -1229,7 +1229,7 @@ static void make_pt_with_offset (u32 *pt, const u32 offset, const u32 *sc, const
const u32 om = m % 4;
const u32 od = m / 4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
pt[0] = amd_bytealign (sc[od + 1], sc[od + 0], om);
pt[1] = amd_bytealign (sc[od + 2], sc[od + 1], om);
pt[2] = amd_bytealign (sc[od + 3], sc[od + 2], om);

View File

@ -29,7 +29,7 @@ static u32 memcat32 (u32 block0[16], u32 block1[16], const u32 block_len, const
const u32 mod = block_len & 3;
const u32 div = block_len / 4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - mod;
u32 append0_t[4];

View File

@ -27,7 +27,7 @@ static u32 memcat32 (u32 block0[16], u32 block1[16], const u32 block_len, const
const u32 mod = block_len & 3;
const u32 div = block_len / 4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - mod;
u32 append0_t[4];

View File

@ -27,7 +27,7 @@ static u32 memcat32 (u32 block0[16], u32 block1[16], const u32 block_len, const
const u32 mod = block_len & 3;
const u32 div = block_len / 4;
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - mod;
u32 append0_t[4];

View File

@ -1139,7 +1139,7 @@ static u32 memcat8c (u32 block[16], const u32 block_len, const u32 append[2], co
tmp2 = __byte_perm (append[1], 0, selector);
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - block_len;
tmp0 = amd_bytealign (append[0], 0, offset_minus_4);
@ -1272,7 +1272,7 @@ static u32 memcat32c (u32 block[16], const u32 block_len, const u32 append[8], c
tmp8 = __byte_perm (append[7], 0, selector);
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const int offset_minus_4 = 4 - block_len;
tmp0 = amd_bytealign (append[0], 0, offset_minus_4);

View File

@ -133,7 +133,7 @@ static void lshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 o
out1[3] = __byte_perm (in1[3], 0, 0x4321);
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
out0[0] = amd_bytealign (in0[1], in0[0], 1);
out0[1] = amd_bytealign (in0[2], in0[1], 1);
out0[2] = amd_bytealign (in0[3], in0[2], 1);
@ -158,7 +158,7 @@ static void rshift_block (const u32 in0[4], const u32 in1[4], u32 out0[4], u32 o
out0[0] = __byte_perm ( 0, in0[0], 0x6543);
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
out1[3] = amd_bytealign (in1[3], in1[2], 3);
out1[2] = amd_bytealign (in1[2], in1[1], 3);
out1[1] = amd_bytealign (in1[1], in1[0], 3);
@ -466,7 +466,7 @@ static void lshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
switch (num)
{
case 0: out0[0] = in0[0];
@ -1058,7 +1058,7 @@ static void rshift_block_N (const u32 in0[4], const u32 in1[4], u32 out0[4], u32
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
switch (num)
{
case 0: out1[3] = in1[3];
@ -1648,7 +1648,7 @@ static void append_block8 (const u32 offset, u32 dst0[4], u32 dst1[4], const u32
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
switch (offset)
{
case 0:
@ -2578,7 +2578,7 @@ static u32 rule_op_mangle_replace (const u32 p0, const u32 p1, u32 buf0[4], u32
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
const uchar4 tmp0 = (uchar4) (p0);
const uchar4 tmp1 = (uchar4) (p1);
@ -2793,7 +2793,7 @@ static u32 rule_op_mangle_dupechar_first (const u32 p0, const u32 p1, u32 buf0[4
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
switch (p0)
{
case 1: buf0[0] |= tmp << 0;
@ -3036,7 +3036,7 @@ static u32 rule_op_mangle_dupechar_all (const u32 p0, const u32 p1, u32 buf0[4],
buf1[3] = tib41[3];
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
tib40[0] = ((buf0[0] & 0x000000FF) << 0) | ((buf0[0] & 0x0000FF00) << 8);
tib40[1] = ((buf0[0] & 0x00FF0000) >> 16) | ((buf0[0] & 0xFF000000) >> 8);
tib40[2] = ((buf0[1] & 0x000000FF) << 0) | ((buf0[1] & 0x0000FF00) << 8);
@ -3069,7 +3069,7 @@ static u32 rule_op_mangle_switch_first (const u32 p0, const u32 p1, u32 buf0[4],
buf0[0] = __byte_perm (buf0[0], 0, 0x3201);
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
buf0[0] = (buf0[0] & 0xFFFF0000) | ((buf0[0] << 8) & 0x0000FF00) | ((buf0[0] >> 8) & 0x000000FF);
#endif
@ -3160,7 +3160,7 @@ static u32 rule_op_mangle_switch_last (const u32 p0, const u32 p1, u32 buf0[4],
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
switch (in_len)
{
case 2: buf0[0] = ((buf0[0] << 8) & 0x0000FF00) | ((buf0[0] >> 8) & 0x000000FF);
@ -3489,7 +3489,7 @@ static u32 rule_op_mangle_switch_at (const u32 p0, const u32 p1, u32 buf0[4], u3
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
switch (p0)
{
case 0: tmp0 = (buf0[0] >> 0) & 0xFF;
@ -4065,7 +4065,7 @@ static u32 rule_op_mangle_title (const u32 p0, const u32 p1, u32 buf0[4], u32 bu
}
#endif
#ifdef IS_AMD
#if defined IS_AMD || defined IS_UNKNOWN
u32 tib40[4];
u32 tib41[4];