1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-01 04:12:44 +00:00

Revert the pos == 0 change due to some unexpected results on nvidia

This commit is contained in:
Jens Steube 2018-02-16 11:38:08 +01:00
parent 874635cc49
commit a15c165773
9 changed files with 1216 additions and 2172 deletions

View File

@ -114,51 +114,6 @@ DECLSPEC void md4_update_64 (md4_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u3
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
md4_transform (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos);
@ -225,7 +180,6 @@ DECLSPEC void md4_update_64 (md4_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u3
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void md4_update (md4_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void md4_update (md4_ctx_t *ctx, const u32 *w, const int len)
@ -1280,51 +1234,6 @@ DECLSPEC void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x w0[4], u32x w1[4
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
md4_transform_vector (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_le (w0, w1, w2, w3, pos); switch_buffer_by_offset_le (w0, w1, w2, w3, pos);
@ -1391,7 +1300,6 @@ DECLSPEC void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x w0[4], u32x w1[4
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -150,51 +150,6 @@ DECLSPEC void md5_update_64 (md5_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u3
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
md5_transform (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos);
@ -261,7 +216,6 @@ DECLSPEC void md5_update_64 (md5_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u3
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void md5_update (md5_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void md5_update (md5_ctx_t *ctx, const u32 *w, const int len)
@ -1352,51 +1306,6 @@ DECLSPEC void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x w0[4], u32x w1[4
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
md5_transform_vector (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_le (w0, w1, w2, w3, pos); switch_buffer_by_offset_le (w0, w1, w2, w3, pos);
@ -1463,7 +1372,6 @@ DECLSPEC void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x w0[4], u32x w1[4
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -248,51 +248,6 @@ DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
ripemd160_transform (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos);
@ -359,7 +314,6 @@ DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void ripemd160_update (ripemd160_ctx_t *ctx, const u32 *w, const int len)
@ -1549,51 +1503,6 @@ DECLSPEC void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x w0[4
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
ripemd160_transform_vector (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_le (w0, w1, w2, w3, pos); switch_buffer_by_offset_le (w0, w1, w2, w3, pos);
@ -1660,7 +1569,6 @@ DECLSPEC void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x w0[4
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -180,51 +180,6 @@ DECLSPEC void sha1_update_64 (sha1_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4],
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
sha1_transform (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
@ -291,7 +246,6 @@ DECLSPEC void sha1_update_64 (sha1_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4],
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void sha1_update (sha1_ctx_t *ctx, const u32 *w, const int len)
@ -1649,51 +1603,6 @@ DECLSPEC void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x w0[4], u32x w1
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
sha1_transform_vector (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be (w0, w1, w2, w3, pos); switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
@ -1760,7 +1669,6 @@ DECLSPEC void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x w0[4], u32x w1
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -165,51 +165,6 @@ DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
sha224_transform (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
@ -276,7 +231,6 @@ DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void sha224_update (sha224_ctx_t *ctx, const u32 *w, const int len)
@ -1366,51 +1320,6 @@ DECLSPEC void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x w0[4], u32
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
sha224_transform_vector (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be (w0, w1, w2, w3, pos); switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
@ -1477,7 +1386,6 @@ DECLSPEC void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x w0[4], u32
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -165,51 +165,6 @@ DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
sha256_transform (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
@ -276,7 +231,6 @@ DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void sha256_update (sha256_ctx_t *ctx, const u32 *w, const int len)
@ -1366,51 +1320,6 @@ DECLSPEC void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x w0[4], u32
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
sha256_transform_vector (w0, w1, w2, w3, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be (w0, w1, w2, w3, pos); switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
@ -1477,7 +1386,6 @@ DECLSPEC void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x w0[4], u32
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -189,83 +189,6 @@ DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 128)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
ctx->w4[0] = w4[0];
ctx->w4[1] = w4[1];
ctx->w4[2] = w4[2];
ctx->w4[3] = w4[3];
ctx->w5[0] = w5[0];
ctx->w5[1] = w5[1];
ctx->w5[2] = w5[2];
ctx->w5[3] = w5[3];
ctx->w6[0] = w6[0];
ctx->w6[1] = w6[1];
ctx->w6[2] = w6[2];
ctx->w6[3] = w6[3];
ctx->w7[0] = w7[0];
ctx->w7[1] = w7[1];
ctx->w7[2] = w7[2];
ctx->w7[3] = w7[3];
}
else
{
sha384_transform (w0, w1, w2, w3, w4, w5, w6, w7, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
ctx->w4[0] = 0;
ctx->w4[1] = 0;
ctx->w4[2] = 0;
ctx->w4[3] = 0;
ctx->w5[0] = 0;
ctx->w5[1] = 0;
ctx->w5[2] = 0;
ctx->w5[3] = 0;
ctx->w6[0] = 0;
ctx->w6[1] = 0;
ctx->w6[2] = 0;
ctx->w6[3] = 0;
ctx->w7[0] = 0;
ctx->w7[1] = 0;
ctx->w7[2] = 0;
ctx->w7[3] = 0;
}
}
else
{
if ((pos + len) < 128) if ((pos + len) < 128)
{ {
switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos); switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos);
@ -384,7 +307,6 @@ DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
ctx->w7[2] = c7[2]; ctx->w7[2] = c7[2];
ctx->w7[3] = c7[3]; ctx->w7[3] = c7[3];
} }
}
} }
DECLSPEC void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void sha384_update (sha384_ctx_t *ctx, const u32 *w, const int len)
@ -2094,83 +2016,6 @@ DECLSPEC void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x w0[4], u3
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 128)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
ctx->w4[0] = w4[0];
ctx->w4[1] = w4[1];
ctx->w4[2] = w4[2];
ctx->w4[3] = w4[3];
ctx->w5[0] = w5[0];
ctx->w5[1] = w5[1];
ctx->w5[2] = w5[2];
ctx->w5[3] = w5[3];
ctx->w6[0] = w6[0];
ctx->w6[1] = w6[1];
ctx->w6[2] = w6[2];
ctx->w6[3] = w6[3];
ctx->w7[0] = w7[0];
ctx->w7[1] = w7[1];
ctx->w7[2] = w7[2];
ctx->w7[3] = w7[3];
}
else
{
sha384_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
ctx->w4[0] = 0;
ctx->w4[1] = 0;
ctx->w4[2] = 0;
ctx->w4[3] = 0;
ctx->w5[0] = 0;
ctx->w5[1] = 0;
ctx->w5[2] = 0;
ctx->w5[3] = 0;
ctx->w6[0] = 0;
ctx->w6[1] = 0;
ctx->w6[2] = 0;
ctx->w6[3] = 0;
ctx->w7[0] = 0;
ctx->w7[1] = 0;
ctx->w7[2] = 0;
ctx->w7[3] = 0;
}
}
else
{
if ((pos + len) < 128) if ((pos + len) < 128)
{ {
switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos); switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos);
@ -2289,7 +2134,6 @@ DECLSPEC void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x w0[4], u3
ctx->w7[2] = c7[2]; ctx->w7[2] = c7[2];
ctx->w7[3] = c7[3]; ctx->w7[3] = c7[3];
} }
}
} }
DECLSPEC void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -189,83 +189,6 @@ DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 128)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
ctx->w4[0] = w4[0];
ctx->w4[1] = w4[1];
ctx->w4[2] = w4[2];
ctx->w4[3] = w4[3];
ctx->w5[0] = w5[0];
ctx->w5[1] = w5[1];
ctx->w5[2] = w5[2];
ctx->w5[3] = w5[3];
ctx->w6[0] = w6[0];
ctx->w6[1] = w6[1];
ctx->w6[2] = w6[2];
ctx->w6[3] = w6[3];
ctx->w7[0] = w7[0];
ctx->w7[1] = w7[1];
ctx->w7[2] = w7[2];
ctx->w7[3] = w7[3];
}
else
{
sha512_transform (w0, w1, w2, w3, w4, w5, w6, w7, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
ctx->w4[0] = 0;
ctx->w4[1] = 0;
ctx->w4[2] = 0;
ctx->w4[3] = 0;
ctx->w5[0] = 0;
ctx->w5[1] = 0;
ctx->w5[2] = 0;
ctx->w5[3] = 0;
ctx->w6[0] = 0;
ctx->w6[1] = 0;
ctx->w6[2] = 0;
ctx->w6[3] = 0;
ctx->w7[0] = 0;
ctx->w7[1] = 0;
ctx->w7[2] = 0;
ctx->w7[3] = 0;
}
}
else
{
if ((pos + len) < 128) if ((pos + len) < 128)
{ {
switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos); switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos);
@ -384,7 +307,6 @@ DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
ctx->w7[2] = c7[2]; ctx->w7[2] = c7[2];
ctx->w7[3] = c7[3]; ctx->w7[3] = c7[3];
} }
}
} }
DECLSPEC void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void sha512_update (sha512_ctx_t *ctx, const u32 *w, const int len)
@ -2094,83 +2016,6 @@ DECLSPEC void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x w0[4], u3
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 128)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
ctx->w4[0] = w4[0];
ctx->w4[1] = w4[1];
ctx->w4[2] = w4[2];
ctx->w4[3] = w4[3];
ctx->w5[0] = w5[0];
ctx->w5[1] = w5[1];
ctx->w5[2] = w5[2];
ctx->w5[3] = w5[3];
ctx->w6[0] = w6[0];
ctx->w6[1] = w6[1];
ctx->w6[2] = w6[2];
ctx->w6[3] = w6[3];
ctx->w7[0] = w7[0];
ctx->w7[1] = w7[1];
ctx->w7[2] = w7[2];
ctx->w7[3] = w7[3];
}
else
{
sha512_transform_vector (w0, w1, w2, w3, w4, w5, w6, w7, ctx->h);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
ctx->w4[0] = 0;
ctx->w4[1] = 0;
ctx->w4[2] = 0;
ctx->w4[3] = 0;
ctx->w5[0] = 0;
ctx->w5[1] = 0;
ctx->w5[2] = 0;
ctx->w5[3] = 0;
ctx->w6[0] = 0;
ctx->w6[1] = 0;
ctx->w6[2] = 0;
ctx->w6[3] = 0;
ctx->w7[0] = 0;
ctx->w7[1] = 0;
ctx->w7[2] = 0;
ctx->w7[3] = 0;
}
}
else
{
if ((pos + len) < 128) if ((pos + len) < 128)
{ {
switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos); switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos);
@ -2289,7 +2134,6 @@ DECLSPEC void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x w0[4], u3
ctx->w7[2] = c7[2]; ctx->w7[2] = c7[2];
ctx->w7[3] = c7[3]; ctx->w7[3] = c7[3];
} }
}
} }
DECLSPEC void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int len)

View File

@ -1348,51 +1348,6 @@ DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
whirlpool_transform (w0, w1, w2, w3, ctx->h, ctx->s_Ch, ctx->s_Cl);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
@ -1459,7 +1414,6 @@ DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int len) DECLSPEC void whirlpool_update (whirlpool_ctx_t *ctx, const u32 *w, const int len)
@ -2653,51 +2607,6 @@ DECLSPEC void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x w0[4
ctx->len += len; ctx->len += len;
if (pos == 0)
{
if (len < 64)
{
ctx->w0[0] = w0[0];
ctx->w0[1] = w0[1];
ctx->w0[2] = w0[2];
ctx->w0[3] = w0[3];
ctx->w1[0] = w1[0];
ctx->w1[1] = w1[1];
ctx->w1[2] = w1[2];
ctx->w1[3] = w1[3];
ctx->w2[0] = w2[0];
ctx->w2[1] = w2[1];
ctx->w2[2] = w2[2];
ctx->w2[3] = w2[3];
ctx->w3[0] = w3[0];
ctx->w3[1] = w3[1];
ctx->w3[2] = w3[2];
ctx->w3[3] = w3[3];
}
else
{
whirlpool_transform_vector (w0, w1, w2, w3, ctx->h, ctx->s_Ch, ctx->s_Cl);
ctx->w0[0] = 0;
ctx->w0[1] = 0;
ctx->w0[2] = 0;
ctx->w0[3] = 0;
ctx->w1[0] = 0;
ctx->w1[1] = 0;
ctx->w1[2] = 0;
ctx->w1[3] = 0;
ctx->w2[0] = 0;
ctx->w2[1] = 0;
ctx->w2[2] = 0;
ctx->w2[3] = 0;
ctx->w3[0] = 0;
ctx->w3[1] = 0;
ctx->w3[2] = 0;
ctx->w3[3] = 0;
}
}
else
{
if ((pos + len) < 64) if ((pos + len) < 64)
{ {
switch_buffer_by_offset_be (w0, w1, w2, w3, pos); switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
@ -2764,7 +2673,6 @@ DECLSPEC void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x w0[4
ctx->w3[2] = c3[2]; ctx->w3[2] = c3[2];
ctx->w3[3] = c3[3]; ctx->w3[3] = c3[3];
} }
}
} }
DECLSPEC void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len) DECLSPEC void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len)