diff --git a/OpenCL/inc_hash_md4.cl b/OpenCL/inc_hash_md4.cl index 28720b25c..eeb28cd17 100644 --- a/OpenCL/inc_hash_md4.cl +++ b/OpenCL/inc_hash_md4.cl @@ -799,9 +799,7 @@ DECLSPEC void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md4_init (&ctx->ipad); - md4_transform (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + md4_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -824,9 +822,7 @@ DECLSPEC void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md4_init (&ctx->opad); - md4_transform (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + md4_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1686,9 +1682,7 @@ DECLSPEC void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x *w md4_init_vector (&ctx->ipad); - md4_transform_vector (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + md4_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1711,9 +1705,7 @@ DECLSPEC void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x *w md4_init_vector (&ctx->opad); - md4_transform_vector (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + md4_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_md5.cl b/OpenCL/inc_hash_md5.cl index 2fee96f96..3c52c1f40 100644 --- a/OpenCL/inc_hash_md5.cl +++ b/OpenCL/inc_hash_md5.cl @@ -835,9 +835,7 @@ DECLSPEC void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md5_init (&ctx->ipad); - md5_transform (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + md5_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -860,9 +858,7 @@ DECLSPEC void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md5_init (&ctx->opad); - md5_transform (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + md5_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1758,9 +1754,7 @@ DECLSPEC void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x *w md5_init_vector (&ctx->ipad); - md5_transform_vector (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + md5_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1783,9 +1777,7 @@ DECLSPEC void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x *w md5_init_vector (&ctx->opad); - md5_transform_vector (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + md5_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_ripemd160.cl b/OpenCL/inc_hash_ripemd160.cl index 703f0dcc8..bcf1074ac 100644 --- a/OpenCL/inc_hash_ripemd160.cl +++ b/OpenCL/inc_hash_ripemd160.cl @@ -933,9 +933,7 @@ DECLSPEC void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 *w0, ripemd160_init (&ctx->ipad); - ripemd160_transform (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + ripemd160_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -958,9 +956,7 @@ DECLSPEC void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 *w0, ripemd160_init (&ctx->opad); - ripemd160_transform (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + ripemd160_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1955,9 +1951,7 @@ DECLSPEC void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, c ripemd160_init_vector (&ctx->ipad); - ripemd160_transform_vector (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + ripemd160_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1980,9 +1974,7 @@ DECLSPEC void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, c ripemd160_init_vector (&ctx->opad); - ripemd160_transform_vector (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + ripemd160_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_sha1.cl b/OpenCL/inc_hash_sha1.cl index 0166bcad5..7f1da4105 100644 --- a/OpenCL/inc_hash_sha1.cl +++ b/OpenCL/inc_hash_sha1.cl @@ -1165,9 +1165,7 @@ DECLSPEC void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 *w0, const u32 sha1_init (&ctx->ipad); - sha1_transform (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + sha1_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1190,9 +1188,7 @@ DECLSPEC void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 *w0, const u32 sha1_init (&ctx->opad); - sha1_transform (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + sha1_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -2267,9 +2263,7 @@ DECLSPEC void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x sha1_init_vector (&ctx->ipad); - sha1_transform_vector (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + sha1_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -2292,9 +2286,7 @@ DECLSPEC void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x sha1_init_vector (&ctx->opad); - sha1_transform_vector (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + sha1_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_sha224.cl b/OpenCL/inc_hash_sha224.cl index e93206e44..72f3dac99 100644 --- a/OpenCL/inc_hash_sha224.cl +++ b/OpenCL/inc_hash_sha224.cl @@ -850,9 +850,7 @@ DECLSPEC void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 *w0, const sha224_init (&ctx->ipad); - sha224_transform (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + sha224_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -875,9 +873,7 @@ DECLSPEC void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 *w0, const sha224_init (&ctx->opad); - sha224_transform (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + sha224_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1814,9 +1810,7 @@ DECLSPEC void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u sha224_init_vector (&ctx->ipad); - sha224_transform_vector (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + sha224_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1839,9 +1833,7 @@ DECLSPEC void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u sha224_init_vector (&ctx->opad); - sha224_transform_vector (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + sha224_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_sha256.cl b/OpenCL/inc_hash_sha256.cl index de2bd5897..430b0e8b9 100644 --- a/OpenCL/inc_hash_sha256.cl +++ b/OpenCL/inc_hash_sha256.cl @@ -850,9 +850,7 @@ DECLSPEC void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 *w0, const sha256_init (&ctx->ipad); - sha256_transform (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + sha256_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -875,9 +873,7 @@ DECLSPEC void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 *w0, const sha256_init (&ctx->opad); - sha256_transform (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + sha256_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1814,9 +1810,7 @@ DECLSPEC void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u sha256_init_vector (&ctx->ipad); - sha256_transform_vector (t0, t1, t2, t3, ctx->ipad.h); - - ctx->ipad.len = 64; + sha256_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1839,9 +1833,7 @@ DECLSPEC void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u sha256_init_vector (&ctx->opad); - sha256_transform_vector (t0, t1, t2, t3, ctx->opad.h); - - ctx->opad.len = 64; + sha256_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_sha384.cl b/OpenCL/inc_hash_sha384.cl index ea26ec734..c145210d5 100644 --- a/OpenCL/inc_hash_sha384.cl +++ b/OpenCL/inc_hash_sha384.cl @@ -1358,9 +1358,7 @@ DECLSPEC void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 *w0, const sha384_init (&ctx->ipad); - sha384_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); - - ctx->ipad.len = 128; + sha384_update_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); // opad @@ -1399,9 +1397,7 @@ DECLSPEC void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 *w0, const sha384_init (&ctx->opad); - sha384_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); - - ctx->opad.len = 128; + sha384_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } DECLSPEC void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -2858,9 +2854,7 @@ DECLSPEC void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const sha384_init_vector (&ctx->ipad); - sha384_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); - - ctx->ipad.len = 128; + sha384_update_vector_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); // opad @@ -2899,9 +2893,7 @@ DECLSPEC void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const sha384_init_vector (&ctx->opad); - sha384_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); - - ctx->opad.len = 128; + sha384_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } DECLSPEC void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_sha512.cl b/OpenCL/inc_hash_sha512.cl index 783a66fbe..0f5ca288a 100644 --- a/OpenCL/inc_hash_sha512.cl +++ b/OpenCL/inc_hash_sha512.cl @@ -1358,9 +1358,7 @@ DECLSPEC void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 *w0, const sha512_init (&ctx->ipad); - sha512_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); - - ctx->ipad.len = 128; + sha512_update_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); // opad @@ -1399,9 +1397,7 @@ DECLSPEC void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 *w0, const sha512_init (&ctx->opad); - sha512_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); - - ctx->opad.len = 128; + sha512_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } DECLSPEC void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -2975,9 +2971,7 @@ DECLSPEC void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const sha512_init_vector (&ctx->ipad); - sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); - - ctx->ipad.len = 128; + sha512_update_vector_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); // opad @@ -3016,9 +3010,7 @@ DECLSPEC void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const sha512_init_vector (&ctx->opad); - sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); - - ctx->opad.len = 128; + sha512_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); } DECLSPEC void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) diff --git a/OpenCL/inc_hash_streebog256.cl b/OpenCL/inc_hash_streebog256.cl index 92534db1d..3983ef70a 100644 --- a/OpenCL/inc_hash_streebog256.cl +++ b/OpenCL/inc_hash_streebog256.cl @@ -1106,9 +1106,7 @@ DECLSPEC void streebog256_hmac_init_64 (streebog256_hmac_ctx_t *ctx, const u32 * streebog256_init (&ctx->ipad, s_sbob_sl64); - streebog256_transform (&ctx->ipad, t0, t1, t2, t3); - - ctx->ipad.len = 64; + streebog256_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1131,9 +1129,7 @@ DECLSPEC void streebog256_hmac_init_64 (streebog256_hmac_ctx_t *ctx, const u32 * streebog256_init (&ctx->opad, s_sbob_sl64); - streebog256_transform (&ctx->opad, t0, t1, t2, t3); - - ctx->opad.len = 64; + streebog256_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void streebog256_hmac_init (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) @@ -1752,9 +1748,7 @@ DECLSPEC void streebog256_hmac_init_vector_64 (streebog256_hmac_ctx_vector_t *ct streebog256_init_vector (&ctx->ipad, s_sbob_sl64); - streebog256_transform_vector (&ctx->ipad, t0, t1, t2, t3); - - ctx->ipad.len = 64; + streebog256_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1777,9 +1771,7 @@ DECLSPEC void streebog256_hmac_init_vector_64 (streebog256_hmac_ctx_vector_t *ct streebog256_init_vector (&ctx->opad, s_sbob_sl64); - streebog256_transform_vector (&ctx->opad, t0, t1, t2, t3); - - ctx->opad.len = 64; + streebog256_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void streebog256_hmac_init_vector (streebog256_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) diff --git a/OpenCL/inc_hash_streebog512.cl b/OpenCL/inc_hash_streebog512.cl index 08580981d..85aaea233 100644 --- a/OpenCL/inc_hash_streebog512.cl +++ b/OpenCL/inc_hash_streebog512.cl @@ -1106,9 +1106,7 @@ DECLSPEC void streebog512_hmac_init_64 (streebog512_hmac_ctx_t *ctx, const u32 * streebog512_init (&ctx->ipad, s_sbob_sl64); - streebog512_transform (&ctx->ipad, t0, t1, t2, t3); - - ctx->ipad.len = 64; + streebog512_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1131,9 +1129,7 @@ DECLSPEC void streebog512_hmac_init_64 (streebog512_hmac_ctx_t *ctx, const u32 * streebog512_init (&ctx->opad, s_sbob_sl64); - streebog512_transform (&ctx->opad, t0, t1, t2, t3); - - ctx->opad.len = 64; + streebog512_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void streebog512_hmac_init (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) @@ -1771,9 +1767,7 @@ DECLSPEC void streebog512_hmac_init_vector_64 (streebog512_hmac_ctx_vector_t *ct streebog512_init_vector (&ctx->ipad, s_sbob_sl64); - streebog512_transform_vector (&ctx->ipad, t0, t1, t2, t3); - - ctx->ipad.len = 64; + streebog512_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -1796,9 +1790,7 @@ DECLSPEC void streebog512_hmac_init_vector_64 (streebog512_hmac_ctx_vector_t *ct streebog512_init_vector (&ctx->opad, s_sbob_sl64); - streebog512_transform_vector (&ctx->opad, t0, t1, t2, t3); - - ctx->opad.len = 64; + streebog512_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void streebog512_hmac_init_vector (streebog512_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) diff --git a/OpenCL/inc_hash_whirlpool.cl b/OpenCL/inc_hash_whirlpool.cl index b4933e6f7..e4e1f22eb 100644 --- a/OpenCL/inc_hash_whirlpool.cl +++ b/OpenCL/inc_hash_whirlpool.cl @@ -2014,9 +2014,7 @@ DECLSPEC void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 *w0, whirlpool_init (&ctx->ipad, s_Ch, s_Cl); - whirlpool_transform (t0, t1, t2, t3, ctx->ipad.h, ctx->ipad.s_Ch, ctx->ipad.s_Cl); - - ctx->ipad.len = 64; + whirlpool_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -2039,9 +2037,7 @@ DECLSPEC void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 *w0, whirlpool_init (&ctx->opad, s_Ch, s_Cl); - whirlpool_transform (t0, t1, t2, t3, ctx->opad.h, ctx->opad.s_Ch, ctx->opad.s_Cl); - - ctx->opad.len = 64; + whirlpool_update_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void whirlpool_hmac_init (whirlpool_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) @@ -3056,9 +3052,7 @@ DECLSPEC void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, c whirlpool_init_vector (&ctx->ipad, s_Ch, s_Cl); - whirlpool_transform_vector (t0, t1, t2, t3, ctx->ipad.h, ctx->ipad.s_Ch, ctx->ipad.s_Cl); - - ctx->ipad.len = 64; + whirlpool_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); // opad @@ -3081,9 +3075,7 @@ DECLSPEC void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, c whirlpool_init_vector (&ctx->opad, s_Ch, s_Cl); - whirlpool_transform_vector (t0, t1, t2, t3, ctx->opad.h, ctx->opad.s_Ch, ctx->opad.s_Cl); - - ctx->opad.len = 64; + whirlpool_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); } DECLSPEC void whirlpool_hmac_init_vector (whirlpool_hmac_ctx_vector_t *ctx, const u32x *w, const int len, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256])