mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-11 00:01:16 +00:00
Revert the pos == 0 change due to some unexpected results on nvidia
This commit is contained in:
parent
874635cc49
commit
a15c165773
@ -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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos);
|
||||
@ -226,7 +181,6 @@ DECLSPEC void md4_update_64 (md4_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u3
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_le (w0, w1, w2, w3, pos);
|
||||
@ -1392,7 +1301,6 @@ DECLSPEC void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x w0[4], u32x w1[4
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void md4_update_vector (md4_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos);
|
||||
@ -262,7 +217,6 @@ DECLSPEC void md5_update_64 (md5_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4], u3
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_le (w0, w1, w2, w3, pos);
|
||||
@ -1464,7 +1373,6 @@ DECLSPEC void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x w0[4], u32x w1[4
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -248,51 +248,6 @@ DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos);
|
||||
@ -360,7 +315,6 @@ DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 w0[4], u32 w1[4], u
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_le (w0, w1, w2, w3, pos);
|
||||
@ -1661,7 +1570,6 @@ DECLSPEC void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x w0[4
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void ripemd160_update_vector (ripemd160_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
|
||||
@ -292,7 +247,6 @@ DECLSPEC void sha1_update_64 (sha1_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[4],
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
|
||||
@ -1761,7 +1670,6 @@ DECLSPEC void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x w0[4], u32x w1
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void sha1_update_vector (sha1_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -165,51 +165,6 @@ DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
|
||||
@ -277,7 +232,6 @@ DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
|
||||
@ -1478,7 +1387,6 @@ DECLSPEC void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x w0[4], u32
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void sha224_update_vector (sha224_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -165,51 +165,6 @@ DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
|
||||
@ -277,7 +232,6 @@ DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2[
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
|
||||
@ -1478,7 +1387,6 @@ DECLSPEC void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x w0[4], u32
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void sha256_update_vector (sha256_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -189,83 +189,6 @@ DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos);
|
||||
@ -385,7 +308,6 @@ DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
|
||||
ctx->w7[3] = c7[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos);
|
||||
@ -2290,7 +2135,6 @@ DECLSPEC void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x w0[4], u3
|
||||
ctx->w7[3] = c7[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void sha384_update_vector (sha384_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -189,83 +189,6 @@ DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos);
|
||||
@ -385,7 +308,6 @@ DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 w0[4], u32 w1[4], u32 w2
|
||||
ctx->w7[3] = c7[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos);
|
||||
@ -2290,7 +2135,6 @@ DECLSPEC void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x w0[4], u3
|
||||
ctx->w7[3] = c7[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void sha512_update_vector (sha512_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
@ -1348,51 +1348,6 @@ DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos);
|
||||
@ -1460,7 +1415,6 @@ DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 w0[4], u32 w1[4], u
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
switch_buffer_by_offset_be (w0, w1, w2, w3, pos);
|
||||
@ -2765,7 +2674,6 @@ DECLSPEC void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x w0[4
|
||||
ctx->w3[3] = c3[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DECLSPEC void whirlpool_update_vector (whirlpool_ctx_vector_t *ctx, const u32x *w, const int len)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user