mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-26 16:38:35 +00:00
Fix -m 2100 cracking if (password length & 31) == 0
This commit is contained in:
parent
83455817a7
commit
cea78024bf
@ -189,49 +189,49 @@ void md4_update (md4_ctx_t *ctx, const u32 *w, const int len)
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 64; i += 64, j += 16)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, 64);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, len & 63);
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, len - pos1);
|
||||
}
|
||||
|
||||
void md4_update_global (md4_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
@ -241,49 +241,49 @@ void md4_update_global (md4_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 64; i += 64, j += 16)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, 64);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, len & 63);
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, len - pos1);
|
||||
}
|
||||
|
||||
void md4_update_global_utf16le (md4_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
@ -293,19 +293,19 @@ void md4_update_global_utf16le (md4_ctx_t *ctx, const __global u32 *w, const int
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 32; i += 32, j += 8)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
|
||||
make_utf16le_S (w1, w2, w3);
|
||||
make_utf16le_S (w0, w0, w1);
|
||||
@ -313,19 +313,19 @@ void md4_update_global_utf16le (md4_ctx_t *ctx, const __global u32 *w, const int
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, 32 * 2);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
|
||||
make_utf16le_S (w1, w2, w3);
|
||||
make_utf16le_S (w0, w0, w1);
|
||||
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, (len & 31) * 2);
|
||||
md4_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);
|
||||
}
|
||||
|
||||
void md4_final (md4_ctx_t *ctx)
|
||||
@ -554,49 +554,49 @@ void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
u32x w2[4];
|
||||
u32x w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 64; i += 64, j += 16)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
md4_update_vector_64 (ctx, w0, w1, w2, w3, 64);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
md4_update_vector_64 (ctx, w0, w1, w2, w3, len & 63);
|
||||
md4_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1);
|
||||
}
|
||||
|
||||
void md4_final_vector (md4_ctx_vector_t *ctx)
|
||||
|
@ -254,49 +254,49 @@ void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len)
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 64; i += 64, j += 16)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, 64);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, len & 63);
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1);
|
||||
}
|
||||
|
||||
void sha1_update_global (sha1_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
@ -306,49 +306,49 @@ void sha1_update_global (sha1_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 64; i += 64, j += 16)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, 64);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, len & 63);
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1);
|
||||
}
|
||||
|
||||
void sha1_update_global_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
@ -358,27 +358,27 @@ void sha1_update_global_swap (sha1_ctx_t *ctx, const __global u32 *w, const int
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 64; i += 64, j += 16)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
w0[0] = swap32_S (w0[0]);
|
||||
w0[1] = swap32_S (w0[1]);
|
||||
@ -400,22 +400,22 @@ void sha1_update_global_swap (sha1_ctx_t *ctx, const __global u32 *w, const int
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, 64);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
w0[0] = swap32_S (w0[0]);
|
||||
w0[1] = swap32_S (w0[1]);
|
||||
@ -434,7 +434,7 @@ void sha1_update_global_swap (sha1_ctx_t *ctx, const __global u32 *w, const int
|
||||
w3[2] = swap32_S (w3[2]);
|
||||
w3[3] = swap32_S (w3[3]);
|
||||
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, len & 63);
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, len - pos1);
|
||||
}
|
||||
|
||||
void sha1_update_global_utf16le (sha1_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
@ -444,19 +444,19 @@ void sha1_update_global_utf16le (sha1_ctx_t *ctx, const __global u32 *w, const i
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 32; i += 32, j += 8)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
|
||||
make_utf16le_S (w1, w2, w3);
|
||||
make_utf16le_S (w0, w0, w1);
|
||||
@ -464,19 +464,19 @@ void sha1_update_global_utf16le (sha1_ctx_t *ctx, const __global u32 *w, const i
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, 32 * 2);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
|
||||
make_utf16le_S (w1, w2, w3);
|
||||
make_utf16le_S (w0, w0, w1);
|
||||
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, (len & 31) * 2);
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);
|
||||
}
|
||||
|
||||
void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, const __global u32 *w, const int len)
|
||||
@ -486,19 +486,19 @@ void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, const __global u32 *w, co
|
||||
u32 w2[4];
|
||||
u32 w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 32; i += 32, j += 8)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 32; pos1 += 32, pos4 += 8)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
|
||||
make_utf16le_S (w1, w2, w3);
|
||||
make_utf16le_S (w0, w0, w1);
|
||||
@ -523,14 +523,14 @@ void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, const __global u32 *w, co
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, 32 * 2);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
|
||||
make_utf16le_S (w1, w2, w3);
|
||||
make_utf16le_S (w0, w0, w1);
|
||||
@ -552,7 +552,7 @@ void sha1_update_global_utf16le_swap (sha1_ctx_t *ctx, const __global u32 *w, co
|
||||
w3[2] = swap32_S (w3[2]);
|
||||
w3[3] = swap32_S (w3[3]);
|
||||
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, (len & 31) * 2);
|
||||
sha1_update_64 (ctx, w0, w1, w2, w3, (len - pos1) * 2);
|
||||
}
|
||||
|
||||
void sha1_final (sha1_ctx_t *ctx)
|
||||
@ -970,49 +970,49 @@ void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
u32x w2[4];
|
||||
u32x w3[4];
|
||||
|
||||
int i;
|
||||
int j;
|
||||
int pos1;
|
||||
int pos4;
|
||||
|
||||
for (i = 0, j = 0; i < len - 64; i += 64, j += 16)
|
||||
for (pos1 = 0, pos4 = 0; pos1 < len - 64; pos1 += 64, pos4 += 16)
|
||||
{
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
sha1_update_vector_64 (ctx, w0, w1, w2, w3, 64);
|
||||
}
|
||||
|
||||
w0[0] = w[j + 0];
|
||||
w0[1] = w[j + 1];
|
||||
w0[2] = w[j + 2];
|
||||
w0[3] = w[j + 3];
|
||||
w1[0] = w[j + 4];
|
||||
w1[1] = w[j + 5];
|
||||
w1[2] = w[j + 6];
|
||||
w1[3] = w[j + 7];
|
||||
w2[0] = w[j + 8];
|
||||
w2[1] = w[j + 9];
|
||||
w2[2] = w[j + 10];
|
||||
w2[3] = w[j + 11];
|
||||
w3[0] = w[j + 12];
|
||||
w3[1] = w[j + 13];
|
||||
w3[2] = w[j + 14];
|
||||
w3[3] = w[j + 15];
|
||||
w0[0] = w[pos4 + 0];
|
||||
w0[1] = w[pos4 + 1];
|
||||
w0[2] = w[pos4 + 2];
|
||||
w0[3] = w[pos4 + 3];
|
||||
w1[0] = w[pos4 + 4];
|
||||
w1[1] = w[pos4 + 5];
|
||||
w1[2] = w[pos4 + 6];
|
||||
w1[3] = w[pos4 + 7];
|
||||
w2[0] = w[pos4 + 8];
|
||||
w2[1] = w[pos4 + 9];
|
||||
w2[2] = w[pos4 + 10];
|
||||
w2[3] = w[pos4 + 11];
|
||||
w3[0] = w[pos4 + 12];
|
||||
w3[1] = w[pos4 + 13];
|
||||
w3[2] = w[pos4 + 14];
|
||||
w3[3] = w[pos4 + 15];
|
||||
|
||||
sha1_update_vector_64 (ctx, w0, w1, w2, w3, len & 63);
|
||||
sha1_update_vector_64 (ctx, w0, w1, w2, w3, len - pos1);
|
||||
}
|
||||
|
||||
void sha1_final_vector (sha1_ctx_vector_t *ctx)
|
||||
|
@ -50,10 +50,10 @@ my $MAX_LEN = 55;
|
||||
|
||||
my @modes = (0, 10, 11, 12, 20, 21, 22, 23, 30, 40, 50, 60, 100, 101, 110, 111, 112, 120, 121, 122, 125, 130, 131, 132, 133, 140, 141, 150, 160, 200, 300, 400, 500, 600, 900, 1000, 1100, 1300, 1400, 1410, 1411, 1420, 1430, 1440, 1441, 1450, 1460, 1500, 1600, 1700, 1710, 1711, 1720, 1730, 1740, 1722, 1731, 1750, 1760, 1800, 2100, 2400, 2410, 2500, 2600, 2611, 2612, 2711, 2811, 3000, 3100, 3200, 3710, 3711, 3300, 3500, 3610, 3720, 3800, 3910, 4010, 4110, 4210, 4300, 4400, 4500, 4520, 4521, 4522, 4600, 4700, 4800, 4900, 5000, 5100, 5300, 5400, 5500, 5600, 5700, 5800, 6000, 6100, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7000, 7100, 7200, 7300, 7400, 7500, 7700, 7800, 7900, 8000, 8100, 8200, 8300, 8400, 8500, 8600, 8700, 8900, 9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000, 10100, 10200, 10300, 10400, 10500, 10600, 10700, 10800, 10900, 11000, 11100, 11200, 11300, 11400, 11500, 11600, 11900, 12000, 12001, 12100, 12200, 12300, 12400, 12600, 12700, 12800, 12900, 13000, 13100, 13200, 13300, 13400, 13500, 13600, 13800, 13900, 14000, 14100, 14400, 14700, 14800, 14900, 15000, 15100, 15200, 15300, 15400, 15500, 15600, 15700, 99999);
|
||||
|
||||
#my %is_utf16le = map { $_ => 1 } qw (30 40 130 131 132 133 140 141 1000 1100 1430 1440 1441 1730 1740 1731 5500 5600 8000 9400 9500 9600 9700 9800 11600 13500 13800);
|
||||
my %is_utf16le = map { $_ => 1 } qw (30 40 130 131 132 133 140 141 1000 1100 1430 1440 1441 1730 1740 1731 2100 5500 5600 8000 9400 9500 9600 9700 9800 11600 13500 13800);
|
||||
#my %is_utf16le = map { $_ => 1 } qw (30 40 130 131 132 133 140 141 1000 1100 1430 1440 1441 1730 1740 1731 2100 5500 5600 8000 9400 9500 9600 9700 9800 11600 13500 13800);
|
||||
my %is_utf16le = map { $_ => 1 } qw (30 40 130 131 132 133 140 141 1000 1100 1430 1440 1441 1730 1740 1731 5500 5600 8000 9400 9500 9600 9700 9800 11600 13500 13800);
|
||||
my %less_fifteen = map { $_ => 1 } qw (500 1600 1800 2400 2410 3200 6300 7400 10500 10700);
|
||||
my %allow_long_salt = map { $_ => 1 } qw (2500 4520 4521 5500 5600 7100 7200 7300 9400 9500 9600 9700 9800 10400 10500 10600 10700 1100 11000 11200 11300 11400 11600 12600 13500 13800 15000);
|
||||
my %allow_long_salt = map { $_ => 1 } qw (2100 2500 4520 4521 5500 5600 7100 7200 7300 9400 9500 9600 9700 9800 10400 10500 10600 10700 1100 11000 11200 11300 11400 11600 12600 13500 13800 15000);
|
||||
|
||||
my @lotus_magic_table =
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user