diff --git a/OpenCL/inc_common.cl b/OpenCL/inc_common.cl index 7001aad11..5f5c3eb45 100644 --- a/OpenCL/inc_common.cl +++ b/OpenCL/inc_common.cl @@ -377,7 +377,7 @@ DECLSPEC u64 hc_rotr64_S (const u64 a, const int n) DECLSPEC u64 hc_rotl64_S (const u64 a, const int n) { - return hc_rotr64_S (a, n); + return hc_rotr64_S (a, 64 - n); } #if HAS_VPERM diff --git a/OpenCL/inc_hash_md4.cl b/OpenCL/inc_hash_md4.cl index d02add1fb..07b267d24 100644 --- a/OpenCL/inc_hash_md4.cl +++ b/OpenCL/inc_hash_md4.cl @@ -110,71 +110,115 @@ DECLSPEC void md4_update_64 (md4_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + md4_transform (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_le_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_le_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - md4_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + md4_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -754,7 +798,9 @@ DECLSPEC void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md4_init (&ctx->ipad); - md4_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + md4_transform (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -777,7 +823,9 @@ DECLSPEC void md4_hmac_init_64 (md4_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md4_init (&ctx->opad); - md4_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + md4_transform (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void md4_hmac_init (md4_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1057,29 +1105,24 @@ DECLSPEC void md4_hmac_final (md4_hmac_ctx_t *ctx) { md4_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md4_update_64 (&ctx->opad, t0, t1, t2, t3, 16); + ctx->opad.len += 16; md4_final (&ctx->opad); } @@ -1210,71 +1253,115 @@ DECLSPEC void md4_update_vector_64 (md4_ctx_vector_t *ctx, u32x *w0, u32x *w1, u ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_le (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + md4_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_le (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_le (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_le (w0, w1, w2, w3, c0, c1, c2, c3, pos); - md4_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + md4_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1598,7 +1685,9 @@ DECLSPEC void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x *w md4_init_vector (&ctx->ipad); - md4_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + md4_transform_vector (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -1621,7 +1710,9 @@ DECLSPEC void md4_hmac_init_vector_64 (md4_hmac_ctx_vector_t *ctx, const u32x *w md4_init_vector (&ctx->opad); - md4_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + md4_transform_vector (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void md4_hmac_init_vector (md4_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -1695,29 +1786,24 @@ DECLSPEC void md4_hmac_final_vector (md4_hmac_ctx_vector_t *ctx) { md4_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md4_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 16); + ctx->opad.len += 16; md4_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_md5.cl b/OpenCL/inc_hash_md5.cl index b88bb32ea..e16646ec0 100644 --- a/OpenCL/inc_hash_md5.cl +++ b/OpenCL/inc_hash_md5.cl @@ -146,71 +146,115 @@ DECLSPEC void md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + md5_transform (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_le_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_le_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - md5_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + md5_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -790,7 +834,9 @@ DECLSPEC void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md5_init (&ctx->ipad); - md5_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + md5_transform (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -813,7 +859,9 @@ DECLSPEC void md5_hmac_init_64 (md5_hmac_ctx_t *ctx, const u32 *w0, const u32 *w md5_init (&ctx->opad); - md5_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + md5_transform (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void md5_hmac_init (md5_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1093,29 +1141,24 @@ DECLSPEC void md5_hmac_final (md5_hmac_ctx_t *ctx) { md5_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md5_update_64 (&ctx->opad, t0, t1, t2, t3, 16); + ctx->opad.len += 16; md5_final (&ctx->opad); } @@ -1282,71 +1325,115 @@ DECLSPEC void md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x *w1, u ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_le (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + md5_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_le (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_le (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_le (w0, w1, w2, w3, c0, c1, c2, c3, pos); - md5_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + md5_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1670,7 +1757,9 @@ DECLSPEC void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x *w md5_init_vector (&ctx->ipad); - md5_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + md5_transform_vector (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -1693,7 +1782,9 @@ DECLSPEC void md5_hmac_init_vector_64 (md5_hmac_ctx_vector_t *ctx, const u32x *w md5_init_vector (&ctx->opad); - md5_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + md5_transform_vector (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void md5_hmac_init_vector (md5_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -1767,29 +1858,24 @@ DECLSPEC void md5_hmac_final_vector (md5_hmac_ctx_vector_t *ctx) { md5_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = 0; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - md5_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 16); + ctx->opad.len += 16; md5_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_ripemd160.cl b/OpenCL/inc_hash_ripemd160.cl index a02e30452..13cbc7459 100644 --- a/OpenCL/inc_hash_ripemd160.cl +++ b/OpenCL/inc_hash_ripemd160.cl @@ -244,71 +244,115 @@ DECLSPEC void ripemd160_update_64 (ripemd160_ctx_t *ctx, u32 *w0, u32 *w1, u32 * ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + ripemd160_transform (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_le_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_le_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_le_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - ripemd160_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + ripemd160_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -888,7 +932,9 @@ DECLSPEC void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 *w0, ripemd160_init (&ctx->ipad); - ripemd160_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + ripemd160_transform (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -911,7 +957,9 @@ DECLSPEC void ripemd160_hmac_init_64 (ripemd160_hmac_ctx_t *ctx, const u32 *w0, ripemd160_init (&ctx->opad); - ripemd160_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + ripemd160_transform (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void ripemd160_hmac_init (ripemd160_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1191,29 +1239,24 @@ DECLSPEC void ripemd160_hmac_final (ripemd160_hmac_ctx_t *ctx) { ripemd160_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - ripemd160_update_64 (&ctx->opad, t0, t1, t2, t3, 20); + ctx->opad.len += 20; ripemd160_final (&ctx->opad); } @@ -1479,71 +1522,115 @@ DECLSPEC void ripemd160_update_vector_64 (ripemd160_ctx_vector_t *ctx, u32x *w0, ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_le (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + ripemd160_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_le (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_le (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_le (w0, w1, w2, w3, c0, c1, c2, c3, pos); - ripemd160_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + ripemd160_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1867,7 +1954,9 @@ DECLSPEC void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, c ripemd160_init_vector (&ctx->ipad); - ripemd160_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + ripemd160_transform_vector (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -1890,7 +1979,9 @@ DECLSPEC void ripemd160_hmac_init_vector_64 (ripemd160_hmac_ctx_vector_t *ctx, c ripemd160_init_vector (&ctx->opad); - ripemd160_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + ripemd160_transform_vector (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void ripemd160_hmac_init_vector (ripemd160_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -1964,29 +2055,24 @@ DECLSPEC void ripemd160_hmac_final_vector (ripemd160_hmac_ctx_vector_t *ctx) { ripemd160_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - ripemd160_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 20); + ctx->opad.len += 20; ripemd160_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_sha1.cl b/OpenCL/inc_hash_sha1.cl index 4efea16f0..cb85ce56f 100644 --- a/OpenCL/inc_hash_sha1.cl +++ b/OpenCL/inc_hash_sha1.cl @@ -176,71 +176,115 @@ DECLSPEC void sha1_update_64 (sha1_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + sha1_transform (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - sha1_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + sha1_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1056,7 +1100,9 @@ DECLSPEC void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 *w0, const u32 sha1_init (&ctx->ipad); - sha1_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + sha1_transform (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -1079,7 +1125,9 @@ DECLSPEC void sha1_hmac_init_64 (sha1_hmac_ctx_t *ctx, const u32 *w0, const u32 sha1_init (&ctx->opad); - sha1_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + sha1_transform (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void sha1_hmac_init (sha1_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1359,29 +1407,24 @@ DECLSPEC void sha1_hmac_final (sha1_hmac_ctx_t *ctx) { sha1_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha1_update_64 (&ctx->opad, t0, t1, t2, t3, 20); + ctx->opad.len += 20; sha1_final (&ctx->opad); } @@ -1579,71 +1622,115 @@ DECLSPEC void sha1_update_vector_64 (sha1_ctx_vector_t *ctx, u32x *w0, u32x *w1, ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + sha1_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); - sha1_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + sha1_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -2051,7 +2138,9 @@ DECLSPEC void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x sha1_init_vector (&ctx->ipad); - sha1_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + sha1_transform_vector (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -2074,7 +2163,9 @@ DECLSPEC void sha1_hmac_init_vector_64 (sha1_hmac_ctx_vector_t *ctx, const u32x sha1_init_vector (&ctx->opad); - sha1_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + sha1_transform_vector (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void sha1_hmac_init_vector (sha1_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -2148,29 +2239,24 @@ DECLSPEC void sha1_hmac_final_vector (sha1_hmac_ctx_vector_t *ctx) { sha1_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = 0; - t1[2] = 0; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha1_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 20); + ctx->opad.len += 20; sha1_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_sha224.cl b/OpenCL/inc_hash_sha224.cl index e8075b707..e20a5ecd8 100644 --- a/OpenCL/inc_hash_sha224.cl +++ b/OpenCL/inc_hash_sha224.cl @@ -161,71 +161,115 @@ DECLSPEC void sha224_update_64 (sha224_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u3 ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + sha224_transform (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - sha224_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + sha224_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -805,7 +849,9 @@ DECLSPEC void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 *w0, const sha224_init (&ctx->ipad); - sha224_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + sha224_transform (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -828,7 +874,9 @@ DECLSPEC void sha224_hmac_init_64 (sha224_hmac_ctx_t *ctx, const u32 *w0, const sha224_init (&ctx->opad); - sha224_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + sha224_transform (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void sha224_hmac_init (sha224_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1108,29 +1156,24 @@ DECLSPEC void sha224_hmac_final (sha224_hmac_ctx_t *ctx) { sha224_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = ctx->ipad.h[5]; + ctx->opad.w1[2] = ctx->ipad.h[6]; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = ctx->ipad.h[5]; - t1[2] = ctx->ipad.h[6]; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha224_update_64 (&ctx->opad, t0, t1, t2, t3, 28); + ctx->opad.len += 28; sha224_final (&ctx->opad); } @@ -1296,71 +1339,115 @@ DECLSPEC void sha224_update_vector_64 (sha224_ctx_vector_t *ctx, u32x *w0, u32x ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + sha224_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); - sha224_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + sha224_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1726,7 +1813,9 @@ DECLSPEC void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u sha224_init_vector (&ctx->ipad); - sha224_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + sha224_transform_vector (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -1749,7 +1838,9 @@ DECLSPEC void sha224_hmac_init_vector_64 (sha224_hmac_ctx_vector_t *ctx, const u sha224_init_vector (&ctx->opad); - sha224_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + sha224_transform_vector (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void sha224_hmac_init_vector (sha224_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -1823,29 +1914,24 @@ DECLSPEC void sha224_hmac_final_vector (sha224_hmac_ctx_vector_t *ctx) { sha224_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = ctx->ipad.h[5]; + ctx->opad.w1[2] = ctx->ipad.h[6]; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = ctx->ipad.h[5]; - t1[2] = ctx->ipad.h[6]; - t1[3] = 0; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha224_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 28); + ctx->opad.len += 28; sha224_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_sha256.cl b/OpenCL/inc_hash_sha256.cl index ee0cb762e..ca0525f07 100644 --- a/OpenCL/inc_hash_sha256.cl +++ b/OpenCL/inc_hash_sha256.cl @@ -161,71 +161,115 @@ DECLSPEC void sha256_update_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u3 ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -805,7 +849,9 @@ DECLSPEC void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 *w0, const sha256_init (&ctx->ipad); - sha256_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + sha256_transform (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -828,7 +874,9 @@ DECLSPEC void sha256_hmac_init_64 (sha256_hmac_ctx_t *ctx, const u32 *w0, const sha256_init (&ctx->opad); - sha256_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + sha256_transform (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void sha256_hmac_init (sha256_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1108,29 +1156,24 @@ DECLSPEC void sha256_hmac_final (sha256_hmac_ctx_t *ctx) { sha256_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = ctx->ipad.h[5]; + ctx->opad.w1[2] = ctx->ipad.h[6]; + ctx->opad.w1[3] = ctx->ipad.h[7]; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = ctx->ipad.h[5]; - t1[2] = ctx->ipad.h[6]; - t1[3] = ctx->ipad.h[7]; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha256_update_64 (&ctx->opad, t0, t1, t2, t3, 32); + ctx->opad.len += 32; sha256_final (&ctx->opad); } @@ -1296,71 +1339,115 @@ DECLSPEC void sha256_update_vector_64 (sha256_ctx_vector_t *ctx, u32x *w0, u32x ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + sha256_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); - sha256_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + sha256_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1726,7 +1813,9 @@ DECLSPEC void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u sha256_init_vector (&ctx->ipad); - sha256_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + sha256_transform_vector (t0, t1, t2, t3, ctx->ipad.h); + + ctx->ipad.len = 64; // opad @@ -1749,7 +1838,9 @@ DECLSPEC void sha256_hmac_init_vector_64 (sha256_hmac_ctx_vector_t *ctx, const u sha256_init_vector (&ctx->opad); - sha256_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + sha256_transform_vector (t0, t1, t2, t3, ctx->opad.h); + + ctx->opad.len = 64; } DECLSPEC void sha256_hmac_init_vector (sha256_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -1823,29 +1914,24 @@ DECLSPEC void sha256_hmac_final_vector (sha256_hmac_ctx_vector_t *ctx) { sha256_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[0]; + ctx->opad.w0[1] = ctx->ipad.h[1]; + ctx->opad.w0[2] = ctx->ipad.h[2]; + ctx->opad.w0[3] = ctx->ipad.h[3]; + ctx->opad.w1[0] = ctx->ipad.h[4]; + ctx->opad.w1[1] = ctx->ipad.h[5]; + ctx->opad.w1[2] = ctx->ipad.h[6]; + ctx->opad.w1[3] = ctx->ipad.h[7]; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = ctx->ipad.h[0]; - t0[1] = ctx->ipad.h[1]; - t0[2] = ctx->ipad.h[2]; - t0[3] = ctx->ipad.h[3]; - t1[0] = ctx->ipad.h[4]; - t1[1] = ctx->ipad.h[5]; - t1[2] = ctx->ipad.h[6]; - t1[3] = ctx->ipad.h[7]; - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - sha256_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 32); + ctx->opad.len += 32; sha256_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_sha384.cl b/OpenCL/inc_hash_sha384.cl index b37e3a003..0fa33469d 100644 --- a/OpenCL/inc_hash_sha384.cl +++ b/OpenCL/inc_hash_sha384.cl @@ -181,123 +181,199 @@ DECLSPEC void sha384_update_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u ctx->len += len; - if ((pos + len) < 128) + if (pos == 0) { - switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos); + 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]; - 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]; + if (len == 128) + { + sha384_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; - u32 c4[4] = { 0 }; - u32 c5[4] = { 0 }; - u32 c6[4] = { 0 }; - u32 c7[4] = { 0 }; + 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_carry_be_S (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; + u32 c4[4] = { 0 }; + u32 c5[4] = { 0 }; + u32 c6[4] = { 0 }; + u32 c7[4] = { 0 }; - 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]; + switch_buffer_by_offset_8x4_carry_be_S (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); - sha384_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + 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]; - ctx->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; - ctx->w4[0] = c4[0]; - ctx->w4[1] = c4[1]; - ctx->w4[2] = c4[2]; - ctx->w4[3] = c4[3]; - ctx->w5[0] = c5[0]; - ctx->w5[1] = c5[1]; - ctx->w5[2] = c5[2]; - ctx->w5[3] = c5[3]; - ctx->w6[0] = c6[0]; - ctx->w6[1] = c6[1]; - ctx->w6[2] = c6[2]; - ctx->w6[3] = c6[3]; - ctx->w7[0] = c7[0]; - ctx->w7[1] = c7[1]; - ctx->w7[2] = c7[2]; - ctx->w7[3] = c7[3]; + sha384_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + ctx->w4[0] = c4[0]; + ctx->w4[1] = c4[1]; + ctx->w4[2] = c4[2]; + ctx->w4[3] = c4[3]; + ctx->w5[0] = c5[0]; + ctx->w5[1] = c5[1]; + ctx->w5[2] = c5[2]; + ctx->w5[3] = c5[3]; + ctx->w6[0] = c6[0]; + ctx->w6[1] = c6[1]; + ctx->w6[2] = c6[2]; + ctx->w6[3] = c6[3]; + ctx->w7[0] = c7[0]; + ctx->w7[1] = c7[1]; + ctx->w7[2] = c7[2]; + ctx->w7[3] = c7[3]; + } } } @@ -1281,7 +1357,9 @@ DECLSPEC void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 *w0, const sha384_init (&ctx->ipad); - sha384_update_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha384_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); + + ctx->ipad.len = 128; // opad @@ -1320,7 +1398,9 @@ DECLSPEC void sha384_hmac_init_128 (sha384_hmac_ctx_t *ctx, const u32 *w0, const sha384_init (&ctx->opad); - sha384_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha384_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); + + ctx->opad.len = 128; } DECLSPEC void sha384_hmac_init (sha384_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1744,49 +1824,40 @@ DECLSPEC void sha384_hmac_final (sha384_hmac_ctx_t *ctx) { sha384_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - u32 t4[4]; - u32 t5[4]; - u32 t6[4]; - u32 t7[4]; + ctx->opad.w0[0] = h32_from_64_S (ctx->ipad.h[0]); + ctx->opad.w0[1] = l32_from_64_S (ctx->ipad.h[0]); + ctx->opad.w0[2] = h32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w0[3] = l32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w1[0] = h32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w1[1] = l32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w1[2] = h32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w1[3] = l32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w2[0] = h32_from_64_S (ctx->ipad.h[4]); + ctx->opad.w2[1] = l32_from_64_S (ctx->ipad.h[4]); + ctx->opad.w2[2] = h32_from_64_S (ctx->ipad.h[5]); + ctx->opad.w2[3] = l32_from_64_S (ctx->ipad.h[5]); + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; + ctx->opad.w4[0] = 0; + ctx->opad.w4[1] = 0; + ctx->opad.w4[2] = 0; + ctx->opad.w4[3] = 0; + ctx->opad.w5[0] = 0; + ctx->opad.w5[1] = 0; + ctx->opad.w5[2] = 0; + ctx->opad.w5[3] = 0; + ctx->opad.w6[0] = 0; + ctx->opad.w6[1] = 0; + ctx->opad.w6[2] = 0; + ctx->opad.w6[3] = 0; + ctx->opad.w7[0] = 0; + ctx->opad.w7[1] = 0; + ctx->opad.w7[2] = 0; + ctx->opad.w7[3] = 0; - t0[0] = h32_from_64_S (ctx->ipad.h[0]); - t0[1] = l32_from_64_S (ctx->ipad.h[0]); - t0[2] = h32_from_64_S (ctx->ipad.h[1]); - t0[3] = l32_from_64_S (ctx->ipad.h[1]); - t1[0] = h32_from_64_S (ctx->ipad.h[2]); - t1[1] = l32_from_64_S (ctx->ipad.h[2]); - t1[2] = h32_from_64_S (ctx->ipad.h[3]); - t1[3] = l32_from_64_S (ctx->ipad.h[3]); - t2[0] = h32_from_64_S (ctx->ipad.h[4]); - t2[1] = l32_from_64_S (ctx->ipad.h[4]); - t2[2] = h32_from_64_S (ctx->ipad.h[5]); - t2[3] = l32_from_64_S (ctx->ipad.h[5]); - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - t4[0] = 0; - t4[1] = 0; - t4[2] = 0; - t4[3] = 0; - t5[0] = 0; - t5[1] = 0; - t5[2] = 0; - t5[3] = 0; - t6[0] = 0; - t6[1] = 0; - t6[2] = 0; - t6[3] = 0; - t7[0] = 0; - t7[1] = 0; - t7[2] = 0; - t7[3] = 0; - - sha384_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 48); + ctx->opad.len += 48; sha384_final (&ctx->opad); } @@ -1984,123 +2055,199 @@ DECLSPEC void sha384_update_vector_128 (sha384_ctx_vector_t *ctx, u32x *w0, u32x ctx->len += len; - if ((pos + len) < 128) + if (pos == 0) { - switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos); + 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]; - 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]; + if (len == 128) + { + sha384_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; - u32x c4[4] = { 0 }; - u32x c5[4] = { 0 }; - u32x c6[4] = { 0 }; - u32x c7[4] = { 0 }; + if ((pos + len) < 128) + { + switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos); - switch_buffer_by_offset_8x4_carry_be (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; + u32x c4[4] = { 0 }; + u32x c5[4] = { 0 }; + u32x c6[4] = { 0 }; + u32x c7[4] = { 0 }; - 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]; + switch_buffer_by_offset_8x4_carry_be (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); - sha384_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + 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]; - ctx->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; - ctx->w4[0] = c4[0]; - ctx->w4[1] = c4[1]; - ctx->w4[2] = c4[2]; - ctx->w4[3] = c4[3]; - ctx->w5[0] = c5[0]; - ctx->w5[1] = c5[1]; - ctx->w5[2] = c5[2]; - ctx->w5[3] = c5[3]; - ctx->w6[0] = c6[0]; - ctx->w6[1] = c6[1]; - ctx->w6[2] = c6[2]; - ctx->w6[3] = c6[3]; - ctx->w7[0] = c7[0]; - ctx->w7[1] = c7[1]; - ctx->w7[2] = c7[2]; - ctx->w7[3] = c7[3]; + sha384_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + ctx->w4[0] = c4[0]; + ctx->w4[1] = c4[1]; + ctx->w4[2] = c4[2]; + ctx->w4[3] = c4[3]; + ctx->w5[0] = c5[0]; + ctx->w5[1] = c5[1]; + ctx->w5[2] = c5[2]; + ctx->w5[3] = c5[3]; + ctx->w6[0] = c6[0]; + ctx->w6[1] = c6[1]; + ctx->w6[2] = c6[2]; + ctx->w6[3] = c6[3]; + ctx->w7[0] = c7[0]; + ctx->w7[1] = c7[1]; + ctx->w7[2] = c7[2]; + ctx->w7[3] = c7[3]; + } } } @@ -2710,7 +2857,9 @@ DECLSPEC void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const sha384_init_vector (&ctx->ipad); - sha384_update_vector_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha384_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); + + ctx->ipad.len = 128; // opad @@ -2749,7 +2898,9 @@ DECLSPEC void sha384_hmac_init_vector_128 (sha384_hmac_ctx_vector_t *ctx, const sha384_init_vector (&ctx->opad); - sha384_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha384_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); + + ctx->opad.len = 128; } DECLSPEC void sha384_hmac_init_vector (sha384_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -2859,49 +3010,40 @@ DECLSPEC void sha384_hmac_final_vector (sha384_hmac_ctx_vector_t *ctx) { sha384_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; - u32x t4[4]; - u32x t5[4]; - u32x t6[4]; - u32x t7[4]; + ctx->opad.w0[0] = h32_from_64 (ctx->ipad.h[0]); + ctx->opad.w0[1] = l32_from_64 (ctx->ipad.h[0]); + ctx->opad.w0[2] = h32_from_64 (ctx->ipad.h[1]); + ctx->opad.w0[3] = l32_from_64 (ctx->ipad.h[1]); + ctx->opad.w1[0] = h32_from_64 (ctx->ipad.h[2]); + ctx->opad.w1[1] = l32_from_64 (ctx->ipad.h[2]); + ctx->opad.w1[2] = h32_from_64 (ctx->ipad.h[3]); + ctx->opad.w1[3] = l32_from_64 (ctx->ipad.h[3]); + ctx->opad.w2[0] = h32_from_64 (ctx->ipad.h[4]); + ctx->opad.w2[1] = l32_from_64 (ctx->ipad.h[4]); + ctx->opad.w2[2] = h32_from_64 (ctx->ipad.h[5]); + ctx->opad.w2[3] = l32_from_64 (ctx->ipad.h[5]); + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; + ctx->opad.w4[0] = 0; + ctx->opad.w4[1] = 0; + ctx->opad.w4[2] = 0; + ctx->opad.w4[3] = 0; + ctx->opad.w5[0] = 0; + ctx->opad.w5[1] = 0; + ctx->opad.w5[2] = 0; + ctx->opad.w5[3] = 0; + ctx->opad.w6[0] = 0; + ctx->opad.w6[1] = 0; + ctx->opad.w6[2] = 0; + ctx->opad.w6[3] = 0; + ctx->opad.w7[0] = 0; + ctx->opad.w7[1] = 0; + ctx->opad.w7[2] = 0; + ctx->opad.w7[3] = 0; - t0[0] = h32_from_64 (ctx->ipad.h[0]); - t0[1] = l32_from_64 (ctx->ipad.h[0]); - t0[2] = h32_from_64 (ctx->ipad.h[1]); - t0[3] = l32_from_64 (ctx->ipad.h[1]); - t1[0] = h32_from_64 (ctx->ipad.h[2]); - t1[1] = l32_from_64 (ctx->ipad.h[2]); - t1[2] = h32_from_64 (ctx->ipad.h[3]); - t1[3] = l32_from_64 (ctx->ipad.h[3]); - t2[0] = h32_from_64 (ctx->ipad.h[4]); - t2[1] = l32_from_64 (ctx->ipad.h[4]); - t2[2] = h32_from_64 (ctx->ipad.h[5]); - t2[3] = l32_from_64 (ctx->ipad.h[5]); - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - t4[0] = 0; - t4[1] = 0; - t4[2] = 0; - t4[3] = 0; - t5[0] = 0; - t5[1] = 0; - t5[2] = 0; - t5[3] = 0; - t6[0] = 0; - t6[1] = 0; - t6[2] = 0; - t6[3] = 0; - t7[0] = 0; - t7[1] = 0; - t7[2] = 0; - t7[3] = 0; - - sha384_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 48); + ctx->opad.len += 48; sha384_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_sha512.cl b/OpenCL/inc_hash_sha512.cl index 66b71c958..513972c74 100644 --- a/OpenCL/inc_hash_sha512.cl +++ b/OpenCL/inc_hash_sha512.cl @@ -181,123 +181,199 @@ DECLSPEC void sha512_update_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u ctx->len += len; - if ((pos + len) < 128) + if (pos == 0) { - switch_buffer_by_offset_8x4_be_S (w0, w1, w2, w3, w4, w5, w6, w7, pos); + 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]; - 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]; + if (len == 128) + { + sha512_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; - u32 c4[4] = { 0 }; - u32 c5[4] = { 0 }; - u32 c6[4] = { 0 }; - u32 c7[4] = { 0 }; + 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_carry_be_S (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; + u32 c4[4] = { 0 }; + u32 c5[4] = { 0 }; + u32 c6[4] = { 0 }; + u32 c7[4] = { 0 }; - 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]; + switch_buffer_by_offset_8x4_carry_be_S (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); - sha512_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + 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]; - ctx->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; - ctx->w4[0] = c4[0]; - ctx->w4[1] = c4[1]; - ctx->w4[2] = c4[2]; - ctx->w4[3] = c4[3]; - ctx->w5[0] = c5[0]; - ctx->w5[1] = c5[1]; - ctx->w5[2] = c5[2]; - ctx->w5[3] = c5[3]; - ctx->w6[0] = c6[0]; - ctx->w6[1] = c6[1]; - ctx->w6[2] = c6[2]; - ctx->w6[3] = c6[3]; - ctx->w7[0] = c7[0]; - ctx->w7[1] = c7[1]; - ctx->w7[2] = c7[2]; - ctx->w7[3] = c7[3]; + sha512_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + ctx->w4[0] = c4[0]; + ctx->w4[1] = c4[1]; + ctx->w4[2] = c4[2]; + ctx->w4[3] = c4[3]; + ctx->w5[0] = c5[0]; + ctx->w5[1] = c5[1]; + ctx->w5[2] = c5[2]; + ctx->w5[3] = c5[3]; + ctx->w6[0] = c6[0]; + ctx->w6[1] = c6[1]; + ctx->w6[2] = c6[2]; + ctx->w6[3] = c6[3]; + ctx->w7[0] = c7[0]; + ctx->w7[1] = c7[1]; + ctx->w7[2] = c7[2]; + ctx->w7[3] = c7[3]; + } } } @@ -1281,7 +1357,9 @@ DECLSPEC void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 *w0, const sha512_init (&ctx->ipad); - sha512_update_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha512_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); + + ctx->ipad.len = 128; // opad @@ -1320,7 +1398,9 @@ DECLSPEC void sha512_hmac_init_128 (sha512_hmac_ctx_t *ctx, const u32 *w0, const sha512_init (&ctx->opad); - sha512_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha512_transform (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); + + ctx->opad.len = 128; } DECLSPEC void sha512_hmac_init (sha512_hmac_ctx_t *ctx, const u32 *w, const int len) @@ -1861,49 +1941,40 @@ DECLSPEC void sha512_hmac_final (sha512_hmac_ctx_t *ctx) { sha512_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; - u32 t4[4]; - u32 t5[4]; - u32 t6[4]; - u32 t7[4]; + ctx->opad.w0[0] = h32_from_64_S (ctx->ipad.h[0]); + ctx->opad.w0[1] = l32_from_64_S (ctx->ipad.h[0]); + ctx->opad.w0[2] = h32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w0[3] = l32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w1[0] = h32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w1[1] = l32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w1[2] = h32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w1[3] = l32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w2[0] = h32_from_64_S (ctx->ipad.h[4]); + ctx->opad.w2[1] = l32_from_64_S (ctx->ipad.h[4]); + ctx->opad.w2[2] = h32_from_64_S (ctx->ipad.h[5]); + ctx->opad.w2[3] = l32_from_64_S (ctx->ipad.h[5]); + ctx->opad.w3[0] = h32_from_64_S (ctx->ipad.h[6]); + ctx->opad.w3[1] = l32_from_64_S (ctx->ipad.h[6]); + ctx->opad.w3[2] = h32_from_64_S (ctx->ipad.h[7]); + ctx->opad.w3[3] = l32_from_64_S (ctx->ipad.h[7]); + ctx->opad.w4[0] = 0; + ctx->opad.w4[1] = 0; + ctx->opad.w4[2] = 0; + ctx->opad.w4[3] = 0; + ctx->opad.w5[0] = 0; + ctx->opad.w5[1] = 0; + ctx->opad.w5[2] = 0; + ctx->opad.w5[3] = 0; + ctx->opad.w6[0] = 0; + ctx->opad.w6[1] = 0; + ctx->opad.w6[2] = 0; + ctx->opad.w6[3] = 0; + ctx->opad.w7[0] = 0; + ctx->opad.w7[1] = 0; + ctx->opad.w7[2] = 0; + ctx->opad.w7[3] = 0; - t0[0] = h32_from_64_S (ctx->ipad.h[0]); - t0[1] = l32_from_64_S (ctx->ipad.h[0]); - t0[2] = h32_from_64_S (ctx->ipad.h[1]); - t0[3] = l32_from_64_S (ctx->ipad.h[1]); - t1[0] = h32_from_64_S (ctx->ipad.h[2]); - t1[1] = l32_from_64_S (ctx->ipad.h[2]); - t1[2] = h32_from_64_S (ctx->ipad.h[3]); - t1[3] = l32_from_64_S (ctx->ipad.h[3]); - t2[0] = h32_from_64_S (ctx->ipad.h[4]); - t2[1] = l32_from_64_S (ctx->ipad.h[4]); - t2[2] = h32_from_64_S (ctx->ipad.h[5]); - t2[3] = l32_from_64_S (ctx->ipad.h[5]); - t3[0] = h32_from_64_S (ctx->ipad.h[6]); - t3[1] = l32_from_64_S (ctx->ipad.h[6]); - t3[2] = h32_from_64_S (ctx->ipad.h[7]); - t3[3] = l32_from_64_S (ctx->ipad.h[7]); - t4[0] = 0; - t4[1] = 0; - t4[2] = 0; - t4[3] = 0; - t5[0] = 0; - t5[1] = 0; - t5[2] = 0; - t5[3] = 0; - t6[0] = 0; - t6[1] = 0; - t6[2] = 0; - t6[3] = 0; - t7[0] = 0; - t7[1] = 0; - t7[2] = 0; - t7[3] = 0; - - sha512_update_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 64); + ctx->opad.len += 64; sha512_final (&ctx->opad); } @@ -2101,123 +2172,199 @@ DECLSPEC void sha512_update_vector_128 (sha512_ctx_vector_t *ctx, u32x *w0, u32x ctx->len += len; - if ((pos + len) < 128) + if (pos == 0) { - switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos); + 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]; - 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]; + if (len == 128) + { + sha512_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; - u32x c4[4] = { 0 }; - u32x c5[4] = { 0 }; - u32x c6[4] = { 0 }; - u32x c7[4] = { 0 }; + if ((pos + len) < 128) + { + switch_buffer_by_offset_8x4_be (w0, w1, w2, w3, w4, w5, w6, w7, pos); - switch_buffer_by_offset_8x4_carry_be (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; + u32x c4[4] = { 0 }; + u32x c5[4] = { 0 }; + u32x c6[4] = { 0 }; + u32x c7[4] = { 0 }; - 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]; + switch_buffer_by_offset_8x4_carry_be (w0, w1, w2, w3, w4, w5, w6, w7, c0, c1, c2, c3, c4, c5, c6, c7, pos); - sha512_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + 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]; - ctx->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; - ctx->w4[0] = c4[0]; - ctx->w4[1] = c4[1]; - ctx->w4[2] = c4[2]; - ctx->w4[3] = c4[3]; - ctx->w5[0] = c5[0]; - ctx->w5[1] = c5[1]; - ctx->w5[2] = c5[2]; - ctx->w5[3] = c5[3]; - ctx->w6[0] = c6[0]; - ctx->w6[1] = c6[1]; - ctx->w6[2] = c6[2]; - ctx->w6[3] = c6[3]; - ctx->w7[0] = c7[0]; - ctx->w7[1] = c7[1]; - ctx->w7[2] = c7[2]; - ctx->w7[3] = c7[3]; + sha512_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + ctx->w4[0] = c4[0]; + ctx->w4[1] = c4[1]; + ctx->w4[2] = c4[2]; + ctx->w4[3] = c4[3]; + ctx->w5[0] = c5[0]; + ctx->w5[1] = c5[1]; + ctx->w5[2] = c5[2]; + ctx->w5[3] = c5[3]; + ctx->w6[0] = c6[0]; + ctx->w6[1] = c6[1]; + ctx->w6[2] = c6[2]; + ctx->w6[3] = c6[3]; + ctx->w7[0] = c7[0]; + ctx->w7[1] = c7[1]; + ctx->w7[2] = c7[2]; + ctx->w7[3] = c7[3]; + } } } @@ -2827,7 +2974,9 @@ DECLSPEC void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const sha512_init_vector (&ctx->ipad); - sha512_update_vector_128 (&ctx->ipad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->ipad.h); + + ctx->ipad.len = 128; // opad @@ -2866,7 +3015,9 @@ DECLSPEC void sha512_hmac_init_vector_128 (sha512_hmac_ctx_vector_t *ctx, const sha512_init_vector (&ctx->opad); - sha512_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 128); + sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, ctx->opad.h); + + ctx->opad.len = 128; } DECLSPEC void sha512_hmac_init_vector (sha512_hmac_ctx_vector_t *ctx, const u32x *w, const int len) @@ -2976,49 +3127,40 @@ DECLSPEC void sha512_hmac_final_vector (sha512_hmac_ctx_vector_t *ctx) { sha512_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; - u32x t4[4]; - u32x t5[4]; - u32x t6[4]; - u32x t7[4]; + ctx->opad.w0[0] = h32_from_64 (ctx->ipad.h[0]); + ctx->opad.w0[1] = l32_from_64 (ctx->ipad.h[0]); + ctx->opad.w0[2] = h32_from_64 (ctx->ipad.h[1]); + ctx->opad.w0[3] = l32_from_64 (ctx->ipad.h[1]); + ctx->opad.w1[0] = h32_from_64 (ctx->ipad.h[2]); + ctx->opad.w1[1] = l32_from_64 (ctx->ipad.h[2]); + ctx->opad.w1[2] = h32_from_64 (ctx->ipad.h[3]); + ctx->opad.w1[3] = l32_from_64 (ctx->ipad.h[3]); + ctx->opad.w2[0] = h32_from_64 (ctx->ipad.h[4]); + ctx->opad.w2[1] = l32_from_64 (ctx->ipad.h[4]); + ctx->opad.w2[2] = h32_from_64 (ctx->ipad.h[5]); + ctx->opad.w2[3] = l32_from_64 (ctx->ipad.h[5]); + ctx->opad.w3[0] = h32_from_64 (ctx->ipad.h[6]); + ctx->opad.w3[1] = l32_from_64 (ctx->ipad.h[6]); + ctx->opad.w3[2] = h32_from_64 (ctx->ipad.h[7]); + ctx->opad.w3[3] = l32_from_64 (ctx->ipad.h[7]); + ctx->opad.w4[0] = 0; + ctx->opad.w4[1] = 0; + ctx->opad.w4[2] = 0; + ctx->opad.w4[3] = 0; + ctx->opad.w5[0] = 0; + ctx->opad.w5[1] = 0; + ctx->opad.w5[2] = 0; + ctx->opad.w5[3] = 0; + ctx->opad.w6[0] = 0; + ctx->opad.w6[1] = 0; + ctx->opad.w6[2] = 0; + ctx->opad.w6[3] = 0; + ctx->opad.w7[0] = 0; + ctx->opad.w7[1] = 0; + ctx->opad.w7[2] = 0; + ctx->opad.w7[3] = 0; - t0[0] = h32_from_64 (ctx->ipad.h[0]); - t0[1] = l32_from_64 (ctx->ipad.h[0]); - t0[2] = h32_from_64 (ctx->ipad.h[1]); - t0[3] = l32_from_64 (ctx->ipad.h[1]); - t1[0] = h32_from_64 (ctx->ipad.h[2]); - t1[1] = l32_from_64 (ctx->ipad.h[2]); - t1[2] = h32_from_64 (ctx->ipad.h[3]); - t1[3] = l32_from_64 (ctx->ipad.h[3]); - t2[0] = h32_from_64 (ctx->ipad.h[4]); - t2[1] = l32_from_64 (ctx->ipad.h[4]); - t2[2] = h32_from_64 (ctx->ipad.h[5]); - t2[3] = l32_from_64 (ctx->ipad.h[5]); - t3[0] = h32_from_64 (ctx->ipad.h[6]); - t3[1] = l32_from_64 (ctx->ipad.h[6]); - t3[2] = h32_from_64 (ctx->ipad.h[7]); - t3[3] = l32_from_64 (ctx->ipad.h[7]); - t4[0] = 0; - t4[1] = 0; - t4[2] = 0; - t4[3] = 0; - t5[0] = 0; - t5[1] = 0; - t5[2] = 0; - t5[3] = 0; - t6[0] = 0; - t6[1] = 0; - t6[2] = 0; - t6[3] = 0; - t7[0] = 0; - t7[1] = 0; - t7[2] = 0; - t7[3] = 0; - - sha512_update_vector_128 (&ctx->opad, t0, t1, t2, t3, t4, t5, t6, t7, 64); + ctx->opad.len += 64; sha512_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_streebog256.cl b/OpenCL/inc_hash_streebog256.cl index 7934d1f9b..5056f6984 100644 --- a/OpenCL/inc_hash_streebog256.cl +++ b/OpenCL/inc_hash_streebog256.cl @@ -8,7 +8,7 @@ #include "inc_common.h" #include "inc_hash_streebog256.h" -CONSTANT_AS u64a sbob_sl64[8][256] = +CONSTANT_AS u64a sbob256_sl64[8][256] = { { 0xd031c397ce553fe6, 0x16ba5b01b006b525, 0xa89bade6296e70c8, 0x6a1f525d77d3435b, @@ -540,7 +540,7 @@ CONSTANT_AS u64a sbob_sl64[8][256] = }, }; -CONSTANT_AS u64a sbob_rc64[12][8] = +CONSTANT_AS u64a sbob256_rc64[12][8] = { { 0xe9daca1eda5b08b1, 0x1f7c65c0812fcbeb, 0x16d0452e43766a2f, 0xfcc485758db84e71, @@ -712,7 +712,7 @@ DECLSPEC void streebog256_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a ( for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob256_rc64[r][i]; } #ifdef _unroll @@ -757,77 +757,119 @@ DECLSPEC void streebog256_transform (streebog256_ctx_t *ctx, const u32 *w0, cons DECLSPEC void streebog256_update_64 (streebog256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) { - const int pos = ctx->len; + const int pos = ctx->len & 63; - if ((pos + len) < 64) + ctx->len += len; + + if (pos == 0) { - switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + streebog256_transform (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len += len; + 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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - streebog256_transform (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + streebog256_transform (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len = (pos + len) & 63; + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1022,7 +1064,7 @@ DECLSPEC void streebog256_final (streebog256_ctx_t *ctx) streebog256_g (ctx->h, ctx->n, m, ctx->s_sbob_sl64); u64 sizebuf[8] = { 0 }; - sizebuf[7] = hc_swap64_S ((u64) (ctx->len << 3)); + sizebuf[7] = hc_swap64_S ((u64) (pos << 3)); streebog256_add (ctx->n, sizebuf); @@ -1063,7 +1105,9 @@ DECLSPEC void streebog256_hmac_init_64 (streebog256_hmac_ctx_t *ctx, const u32 * streebog256_init (&ctx->ipad, s_sbob_sl64); - streebog256_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + streebog256_transform (&ctx->ipad, t0, t1, t2, t3); + + ctx->ipad.len = 64; // opad @@ -1086,7 +1130,9 @@ DECLSPEC void streebog256_hmac_init_64 (streebog256_hmac_ctx_t *ctx, const u32 * streebog256_init (&ctx->opad, s_sbob_sl64); - streebog256_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + streebog256_transform (&ctx->opad, t0, t1, t2, t3); + + ctx->opad.len = 64; } DECLSPEC void streebog256_hmac_init (streebog256_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) @@ -1227,29 +1273,24 @@ DECLSPEC void streebog256_hmac_final (streebog256_hmac_ctx_t *ctx) { streebog256_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = h32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w0[1] = l32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w0[2] = h32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w0[3] = l32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w1[0] = h32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w1[1] = l32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w1[2] = h32_from_64_S (ctx->ipad.h[0]); + ctx->opad.w1[3] = l32_from_64_S (ctx->ipad.h[0]); + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = h32_from_64_S (ctx->ipad.h[3]); - t0[1] = l32_from_64_S (ctx->ipad.h[3]); - t0[2] = h32_from_64_S (ctx->ipad.h[2]); - t0[3] = l32_from_64_S (ctx->ipad.h[2]); - t1[0] = h32_from_64_S (ctx->ipad.h[1]); - t1[1] = l32_from_64_S (ctx->ipad.h[1]); - t1[2] = h32_from_64_S (ctx->ipad.h[0]); - t1[3] = l32_from_64_S (ctx->ipad.h[0]); - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - streebog256_update_64 (&ctx->opad, t0, t1, t2, t3, 32); + ctx->opad.len += 32; streebog256_final (&ctx->opad); } @@ -1374,7 +1415,7 @@ DECLSPEC void streebog256_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_T for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob256_rc64[r][i]; } #ifdef _unroll @@ -1419,77 +1460,119 @@ DECLSPEC void streebog256_transform_vector (streebog256_ctx_vector_t *ctx, const DECLSPEC void streebog256_update_vector_64 (streebog256_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) { - const int pos = ctx->len; + const int pos = ctx->len & 63; - if ((pos + len) < 64) + ctx->len += len; + + if (pos == 0) { - switch_buffer_by_offset_be (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + streebog256_transform_vector (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len += len; + 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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); - streebog256_transform_vector (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + streebog256_transform_vector (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len = (pos + len) & 63; + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1627,7 +1710,7 @@ DECLSPEC void streebog256_final_vector (streebog256_ctx_vector_t *ctx) streebog256_g_vector (ctx->h, ctx->n, m, ctx->s_sbob_sl64); u64x sizebuf[8] = { 0 }; - sizebuf[7] = hc_swap64 ((u64x) (ctx->len << 3)); + sizebuf[7] = hc_swap64 ((u64x) (pos << 3)); streebog256_add_vector (ctx->n, sizebuf); @@ -1668,7 +1751,9 @@ DECLSPEC void streebog256_hmac_init_vector_64 (streebog256_hmac_ctx_vector_t *ct streebog256_init_vector (&ctx->ipad, s_sbob_sl64); - streebog256_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + streebog256_transform_vector (&ctx->ipad, t0, t1, t2, t3); + + ctx->ipad.len = 64; // opad @@ -1691,7 +1776,9 @@ DECLSPEC void streebog256_hmac_init_vector_64 (streebog256_hmac_ctx_vector_t *ct streebog256_init_vector (&ctx->opad, s_sbob_sl64); - streebog256_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + streebog256_transform_vector (&ctx->opad, t0, t1, t2, t3); + + ctx->opad.len = 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]) @@ -1822,29 +1909,24 @@ DECLSPEC void streebog256_hmac_final_vector (streebog256_hmac_ctx_vector_t *ctx) { streebog256_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = h32_from_64 (ctx->ipad.h[3]); + ctx->opad.w0[1] = l32_from_64 (ctx->ipad.h[3]); + ctx->opad.w0[2] = h32_from_64 (ctx->ipad.h[2]); + ctx->opad.w0[3] = l32_from_64 (ctx->ipad.h[2]); + ctx->opad.w1[0] = h32_from_64 (ctx->ipad.h[1]); + ctx->opad.w1[1] = l32_from_64 (ctx->ipad.h[1]); + ctx->opad.w1[2] = h32_from_64 (ctx->ipad.h[0]); + ctx->opad.w1[3] = l32_from_64 (ctx->ipad.h[0]); + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; - t0[0] = h32_from_64 (ctx->ipad.h[3]); - t0[1] = l32_from_64 (ctx->ipad.h[3]); - t0[2] = h32_from_64 (ctx->ipad.h[2]); - t0[3] = l32_from_64 (ctx->ipad.h[2]); - t1[0] = h32_from_64 (ctx->ipad.h[1]); - t1[1] = l32_from_64 (ctx->ipad.h[1]); - t1[2] = h32_from_64 (ctx->ipad.h[0]); - t1[3] = l32_from_64 (ctx->ipad.h[0]); - t2[0] = 0; - t2[1] = 0; - t2[2] = 0; - t2[3] = 0; - t3[0] = 0; - t3[1] = 0; - t3[2] = 0; - t3[3] = 0; - - streebog256_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 32); + ctx->opad.len += 32; streebog256_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_streebog512.cl b/OpenCL/inc_hash_streebog512.cl index c4cfd0c54..51b5c0a29 100644 --- a/OpenCL/inc_hash_streebog512.cl +++ b/OpenCL/inc_hash_streebog512.cl @@ -8,7 +8,7 @@ #include "inc_common.h" #include "inc_hash_streebog512.h" -CONSTANT_AS u64a sbob_sl64[8][256] = +CONSTANT_AS u64a sbob512_sl64[8][256] = { { 0xd031c397ce553fe6, 0x16ba5b01b006b525, 0xa89bade6296e70c8, 0x6a1f525d77d3435b, @@ -540,7 +540,7 @@ CONSTANT_AS u64a sbob_sl64[8][256] = }, }; -CONSTANT_AS u64a sbob_rc64[12][8] = +CONSTANT_AS u64a sbob512_rc64[12][8] = { { 0xe9daca1eda5b08b1, 0x1f7c65c0812fcbeb, 0x16d0452e43766a2f, 0xfcc485758db84e71, @@ -712,7 +712,7 @@ DECLSPEC void streebog512_g (u64 *h, const u64 *n, const u64 *m, SHM_TYPE u64a ( for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob512_rc64[r][i]; } #ifdef _unroll @@ -757,77 +757,119 @@ DECLSPEC void streebog512_transform (streebog512_ctx_t *ctx, const u32 *w0, cons DECLSPEC void streebog512_update_64 (streebog512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) { - const int pos = ctx->len; + const int pos = ctx->len & 63; - if ((pos + len) < 64) + ctx->len += len; + + if (pos == 0) { - switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + streebog512_transform (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len += len; + 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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - streebog512_transform (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + streebog512_transform (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len = (pos + len) & 63; + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1022,7 +1064,7 @@ DECLSPEC void streebog512_final (streebog512_ctx_t *ctx) streebog512_g (ctx->h, ctx->n, m, ctx->s_sbob_sl64); u64 sizebuf[8] = { 0 }; - sizebuf[7] = hc_swap64_S ((u64) (ctx->len << 3)); + sizebuf[7] = hc_swap64_S ((u64) (pos << 3)); streebog512_add (ctx->n, sizebuf); @@ -1063,7 +1105,9 @@ DECLSPEC void streebog512_hmac_init_64 (streebog512_hmac_ctx_t *ctx, const u32 * streebog512_init (&ctx->ipad, s_sbob_sl64); - streebog512_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + streebog512_transform (&ctx->ipad, t0, t1, t2, t3); + + ctx->ipad.len = 64; // opad @@ -1086,7 +1130,9 @@ DECLSPEC void streebog512_hmac_init_64 (streebog512_hmac_ctx_t *ctx, const u32 * streebog512_init (&ctx->opad, s_sbob_sl64); - streebog512_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + streebog512_transform (&ctx->opad, t0, t1, t2, t3); + + ctx->opad.len = 64; } DECLSPEC void streebog512_hmac_init (streebog512_hmac_ctx_t *ctx, const u32 *w, const int len, SHM_TYPE u64a (*s_sbob_sl64)[256]) @@ -1227,29 +1273,43 @@ DECLSPEC void streebog512_hmac_final (streebog512_hmac_ctx_t *ctx) { streebog512_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = h32_from_64_S (ctx->ipad.h[7]); + ctx->opad.w0[1] = l32_from_64_S (ctx->ipad.h[7]); + ctx->opad.w0[2] = h32_from_64_S (ctx->ipad.h[6]); + ctx->opad.w0[3] = l32_from_64_S (ctx->ipad.h[6]); + ctx->opad.w1[0] = h32_from_64_S (ctx->ipad.h[5]); + ctx->opad.w1[1] = l32_from_64_S (ctx->ipad.h[5]); + ctx->opad.w1[2] = h32_from_64_S (ctx->ipad.h[4]); + ctx->opad.w1[3] = l32_from_64_S (ctx->ipad.h[4]); + ctx->opad.w2[0] = h32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w2[1] = l32_from_64_S (ctx->ipad.h[3]); + ctx->opad.w2[2] = h32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w2[3] = l32_from_64_S (ctx->ipad.h[2]); + ctx->opad.w3[0] = h32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w3[1] = l32_from_64_S (ctx->ipad.h[1]); + ctx->opad.w3[2] = h32_from_64_S (ctx->ipad.h[0]); + ctx->opad.w3[3] = l32_from_64_S (ctx->ipad.h[0]); - t0[0] = h32_from_64_S (ctx->ipad.h[7]); - t0[1] = l32_from_64_S (ctx->ipad.h[7]); - t0[2] = h32_from_64_S (ctx->ipad.h[6]); - t0[3] = l32_from_64_S (ctx->ipad.h[6]); - t1[0] = h32_from_64_S (ctx->ipad.h[5]); - t1[1] = l32_from_64_S (ctx->ipad.h[5]); - t1[2] = h32_from_64_S (ctx->ipad.h[4]); - t1[3] = l32_from_64_S (ctx->ipad.h[4]); - t2[0] = h32_from_64_S (ctx->ipad.h[3]); - t2[1] = l32_from_64_S (ctx->ipad.h[3]); - t2[2] = h32_from_64_S (ctx->ipad.h[2]); - t2[3] = l32_from_64_S (ctx->ipad.h[2]); - t3[0] = h32_from_64_S (ctx->ipad.h[1]); - t3[1] = l32_from_64_S (ctx->ipad.h[1]); - t3[2] = h32_from_64_S (ctx->ipad.h[0]); - t3[3] = l32_from_64_S (ctx->ipad.h[0]); + ctx->opad.len = 0; - streebog512_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + streebog512_transform (&ctx->opad, ctx->opad.w0, ctx->opad.w1, ctx->opad.w2, ctx->opad.w3); + + ctx->opad.w0[0] = 0; + ctx->opad.w0[1] = 0; + ctx->opad.w0[2] = 0; + ctx->opad.w0[3] = 0; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; streebog512_final (&ctx->opad); } @@ -1374,7 +1434,7 @@ DECLSPEC void streebog512_g_vector (u64x *h, const u64x *n, const u64x *m, SHM_T for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob512_rc64[r][i]; } #ifdef _unroll @@ -1419,77 +1479,119 @@ DECLSPEC void streebog512_transform_vector (streebog512_ctx_vector_t *ctx, const DECLSPEC void streebog512_update_vector_64 (streebog512_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) { - const int pos = ctx->len; + const int pos = ctx->len & 63; - if ((pos + len) < 64) + ctx->len += len; + + if (pos == 0) { - switch_buffer_by_offset_be (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + streebog512_transform_vector (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len += len; + 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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); - streebog512_transform_vector (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + streebog512_transform_vector (ctx, ctx->w0, ctx->w1, ctx->w2, ctx->w3); - ctx->len = (pos + len) & 63; + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1627,7 +1729,7 @@ DECLSPEC void streebog512_final_vector (streebog512_ctx_vector_t *ctx) streebog512_g_vector (ctx->h, ctx->n, m, ctx->s_sbob_sl64); u64x sizebuf[8] = { 0 }; - sizebuf[7] = hc_swap64 ((u64x) (ctx->len << 3)); + sizebuf[7] = hc_swap64 ((u64x) (pos << 3)); streebog512_add_vector (ctx->n, sizebuf); @@ -1668,7 +1770,9 @@ DECLSPEC void streebog512_hmac_init_vector_64 (streebog512_hmac_ctx_vector_t *ct streebog512_init_vector (&ctx->ipad, s_sbob_sl64); - streebog512_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + streebog512_transform_vector (&ctx->ipad, t0, t1, t2, t3); + + ctx->ipad.len = 64; // opad @@ -1691,7 +1795,9 @@ DECLSPEC void streebog512_hmac_init_vector_64 (streebog512_hmac_ctx_vector_t *ct streebog512_init_vector (&ctx->opad, s_sbob_sl64); - streebog512_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + streebog512_transform_vector (&ctx->opad, t0, t1, t2, t3); + + ctx->opad.len = 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]) @@ -1822,29 +1928,43 @@ DECLSPEC void streebog512_hmac_final_vector (streebog512_hmac_ctx_vector_t *ctx) { streebog512_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = h32_from_64 (ctx->ipad.h[7]); + ctx->opad.w0[1] = l32_from_64 (ctx->ipad.h[7]); + ctx->opad.w0[2] = h32_from_64 (ctx->ipad.h[6]); + ctx->opad.w0[3] = l32_from_64 (ctx->ipad.h[6]); + ctx->opad.w1[0] = h32_from_64 (ctx->ipad.h[5]); + ctx->opad.w1[1] = l32_from_64 (ctx->ipad.h[5]); + ctx->opad.w1[2] = h32_from_64 (ctx->ipad.h[4]); + ctx->opad.w1[3] = l32_from_64 (ctx->ipad.h[4]); + ctx->opad.w2[0] = h32_from_64 (ctx->ipad.h[3]); + ctx->opad.w2[1] = l32_from_64 (ctx->ipad.h[3]); + ctx->opad.w2[2] = h32_from_64 (ctx->ipad.h[2]); + ctx->opad.w2[3] = l32_from_64 (ctx->ipad.h[2]); + ctx->opad.w3[0] = h32_from_64 (ctx->ipad.h[1]); + ctx->opad.w3[1] = l32_from_64 (ctx->ipad.h[1]); + ctx->opad.w3[2] = h32_from_64 (ctx->ipad.h[0]); + ctx->opad.w3[3] = l32_from_64 (ctx->ipad.h[0]); - t0[0] = h32_from_64 (ctx->ipad.h[7]); - t0[1] = l32_from_64 (ctx->ipad.h[7]); - t0[2] = h32_from_64 (ctx->ipad.h[6]); - t0[3] = l32_from_64 (ctx->ipad.h[6]); - t1[0] = h32_from_64 (ctx->ipad.h[5]); - t1[1] = l32_from_64 (ctx->ipad.h[5]); - t1[2] = h32_from_64 (ctx->ipad.h[4]); - t1[3] = l32_from_64 (ctx->ipad.h[4]); - t2[0] = h32_from_64 (ctx->ipad.h[3]); - t2[1] = l32_from_64 (ctx->ipad.h[3]); - t2[2] = h32_from_64 (ctx->ipad.h[2]); - t2[3] = l32_from_64 (ctx->ipad.h[2]); - t3[0] = h32_from_64 (ctx->ipad.h[1]); - t3[1] = l32_from_64 (ctx->ipad.h[1]); - t3[2] = h32_from_64 (ctx->ipad.h[0]); - t3[3] = l32_from_64 (ctx->ipad.h[0]); + ctx->opad.len = 0; - streebog512_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + streebog512_transform_vector (&ctx->opad, ctx->opad.w0, ctx->opad.w1, ctx->opad.w2, ctx->opad.w3); + + ctx->opad.w0[0] = 0; + ctx->opad.w0[1] = 0; + ctx->opad.w0[2] = 0; + ctx->opad.w0[3] = 0; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; streebog512_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_hash_whirlpool.cl b/OpenCL/inc_hash_whirlpool.cl index 6e9c1b8ab..37d073cba 100644 --- a/OpenCL/inc_hash_whirlpool.cl +++ b/OpenCL/inc_hash_whirlpool.cl @@ -1325,71 +1325,115 @@ DECLSPEC void whirlpool_update_64 (whirlpool_ctx_t *ctx, u32 *w0, u32 *w1, u32 * ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + whirlpool_transform (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32 c0[4] = { 0 }; - u32 c1[4] = { 0 }; - u32 c2[4] = { 0 }; - u32 c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be_S (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32 c0[4] = { 0 }; + u32 c1[4] = { 0 }; + u32 c2[4] = { 0 }; + u32 c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be_S (w0, w1, w2, w3, c0, c1, c2, c3, pos); - whirlpool_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h, ctx->s_Ch, ctx->s_Cl); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + whirlpool_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h, ctx->s_Ch, ctx->s_Cl); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -1969,7 +2013,9 @@ DECLSPEC void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 *w0, whirlpool_init (&ctx->ipad, s_Ch, s_Cl); - whirlpool_update_64 (&ctx->ipad, t0, t1, t2, t3, 64); + whirlpool_transform (t0, t1, t2, t3, ctx->ipad.h, ctx->ipad.s_Ch, ctx->ipad.s_Cl); + + ctx->ipad.len = 64; // opad @@ -1992,7 +2038,9 @@ DECLSPEC void whirlpool_hmac_init_64 (whirlpool_hmac_ctx_t *ctx, const u32 *w0, whirlpool_init (&ctx->opad, s_Ch, s_Cl); - whirlpool_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + whirlpool_transform (t0, t1, t2, t3, ctx->opad.h, ctx->opad.s_Ch, ctx->opad.s_Cl); + + ctx->opad.len = 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]) @@ -2272,29 +2320,43 @@ DECLSPEC void whirlpool_hmac_final (whirlpool_hmac_ctx_t *ctx) { whirlpool_final (&ctx->ipad); - u32 t0[4]; - u32 t1[4]; - u32 t2[4]; - u32 t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[ 0]; + ctx->opad.w0[1] = ctx->ipad.h[ 1]; + ctx->opad.w0[2] = ctx->ipad.h[ 2]; + ctx->opad.w0[3] = ctx->ipad.h[ 3]; + ctx->opad.w1[0] = ctx->ipad.h[ 4]; + ctx->opad.w1[1] = ctx->ipad.h[ 5]; + ctx->opad.w1[2] = ctx->ipad.h[ 6]; + ctx->opad.w1[3] = ctx->ipad.h[ 7]; + ctx->opad.w2[0] = ctx->ipad.h[ 8]; + ctx->opad.w2[1] = ctx->ipad.h[ 9]; + ctx->opad.w2[2] = ctx->ipad.h[10]; + ctx->opad.w2[3] = ctx->ipad.h[11]; + ctx->opad.w3[0] = ctx->ipad.h[12]; + ctx->opad.w3[1] = ctx->ipad.h[13]; + ctx->opad.w3[2] = ctx->ipad.h[14]; + ctx->opad.w3[3] = ctx->ipad.h[15]; - t0[0] = ctx->ipad.h[ 0]; - t0[1] = ctx->ipad.h[ 1]; - t0[2] = ctx->ipad.h[ 2]; - t0[3] = ctx->ipad.h[ 3]; - t1[0] = ctx->ipad.h[ 4]; - t1[1] = ctx->ipad.h[ 5]; - t1[2] = ctx->ipad.h[ 6]; - t1[3] = ctx->ipad.h[ 7]; - t2[0] = ctx->ipad.h[ 8]; - t2[1] = ctx->ipad.h[ 9]; - t2[2] = ctx->ipad.h[10]; - t2[3] = ctx->ipad.h[11]; - t3[0] = ctx->ipad.h[12]; - t3[1] = ctx->ipad.h[13]; - t3[2] = ctx->ipad.h[14]; - t3[3] = ctx->ipad.h[15]; + ctx->opad.len += 64; - whirlpool_update_64 (&ctx->opad, t0, t1, t2, t3, 64); + whirlpool_transform (ctx->opad.w0, ctx->opad.w1, ctx->opad.w2, ctx->opad.w3, ctx->opad.h, ctx->opad.s_Ch, ctx->opad.s_Cl); + + ctx->opad.w0[0] = 0; + ctx->opad.w0[1] = 0; + ctx->opad.w0[2] = 0; + ctx->opad.w0[3] = 0; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; whirlpool_final (&ctx->opad); } @@ -2561,71 +2623,115 @@ DECLSPEC void whirlpool_update_vector_64 (whirlpool_ctx_vector_t *ctx, u32x *w0, ctx->len += len; - if ((pos + len) < 64) + if (pos == 0) { - switch_buffer_by_offset_be (w0, w1, w2, w3, pos); + 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->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]; + if (len == 64) + { + whirlpool_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->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 { - u32x c0[4] = { 0 }; - u32x c1[4] = { 0 }; - u32x c2[4] = { 0 }; - u32x c3[4] = { 0 }; + if ((pos + len) < 64) + { + switch_buffer_by_offset_be (w0, w1, w2, w3, pos); - switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); + 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 + { + u32x c0[4] = { 0 }; + u32x c1[4] = { 0 }; + u32x c2[4] = { 0 }; + u32x c3[4] = { 0 }; - 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]; + switch_buffer_by_offset_carry_be (w0, w1, w2, w3, c0, c1, c2, c3, pos); - whirlpool_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h, ctx->s_Ch, ctx->s_Cl); + 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->w0[0] = c0[0]; - ctx->w0[1] = c0[1]; - ctx->w0[2] = c0[2]; - ctx->w0[3] = c0[3]; - ctx->w1[0] = c1[0]; - ctx->w1[1] = c1[1]; - ctx->w1[2] = c1[2]; - ctx->w1[3] = c1[3]; - ctx->w2[0] = c2[0]; - ctx->w2[1] = c2[1]; - ctx->w2[2] = c2[2]; - ctx->w2[3] = c2[3]; - ctx->w3[0] = c3[0]; - ctx->w3[1] = c3[1]; - ctx->w3[2] = c3[2]; - ctx->w3[3] = c3[3]; + whirlpool_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h, ctx->s_Ch, ctx->s_Cl); + + ctx->w0[0] = c0[0]; + ctx->w0[1] = c0[1]; + ctx->w0[2] = c0[2]; + ctx->w0[3] = c0[3]; + ctx->w1[0] = c1[0]; + ctx->w1[1] = c1[1]; + ctx->w1[2] = c1[2]; + ctx->w1[3] = c1[3]; + ctx->w2[0] = c2[0]; + ctx->w2[1] = c2[1]; + ctx->w2[2] = c2[2]; + ctx->w2[3] = c2[3]; + ctx->w3[0] = c3[0]; + ctx->w3[1] = c3[1]; + ctx->w3[2] = c3[2]; + ctx->w3[3] = c3[3]; + } } } @@ -2949,7 +3055,9 @@ DECLSPEC void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, c whirlpool_init_vector (&ctx->ipad, s_Ch, s_Cl); - whirlpool_update_vector_64 (&ctx->ipad, t0, t1, t2, t3, 64); + whirlpool_transform_vector (t0, t1, t2, t3, ctx->ipad.h, ctx->ipad.s_Ch, ctx->ipad.s_Cl); + + ctx->ipad.len = 64; // opad @@ -2972,7 +3080,9 @@ DECLSPEC void whirlpool_hmac_init_vector_64 (whirlpool_hmac_ctx_vector_t *ctx, c whirlpool_init_vector (&ctx->opad, s_Ch, s_Cl); - whirlpool_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + whirlpool_transform_vector (t0, t1, t2, t3, ctx->opad.h, ctx->opad.s_Ch, ctx->opad.s_Cl); + + ctx->opad.len = 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]) @@ -3046,29 +3156,43 @@ DECLSPEC void whirlpool_hmac_final_vector (whirlpool_hmac_ctx_vector_t *ctx) { whirlpool_final_vector (&ctx->ipad); - u32x t0[4]; - u32x t1[4]; - u32x t2[4]; - u32x t3[4]; + ctx->opad.w0[0] = ctx->ipad.h[ 0]; + ctx->opad.w0[1] = ctx->ipad.h[ 1]; + ctx->opad.w0[2] = ctx->ipad.h[ 2]; + ctx->opad.w0[3] = ctx->ipad.h[ 3]; + ctx->opad.w1[0] = ctx->ipad.h[ 4]; + ctx->opad.w1[1] = ctx->ipad.h[ 5]; + ctx->opad.w1[2] = ctx->ipad.h[ 6]; + ctx->opad.w1[3] = ctx->ipad.h[ 7]; + ctx->opad.w2[0] = ctx->ipad.h[ 8]; + ctx->opad.w2[1] = ctx->ipad.h[ 9]; + ctx->opad.w2[2] = ctx->ipad.h[10]; + ctx->opad.w2[3] = ctx->ipad.h[11]; + ctx->opad.w3[0] = ctx->ipad.h[12]; + ctx->opad.w3[1] = ctx->ipad.h[13]; + ctx->opad.w3[2] = ctx->ipad.h[14]; + ctx->opad.w3[3] = ctx->ipad.h[15]; - t0[0] = ctx->ipad.h[ 0]; - t0[1] = ctx->ipad.h[ 1]; - t0[2] = ctx->ipad.h[ 2]; - t0[3] = ctx->ipad.h[ 3]; - t1[0] = ctx->ipad.h[ 4]; - t1[1] = ctx->ipad.h[ 5]; - t1[2] = ctx->ipad.h[ 6]; - t1[3] = ctx->ipad.h[ 7]; - t2[0] = ctx->ipad.h[ 8]; - t2[1] = ctx->ipad.h[ 9]; - t2[2] = ctx->ipad.h[10]; - t2[3] = ctx->ipad.h[11]; - t3[0] = ctx->ipad.h[12]; - t3[1] = ctx->ipad.h[13]; - t3[2] = ctx->ipad.h[14]; - t3[3] = ctx->ipad.h[15]; + ctx->opad.len += 64; - whirlpool_update_vector_64 (&ctx->opad, t0, t1, t2, t3, 64); + whirlpool_transform_vector (ctx->opad.w0, ctx->opad.w1, ctx->opad.w2, ctx->opad.w3, ctx->opad.h, ctx->opad.s_Ch, ctx->opad.s_Cl); + + ctx->opad.w0[0] = 0; + ctx->opad.w0[1] = 0; + ctx->opad.w0[2] = 0; + ctx->opad.w0[3] = 0; + ctx->opad.w1[0] = 0; + ctx->opad.w1[1] = 0; + ctx->opad.w1[2] = 0; + ctx->opad.w1[3] = 0; + ctx->opad.w2[0] = 0; + ctx->opad.w2[1] = 0; + ctx->opad.w2[2] = 0; + ctx->opad.w2[3] = 0; + ctx->opad.w3[0] = 0; + ctx->opad.w3[1] = 0; + ctx->opad.w3[2] = 0; + ctx->opad.w3[3] = 0; whirlpool_final_vector (&ctx->opad); } diff --git a/OpenCL/inc_vendor.h b/OpenCL/inc_vendor.h index e243ec613..64205edb6 100644 --- a/OpenCL/inc_vendor.h +++ b/OpenCL/inc_vendor.h @@ -80,13 +80,14 @@ /** * function declarations can have a large influence depending on the opencl runtime + * fast but pure kernels on rocm is a good example */ #if defined IS_CPU #define DECLSPEC inline #elif defined IS_GPU #if defined IS_AMD -#define DECLSPEC inline +#define DECLSPEC inline static #else #define DECLSPEC #endif diff --git a/OpenCL/m00000_a3-optimized.cl b/OpenCL/m00000_a3-optimized.cl index 96d701601..72403afb8 100644 --- a/OpenCL/m00000_a3-optimized.cl +++ b/OpenCL/m00000_a3-optimized.cl @@ -30,7 +30,7 @@ a -= t; \ } -DECLSPEC static void m00000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -202,7 +202,7 @@ DECLSPEC static void m00000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00000_a3-pure.cl b/OpenCL/m00000_a3-pure.cl index 11f74142d..ee6072389 100644 --- a/OpenCL/m00000_a3-pure.cl +++ b/OpenCL/m00000_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00000_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m00000_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00010_a0-pure.cl b/OpenCL/m00010_a0-pure.cl index 4b0790e91..1b9765de2 100644 --- a/OpenCL/m00010_a0-pure.cl +++ b/OpenCL/m00010_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00010_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -103,7 +103,7 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00010_a1-pure.cl b/OpenCL/m00010_a1-pure.cl index e28624755..fbc397d7d 100644 --- a/OpenCL/m00010_a1-pure.cl +++ b/OpenCL/m00010_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00010_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -97,7 +97,7 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00010_a3-optimized.cl b/OpenCL/m00010_a3-optimized.cl index b4c72c7c7..0367d7cfe 100644 --- a/OpenCL/m00010_a3-optimized.cl +++ b/OpenCL/m00010_a3-optimized.cl @@ -30,7 +30,7 @@ a -= t; \ } -DECLSPEC static void m00010m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00010m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -251,7 +251,7 @@ DECLSPEC static void m00010m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00010s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00010s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00010_a3-pure.cl b/OpenCL/m00010_a3-pure.cl index c415b3422..362207256 100644 --- a/OpenCL/m00010_a3-pure.cl +++ b/OpenCL/m00010_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00010_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00010_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -110,7 +110,7 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m00010_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00020_a3-optimized.cl b/OpenCL/m00020_a3-optimized.cl index 7fa0a6d48..1dc9be105 100644 --- a/OpenCL/m00020_a3-optimized.cl +++ b/OpenCL/m00020_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m00020m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00020m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -188,7 +188,7 @@ DECLSPEC static void m00020m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00020s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00020s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00020_a3-pure.cl b/OpenCL/m00020_a3-pure.cl index 61c585cbe..d937f3f82 100644 --- a/OpenCL/m00020_a3-pure.cl +++ b/OpenCL/m00020_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00020_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m00020_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00030_a0-pure.cl b/OpenCL/m00030_a0-pure.cl index 4c86b7f69..ac7ebbd6d 100644 --- a/OpenCL/m00030_a0-pure.cl +++ b/OpenCL/m00030_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00030_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -103,7 +103,7 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00030_a1-pure.cl b/OpenCL/m00030_a1-pure.cl index 306721186..ac7582c66 100644 --- a/OpenCL/m00030_a1-pure.cl +++ b/OpenCL/m00030_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00030_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -97,7 +97,7 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00030_a3-optimized.cl b/OpenCL/m00030_a3-optimized.cl index b65bf0ed1..a1505af17 100644 --- a/OpenCL/m00030_a3-optimized.cl +++ b/OpenCL/m00030_a3-optimized.cl @@ -30,7 +30,7 @@ a -= t; \ } -DECLSPEC static void m00030m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00030m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -251,7 +251,7 @@ DECLSPEC static void m00030m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00030s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00030s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00030_a3-pure.cl b/OpenCL/m00030_a3-pure.cl index 182f7e444..dedf84f53 100644 --- a/OpenCL/m00030_a3-pure.cl +++ b/OpenCL/m00030_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00030_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00030_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -110,7 +110,7 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m00030_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00040_a3-optimized.cl b/OpenCL/m00040_a3-optimized.cl index 997e7569c..bdfa5f16c 100644 --- a/OpenCL/m00040_a3-optimized.cl +++ b/OpenCL/m00040_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m00040m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00040m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -188,7 +188,7 @@ DECLSPEC static void m00040m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00040s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00040s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00040_a3-pure.cl b/OpenCL/m00040_a3-pure.cl index f2783cba4..4da1b7438 100644 --- a/OpenCL/m00040_a3-pure.cl +++ b/OpenCL/m00040_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00040_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m00040_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00050_a0-optimized.cl b/OpenCL/m00050_a0-optimized.cl index 25b6126db..944006caa 100644 --- a/OpenCL/m00050_a0-optimized.cl +++ b/OpenCL/m00050_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -66,7 +66,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00050_a0-pure.cl b/OpenCL/m00050_a0-pure.cl index 6ebd9762a..38fba8341 100644 --- a/OpenCL/m00050_a0-pure.cl +++ b/OpenCL/m00050_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -101,7 +101,7 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00050_a1-optimized.cl b/OpenCL/m00050_a1-optimized.cl index f11999d5d..6cebd87a4 100644 --- a/OpenCL/m00050_a1-optimized.cl +++ b/OpenCL/m00050_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -64,7 +64,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00050_a1-pure.cl b/OpenCL/m00050_a1-pure.cl index b0c11af36..927d48fcb 100644 --- a/OpenCL/m00050_a1-pure.cl +++ b/OpenCL/m00050_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -122,7 +122,7 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -131,7 +131,7 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00050_a3-optimized.cl b/OpenCL/m00050_a3-optimized.cl index 084c39a04..a19259f1f 100644 --- a/OpenCL/m00050_a3-optimized.cl +++ b/OpenCL/m00050_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -64,7 +64,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -98,7 +98,7 @@ DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m00050m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00050m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -203,7 +203,7 @@ DECLSPEC static void m00050m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00050s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00050s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00050_a3-pure.cl b/OpenCL/m00050_a3-pure.cl index f21066750..3e0adaee3 100644 --- a/OpenCL/m00050_a3-pure.cl +++ b/OpenCL/m00050_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00050_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -108,7 +108,7 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -117,7 +117,7 @@ KERNEL_FQ void m00050_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00060_a0-optimized.cl b/OpenCL/m00060_a0-optimized.cl index 433de961e..e9656ced9 100644 --- a/OpenCL/m00060_a0-optimized.cl +++ b/OpenCL/m00060_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -66,7 +66,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00060_a0-pure.cl b/OpenCL/m00060_a0-pure.cl index d46ad0ce8..9efc3ea1e 100644 --- a/OpenCL/m00060_a0-pure.cl +++ b/OpenCL/m00060_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -103,7 +103,7 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00060_a1-optimized.cl b/OpenCL/m00060_a1-optimized.cl index f15837866..25159ee25 100644 --- a/OpenCL/m00060_a1-optimized.cl +++ b/OpenCL/m00060_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -64,7 +64,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00060_a1-pure.cl b/OpenCL/m00060_a1-pure.cl index 2019e8fe9..fa247bfc8 100644 --- a/OpenCL/m00060_a1-pure.cl +++ b/OpenCL/m00060_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -124,7 +124,7 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -133,7 +133,7 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00060_a3-optimized.cl b/OpenCL/m00060_a3-optimized.cl index 44bae8951..b46767385 100644 --- a/OpenCL/m00060_a3-optimized.cl +++ b/OpenCL/m00060_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -64,7 +64,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -98,7 +98,7 @@ DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m00060m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00060m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -201,7 +201,7 @@ DECLSPEC static void m00060m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00060s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00060s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00060_a3-pure.cl b/OpenCL/m00060_a3-pure.cl index 16d00ab57..c44f0ea10 100644 --- a/OpenCL/m00060_a3-pure.cl +++ b/OpenCL/m00060_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00060_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -110,7 +110,7 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m00060_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00100_a3-optimized.cl b/OpenCL/m00100_a3-optimized.cl index 6cbabc4fc..7584036a7 100644 --- a/OpenCL/m00100_a3-optimized.cl +++ b/OpenCL/m00100_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m00100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -257,7 +257,7 @@ DECLSPEC static void m00100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00100_a3-pure.cl b/OpenCL/m00100_a3-pure.cl index 4134eca49..881f45ee4 100644 --- a/OpenCL/m00100_a3-pure.cl +++ b/OpenCL/m00100_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00100_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m00100_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00110_a0-pure.cl b/OpenCL/m00110_a0-pure.cl index a51b1b374..5103f8a56 100644 --- a/OpenCL/m00110_a0-pure.cl +++ b/OpenCL/m00110_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00110_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00110_a1-pure.cl b/OpenCL/m00110_a1-pure.cl index 37c6eafa1..294def602 100644 --- a/OpenCL/m00110_a1-pure.cl +++ b/OpenCL/m00110_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00110_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -97,7 +97,7 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00110_a3-optimized.cl b/OpenCL/m00110_a3-optimized.cl index 79c1da7e3..9dcc6624c 100644 --- a/OpenCL/m00110_a3-optimized.cl +++ b/OpenCL/m00110_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m00110m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00110m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -305,7 +305,7 @@ DECLSPEC static void m00110m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00110s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00110s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00110_a3-pure.cl b/OpenCL/m00110_a3-pure.cl index 9c926582b..c17b03694 100644 --- a/OpenCL/m00110_a3-pure.cl +++ b/OpenCL/m00110_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00110_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00110_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m00110_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00120_a3-optimized.cl b/OpenCL/m00120_a3-optimized.cl index 474078e47..2864927bd 100644 --- a/OpenCL/m00120_a3-optimized.cl +++ b/OpenCL/m00120_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m00120m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00120m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -232,7 +232,7 @@ DECLSPEC static void m00120m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00120s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00120s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00120_a3-pure.cl b/OpenCL/m00120_a3-pure.cl index 65c6b070a..6d5cf8c7c 100644 --- a/OpenCL/m00120_a3-pure.cl +++ b/OpenCL/m00120_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00120_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m00120_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00130_a0-pure.cl b/OpenCL/m00130_a0-pure.cl index 56029cf3d..9a8493ffa 100644 --- a/OpenCL/m00130_a0-pure.cl +++ b/OpenCL/m00130_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00130_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00130_a1-pure.cl b/OpenCL/m00130_a1-pure.cl index 7188639aa..69f9b7de2 100644 --- a/OpenCL/m00130_a1-pure.cl +++ b/OpenCL/m00130_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00130_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -97,7 +97,7 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00130_a3-optimized.cl b/OpenCL/m00130_a3-optimized.cl index cfa8189d7..c8dd293a8 100644 --- a/OpenCL/m00130_a3-optimized.cl +++ b/OpenCL/m00130_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m00130m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00130m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -305,7 +305,7 @@ DECLSPEC static void m00130m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00130s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00130s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00130_a3-pure.cl b/OpenCL/m00130_a3-pure.cl index dff3133b6..00e20212c 100644 --- a/OpenCL/m00130_a3-pure.cl +++ b/OpenCL/m00130_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00130_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00130_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m00130_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00140_a3-optimized.cl b/OpenCL/m00140_a3-optimized.cl index 365527948..8db77efc5 100644 --- a/OpenCL/m00140_a3-optimized.cl +++ b/OpenCL/m00140_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m00140m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00140m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -232,7 +232,7 @@ DECLSPEC static void m00140m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00140s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00140s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00140_a3-pure.cl b/OpenCL/m00140_a3-pure.cl index a1e087445..f68773c30 100644 --- a/OpenCL/m00140_a3-pure.cl +++ b/OpenCL/m00140_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00140_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m00140_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00150_a0-optimized.cl b/OpenCL/m00150_a0-optimized.cl index 5e811d340..65e8267bd 100644 --- a/OpenCL/m00150_a0-optimized.cl +++ b/OpenCL/m00150_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -68,7 +68,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00150_a0-pure.cl b/OpenCL/m00150_a0-pure.cl index 5bbcde96e..47d679903 100644 --- a/OpenCL/m00150_a0-pure.cl +++ b/OpenCL/m00150_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -101,7 +101,7 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00150_a1-optimized.cl b/OpenCL/m00150_a1-optimized.cl index b0d9d4793..3c2274d21 100644 --- a/OpenCL/m00150_a1-optimized.cl +++ b/OpenCL/m00150_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -66,7 +66,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00150_a1-pure.cl b/OpenCL/m00150_a1-pure.cl index c675a35dc..24153ff0f 100644 --- a/OpenCL/m00150_a1-pure.cl +++ b/OpenCL/m00150_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -41,7 +41,7 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -122,7 +122,7 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -131,7 +131,7 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00150_a3-optimized.cl b/OpenCL/m00150_a3-optimized.cl index 6209b9740..45d124de5 100644 --- a/OpenCL/m00150_a3-optimized.cl +++ b/OpenCL/m00150_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -66,7 +66,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -102,7 +102,7 @@ DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m00150m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00150m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -207,7 +207,7 @@ DECLSPEC static void m00150m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00150s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00150s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00150_a3-pure.cl b/OpenCL/m00150_a3-pure.cl index 296cd8c88..f4703db48 100644 --- a/OpenCL/m00150_a3-pure.cl +++ b/OpenCL/m00150_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00150_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -108,7 +108,7 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -117,7 +117,7 @@ KERNEL_FQ void m00150_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00160_a0-optimized.cl b/OpenCL/m00160_a0-optimized.cl index 3c53e06e5..7a1be5004 100644 --- a/OpenCL/m00160_a0-optimized.cl +++ b/OpenCL/m00160_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -68,7 +68,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00160_a0-pure.cl b/OpenCL/m00160_a0-pure.cl index f4ec5413d..5ae8c69d1 100644 --- a/OpenCL/m00160_a0-pure.cl +++ b/OpenCL/m00160_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00160_a1-optimized.cl b/OpenCL/m00160_a1-optimized.cl index 847c24c11..894c31530 100644 --- a/OpenCL/m00160_a1-optimized.cl +++ b/OpenCL/m00160_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -66,7 +66,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m00160_a1-pure.cl b/OpenCL/m00160_a1-pure.cl index 9a26d7eab..39a1a1c10 100644 --- a/OpenCL/m00160_a1-pure.cl +++ b/OpenCL/m00160_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -41,7 +41,7 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -124,7 +124,7 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -133,7 +133,7 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00160_a3-optimized.cl b/OpenCL/m00160_a3-optimized.cl index b629a7750..ff0e7823a 100644 --- a/OpenCL/m00160_a3-optimized.cl +++ b/OpenCL/m00160_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -66,7 +66,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -102,7 +102,7 @@ DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m00160m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00160m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -205,7 +205,7 @@ DECLSPEC static void m00160m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m00160s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m00160s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m00160_a3-pure.cl b/OpenCL/m00160_a3-pure.cl index 6da08e1f2..24fb6e0ef 100644 --- a/OpenCL/m00160_a3-pure.cl +++ b/OpenCL/m00160_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m00160_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m00160_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m00200_a3-optimized.cl b/OpenCL/m00200_a3-optimized.cl index 08bcf31b4..61481aa69 100644 --- a/OpenCL/m00200_a3-optimized.cl +++ b/OpenCL/m00200_a3-optimized.cl @@ -89,7 +89,7 @@ } \ } -DECLSPEC static void m00200m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00200m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -235,7 +235,7 @@ DECLSPEC static void m00200m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00200s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00200s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00300_a3-optimized.cl b/OpenCL/m00300_a3-optimized.cl index cd2d3a43b..4fc9de868 100644 --- a/OpenCL/m00300_a3-optimized.cl +++ b/OpenCL/m00300_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m00300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -382,7 +382,7 @@ DECLSPEC static void m00300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00300_a3-pure.cl b/OpenCL/m00300_a3-pure.cl index a94d806c5..4d4865da2 100644 --- a/OpenCL/m00300_a3-pure.cl +++ b/OpenCL/m00300_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00300_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -122,7 +122,7 @@ KERNEL_FQ void m00300_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00400-pure.cl b/OpenCL/m00400-pure.cl index 4446e046e..c251a0380 100644 --- a/OpenCL/m00400-pure.cl +++ b/OpenCL/m00400-pure.cl @@ -77,7 +77,7 @@ KERNEL_FQ void m00400_loop (KERN_ATTR_TMPS (phpass_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m00500-optimized.cl b/OpenCL/m00500-optimized.cl index b77246986..ba7b6f83f 100644 --- a/OpenCL/m00500-optimized.cl +++ b/OpenCL/m00500-optimized.cl @@ -23,7 +23,7 @@ typedef struct md5crypt_tmp #define md5crypt_magic 0x00243124u -DECLSPEC static void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -130,7 +130,7 @@ DECLSPEC static void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block } } -DECLSPEC static void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -239,7 +239,7 @@ DECLSPEC static void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *b } } -DECLSPEC static void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -324,7 +324,7 @@ DECLSPEC static void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3 } } -DECLSPEC static void append_sign (u32 *block0, u32 *block1, const u32 block_len) +DECLSPEC void append_sign (u32 *block0, u32 *block1, const u32 block_len) { switch (block_len) { @@ -406,7 +406,7 @@ DECLSPEC static void append_sign (u32 *block0, u32 *block1, const u32 block_len) } } -DECLSPEC static void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) +DECLSPEC void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) { switch (block_len) { diff --git a/OpenCL/m00500-pure.cl b/OpenCL/m00500-pure.cl index d609e341c..d30b7d1ae 100644 --- a/OpenCL/m00500-pure.cl +++ b/OpenCL/m00500-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m00500_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -50,7 +50,7 @@ KERNEL_FQ void m00500_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -147,7 +147,7 @@ KERNEL_FQ void m00500_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -156,7 +156,7 @@ KERNEL_FQ void m00500_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m00600_a0-optimized.cl b/OpenCL/m00600_a0-optimized.cl index 33264879e..024dae362 100644 --- a/OpenCL/m00600_a0-optimized.cl +++ b/OpenCL/m00600_a0-optimized.cl @@ -51,7 +51,7 @@ typedef struct blake2 BLAKE2B_G (r,7,v[ 3],v[ 4],v[ 9],v[14]); \ } while(0) -DECLSPEC static void blake2b_transform (u64x *h, u64x *t, u64x *f, u64x *m, u64x *v, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x out_len, const u8 isFinal) +DECLSPEC void blake2b_transform (u64x *h, u64x *t, u64x *f, u64x *m, u64x *v, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x out_len, const u8 isFinal) { if (isFinal) f[0] = -1; diff --git a/OpenCL/m00600_a1-optimized.cl b/OpenCL/m00600_a1-optimized.cl index 1f88246f9..9af3a5fbe 100644 --- a/OpenCL/m00600_a1-optimized.cl +++ b/OpenCL/m00600_a1-optimized.cl @@ -49,7 +49,7 @@ typedef struct blake2 BLAKE2B_G (r,7,v[ 3],v[ 4],v[ 9],v[14]); \ } while(0) -DECLSPEC static void blake2b_transform (u64x *h, u64x *t, u64x *f, u64x *m, u64x *v, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x out_len, const u8 isFinal) +DECLSPEC void blake2b_transform (u64x *h, u64x *t, u64x *f, u64x *m, u64x *v, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x out_len, const u8 isFinal) { if (isFinal) f[0] = -1; diff --git a/OpenCL/m00600_a3-optimized.cl b/OpenCL/m00600_a3-optimized.cl index 06b42bd82..56cb67eb7 100644 --- a/OpenCL/m00600_a3-optimized.cl +++ b/OpenCL/m00600_a3-optimized.cl @@ -49,7 +49,7 @@ typedef struct blake2 BLAKE2B_G (r,7,v[ 3],v[ 4],v[ 9],v[14]); \ } while(0) -DECLSPEC static void blake2b_transform (u64x *h, u64x *t, u64x *f, u64x *m, u64x *v, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x out_len, const u8 isFinal) +DECLSPEC void blake2b_transform (u64x *h, u64x *t, u64x *f, u64x *m, u64x *v, const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x out_len, const u8 isFinal) { if (isFinal) f[0] = -1; diff --git a/OpenCL/m00900_a3-optimized.cl b/OpenCL/m00900_a3-optimized.cl index 3da53bca4..a2c3b978b 100644 --- a/OpenCL/m00900_a3-optimized.cl +++ b/OpenCL/m00900_a3-optimized.cl @@ -28,7 +28,7 @@ a -= t; \ } -DECLSPEC static void m00900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -164,7 +164,7 @@ DECLSPEC static void m00900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m00900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m00900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m00900_a3-pure.cl b/OpenCL/m00900_a3-pure.cl index 80620f987..40f3e297c 100644 --- a/OpenCL/m00900_a3-pure.cl +++ b/OpenCL/m00900_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m00900_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m00900_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01000_a3-optimized.cl b/OpenCL/m01000_a3-optimized.cl index c6e074bfe..9ede59c48 100644 --- a/OpenCL/m01000_a3-optimized.cl +++ b/OpenCL/m01000_a3-optimized.cl @@ -28,7 +28,7 @@ a -= t; \ } -DECLSPEC static void m01000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -164,7 +164,7 @@ DECLSPEC static void m01000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01000_a3-pure.cl b/OpenCL/m01000_a3-pure.cl index 19d0421b5..91c34a4de 100644 --- a/OpenCL/m01000_a3-pure.cl +++ b/OpenCL/m01000_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01000_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m01000_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01100_a0-pure.cl b/OpenCL/m01100_a0-pure.cl index 226206ee6..311bf0a12 100644 --- a/OpenCL/m01100_a0-pure.cl +++ b/OpenCL/m01100_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -116,7 +116,7 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m01100_a1-pure.cl b/OpenCL/m01100_a1-pure.cl index b39c60882..d7d218ad6 100644 --- a/OpenCL/m01100_a1-pure.cl +++ b/OpenCL/m01100_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -110,7 +110,7 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m01100_a3-optimized.cl b/OpenCL/m01100_a3-optimized.cl index 8332000a0..73d1b826d 100644 --- a/OpenCL/m01100_a3-optimized.cl +++ b/OpenCL/m01100_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md4.cl" #endif -DECLSPEC static void m01100m (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01100m (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -248,7 +248,7 @@ DECLSPEC static void m01100m (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_ } } -DECLSPEC static void m01100s (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01100s (LOCAL_AS salt_t *s_salt_buf, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01100_a3-pure.cl b/OpenCL/m01100_a3-pure.cl index 9355bc825..155828ab5 100644 --- a/OpenCL/m01100_a3-pure.cl +++ b/OpenCL/m01100_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01100_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -123,7 +123,7 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -132,7 +132,7 @@ KERNEL_FQ void m01100_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m01300_a3-optimized.cl b/OpenCL/m01300_a3-optimized.cl index 8371b6a4b..94e7dadf1 100644 --- a/OpenCL/m01300_a3-optimized.cl +++ b/OpenCL/m01300_a3-optimized.cl @@ -26,7 +26,7 @@ g = 0; \ } -DECLSPEC static void m01300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -145,7 +145,7 @@ DECLSPEC static void m01300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01300_a3-pure.cl b/OpenCL/m01300_a3-pure.cl index 7fc2d9688..c5c54972a 100644 --- a/OpenCL/m01300_a3-pure.cl +++ b/OpenCL/m01300_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01300_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m01300_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01400_a3-optimized.cl b/OpenCL/m01400_a3-optimized.cl index 268942805..e2a3694f4 100644 --- a/OpenCL/m01400_a3-optimized.cl +++ b/OpenCL/m01400_a3-optimized.cl @@ -27,7 +27,7 @@ h = 0; \ } -DECLSPEC static void m01400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -146,7 +146,7 @@ DECLSPEC static void m01400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01400_a3-pure.cl b/OpenCL/m01400_a3-pure.cl index ea2876f55..50ae4b91e 100644 --- a/OpenCL/m01400_a3-pure.cl +++ b/OpenCL/m01400_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01400_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m01400_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01410_a0-pure.cl b/OpenCL/m01410_a0-pure.cl index 5eb183743..852574eec 100644 --- a/OpenCL/m01410_a0-pure.cl +++ b/OpenCL/m01410_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01410_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01410_a1-pure.cl b/OpenCL/m01410_a1-pure.cl index 6567ed32b..4ca539c91 100644 --- a/OpenCL/m01410_a1-pure.cl +++ b/OpenCL/m01410_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01410_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -97,7 +97,7 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01410_a3-optimized.cl b/OpenCL/m01410_a3-optimized.cl index 308bcdebf..69b680bd9 100644 --- a/OpenCL/m01410_a3-optimized.cl +++ b/OpenCL/m01410_a3-optimized.cl @@ -27,7 +27,7 @@ h = 0; \ } -DECLSPEC static void m01410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -197,7 +197,7 @@ DECLSPEC static void m01410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01410_a3-pure.cl b/OpenCL/m01410_a3-pure.cl index 55c899b9d..ec5c0fd00 100644 --- a/OpenCL/m01410_a3-pure.cl +++ b/OpenCL/m01410_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01410_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01410_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m01410_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01420_a3-optimized.cl b/OpenCL/m01420_a3-optimized.cl index 1faafcb37..3915e0d7f 100644 --- a/OpenCL/m01420_a3-optimized.cl +++ b/OpenCL/m01420_a3-optimized.cl @@ -27,7 +27,7 @@ h = 0; \ } -DECLSPEC static void m01420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -221,7 +221,7 @@ DECLSPEC static void m01420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01420_a3-pure.cl b/OpenCL/m01420_a3-pure.cl index 70463fcc7..197729d3a 100644 --- a/OpenCL/m01420_a3-pure.cl +++ b/OpenCL/m01420_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01420_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m01420_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01430_a0-pure.cl b/OpenCL/m01430_a0-pure.cl index d77a15bf6..4ed0a82e5 100644 --- a/OpenCL/m01430_a0-pure.cl +++ b/OpenCL/m01430_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01430_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01430_a1-pure.cl b/OpenCL/m01430_a1-pure.cl index f163d3a02..3b5db7ce1 100644 --- a/OpenCL/m01430_a1-pure.cl +++ b/OpenCL/m01430_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01430_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -97,7 +97,7 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01430_a3-optimized.cl b/OpenCL/m01430_a3-optimized.cl index 1fd72ad98..7122b44b2 100644 --- a/OpenCL/m01430_a3-optimized.cl +++ b/OpenCL/m01430_a3-optimized.cl @@ -27,7 +27,7 @@ h = 0; \ } -DECLSPEC static void m01430m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01430m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -197,7 +197,7 @@ DECLSPEC static void m01430m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01430s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01430s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01430_a3-pure.cl b/OpenCL/m01430_a3-pure.cl index c33ac3d8b..3827a7ca7 100644 --- a/OpenCL/m01430_a3-pure.cl +++ b/OpenCL/m01430_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01430_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01430_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m01430_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01440_a3-optimized.cl b/OpenCL/m01440_a3-optimized.cl index e6b750fce..f41486ab4 100644 --- a/OpenCL/m01440_a3-optimized.cl +++ b/OpenCL/m01440_a3-optimized.cl @@ -27,7 +27,7 @@ h = 0; \ } -DECLSPEC static void m01440m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01440m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -221,7 +221,7 @@ DECLSPEC static void m01440m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01440s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01440s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01440_a3-pure.cl b/OpenCL/m01440_a3-pure.cl index 874f31160..91208330e 100644 --- a/OpenCL/m01440_a3-pure.cl +++ b/OpenCL/m01440_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01440_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m01440_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01450_a0-optimized.cl b/OpenCL/m01450_a0-optimized.cl index 9439b326a..fb0a46c6d 100644 --- a/OpenCL/m01450_a0-optimized.cl +++ b/OpenCL/m01450_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -74,7 +74,7 @@ DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01450_a0-pure.cl b/OpenCL/m01450_a0-pure.cl index bb9566ba6..6febabf09 100644 --- a/OpenCL/m01450_a0-pure.cl +++ b/OpenCL/m01450_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -101,7 +101,7 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01450_a1-optimized.cl b/OpenCL/m01450_a1-optimized.cl index 9c706c500..32c27e05a 100644 --- a/OpenCL/m01450_a1-optimized.cl +++ b/OpenCL/m01450_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -72,7 +72,7 @@ DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01450_a1-pure.cl b/OpenCL/m01450_a1-pure.cl index 24aaefd17..2dc862f8e 100644 --- a/OpenCL/m01450_a1-pure.cl +++ b/OpenCL/m01450_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -41,7 +41,7 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -122,7 +122,7 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -131,7 +131,7 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01450_a3-optimized.cl b/OpenCL/m01450_a3-optimized.cl index a418fd905..20e2730c3 100644 --- a/OpenCL/m01450_a3-optimized.cl +++ b/OpenCL/m01450_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -72,7 +72,7 @@ DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -114,7 +114,7 @@ DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m01450m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01450m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -219,7 +219,7 @@ DECLSPEC static void m01450m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01450s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01450s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01450_a3-pure.cl b/OpenCL/m01450_a3-pure.cl index 1b2e6e31b..7a73dfacd 100644 --- a/OpenCL/m01450_a3-pure.cl +++ b/OpenCL/m01450_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01450_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -108,7 +108,7 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -117,7 +117,7 @@ KERNEL_FQ void m01450_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01460_a0-optimized.cl b/OpenCL/m01460_a0-optimized.cl index 426f2cf68..709688c82 100644 --- a/OpenCL/m01460_a0-optimized.cl +++ b/OpenCL/m01460_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -74,7 +74,7 @@ DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01460_a0-pure.cl b/OpenCL/m01460_a0-pure.cl index fdb5c662d..c6e2abad6 100644 --- a/OpenCL/m01460_a0-pure.cl +++ b/OpenCL/m01460_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01460_a1-optimized.cl b/OpenCL/m01460_a1-optimized.cl index 195e21b17..3edbecca7 100644 --- a/OpenCL/m01460_a1-optimized.cl +++ b/OpenCL/m01460_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -72,7 +72,7 @@ DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m01460_a1-pure.cl b/OpenCL/m01460_a1-pure.cl index 666a5f7d1..b40516132 100644 --- a/OpenCL/m01460_a1-pure.cl +++ b/OpenCL/m01460_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -41,7 +41,7 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -124,7 +124,7 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -133,7 +133,7 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01460_a3-optimized.cl b/OpenCL/m01460_a3-optimized.cl index 9f2306fa9..67121ae53 100644 --- a/OpenCL/m01460_a3-optimized.cl +++ b/OpenCL/m01460_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -72,7 +72,7 @@ DECLSPEC static void hmac_sha256_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -114,7 +114,7 @@ DECLSPEC static void hmac_sha256_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha256_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m01460m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01460m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -217,7 +217,7 @@ DECLSPEC static void m01460m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01460s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01460s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01460_a3-pure.cl b/OpenCL/m01460_a3-pure.cl index c5d15d7c9..01deffbae 100644 --- a/OpenCL/m01460_a3-pure.cl +++ b/OpenCL/m01460_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01460_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m01460_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01500_a0-pure.cl b/OpenCL/m01500_a0-pure.cl index 6466c996b..f3a4d5913 100644 --- a/OpenCL/m01500_a0-pure.cl +++ b/OpenCL/m01500_a0-pure.cl @@ -342,7 +342,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -411,7 +411,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m01500_a1-pure.cl b/OpenCL/m01500_a1-pure.cl index c0800e1a9..88a06b749 100644 --- a/OpenCL/m01500_a1-pure.cl +++ b/OpenCL/m01500_a1-pure.cl @@ -340,7 +340,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -409,7 +409,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m01500_a3-pure.cl b/OpenCL/m01500_a3-pure.cl index 93dd66f60..ce3cebf22 100644 --- a/OpenCL/m01500_a3-pure.cl +++ b/OpenCL/m01500_a3-pure.cl @@ -55,7 +55,7 @@ #define LUT(a,b,c,d,e) u32 a; asm ("lop3.b32 %0, %1, %2, %3, "#e";" : "=r"(a): "r"(b), "r"(c), "r"(d)); -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xAA55AA5500550055, a1, a4, a6, 0xC1) LUT(xA55AA55AF0F5F0F5, a3, a6, xAA55AA5500550055, 0x9E) @@ -89,7 +89,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xEEEEEEEE99999999, a1, a2, a6, 0x97) LUT(xFFFFEEEE66666666, a5, a6, xEEEEEEEE99999999, 0x67) @@ -122,7 +122,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xA50FA50FA50FA50F, a1, a3, a4, 0xC9) LUT(xF0F00F0FF0F0F0F0, a3, a5, a6, 0x4B) @@ -156,7 +156,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x55F055F055F055F0, a1, a3, a4, 0x72) LUT(xA500F5F0A500F5F0, a3, a5, x55F055F055F055F0, 0xAD) @@ -183,7 +183,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xA0A0A0A0FFFFFFFF, a1, a3, a6, 0xAB) LUT(xFFFF00005555FFFF, a1, a5, a6, 0xB9) @@ -217,7 +217,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x5050F5F55050F5F5, a1, a3, a5, 0xB2) LUT(x6363C6C66363C6C6, a1, a2, x5050F5F55050F5F5, 0x66) @@ -250,7 +250,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x88AA88AA88AA88AA, a1, a2, a4, 0x0B) LUT(xAAAAFF00AAAAFF00, a1, a4, a5, 0x27) @@ -283,7 +283,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xEEEE3333EEEE3333, a1, a2, a5, 0x9D) LUT(xBBBBBBBBBBBBBBBB, a1, a1, a2, 0x83) @@ -341,7 +341,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -416,7 +416,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -487,7 +487,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -558,7 +558,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out3 ^= x21; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -612,7 +612,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -685,7 +685,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -758,7 +758,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out1 ^= x01; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -829,7 +829,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -922,7 +922,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -997,7 +997,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -1068,7 +1068,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -1139,7 +1139,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out3 ^= x21; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -1193,7 +1193,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -1266,7 +1266,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -1339,7 +1339,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out1 ^= x01; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -1410,7 +1410,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -1534,7 +1534,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, #ifdef DESCRYPT_SALT -DECLSPEC static void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) { const u32 s001 = (0x001 & DESCRYPT_SALT) ? 1 : 0; const u32 s002 = (0x002 & DESCRYPT_SALT) ? 1 : 0; @@ -1662,7 +1662,7 @@ DECLSPEC static void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, con #else -DECLSPEC static void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) { const u32 s001 = (0x001 & SALT) ? 0xffffffff : 0; const u32 s002 = (0x002 & SALT) ? 0xffffffff : 0; @@ -1790,7 +1790,7 @@ DECLSPEC static void DESCrypt (const u32 SALT, const u32 K00, const u32 K01, con #endif -DECLSPEC static void transpose32c (u32 *data) +DECLSPEC void transpose32c (u32 *data) { #define swap(x,y,j,m) \ t = ((x) ^ ((y) >> (j))) & (m); \ diff --git a/OpenCL/m01600-optimized.cl b/OpenCL/m01600-optimized.cl index 7731073e3..66dbd88b7 100644 --- a/OpenCL/m01600-optimized.cl +++ b/OpenCL/m01600-optimized.cl @@ -22,7 +22,7 @@ typedef struct md5crypt_tmp #define md5apr1_magic0 0x72706124u #define md5apr1_magic1 0x00002431u -DECLSPEC static void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -129,7 +129,7 @@ DECLSPEC static void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block } } -DECLSPEC static void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -238,7 +238,7 @@ DECLSPEC static void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *b } } -DECLSPEC static void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -323,7 +323,7 @@ DECLSPEC static void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3 } } -DECLSPEC static void append_sign (u32 *block0, u32 *block1, const u32 block_len) +DECLSPEC void append_sign (u32 *block0, u32 *block1, const u32 block_len) { switch (block_len) { @@ -421,7 +421,7 @@ DECLSPEC static void append_sign (u32 *block0, u32 *block1, const u32 block_len) } } -DECLSPEC static void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) +DECLSPEC void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) { switch (block_len) { diff --git a/OpenCL/m01600-pure.cl b/OpenCL/m01600-pure.cl index 567ae9bfa..129ff6ab2 100644 --- a/OpenCL/m01600-pure.cl +++ b/OpenCL/m01600-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m01600_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -51,7 +51,7 @@ KERNEL_FQ void m01600_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -149,7 +149,7 @@ KERNEL_FQ void m01600_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -158,7 +158,7 @@ KERNEL_FQ void m01600_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m01700_a0-optimized.cl b/OpenCL/m01700_a0-optimized.cl index f0637efcb..695c97f08 100644 --- a/OpenCL/m01700_a0-optimized.cl +++ b/OpenCL/m01700_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01700_a1-optimized.cl b/OpenCL/m01700_a1-optimized.cl index c45f2ba1c..3b42628f8 100644 --- a/OpenCL/m01700_a1-optimized.cl +++ b/OpenCL/m01700_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01700_a3-optimized.cl b/OpenCL/m01700_a3-optimized.cl index 856523908..e56c00969 100644 --- a/OpenCL/m01700_a3-optimized.cl +++ b/OpenCL/m01700_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, co digest[7] = h; } -DECLSPEC static void m01700m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01700m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -177,7 +177,7 @@ DECLSPEC static void m01700m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01700s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01700s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01700_a3-pure.cl b/OpenCL/m01700_a3-pure.cl index 4eae8ab89..19a23b77c 100644 --- a/OpenCL/m01700_a3-pure.cl +++ b/OpenCL/m01700_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01700_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m01700_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01710_a0-optimized.cl b/OpenCL/m01710_a0-optimized.cl index 8e82289b9..8bc710215 100644 --- a/OpenCL/m01710_a0-optimized.cl +++ b/OpenCL/m01710_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01710_a0-pure.cl b/OpenCL/m01710_a0-pure.cl index a9aeed15b..6d40f022d 100644 --- a/OpenCL/m01710_a0-pure.cl +++ b/OpenCL/m01710_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01710_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01710_a1-optimized.cl b/OpenCL/m01710_a1-optimized.cl index 5a547bd54..97997deaf 100644 --- a/OpenCL/m01710_a1-optimized.cl +++ b/OpenCL/m01710_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01710_a1-pure.cl b/OpenCL/m01710_a1-pure.cl index 8956f2099..aa558a08f 100644 --- a/OpenCL/m01710_a1-pure.cl +++ b/OpenCL/m01710_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01710_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -97,7 +97,7 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01710_a3-optimized.cl b/OpenCL/m01710_a3-optimized.cl index 695d200e4..fc88c97b9 100644 --- a/OpenCL/m01710_a3-optimized.cl +++ b/OpenCL/m01710_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, co digest[7] = h; } -DECLSPEC static void m01710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -228,7 +228,7 @@ DECLSPEC static void m01710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01710_a3-pure.cl b/OpenCL/m01710_a3-pure.cl index fd311b1e0..cd381f8b1 100644 --- a/OpenCL/m01710_a3-pure.cl +++ b/OpenCL/m01710_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01710_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01710_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m01710_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01720_a0-optimized.cl b/OpenCL/m01720_a0-optimized.cl index 10a6de0e3..d2b6624a2 100644 --- a/OpenCL/m01720_a0-optimized.cl +++ b/OpenCL/m01720_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01720_a1-optimized.cl b/OpenCL/m01720_a1-optimized.cl index f618bf2b9..db43b2d6f 100644 --- a/OpenCL/m01720_a1-optimized.cl +++ b/OpenCL/m01720_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01720_a3-optimized.cl b/OpenCL/m01720_a3-optimized.cl index 3f0393c07..205d6a567 100644 --- a/OpenCL/m01720_a3-optimized.cl +++ b/OpenCL/m01720_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, co digest[7] = h; } -DECLSPEC static void m01720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -230,7 +230,7 @@ DECLSPEC static void m01720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01720_a3-pure.cl b/OpenCL/m01720_a3-pure.cl index 8a143c538..b4faaaed2 100644 --- a/OpenCL/m01720_a3-pure.cl +++ b/OpenCL/m01720_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01720_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m01720_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01730_a0-optimized.cl b/OpenCL/m01730_a0-optimized.cl index 6d460a04a..990dc6712 100644 --- a/OpenCL/m01730_a0-optimized.cl +++ b/OpenCL/m01730_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01730_a0-pure.cl b/OpenCL/m01730_a0-pure.cl index 3f07846d8..1f2f9946f 100644 --- a/OpenCL/m01730_a0-pure.cl +++ b/OpenCL/m01730_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01730_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01730_a1-optimized.cl b/OpenCL/m01730_a1-optimized.cl index 9d25b933f..51e673e37 100644 --- a/OpenCL/m01730_a1-optimized.cl +++ b/OpenCL/m01730_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01730_a1-pure.cl b/OpenCL/m01730_a1-pure.cl index 189586d83..e1dd5629d 100644 --- a/OpenCL/m01730_a1-pure.cl +++ b/OpenCL/m01730_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01730_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -97,7 +97,7 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01730_a3-optimized.cl b/OpenCL/m01730_a3-optimized.cl index 41c59479d..cc9a73baa 100644 --- a/OpenCL/m01730_a3-optimized.cl +++ b/OpenCL/m01730_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, co digest[7] = h; } -DECLSPEC static void m01730m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01730m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -228,7 +228,7 @@ DECLSPEC static void m01730m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m01730s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m01730s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m01730_a3-pure.cl b/OpenCL/m01730_a3-pure.cl index 7d5cac9f8..119a19f31 100644 --- a/OpenCL/m01730_a3-pure.cl +++ b/OpenCL/m01730_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01730_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01730_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m01730_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01740_a0-optimized.cl b/OpenCL/m01740_a0-optimized.cl index 36f37bd94..4e046b948 100644 --- a/OpenCL/m01740_a0-optimized.cl +++ b/OpenCL/m01740_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01740_a1-optimized.cl b/OpenCL/m01740_a1-optimized.cl index 93cbca542..6c9306d76 100644 --- a/OpenCL/m01740_a1-optimized.cl +++ b/OpenCL/m01740_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m01740_a3-optimized.cl b/OpenCL/m01740_a3-optimized.cl index fb1587a8d..077830ed1 100644 --- a/OpenCL/m01740_a3-optimized.cl +++ b/OpenCL/m01740_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, co digest[7] = h; } -DECLSPEC static void m01740m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01740m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -230,7 +230,7 @@ DECLSPEC static void m01740m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01740s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01740s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01740_a3-pure.cl b/OpenCL/m01740_a3-pure.cl index 2aee6cac0..298ff8eb7 100644 --- a/OpenCL/m01740_a3-pure.cl +++ b/OpenCL/m01740_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01740_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m01740_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m01750_a0-optimized.cl b/OpenCL/m01750_a0-optimized.cl index 2f0f7be6c..b8cdee6e8 100644 --- a/OpenCL/m01750_a0-optimized.cl +++ b/OpenCL/m01750_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -62,7 +62,7 @@ DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u6 sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -126,7 +126,7 @@ DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01750_a0-pure.cl b/OpenCL/m01750_a0-pure.cl index 565b6db17..adf938244 100644 --- a/OpenCL/m01750_a0-pure.cl +++ b/OpenCL/m01750_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -101,7 +101,7 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01750_a1-optimized.cl b/OpenCL/m01750_a1-optimized.cl index b132e198c..56693782b 100644 --- a/OpenCL/m01750_a1-optimized.cl +++ b/OpenCL/m01750_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -60,7 +60,7 @@ DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u6 sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -124,7 +124,7 @@ DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01750_a1-pure.cl b/OpenCL/m01750_a1-pure.cl index 98e1b5e49..ebc65973f 100644 --- a/OpenCL/m01750_a1-pure.cl +++ b/OpenCL/m01750_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -41,7 +41,7 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -122,7 +122,7 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -131,7 +131,7 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01750_a3-optimized.cl b/OpenCL/m01750_a3-optimized.cl index 99749e121..05f3a62f7 100644 --- a/OpenCL/m01750_a3-optimized.cl +++ b/OpenCL/m01750_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -60,7 +60,7 @@ DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u6 sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -124,7 +124,7 @@ DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; @@ -188,7 +188,7 @@ DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, digest); } -DECLSPEC static void m01750m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01750m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -298,7 +298,7 @@ DECLSPEC static void m01750m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01750s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01750s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01750_a3-pure.cl b/OpenCL/m01750_a3-pure.cl index 116c40ce5..1a2c82e24 100644 --- a/OpenCL/m01750_a3-pure.cl +++ b/OpenCL/m01750_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01750_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -108,7 +108,7 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -117,7 +117,7 @@ KERNEL_FQ void m01750_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01760_a0-optimized.cl b/OpenCL/m01760_a0-optimized.cl index 7c01f8bfe..2a8fbca09 100644 --- a/OpenCL/m01760_a0-optimized.cl +++ b/OpenCL/m01760_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -62,7 +62,7 @@ DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u6 sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -126,7 +126,7 @@ DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01760_a0-pure.cl b/OpenCL/m01760_a0-pure.cl index 0167f1b57..149526465 100644 --- a/OpenCL/m01760_a0-pure.cl +++ b/OpenCL/m01760_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01760_a1-optimized.cl b/OpenCL/m01760_a1-optimized.cl index 2374c0d47..9285fd6d4 100644 --- a/OpenCL/m01760_a1-optimized.cl +++ b/OpenCL/m01760_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -60,7 +60,7 @@ DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u6 sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -124,7 +124,7 @@ DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; diff --git a/OpenCL/m01760_a1-pure.cl b/OpenCL/m01760_a1-pure.cl index 7f1b9fe55..81fe1aa1a 100644 --- a/OpenCL/m01760_a1-pure.cl +++ b/OpenCL/m01760_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -41,7 +41,7 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -124,7 +124,7 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -133,7 +133,7 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01760_a3-optimized.cl b/OpenCL/m01760_a3-optimized.cl index 7a9097140..ca5ecc77c 100644 --- a/OpenCL/m01760_a3-optimized.cl +++ b/OpenCL/m01760_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) +DECLSPEC void sha512_transform_transport_vector (const u64x *w0, const u64x *w1, const u64x *w2, const u64x *w3, u64x *digest) { u32x t0[4]; u32x t1[4]; @@ -60,7 +60,7 @@ DECLSPEC static void sha512_transform_transport_vector (const u64x *w0, const u6 sha512_transform_vector (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) +DECLSPEC void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad) { u64x w0_t[4]; u64x w1_t[4]; @@ -124,7 +124,7 @@ DECLSPEC static void hmac_sha512_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, opad); } -DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad, u64x *opad, u64x *digest) { u64x w0_t[4]; u64x w1_t[4]; @@ -188,7 +188,7 @@ DECLSPEC static void hmac_sha512_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u6 sha512_transform_transport_vector (w0_t, w1_t, w2_t, w3_t, digest); } -DECLSPEC static void m01760m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01760m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -296,7 +296,7 @@ DECLSPEC static void m01760m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m01760s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m01760s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m01760_a3-pure.cl b/OpenCL/m01760_a3-pure.cl index c40ae8c11..1110e21da 100644 --- a/OpenCL/m01760_a3-pure.cl +++ b/OpenCL/m01760_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m01760_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m01760_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m01800-optimized.cl b/OpenCL/m01800-optimized.cl index 031d518bb..f9ec2cc02 100644 --- a/OpenCL/m01800-optimized.cl +++ b/OpenCL/m01800-optimized.cl @@ -38,7 +38,7 @@ typedef struct } orig_sha512_ctx_t; -DECLSPEC static void sha512_transform_transport (const u64 *w, u64 *digest) +DECLSPEC void sha512_transform_transport (const u64 *w, u64 *digest) { u32 t0[4]; u32 t1[4]; @@ -85,7 +85,7 @@ DECLSPEC static void sha512_transform_transport (const u64 *w, u64 *digest) sha512_transform (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void orig_sha512_init (orig_sha512_ctx_t *sha512_ctx) +DECLSPEC void orig_sha512_init (orig_sha512_ctx_t *sha512_ctx) { sha512_ctx->state[0] = SHA512M_A; sha512_ctx->state[1] = SHA512M_B; @@ -99,7 +99,7 @@ DECLSPEC static void orig_sha512_init (orig_sha512_ctx_t *sha512_ctx) sha512_ctx->len = 0; } -DECLSPEC static void orig_sha512_update (orig_sha512_ctx_t *sha512_ctx, const u64 *buf, int len) +DECLSPEC void orig_sha512_update (orig_sha512_ctx_t *sha512_ctx, const u64 *buf, int len) { int pos = sha512_ctx->len & 0x7f; @@ -132,7 +132,7 @@ DECLSPEC static void orig_sha512_update (orig_sha512_ctx_t *sha512_ctx, const u6 } } -DECLSPEC static void orig_sha512_final (orig_sha512_ctx_t *sha512_ctx) +DECLSPEC void orig_sha512_final (orig_sha512_ctx_t *sha512_ctx) { int pos = sha512_ctx->len & 0x7f; diff --git a/OpenCL/m01800-pure.cl b/OpenCL/m01800-pure.cl index 80adb080d..64a705d8e 100644 --- a/OpenCL/m01800-pure.cl +++ b/OpenCL/m01800-pure.cl @@ -45,12 +45,12 @@ KERNEL_FQ void m01800_init (KERN_ATTR_TMPS (sha512crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (w[idx]); } @@ -59,12 +59,12 @@ KERNEL_FQ void m01800_init (KERN_ATTR_TMPS (sha512crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (s[idx]); } diff --git a/OpenCL/m02100-pure.cl b/OpenCL/m02100-pure.cl index 0d32db92a..cde6b322f 100644 --- a/OpenCL/m02100-pure.cl +++ b/OpenCL/m02100-pure.cl @@ -27,7 +27,7 @@ typedef struct dcc2_tmp } dcc2_tmp_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m02400_a3-optimized.cl b/OpenCL/m02400_a3-optimized.cl index af7cb3c94..66fa42907 100644 --- a/OpenCL/m02400_a3-optimized.cl +++ b/OpenCL/m02400_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m02400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -228,7 +228,7 @@ DECLSPEC static void m02400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m02400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m02410_a3-optimized.cl b/OpenCL/m02410_a3-optimized.cl index fe06f2515..76b7eb086 100644 --- a/OpenCL/m02410_a3-optimized.cl +++ b/OpenCL/m02410_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m02410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -277,7 +277,7 @@ DECLSPEC static void m02410m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m02410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m02410s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m02500-pure.cl b/OpenCL/m02500-pure.cl index 30609d31a..e106634b6 100644 --- a/OpenCL/m02500-pure.cl +++ b/OpenCL/m02500-pure.cl @@ -60,7 +60,7 @@ typedef struct wpa_pbkdf2_tmp } wpa_pbkdf2_tmp_t; -DECLSPEC static void make_kn (u32 *k) +DECLSPEC void make_kn (u32 *k) { u32 kl[4]; u32 kr[4]; @@ -90,7 +90,7 @@ DECLSPEC static void make_kn (u32 *k) k[3] ^= c * 0x87000000; } -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m02501-pure.cl b/OpenCL/m02501-pure.cl index 8a774d0da..8259b455f 100644 --- a/OpenCL/m02501-pure.cl +++ b/OpenCL/m02501-pure.cl @@ -54,12 +54,12 @@ typedef struct wpa_eapol } wpa_eapol_t; #ifdef KERNEL_STATIC -DECLSPEC static u8 hex_convert (const u8 c) +DECLSPEC u8 hex_convert (const u8 c) { return (c & 15) + (c >> 6) * 9; } -DECLSPEC static u8 hex_to_u8 (const u8 *hex) +DECLSPEC u8 hex_to_u8 (const u8 *hex) { u8 v = 0; @@ -70,7 +70,7 @@ DECLSPEC static u8 hex_to_u8 (const u8 *hex) } #endif -DECLSPEC static void make_kn (u32 *k) +DECLSPEC void make_kn (u32 *k) { u32 kl[4]; u32 kr[4]; diff --git a/OpenCL/m02610_a0-pure.cl b/OpenCL/m02610_a0-pure.cl index 143f32f28..5c209f995 100644 --- a/OpenCL/m02610_a0-pure.cl +++ b/OpenCL/m02610_a0-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m02610_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -181,7 +181,7 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m02610_a1-pure.cl b/OpenCL/m02610_a1-pure.cl index c4b97e3c8..46f3808bb 100644 --- a/OpenCL/m02610_a1-pure.cl +++ b/OpenCL/m02610_a1-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m02610_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -175,7 +175,7 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m02610_a3-optimized.cl b/OpenCL/m02610_a3-optimized.cl index ab0fc7e24..73af945f8 100644 --- a/OpenCL/m02610_a3-optimized.cl +++ b/OpenCL/m02610_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m02610m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02610m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -283,7 +283,7 @@ DECLSPEC static void m02610m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m02610s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02610s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m02610_a3-pure.cl b/OpenCL/m02610_a3-pure.cl index 448bdddcf..842897b54 100644 --- a/OpenCL/m02610_a3-pure.cl +++ b/OpenCL/m02610_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m02610_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -71,7 +71,7 @@ KERNEL_FQ void m02610_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -188,7 +188,7 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -197,7 +197,7 @@ KERNEL_FQ void m02610_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m02710_a3-optimized.cl b/OpenCL/m02710_a3-optimized.cl index 30a27d52b..a02f67260 100644 --- a/OpenCL/m02710_a3-optimized.cl +++ b/OpenCL/m02710_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m02710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -368,7 +368,7 @@ DECLSPEC static void m02710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m02710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m02810_a0-pure.cl b/OpenCL/m02810_a0-pure.cl index e12a17728..5e22e1b3b 100644 --- a/OpenCL/m02810_a0-pure.cl +++ b/OpenCL/m02810_a0-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m02810_mxx (KERN_ATTR_RULES ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } @@ -204,7 +204,7 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_RULES ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } diff --git a/OpenCL/m02810_a1-pure.cl b/OpenCL/m02810_a1-pure.cl index 64209484b..187fe0dfc 100644 --- a/OpenCL/m02810_a1-pure.cl +++ b/OpenCL/m02810_a1-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m02810_mxx (KERN_ATTR_BASIC ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } @@ -198,7 +198,7 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_BASIC ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } diff --git a/OpenCL/m02810_a3-optimized.cl b/OpenCL/m02810_a3-optimized.cl index 30cbe1710..1f80d06f3 100644 --- a/OpenCL/m02810_a3-optimized.cl +++ b/OpenCL/m02810_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m02810m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02810m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -367,7 +367,7 @@ DECLSPEC static void m02810m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m02810s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m02810s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m02810_a3-pure.cl b/OpenCL/m02810_a3-pure.cl index bc7178999..0af147c6b 100644 --- a/OpenCL/m02810_a3-pure.cl +++ b/OpenCL/m02810_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m02810_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -71,7 +71,7 @@ KERNEL_FQ void m02810_mxx (KERN_ATTR_VECTOR ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } @@ -211,7 +211,7 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -220,7 +220,7 @@ KERNEL_FQ void m02810_sxx (KERN_ATTR_VECTOR ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } diff --git a/OpenCL/m03000_a0-pure.cl b/OpenCL/m03000_a0-pure.cl index 8986a93fe..531d294e9 100644 --- a/OpenCL/m03000_a0-pure.cl +++ b/OpenCL/m03000_a0-pure.cl @@ -345,7 +345,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -387,7 +387,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd iv[1] = hc_rotl32 (r, 29); } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -456,7 +456,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void transform_netntlmv1_key (const u32 w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32x w1, u32x *out) { u32 t[8]; diff --git a/OpenCL/m03000_a1-pure.cl b/OpenCL/m03000_a1-pure.cl index ba8b63b1a..0e00a37ef 100644 --- a/OpenCL/m03000_a1-pure.cl +++ b/OpenCL/m03000_a1-pure.cl @@ -343,7 +343,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -385,7 +385,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd iv[1] = hc_rotl32 (r, 29); } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -454,7 +454,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void transform_netntlmv1_key (const u32 w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32x w1, u32x *out) { u32 t[8]; diff --git a/OpenCL/m03000_a3-pure.cl b/OpenCL/m03000_a3-pure.cl index f0effced1..81d25664a 100644 --- a/OpenCL/m03000_a3-pure.cl +++ b/OpenCL/m03000_a3-pure.cl @@ -55,7 +55,7 @@ #define LUT(a,b,c,d,e) u32 a; asm ("lop3.b32 %0, %1, %2, %3, "#e";" : "=r"(a): "r"(b), "r"(c), "r"(d)); -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xAA55AA5500550055, a1, a4, a6, 0xC1) LUT(xA55AA55AF0F5F0F5, a3, a6, xAA55AA5500550055, 0x9E) @@ -89,7 +89,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xEEEEEEEE99999999, a1, a2, a6, 0x97) LUT(xFFFFEEEE66666666, a5, a6, xEEEEEEEE99999999, 0x67) @@ -122,7 +122,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xA50FA50FA50FA50F, a1, a3, a4, 0xC9) LUT(xF0F00F0FF0F0F0F0, a3, a5, a6, 0x4B) @@ -156,7 +156,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x55F055F055F055F0, a1, a3, a4, 0x72) LUT(xA500F5F0A500F5F0, a3, a5, x55F055F055F055F0, 0xAD) @@ -183,7 +183,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xA0A0A0A0FFFFFFFF, a1, a3, a6, 0xAB) LUT(xFFFF00005555FFFF, a1, a5, a6, 0xB9) @@ -217,7 +217,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x5050F5F55050F5F5, a1, a3, a5, 0xB2) LUT(x6363C6C66363C6C6, a1, a2, x5050F5F55050F5F5, 0x66) @@ -250,7 +250,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x88AA88AA88AA88AA, a1, a2, a4, 0x0B) LUT(xAAAAFF00AAAAFF00, a1, a4, a5, 0x27) @@ -283,7 +283,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xEEEE3333EEEE3333, a1, a2, a5, 0x9D) LUT(xBBBBBBBBBBBBBBBB, a1, a1, a2, 0x83) @@ -341,7 +341,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -416,7 +416,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -487,7 +487,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -558,7 +558,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out3 ^= x21; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -612,7 +612,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -685,7 +685,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -758,7 +758,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out1 ^= x01; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -829,7 +829,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -922,7 +922,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -997,7 +997,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -1068,7 +1068,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -1139,7 +1139,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out3 ^= x21; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -1193,7 +1193,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -1266,7 +1266,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -1339,7 +1339,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out1 ^= x01; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -1410,7 +1410,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -1529,7 +1529,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, #define KEYSET07 { k00 = K31; k01 = K35; k02 = K52; k03 = K43; k04 = K08; k05 = K37; k06 = K51; k07 = K15; k08 = K49; k09 = K30; k10 = K07; k11 = K02; k12 = K50; k13 = K21; k14 = K45; k15 = K44; k16 = K29; k17 = K16; k18 = K42; k19 = K23; k20 = K22; k21 = K14; k22 = K38; k23 = K01; k24 = K10; k25 = K47; k26 = K53; k27 = K11; k28 = K27; k29 = K26; k30 = K05; k31 = K17; k32 = K54; k33 = K41; k34 = K39; k35 = K20; k36 = K48; k37 = K13; k38 = K24; k39 = K19; k40 = K32; k41 = K40; k42 = K34; k43 = K03; k44 = K06; k45 = K18; k46 = K12; k47 = K46; } #define KEYSET17 { k00 = K15; k01 = K51; k02 = K36; k03 = K02; k04 = K49; k05 = K21; k06 = K35; k07 = K31; k08 = K08; k09 = K14; k10 = K23; k11 = K43; k12 = K09; k13 = K37; k14 = K29; k15 = K28; k16 = K45; k17 = K00; k18 = K01; k19 = K07; k20 = K38; k21 = K30; k22 = K22; k23 = K42; k24 = K26; k25 = K04; k26 = K41; k27 = K54; k28 = K39; k29 = K10; k30 = K48; k31 = K33; k32 = K11; k33 = K53; k34 = K27; k35 = K32; k36 = K05; k37 = K25; k38 = K40; k39 = K03; k40 = K20; k41 = K24; k42 = K46; k43 = K19; k44 = K18; k45 = K06; k46 = K55; k47 = K34; } -DECLSPEC static void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) { KXX_DECL u32 k00, k01, k02, k03, k04, k05; KXX_DECL u32 k06, k07, k08, k09, k10, k11; @@ -1635,7 +1635,7 @@ DECLSPEC static void DES (const u32 K00, const u32 K01, const u32 K02, const u32 } } -DECLSPEC static void transpose32c (u32 *data) +DECLSPEC void transpose32c (u32 *data) { #define swap(x,y,j,m) \ t = ((x) ^ ((y) >> (j))) & (m); \ diff --git a/OpenCL/m03100_a3-optimized.cl b/OpenCL/m03100_a3-optimized.cl index c0c72063d..41fe2f1f5 100644 --- a/OpenCL/m03100_a3-optimized.cl +++ b/OpenCL/m03100_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_cipher_des.cl" #endif -DECLSPEC static void m03100m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m03100m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -194,7 +194,7 @@ DECLSPEC static void m03100m (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_sk } } -DECLSPEC static void m03100s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m03100s (SHM_TYPE u32 (*s_SPtrans)[64], SHM_TYPE u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m03200-pure.cl b/OpenCL/m03200-pure.cl index 1d35e2931..332cca11c 100644 --- a/OpenCL/m03200-pure.cl +++ b/OpenCL/m03200-pure.cl @@ -346,7 +346,7 @@ CONSTANT_AS u32a c_sbox3[256] = L ^= P[17]; \ } -DECLSPEC static void expand_key (u32 *E, u32 *W, const int len) +DECLSPEC void expand_key (u32 *E, u32 *W, const int len) { u8 *E_ptr = (u8 *) E; u8 *W_ptr = (u8 *) W; diff --git a/OpenCL/m03710_a0-pure.cl b/OpenCL/m03710_a0-pure.cl index 1968820c7..600e2bfbd 100644 --- a/OpenCL/m03710_a0-pure.cl +++ b/OpenCL/m03710_a0-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m03710_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -194,7 +194,7 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m03710_a1-pure.cl b/OpenCL/m03710_a1-pure.cl index 8f45d0522..334a09bdb 100644 --- a/OpenCL/m03710_a1-pure.cl +++ b/OpenCL/m03710_a1-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m03710_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -188,7 +188,7 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m03710_a3-optimized.cl b/OpenCL/m03710_a3-optimized.cl index 44677d5e6..6feff2427 100644 --- a/OpenCL/m03710_a3-optimized.cl +++ b/OpenCL/m03710_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m03710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -314,7 +314,7 @@ DECLSPEC static void m03710m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m03710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03710s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m03710_a3-pure.cl b/OpenCL/m03710_a3-pure.cl index 342a13974..b9c61f98f 100644 --- a/OpenCL/m03710_a3-pure.cl +++ b/OpenCL/m03710_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m03710_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -71,7 +71,7 @@ KERNEL_FQ void m03710_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -201,7 +201,7 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -210,7 +210,7 @@ KERNEL_FQ void m03710_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m03800_a0-pure.cl b/OpenCL/m03800_a0-pure.cl index df14818f5..4bcc387b9 100644 --- a/OpenCL/m03800_a0-pure.cl +++ b/OpenCL/m03800_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m03800_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -107,7 +107,7 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m03800_a1-pure.cl b/OpenCL/m03800_a1-pure.cl index d63de7d0d..e0b3fbf2d 100644 --- a/OpenCL/m03800_a1-pure.cl +++ b/OpenCL/m03800_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m03800_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m03800_a3-optimized.cl b/OpenCL/m03800_a3-optimized.cl index 7d7c25c60..5fbcffba0 100644 --- a/OpenCL/m03800_a3-optimized.cl +++ b/OpenCL/m03800_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m03800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m03800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -237,7 +237,7 @@ DECLSPEC static void m03800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m03800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m03800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m03800_a3-pure.cl b/OpenCL/m03800_a3-pure.cl index f45ff5b8e..4f8bf236b 100644 --- a/OpenCL/m03800_a3-pure.cl +++ b/OpenCL/m03800_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m03800_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m03800_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -116,7 +116,7 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -125,7 +125,7 @@ KERNEL_FQ void m03800_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m03910_a0-pure.cl b/OpenCL/m03910_a0-pure.cl index 3b7a85d3b..9cebaca44 100644 --- a/OpenCL/m03910_a0-pure.cl +++ b/OpenCL/m03910_a0-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m03910_mxx (KERN_ATTR_RULES ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } @@ -204,7 +204,7 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_RULES ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } diff --git a/OpenCL/m03910_a1-pure.cl b/OpenCL/m03910_a1-pure.cl index 104fe563e..3c3706a99 100644 --- a/OpenCL/m03910_a1-pure.cl +++ b/OpenCL/m03910_a1-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m03910_mxx (KERN_ATTR_BASIC ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } @@ -198,7 +198,7 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_BASIC ()) u32 s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } diff --git a/OpenCL/m03910_a3-optimized.cl b/OpenCL/m03910_a3-optimized.cl index c4f68d8e6..aeacff0e7 100644 --- a/OpenCL/m03910_a3-optimized.cl +++ b/OpenCL/m03910_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m03910m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03910m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -367,7 +367,7 @@ DECLSPEC static void m03910m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m03910s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m03910s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m03910_a3-pure.cl b/OpenCL/m03910_a3-pure.cl index 5b583f2d2..b4c269e4c 100644 --- a/OpenCL/m03910_a3-pure.cl +++ b/OpenCL/m03910_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m03910_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -71,7 +71,7 @@ KERNEL_FQ void m03910_mxx (KERN_ATTR_VECTOR ()) u32x s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } @@ -211,7 +211,7 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -220,7 +220,7 @@ KERNEL_FQ void m03910_sxx (KERN_ATTR_VECTOR ()) u32x s[8] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf_pc[idx]; } diff --git a/OpenCL/m04010_a3-optimized.cl b/OpenCL/m04010_a3-optimized.cl index f889d46cd..34d678766 100644 --- a/OpenCL/m04010_a3-optimized.cl +++ b/OpenCL/m04010_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m04010m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04010m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -334,7 +334,7 @@ DECLSPEC static void m04010m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04010s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04010s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m04010_a3-pure.cl b/OpenCL/m04010_a3-pure.cl index be45c592f..2f6882a17 100644 --- a/OpenCL/m04010_a3-pure.cl +++ b/OpenCL/m04010_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m04010_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -196,7 +196,7 @@ KERNEL_FQ void m04010_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m04110_a0-pure.cl b/OpenCL/m04110_a0-pure.cl index f62bb7614..8347442e3 100644 --- a/OpenCL/m04110_a0-pure.cl +++ b/OpenCL/m04110_a0-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m04110_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -198,7 +198,7 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m04110_a1-pure.cl b/OpenCL/m04110_a1-pure.cl index d3b34b792..9d9273f2a 100644 --- a/OpenCL/m04110_a1-pure.cl +++ b/OpenCL/m04110_a1-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m04110_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -192,7 +192,7 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m04110_a3-optimized.cl b/OpenCL/m04110_a3-optimized.cl index 55fc68e4b..c9dd1fcc5 100644 --- a/OpenCL/m04110_a3-optimized.cl +++ b/OpenCL/m04110_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m04110m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04110m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -362,7 +362,7 @@ DECLSPEC static void m04110m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04110s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04110s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m04110_a3-pure.cl b/OpenCL/m04110_a3-pure.cl index c8b6c635a..4c74ccbd2 100644 --- a/OpenCL/m04110_a3-pure.cl +++ b/OpenCL/m04110_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m04110_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -71,7 +71,7 @@ KERNEL_FQ void m04110_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -207,7 +207,7 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -216,7 +216,7 @@ KERNEL_FQ void m04110_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m04310_a0-pure.cl b/OpenCL/m04310_a0-pure.cl index 61e2f7200..0a0230892 100644 --- a/OpenCL/m04310_a0-pure.cl +++ b/OpenCL/m04310_a0-pure.cl @@ -66,7 +66,7 @@ KERNEL_FQ void m04310_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -181,7 +181,7 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m04310_a1-pure.cl b/OpenCL/m04310_a1-pure.cl index 8e0db955e..2ce1d1fa7 100644 --- a/OpenCL/m04310_a1-pure.cl +++ b/OpenCL/m04310_a1-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m04310_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -175,7 +175,7 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m04310_a3-optimized.cl b/OpenCL/m04310_a3-optimized.cl index 74a3f902b..159bf0f4a 100644 --- a/OpenCL/m04310_a3-optimized.cl +++ b/OpenCL/m04310_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m04310m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04310m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -283,7 +283,7 @@ DECLSPEC static void m04310m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04310s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04310s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m04310_a3-pure.cl b/OpenCL/m04310_a3-pure.cl index 1fa18591c..f291aecb6 100644 --- a/OpenCL/m04310_a3-pure.cl +++ b/OpenCL/m04310_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m04310_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -71,7 +71,7 @@ KERNEL_FQ void m04310_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -188,7 +188,7 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -197,7 +197,7 @@ KERNEL_FQ void m04310_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m04400_a3-optimized.cl b/OpenCL/m04400_a3-optimized.cl index 892c15d47..33224fc61 100644 --- a/OpenCL/m04400_a3-optimized.cl +++ b/OpenCL/m04400_a3-optimized.cl @@ -26,7 +26,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m04400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -287,7 +287,7 @@ DECLSPEC static void m04400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m04400_a3-pure.cl b/OpenCL/m04400_a3-pure.cl index 091fc60ce..213a956ef 100644 --- a/OpenCL/m04400_a3-pure.cl +++ b/OpenCL/m04400_a3-pure.cl @@ -63,7 +63,7 @@ KERNEL_FQ void m04400_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -183,7 +183,7 @@ KERNEL_FQ void m04400_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m04500_a3-optimized.cl b/OpenCL/m04500_a3-optimized.cl index a6d89eb50..1be7a4321 100644 --- a/OpenCL/m04500_a3-optimized.cl +++ b/OpenCL/m04500_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m04500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -313,7 +313,7 @@ DECLSPEC static void m04500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m04500_a3-pure.cl b/OpenCL/m04500_a3-pure.cl index 268e86b75..086e72121 100644 --- a/OpenCL/m04500_a3-pure.cl +++ b/OpenCL/m04500_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m04500_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -182,7 +182,7 @@ KERNEL_FQ void m04500_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m04520_a3-optimized.cl b/OpenCL/m04520_a3-optimized.cl index 753141c1c..c3d1a96d3 100644 --- a/OpenCL/m04520_a3-optimized.cl +++ b/OpenCL/m04520_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m04520m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04520m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -544,7 +544,7 @@ DECLSPEC static void m04520m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04520s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04520s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m04520_a3-pure.cl b/OpenCL/m04520_a3-pure.cl index 20f479c53..c1e49123c 100644 --- a/OpenCL/m04520_a3-pure.cl +++ b/OpenCL/m04520_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m04520_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -199,7 +199,7 @@ KERNEL_FQ void m04520_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m04700_a3-optimized.cl b/OpenCL/m04700_a3-optimized.cl index 2931376ba..d1bf72589 100644 --- a/OpenCL/m04700_a3-optimized.cl +++ b/OpenCL/m04700_a3-optimized.cl @@ -26,7 +26,7 @@ #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m04700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -284,7 +284,7 @@ DECLSPEC static void m04700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m04700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m04700_a3-pure.cl b/OpenCL/m04700_a3-pure.cl index 9a5fce196..29ca21e72 100644 --- a/OpenCL/m04700_a3-pure.cl +++ b/OpenCL/m04700_a3-pure.cl @@ -63,7 +63,7 @@ KERNEL_FQ void m04700_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -178,7 +178,7 @@ KERNEL_FQ void m04700_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m04800_a3-optimized.cl b/OpenCL/m04800_a3-optimized.cl index 995f5a679..5da3ee496 100644 --- a/OpenCL/m04800_a3-optimized.cl +++ b/OpenCL/m04800_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m04800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -197,7 +197,7 @@ DECLSPEC static void m04800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m04800_a3-pure.cl b/OpenCL/m04800_a3-pure.cl index aa4b26b98..43284c7af 100644 --- a/OpenCL/m04800_a3-pure.cl +++ b/OpenCL/m04800_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m04800_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -118,7 +118,7 @@ KERNEL_FQ void m04800_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m04900_a0-pure.cl b/OpenCL/m04900_a0-pure.cl index e33e13272..ef31db611 100644 --- a/OpenCL/m04900_a0-pure.cl +++ b/OpenCL/m04900_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m04900_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -107,7 +107,7 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m04900_a1-pure.cl b/OpenCL/m04900_a1-pure.cl index 7f1d1a242..acd27d749 100644 --- a/OpenCL/m04900_a1-pure.cl +++ b/OpenCL/m04900_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m04900_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -99,7 +99,7 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m04900_a3-optimized.cl b/OpenCL/m04900_a3-optimized.cl index 699900b60..e3aa883cc 100644 --- a/OpenCL/m04900_a3-optimized.cl +++ b/OpenCL/m04900_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m04900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -280,7 +280,7 @@ DECLSPEC static void m04900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m04900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m04900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m04900_a3-pure.cl b/OpenCL/m04900_a3-pure.cl index 345852597..6d6b02b9f 100644 --- a/OpenCL/m04900_a3-pure.cl +++ b/OpenCL/m04900_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m04900_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m04900_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); } @@ -116,7 +116,7 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -125,7 +125,7 @@ KERNEL_FQ void m04900_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m05100_a3-optimized.cl b/OpenCL/m05100_a3-optimized.cl index f3541397c..f4be1c794 100644 --- a/OpenCL/m05100_a3-optimized.cl +++ b/OpenCL/m05100_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m05100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m05100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -148,7 +148,7 @@ DECLSPEC static void m05100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m05100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m05100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m05100_a3-pure.cl b/OpenCL/m05100_a3-pure.cl index 3ba6e6712..6dcea48d1 100644 --- a/OpenCL/m05100_a3-pure.cl +++ b/OpenCL/m05100_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m05100_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -103,7 +103,7 @@ KERNEL_FQ void m05100_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m05300_a0-optimized.cl b/OpenCL/m05300_a0-optimized.cl index 80149dad1..11a175095 100644 --- a/OpenCL/m05300_a0-optimized.cl +++ b/OpenCL/m05300_a0-optimized.cl @@ -25,7 +25,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -76,7 +76,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05300_a1-optimized.cl b/OpenCL/m05300_a1-optimized.cl index ad6da1f7d..290f60a35 100644 --- a/OpenCL/m05300_a1-optimized.cl +++ b/OpenCL/m05300_a1-optimized.cl @@ -23,7 +23,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -74,7 +74,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05300_a1-pure.cl b/OpenCL/m05300_a1-pure.cl index a854741b1..8aa4b80d3 100644 --- a/OpenCL/m05300_a1-pure.cl +++ b/OpenCL/m05300_a1-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_ESALT (ikepsk_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -153,7 +153,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_ESALT (ikepsk_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m05300_a3-optimized.cl b/OpenCL/m05300_a3-optimized.cl index 312005cb1..c228edc09 100644 --- a/OpenCL/m05300_a3-optimized.cl +++ b/OpenCL/m05300_a3-optimized.cl @@ -23,7 +23,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -74,7 +74,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -108,7 +108,7 @@ DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m05300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** * modifier @@ -255,7 +255,7 @@ DECLSPEC static void m05300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m05300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** * modifier diff --git a/OpenCL/m05300_a3-pure.cl b/OpenCL/m05300_a3-pure.cl index 450d8b3eb..c89b6ab10 100644 --- a/OpenCL/m05300_a3-pure.cl +++ b/OpenCL/m05300_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m05300_mxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -139,7 +139,7 @@ KERNEL_FQ void m05300_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m05400_a0-optimized.cl b/OpenCL/m05400_a0-optimized.cl index 063deb64c..06cfe4d95 100644 --- a/OpenCL/m05400_a0-optimized.cl +++ b/OpenCL/m05400_a0-optimized.cl @@ -25,7 +25,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -78,7 +78,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05400_a1-optimized.cl b/OpenCL/m05400_a1-optimized.cl index a94f66c2b..576f280d4 100644 --- a/OpenCL/m05400_a1-optimized.cl +++ b/OpenCL/m05400_a1-optimized.cl @@ -23,7 +23,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -76,7 +76,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05400_a1-pure.cl b/OpenCL/m05400_a1-pure.cl index 3d649bb71..abb5cfce3 100644 --- a/OpenCL/m05400_a1-pure.cl +++ b/OpenCL/m05400_a1-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_ESALT (ikepsk_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -153,7 +153,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_ESALT (ikepsk_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } diff --git a/OpenCL/m05400_a3-optimized.cl b/OpenCL/m05400_a3-optimized.cl index 617d66a4b..21d723531 100644 --- a/OpenCL/m05400_a3-optimized.cl +++ b/OpenCL/m05400_a3-optimized.cl @@ -23,7 +23,7 @@ typedef struct ikepsk } ikepsk_t; -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -76,7 +76,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -112,7 +112,7 @@ DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m05400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** * modifier @@ -259,7 +259,7 @@ DECLSPEC static void m05400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m05400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) +DECLSPEC void m05400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (ikepsk_t), LOCAL_AS u32 *s_msg_buf, LOCAL_AS u32 *s_nr_buf) { /** * modifier diff --git a/OpenCL/m05400_a3-pure.cl b/OpenCL/m05400_a3-pure.cl index af1773d6c..ed16f2ca9 100644 --- a/OpenCL/m05400_a3-pure.cl +++ b/OpenCL/m05400_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m05400_mxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -139,7 +139,7 @@ KERNEL_FQ void m05400_sxx (KERN_ATTR_VECTOR_ESALT (ikepsk_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m05500_a0-optimized.cl b/OpenCL/m05500_a0-optimized.cl index b01c66dab..7db6100e7 100644 --- a/OpenCL/m05500_a0-optimized.cl +++ b/OpenCL/m05500_a0-optimized.cl @@ -355,7 +355,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -397,7 +397,7 @@ DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *K iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -466,7 +466,7 @@ DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LO } } -DECLSPEC static void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) { u32x t[8]; diff --git a/OpenCL/m05500_a0-pure.cl b/OpenCL/m05500_a0-pure.cl index ebaa51a95..f83be3388 100644 --- a/OpenCL/m05500_a0-pure.cl +++ b/OpenCL/m05500_a0-pure.cl @@ -355,7 +355,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -397,7 +397,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -466,7 +466,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_ } } -DECLSPEC static void transform_netntlmv1_key (const u32 w0, const u32 w1, u32 *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, u32 *out) { u32 t[8]; diff --git a/OpenCL/m05500_a1-optimized.cl b/OpenCL/m05500_a1-optimized.cl index 5d277802f..20de5bc7e 100644 --- a/OpenCL/m05500_a1-optimized.cl +++ b/OpenCL/m05500_a1-optimized.cl @@ -353,7 +353,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -395,7 +395,7 @@ DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *K iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -464,7 +464,7 @@ DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LO } } -DECLSPEC static void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) { u32x t[8]; diff --git a/OpenCL/m05500_a1-pure.cl b/OpenCL/m05500_a1-pure.cl index bfb04422f..14e152681 100644 --- a/OpenCL/m05500_a1-pure.cl +++ b/OpenCL/m05500_a1-pure.cl @@ -353,7 +353,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -395,7 +395,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -464,7 +464,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_ } } -DECLSPEC static void transform_netntlmv1_key (const u32 w0, const u32 w1, u32 *out) +DECLSPEC void transform_netntlmv1_key (const u32 w0, const u32 w1, u32 *out) { u32 t[8]; diff --git a/OpenCL/m05500_a3-optimized.cl b/OpenCL/m05500_a3-optimized.cl index 9ba5d0c6d..5f43cd563 100644 --- a/OpenCL/m05500_a3-optimized.cl +++ b/OpenCL/m05500_a3-optimized.cl @@ -353,7 +353,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -395,7 +395,7 @@ DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *K iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -464,7 +464,7 @@ DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LO } } -DECLSPEC static void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) { u32x t[8]; @@ -499,7 +499,7 @@ DECLSPEC static void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x | ((k[7] & 0xff) << 24); } -DECLSPEC static void m05500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m05500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -656,7 +656,7 @@ DECLSPEC static void m05500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_sk } } -DECLSPEC static void m05500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m05500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m05500_a3-pure.cl b/OpenCL/m05500_a3-pure.cl index e372b5f32..c4aa11718 100644 --- a/OpenCL/m05500_a3-pure.cl +++ b/OpenCL/m05500_a3-pure.cl @@ -353,7 +353,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -395,7 +395,7 @@ DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *K iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -464,7 +464,7 @@ DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LO } } -DECLSPEC static void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) +DECLSPEC void transform_netntlmv1_key (const u32x w0, const u32x w1, u32x *out) { u32x t[8]; @@ -557,7 +557,7 @@ KERNEL_FQ void m05500_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -704,7 +704,7 @@ KERNEL_FQ void m05500_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m05600_a0-optimized.cl b/OpenCL/m05600_a0-optimized.cl index f6b17c6e8..a1cb6f71d 100644 --- a/OpenCL/m05600_a0-optimized.cl +++ b/OpenCL/m05600_a0-optimized.cl @@ -28,7 +28,7 @@ typedef struct netntlm } netntlm_t; -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -79,7 +79,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05600_a1-optimized.cl b/OpenCL/m05600_a1-optimized.cl index 496714b2d..16af9bf75 100644 --- a/OpenCL/m05600_a1-optimized.cl +++ b/OpenCL/m05600_a1-optimized.cl @@ -26,7 +26,7 @@ typedef struct netntlm } netntlm_t; -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -77,7 +77,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m05600_a3-optimized.cl b/OpenCL/m05600_a3-optimized.cl index dd2d401d7..ba42483e9 100644 --- a/OpenCL/m05600_a3-optimized.cl +++ b/OpenCL/m05600_a3-optimized.cl @@ -26,7 +26,7 @@ typedef struct netntlm } netntlm_t; -DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -77,7 +77,7 @@ DECLSPEC static void hmac_md5_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -111,7 +111,7 @@ DECLSPEC static void hmac_md5_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x md5_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m05600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) +DECLSPEC void m05600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) { /** * modifier @@ -317,7 +317,7 @@ DECLSPEC static void m05600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m05600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) +DECLSPEC void m05600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (netntlm_t), LOCAL_AS u32 *s_userdomain_buf, LOCAL_AS u32 *s_chall_buf) { /** * modifier diff --git a/OpenCL/m05600_a3-pure.cl b/OpenCL/m05600_a3-pure.cl index 192430399..d5d48f5b7 100644 --- a/OpenCL/m05600_a3-pure.cl +++ b/OpenCL/m05600_a3-pure.cl @@ -45,7 +45,7 @@ KERNEL_FQ void m05600_mxx (KERN_ATTR_VECTOR_ESALT (netntlm_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -167,7 +167,7 @@ KERNEL_FQ void m05600_sxx (KERN_ATTR_VECTOR_ESALT (netntlm_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m05800-optimized.cl b/OpenCL/m05800-optimized.cl index 6f811a977..339376659 100644 --- a/OpenCL/m05800-optimized.cl +++ b/OpenCL/m05800-optimized.cl @@ -2075,7 +2075,7 @@ CONSTANT_AS u32a c_pc_len[1024] = 4 }; -DECLSPEC static void append_word (u32 *w0, u32 *w1, const u32 *append, const u32 offset) +DECLSPEC void append_word (u32 *w0, u32 *w1, const u32 *append, const u32 offset) { switch (offset) { @@ -2109,7 +2109,7 @@ DECLSPEC static void append_word (u32 *w0, u32 *w1, const u32 *append, const u32 } } -DECLSPEC static void append_salt (u32 *w0, u32 *w1, u32 *w2, const u32 *append, const u32 offset) +DECLSPEC void append_salt (u32 *w0, u32 *w1, u32 *w2, const u32 *append, const u32 offset) { u32 tmp0; u32 tmp1; diff --git a/OpenCL/m05800-pure.cl b/OpenCL/m05800-pure.cl index 35e4201bf..a397ae119 100644 --- a/OpenCL/m05800-pure.cl +++ b/OpenCL/m05800-pure.cl @@ -2140,7 +2140,7 @@ KERNEL_FQ void m05800_loop (KERN_ATTR_TMPS (androidpin_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -2149,7 +2149,7 @@ KERNEL_FQ void m05800_loop (KERN_ATTR_TMPS (androidpin_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m06000_a0-optimized.cl b/OpenCL/m06000_a0-optimized.cl index b42e16084..e38bfd5a6 100644 --- a/OpenCL/m06000_a0-optimized.cl +++ b/OpenCL/m06000_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_ripemd160.cl" #endif -DECLSPEC static void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) +DECLSPEC void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) { ripemd160_transform_vector (w + 0, w + 4, w + 8, w + 12, dgst); } diff --git a/OpenCL/m06000_a1-optimized.cl b/OpenCL/m06000_a1-optimized.cl index 96c043c27..640132315 100644 --- a/OpenCL/m06000_a1-optimized.cl +++ b/OpenCL/m06000_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_ripemd160.cl" #endif -DECLSPEC static void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) +DECLSPEC void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) { ripemd160_transform_vector (w + 0, w + 4, w + 8, w + 12, dgst); } diff --git a/OpenCL/m06000_a3-optimized.cl b/OpenCL/m06000_a3-optimized.cl index e2fe16deb..966fcf15f 100644 --- a/OpenCL/m06000_a3-optimized.cl +++ b/OpenCL/m06000_a3-optimized.cl @@ -13,12 +13,12 @@ #include "inc_hash_ripemd160.cl" #endif -DECLSPEC static void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) +DECLSPEC void ripemd160_transform_transport_vector (const u32x *w, u32x *dgst) { ripemd160_transform_vector (w + 0, w + 4, w + 8, w + 12, dgst); } -DECLSPEC static void m06000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m06000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -76,7 +76,7 @@ DECLSPEC static void m06000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m06000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m06000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m06000_a3-pure.cl b/OpenCL/m06000_a3-pure.cl index c30b40113..d7bbe5a02 100644 --- a/OpenCL/m06000_a3-pure.cl +++ b/OpenCL/m06000_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m06000_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m06000_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m06100_a0-optimized.cl b/OpenCL/m06100_a0-optimized.cl index 4c218d64a..046d0c4f9 100644 --- a/OpenCL/m06100_a0-optimized.cl +++ b/OpenCL/m06100_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_whirlpool.cl" #endif -DECLSPEC static void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { whirlpool_transform_vector (w + 0, w + 4, w + 8, w + 12, digest, s_Ch, s_Cl); } diff --git a/OpenCL/m06100_a1-optimized.cl b/OpenCL/m06100_a1-optimized.cl index aae60b220..f81455869 100644 --- a/OpenCL/m06100_a1-optimized.cl +++ b/OpenCL/m06100_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_whirlpool.cl" #endif -DECLSPEC static void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { whirlpool_transform_vector (w + 0, w + 4, w + 8, w + 12, digest, s_Ch, s_Cl); } diff --git a/OpenCL/m06100_a3-optimized.cl b/OpenCL/m06100_a3-optimized.cl index e2632dcc3..da2d8745e 100644 --- a/OpenCL/m06100_a3-optimized.cl +++ b/OpenCL/m06100_a3-optimized.cl @@ -13,12 +13,12 @@ #include "inc_hash_whirlpool.cl" #endif -DECLSPEC static void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void whirlpool_transform_transport_vector (const u32x *w, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { whirlpool_transform_vector (w + 0, w + 4, w + 8, w + 12, digest, s_Ch, s_Cl); } -DECLSPEC static void m06100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), SHM_TYPE u32 (*s_Cl)[256], SHM_TYPE u32 (*s_Ch)[256]) +DECLSPEC void m06100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), SHM_TYPE u32 (*s_Cl)[256], SHM_TYPE u32 (*s_Ch)[256]) { /** * modifier @@ -87,7 +87,7 @@ DECLSPEC static void m06100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m06100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), SHM_TYPE u32 (*s_Cl)[256], SHM_TYPE u32 (*s_Ch)[256]) +DECLSPEC void m06100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), SHM_TYPE u32 (*s_Cl)[256], SHM_TYPE u32 (*s_Ch)[256]) { /** * modifier diff --git a/OpenCL/m06100_a3-pure.cl b/OpenCL/m06100_a3-pure.cl index eb1ef32da..3f2f65bfd 100644 --- a/OpenCL/m06100_a3-pure.cl +++ b/OpenCL/m06100_a3-pure.cl @@ -72,7 +72,7 @@ KERNEL_FQ void m06100_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -179,7 +179,7 @@ KERNEL_FQ void m06100_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m06211-pure.cl b/OpenCL/m06211-pure.cl index 6d23d8e67..529049401 100644 --- a/OpenCL/m06211-pure.cl +++ b/OpenCL/m06211-pure.cl @@ -44,7 +44,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06212-pure.cl b/OpenCL/m06212-pure.cl index 330e95771..f6228daea 100644 --- a/OpenCL/m06212-pure.cl +++ b/OpenCL/m06212-pure.cl @@ -44,7 +44,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06213-pure.cl b/OpenCL/m06213-pure.cl index 4cbe55304..1bd79a274 100644 --- a/OpenCL/m06213-pure.cl +++ b/OpenCL/m06213-pure.cl @@ -44,7 +44,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06221-pure.cl b/OpenCL/m06221-pure.cl index 93d368d78..75e6a556e 100644 --- a/OpenCL/m06221-pure.cl +++ b/OpenCL/m06221-pure.cl @@ -44,7 +44,7 @@ typedef struct tc64_tmp } tc64_tmp_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06222-pure.cl b/OpenCL/m06222-pure.cl index 6e7cd8b80..f39eba2a5 100644 --- a/OpenCL/m06222-pure.cl +++ b/OpenCL/m06222-pure.cl @@ -44,7 +44,7 @@ typedef struct tc64_tmp } tc64_tmp_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06223-pure.cl b/OpenCL/m06223-pure.cl index ac18aabec..2c2468f59 100644 --- a/OpenCL/m06223-pure.cl +++ b/OpenCL/m06223-pure.cl @@ -44,7 +44,7 @@ typedef struct tc64_tmp } tc64_tmp_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06231-pure.cl b/OpenCL/m06231-pure.cl index 5b9f59e4c..57fc6cdcc 100644 --- a/OpenCL/m06231-pure.cl +++ b/OpenCL/m06231-pure.cl @@ -44,7 +44,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC static void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m06232-pure.cl b/OpenCL/m06232-pure.cl index 51aba0f02..9634349d5 100644 --- a/OpenCL/m06232-pure.cl +++ b/OpenCL/m06232-pure.cl @@ -44,7 +44,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC static void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m06233-pure.cl b/OpenCL/m06233-pure.cl index 95246c62c..7e4066daa 100644 --- a/OpenCL/m06233-pure.cl +++ b/OpenCL/m06233-pure.cl @@ -44,7 +44,7 @@ typedef struct tc_tmp } tc_tmp_t; -DECLSPEC static void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m06300-optimized.cl b/OpenCL/m06300-optimized.cl index ff088da80..fb1169aea 100644 --- a/OpenCL/m06300-optimized.cl +++ b/OpenCL/m06300-optimized.cl @@ -19,7 +19,7 @@ typedef struct md5crypt_tmp } md5crypt_tmp_t; -DECLSPEC static void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -126,7 +126,7 @@ DECLSPEC static void memcat16 (u32 *block0, u32 *block1, u32 *block2, u32 *block } } -DECLSPEC static void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -235,7 +235,7 @@ DECLSPEC static void memcat16_x80 (u32 *block0, u32 *block1, u32 *block2, u32 *b } } -DECLSPEC static void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) +DECLSPEC void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 offset, const u32 *append) { u32 tmp0; u32 tmp1; @@ -320,7 +320,7 @@ DECLSPEC static void memcat8 (u32 *block0, u32 *block1, u32 *block2, u32 *block3 } } -DECLSPEC static void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) +DECLSPEC void append_1st (u32 *block0, u32 *block1, u32 *block2, u32 *block3, const u32 block_len, const u32 append) { switch (block_len) { diff --git a/OpenCL/m06300-pure.cl b/OpenCL/m06300-pure.cl index 12bf2ee12..360f2e4e9 100644 --- a/OpenCL/m06300-pure.cl +++ b/OpenCL/m06300-pure.cl @@ -39,7 +39,7 @@ KERNEL_FQ void m06300_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -48,7 +48,7 @@ KERNEL_FQ void m06300_init (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } @@ -139,7 +139,7 @@ KERNEL_FQ void m06300_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -148,7 +148,7 @@ KERNEL_FQ void m06300_loop (KERN_ATTR_TMPS (md5crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } diff --git a/OpenCL/m06400-pure.cl b/OpenCL/m06400-pure.cl index 3b45deb2c..0b7ba781e 100644 --- a/OpenCL/m06400-pure.cl +++ b/OpenCL/m06400-pure.cl @@ -26,7 +26,7 @@ typedef struct sha256aix_tmp } sha256aix_tmp_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06500-pure.cl b/OpenCL/m06500-pure.cl index 5046c9f5b..4a4a5b449 100644 --- a/OpenCL/m06500-pure.cl +++ b/OpenCL/m06500-pure.cl @@ -26,7 +26,7 @@ typedef struct sha512aix_tmp } sha512aix_tmp_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06600-pure.cl b/OpenCL/m06600-pure.cl index c146c98af..b84adff7b 100644 --- a/OpenCL/m06600-pure.cl +++ b/OpenCL/m06600-pure.cl @@ -27,7 +27,7 @@ typedef struct agilekey_tmp } agilekey_tmp_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06700-pure.cl b/OpenCL/m06700-pure.cl index a8803294d..9c9edafc2 100644 --- a/OpenCL/m06700-pure.cl +++ b/OpenCL/m06700-pure.cl @@ -26,7 +26,7 @@ typedef struct sha1aix_tmp } sha1aix_tmp_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06800-pure.cl b/OpenCL/m06800-pure.cl index ccf9f76ff..2bf55cd0d 100644 --- a/OpenCL/m06800-pure.cl +++ b/OpenCL/m06800-pure.cl @@ -27,7 +27,7 @@ typedef struct lastpass_tmp } lastpass_tmp_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m06900_a3-optimized.cl b/OpenCL/m06900_a3-optimized.cl index 26a8cb8cf..5d9996777 100644 --- a/OpenCL/m06900_a3-optimized.cl +++ b/OpenCL/m06900_a3-optimized.cl @@ -695,7 +695,7 @@ CONSTANT_AS u32a c_tables[4][256] = R (k, h, s, 6, t); \ } -DECLSPEC static void m06900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 (*s_tables)[256]) +DECLSPEC void m06900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 (*s_tables)[256]) { /** * modifier @@ -869,7 +869,7 @@ DECLSPEC static void m06900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m06900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 (*s_tables)[256]) +DECLSPEC void m06900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 (*s_tables)[256]) { /** * modifier diff --git a/OpenCL/m07000_a3-optimized.cl b/OpenCL/m07000_a3-optimized.cl index bacc4c447..f3db19268 100644 --- a/OpenCL/m07000_a3-optimized.cl +++ b/OpenCL/m07000_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m07000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -280,7 +280,7 @@ DECLSPEC static void m07000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m07000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m07000_a3-pure.cl b/OpenCL/m07000_a3-pure.cl index c3fc7752a..52852d473 100644 --- a/OpenCL/m07000_a3-pure.cl +++ b/OpenCL/m07000_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m07000_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -133,7 +133,7 @@ KERNEL_FQ void m07000_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m07100-pure.cl b/OpenCL/m07100-pure.cl index 35b66852f..9426ceb2f 100644 --- a/OpenCL/m07100-pure.cl +++ b/OpenCL/m07100-pure.cl @@ -32,7 +32,7 @@ typedef struct pbkdf2_sha512 } pbkdf2_sha512_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m07300_a0-optimized.cl b/OpenCL/m07300_a0-optimized.cl index 6c8b532b0..c1744096c 100644 --- a/OpenCL/m07300_a0-optimized.cl +++ b/OpenCL/m07300_a0-optimized.cl @@ -22,7 +22,7 @@ typedef struct rakp } rakp_t; -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -75,7 +75,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m07300_a1-optimized.cl b/OpenCL/m07300_a1-optimized.cl index 03998040a..cf142f29a 100644 --- a/OpenCL/m07300_a1-optimized.cl +++ b/OpenCL/m07300_a1-optimized.cl @@ -20,7 +20,7 @@ typedef struct rakp } rakp_t; -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -73,7 +73,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m07300_a1-pure.cl b/OpenCL/m07300_a1-pure.cl index d2f7a4fbe..26bf80185 100644 --- a/OpenCL/m07300_a1-pure.cl +++ b/OpenCL/m07300_a1-pure.cl @@ -39,7 +39,7 @@ KERNEL_FQ void m07300_mxx (KERN_ATTR_ESALT (rakp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -120,7 +120,7 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_ESALT (rakp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } diff --git a/OpenCL/m07300_a3-optimized.cl b/OpenCL/m07300_a3-optimized.cl index 4c2ce199e..7b9e7a78d 100644 --- a/OpenCL/m07300_a3-optimized.cl +++ b/OpenCL/m07300_a3-optimized.cl @@ -20,7 +20,7 @@ typedef struct rakp } rakp_t; -DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) +DECLSPEC void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -73,7 +73,7 @@ DECLSPEC static void hmac_sha1_pad (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -109,7 +109,7 @@ DECLSPEC static void hmac_sha1_run (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void m07300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (rakp_t)) +DECLSPEC void m07300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (rakp_t)) { /** * modifier @@ -219,7 +219,7 @@ DECLSPEC static void m07300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m07300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (rakp_t)) +DECLSPEC void m07300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (rakp_t)) { /** * modifier diff --git a/OpenCL/m07300_a3-pure.cl b/OpenCL/m07300_a3-pure.cl index 46237c1ee..bfdf6824c 100644 --- a/OpenCL/m07300_a3-pure.cl +++ b/OpenCL/m07300_a3-pure.cl @@ -39,7 +39,7 @@ KERNEL_FQ void m07300_mxx (KERN_ATTR_VECTOR_ESALT (rakp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -106,7 +106,7 @@ KERNEL_FQ void m07300_sxx (KERN_ATTR_VECTOR_ESALT (rakp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m07400-optimized.cl b/OpenCL/m07400-optimized.cl index e98f60304..0b56927cb 100644 --- a/OpenCL/m07400-optimized.cl +++ b/OpenCL/m07400-optimized.cl @@ -23,7 +23,7 @@ typedef struct sha256crypt_tmp } sha256crypt_tmp_t; -DECLSPEC static void sha256_transform_transport (const u32 *w, u32 *digest) +DECLSPEC void sha256_transform_transport (const u32 *w, u32 *digest) { u32 w0[4]; u32 w1[4]; @@ -50,7 +50,7 @@ DECLSPEC static void sha256_transform_transport (const u32 *w, u32 *digest) sha256_transform (w0, w1, w2, w3, digest); } -DECLSPEC static void init_ctx (u32 *digest) +DECLSPEC void init_ctx (u32 *digest) { digest[0] = SHA256M_A; digest[1] = SHA256M_B; @@ -62,7 +62,7 @@ DECLSPEC static void init_ctx (u32 *digest) digest[7] = SHA256M_H; } -DECLSPEC static void bzero16 (u32 *block) +DECLSPEC void bzero16 (u32 *block) { block[ 0] = 0; block[ 1] = 0; @@ -82,7 +82,7 @@ DECLSPEC static void bzero16 (u32 *block) block[15] = 0; } -DECLSPEC static void bswap8 (u32 *block) +DECLSPEC void bswap8 (u32 *block) { block[ 0] = hc_swap32_S (block[ 0]); block[ 1] = hc_swap32_S (block[ 1]); @@ -94,7 +94,7 @@ DECLSPEC static void bswap8 (u32 *block) block[ 7] = hc_swap32_S (block[ 7]); } -DECLSPEC static u32 memcat16 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat16 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) { u32 tmp0; u32 tmp1; @@ -229,7 +229,7 @@ DECLSPEC static u32 memcat16 (u32 *block, const u32 offset, const u32 *append, c return new_len; } -DECLSPEC static u32 memcat16c (u32 *block, const u32 offset, const u32 *append, const u32 append_len, u32 *digest) +DECLSPEC u32 memcat16c (u32 *block, const u32 offset, const u32 *append, const u32 append_len, u32 *digest) { u32 tmp0; u32 tmp1; @@ -390,7 +390,7 @@ DECLSPEC static u32 memcat16c (u32 *block, const u32 offset, const u32 *append, return new_len; } -DECLSPEC static u32 memcat20 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat20 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) { u32 tmp0; u32 tmp1; @@ -533,7 +533,7 @@ DECLSPEC static u32 memcat20 (u32 *block, const u32 offset, const u32 *append, c return offset + append_len; } -DECLSPEC static u32 memcat20_x80 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) +DECLSPEC u32 memcat20_x80 (u32 *block, const u32 offset, const u32 *append, const u32 append_len) { u32 tmp0; u32 tmp1; diff --git a/OpenCL/m07400-pure.cl b/OpenCL/m07400-pure.cl index 1cacc18c2..b822dbdad 100644 --- a/OpenCL/m07400-pure.cl +++ b/OpenCL/m07400-pure.cl @@ -41,12 +41,12 @@ KERNEL_FQ void m07400_init (KERN_ATTR_TMPS (sha256crypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (w[idx]); } @@ -55,12 +55,12 @@ KERNEL_FQ void m07400_init (KERN_ATTR_TMPS (sha256crypt_tmp_t)) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = salt_bufs[salt_pos].salt_buf[idx]; } - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (s[idx]); } diff --git a/OpenCL/m07500_a0-optimized.cl b/OpenCL/m07500_a0-optimized.cl index 1bb725266..028cca99b 100644 --- a/OpenCL/m07500_a0-optimized.cl +++ b/OpenCL/m07500_a0-optimized.cl @@ -35,7 +35,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -44,7 +44,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -97,7 +97,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -150,7 +150,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) { rc4_init_16 (rc4_key, data); @@ -180,7 +180,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 return 1; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -231,7 +231,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -265,7 +265,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) { /** * pads diff --git a/OpenCL/m07500_a0-pure.cl b/OpenCL/m07500_a0-pure.cl index 2b162e7c9..5540ccde5 100644 --- a/OpenCL/m07500_a0-pure.cl +++ b/OpenCL/m07500_a0-pure.cl @@ -34,7 +34,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -43,7 +43,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -96,7 +96,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -149,7 +149,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) { rc4_init_16 (rc4_key, data); @@ -179,7 +179,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); diff --git a/OpenCL/m07500_a1-optimized.cl b/OpenCL/m07500_a1-optimized.cl index 4d48e3414..7b0746d91 100644 --- a/OpenCL/m07500_a1-optimized.cl +++ b/OpenCL/m07500_a1-optimized.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -148,7 +148,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) { rc4_init_16 (rc4_key, data); @@ -178,7 +178,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 return 1; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -229,7 +229,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -263,7 +263,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) { /** * pads diff --git a/OpenCL/m07500_a1-pure.cl b/OpenCL/m07500_a1-pure.cl index 1b7625353..6ec806490 100644 --- a/OpenCL/m07500_a1-pure.cl +++ b/OpenCL/m07500_a1-pure.cl @@ -32,7 +32,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -41,7 +41,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -94,7 +94,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -147,7 +147,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) { rc4_init_16 (rc4_key, data); @@ -177,7 +177,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); diff --git a/OpenCL/m07500_a3-optimized.cl b/OpenCL/m07500_a3-optimized.cl index 0a2a4b511..5f51f887e 100644 --- a/OpenCL/m07500_a3-optimized.cl +++ b/OpenCL/m07500_a3-optimized.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -148,7 +148,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) { rc4_init_16 (rc4_key, data); @@ -178,7 +178,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 return 1; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -229,7 +229,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -263,7 +263,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest) { /** * pads @@ -392,7 +392,7 @@ DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_le hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest); } -DECLSPEC static void m07500 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5pa_t)) +DECLSPEC void m07500 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5pa_t)) { /** * modifier diff --git a/OpenCL/m07500_a3-pure.cl b/OpenCL/m07500_a3-pure.cl index 05abf4fa8..02749c3e5 100644 --- a/OpenCL/m07500_a3-pure.cl +++ b/OpenCL/m07500_a3-pure.cl @@ -32,7 +32,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -41,7 +41,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -94,7 +94,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -147,7 +147,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 *timestamp_ct) { rc4_init_16 (rc4_key, data); @@ -177,7 +177,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, u32 return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -307,7 +307,7 @@ KERNEL_FQ void m07500_mxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -401,7 +401,7 @@ KERNEL_FQ void m07500_sxx (KERN_ATTR_VECTOR_ESALT (krb5pa_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m07700_a0-optimized.cl b/OpenCL/m07700_a0-optimized.cl index 4d6e090a0..5a530f8db 100644 --- a/OpenCL/m07700_a0-optimized.cl +++ b/OpenCL/m07700_a0-optimized.cl @@ -56,7 +56,7 @@ CONSTANT_AS u32a bcodeArray[48] = 0xe2, 0xb7, 0x33, 0x71, 0x8b, 0x9f, 0x5d, 0x01, 0x44, 0x70, 0xae, 0x11, 0xef, 0x28, 0xf0, 0x0d }; -DECLSPEC static u32 sapb_trans (const u32 in) +DECLSPEC u32 sapb_trans (const u32 in) { u32 out = 0; @@ -68,7 +68,7 @@ DECLSPEC static u32 sapb_trans (const u32 in) return out; } -DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07700_a1-optimized.cl b/OpenCL/m07700_a1-optimized.cl index 4bbceca07..86dd31267 100644 --- a/OpenCL/m07700_a1-optimized.cl +++ b/OpenCL/m07700_a1-optimized.cl @@ -54,7 +54,7 @@ CONSTANT_AS u32a bcodeArray[48] = 0xe2, 0xb7, 0x33, 0x71, 0x8b, 0x9f, 0x5d, 0x01, 0x44, 0x70, 0xae, 0x11, 0xef, 0x28, 0xf0, 0x0d }; -DECLSPEC static u32 sapb_trans (const u32 in) +DECLSPEC u32 sapb_trans (const u32 in) { u32 out = 0; @@ -66,7 +66,7 @@ DECLSPEC static u32 sapb_trans (const u32 in) return out; } -DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07700_a3-optimized.cl b/OpenCL/m07700_a3-optimized.cl index b6c211b7f..a3f3d7a62 100644 --- a/OpenCL/m07700_a3-optimized.cl +++ b/OpenCL/m07700_a3-optimized.cl @@ -45,7 +45,7 @@ CONSTANT_AS u32a bcodeArray[48] = 0xe2, 0xb7, 0x33, 0x71, 0x8b, 0x9f, 0x5d, 0x01, 0x44, 0x70, 0xae, 0x11, 0xef, 0x28, 0xf0, 0x0d }; -DECLSPEC static u32 sapb_trans (const u32 in) +DECLSPEC u32 sapb_trans (const u32 in) { u32 out = 0; @@ -57,7 +57,7 @@ DECLSPEC static u32 sapb_trans (const u32 in) return out; } -DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) { t[ 0] = 0; t[ 1] = 0; @@ -136,7 +136,7 @@ DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 * return sum20; } -DECLSPEC static void m07700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -261,7 +261,7 @@ DECLSPEC static void m07700m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m07700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07700s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m07701_a0-optimized.cl b/OpenCL/m07701_a0-optimized.cl index 6e2a8f09d..840842fb0 100644 --- a/OpenCL/m07701_a0-optimized.cl +++ b/OpenCL/m07701_a0-optimized.cl @@ -56,7 +56,7 @@ CONSTANT_AS u32a bcodeArray[48] = 0xe2, 0xb7, 0x33, 0x71, 0x8b, 0x9f, 0x5d, 0x01, 0x44, 0x70, 0xae, 0x11, 0xef, 0x28, 0xf0, 0x0d }; -DECLSPEC static u32 sapb_trans (const u32 in) +DECLSPEC u32 sapb_trans (const u32 in) { u32 out = 0; @@ -68,7 +68,7 @@ DECLSPEC static u32 sapb_trans (const u32 in) return out; } -DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07701_a1-optimized.cl b/OpenCL/m07701_a1-optimized.cl index eed2b457f..f73364987 100644 --- a/OpenCL/m07701_a1-optimized.cl +++ b/OpenCL/m07701_a1-optimized.cl @@ -54,7 +54,7 @@ CONSTANT_AS u32a bcodeArray[48] = 0xe2, 0xb7, 0x33, 0x71, 0x8b, 0x9f, 0x5d, 0x01, 0x44, 0x70, 0xae, 0x11, 0xef, 0x28, 0xf0, 0x0d }; -DECLSPEC static u32 sapb_trans (const u32 in) +DECLSPEC u32 sapb_trans (const u32 in) { u32 out = 0; @@ -66,7 +66,7 @@ DECLSPEC static u32 sapb_trans (const u32 in) return out; } -DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) { t[ 0] = 0; t[ 1] = 0; diff --git a/OpenCL/m07701_a3-optimized.cl b/OpenCL/m07701_a3-optimized.cl index 05f6f441a..b32c65f24 100644 --- a/OpenCL/m07701_a3-optimized.cl +++ b/OpenCL/m07701_a3-optimized.cl @@ -45,7 +45,7 @@ CONSTANT_AS u32a bcodeArray[48] = 0xe2, 0xb7, 0x33, 0x71, 0x8b, 0x9f, 0x5d, 0x01, 0x44, 0x70, 0xae, 0x11, 0xef, 0x28, 0xf0, 0x0d }; -DECLSPEC static u32 sapb_trans (const u32 in) +DECLSPEC u32 sapb_trans (const u32 in) { u32 out = 0; @@ -57,7 +57,7 @@ DECLSPEC static u32 sapb_trans (const u32 in) return out; } -DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) +DECLSPEC u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 *salt_buf0, const u32 salt_len, const u32 a, const u32 b, const u32 c, const u32 d, u32 *t) { t[ 0] = 0; t[ 1] = 0; @@ -136,7 +136,7 @@ DECLSPEC static u32 walld0rf_magic (const u32 *w0, const u32 pw_len, const u32 * return sum20; } -DECLSPEC static void m07701m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07701m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -261,7 +261,7 @@ DECLSPEC static void m07701m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m07701s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07701s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m07800_a0-optimized.cl b/OpenCL/m07800_a0-optimized.cl index 2e790e718..7c6951d9b 100644 --- a/OpenCL/m07800_a0-optimized.cl +++ b/OpenCL/m07800_a0-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u32a theMagicArray[64] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; -DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) +DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) { const int d = n / 4; const int m = n & 3; @@ -40,7 +40,7 @@ DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07800_a1-optimized.cl b/OpenCL/m07800_a1-optimized.cl index fc5259644..856e32bdd 100644 --- a/OpenCL/m07800_a1-optimized.cl +++ b/OpenCL/m07800_a1-optimized.cl @@ -26,7 +26,7 @@ CONSTANT_AS u32a theMagicArray[64] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; -DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) +DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) { const int d = n / 4; const int m = n & 3; @@ -38,7 +38,7 @@ DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07800_a3-optimized.cl b/OpenCL/m07800_a3-optimized.cl index 0e25fc78d..3e0363867 100644 --- a/OpenCL/m07800_a3-optimized.cl +++ b/OpenCL/m07800_a3-optimized.cl @@ -26,7 +26,7 @@ CONSTANT_AS u32a theMagicArray[64] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; -DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) +DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) { const int d = n / 4; const int m = n & 3; @@ -38,7 +38,7 @@ DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; @@ -51,7 +51,7 @@ DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) a[d + 1] = l32_from_64_S (tmp); } -DECLSPEC static void m07800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -267,7 +267,7 @@ DECLSPEC static void m07800m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m07800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07800s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m07801_a0-optimized.cl b/OpenCL/m07801_a0-optimized.cl index 80f73019e..5a5b224a7 100644 --- a/OpenCL/m07801_a0-optimized.cl +++ b/OpenCL/m07801_a0-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u32a theMagicArray[64] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; -DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) +DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) { const int d = n / 4; const int m = n & 3; @@ -40,7 +40,7 @@ DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07801_a1-optimized.cl b/OpenCL/m07801_a1-optimized.cl index a7e6c0e18..52fbf44c8 100644 --- a/OpenCL/m07801_a1-optimized.cl +++ b/OpenCL/m07801_a1-optimized.cl @@ -26,7 +26,7 @@ CONSTANT_AS u32a theMagicArray[64] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; -DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) +DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) { const int d = n / 4; const int m = n & 3; @@ -38,7 +38,7 @@ DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; diff --git a/OpenCL/m07801_a3-optimized.cl b/OpenCL/m07801_a3-optimized.cl index 2655648b1..47765cbbb 100644 --- a/OpenCL/m07801_a3-optimized.cl +++ b/OpenCL/m07801_a3-optimized.cl @@ -26,7 +26,7 @@ CONSTANT_AS u32a theMagicArray[64] = 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; -DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) +DECLSPEC u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) { const int d = n / 4; const int m = n & 3; @@ -38,7 +38,7 @@ DECLSPEC static u32 GETSHIFTEDINT_CONST (CONSTANT_AS u32a *a, const int n) return h32_from_64_S (tmp); } -DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) +DECLSPEC void SETSHIFTEDINT (u32 *a, const int n, const u32 v) { const int d = n / 4; const int m = n & 3; @@ -51,7 +51,7 @@ DECLSPEC static void SETSHIFTEDINT (u32 *a, const int n, const u32 v) a[d + 1] = l32_from_64_S (tmp); } -DECLSPEC static void m07801m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07801m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -267,7 +267,7 @@ DECLSPEC static void m07801m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m07801s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m07801s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m08000_a0-optimized.cl b/OpenCL/m08000_a0-optimized.cl index b0b16a44b..c3f3e6edf 100644 --- a/OpenCL/m08000_a0-optimized.cl +++ b/OpenCL/m08000_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void sha256_transform_m (u32x *digest, const u32x *w) +DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -103,7 +103,7 @@ DECLSPEC static void sha256_transform_m (u32x *digest, const u32x *w) digest[7] += h; } -DECLSPEC static void sha256_transform_z (u32x *digest) +DECLSPEC void sha256_transform_z (u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -154,7 +154,7 @@ DECLSPEC static void sha256_transform_z (u32x *digest) digest[7] += h; } -DECLSPEC static void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) +DECLSPEC void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) { u32x a = digest[0]; u32x b = digest[1]; diff --git a/OpenCL/m08000_a1-optimized.cl b/OpenCL/m08000_a1-optimized.cl index 1a255aae0..defb4c2f0 100644 --- a/OpenCL/m08000_a1-optimized.cl +++ b/OpenCL/m08000_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void sha256_transform_m (u32x *digest, const u32x *w) +DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -101,7 +101,7 @@ DECLSPEC static void sha256_transform_m (u32x *digest, const u32x *w) digest[7] += h; } -DECLSPEC static void sha256_transform_z (u32x *digest) +DECLSPEC void sha256_transform_z (u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -152,7 +152,7 @@ DECLSPEC static void sha256_transform_z (u32x *digest) digest[7] += h; } -DECLSPEC static void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) +DECLSPEC void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) { u32x a = digest[0]; u32x b = digest[1]; diff --git a/OpenCL/m08000_a3-optimized.cl b/OpenCL/m08000_a3-optimized.cl index 46393b17e..1439bce9e 100644 --- a/OpenCL/m08000_a3-optimized.cl +++ b/OpenCL/m08000_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha256.cl" #endif -DECLSPEC static void sha256_transform_m (u32x *digest, const u32x *w) +DECLSPEC void sha256_transform_m (u32x *digest, const u32x *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -101,7 +101,7 @@ DECLSPEC static void sha256_transform_m (u32x *digest, const u32x *w) digest[7] += h; } -DECLSPEC static void sha256_transform_z (u32x *digest) +DECLSPEC void sha256_transform_z (u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -152,7 +152,7 @@ DECLSPEC static void sha256_transform_z (u32x *digest) digest[7] += h; } -DECLSPEC static void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) +DECLSPEC void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) { u32x a = digest[0]; u32x b = digest[1]; @@ -203,7 +203,7 @@ DECLSPEC static void sha256_transform_s (u32x *digest, LOCAL_AS u32 *w) digest[7] += h; } -DECLSPEC static void m08000m (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08000m (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -325,7 +325,7 @@ DECLSPEC static void m08000m (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, co } } -DECLSPEC static void m08000s (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08000s (LOCAL_AS u32 *w_s1, LOCAL_AS u32 *w_s2, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m08100_a3-optimized.cl b/OpenCL/m08100_a3-optimized.cl index 19438580d..076a10dcf 100644 --- a/OpenCL/m08100_a3-optimized.cl +++ b/OpenCL/m08100_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m08100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -174,7 +174,7 @@ DECLSPEC static void m08100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m08100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m08100_a3-pure.cl b/OpenCL/m08100_a3-pure.cl index 0e1e2e7ba..2582bc358 100644 --- a/OpenCL/m08100_a3-pure.cl +++ b/OpenCL/m08100_a3-pure.cl @@ -34,7 +34,7 @@ KERNEL_FQ void m08100_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -111,7 +111,7 @@ KERNEL_FQ void m08100_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m08200-pure.cl b/OpenCL/m08200-pure.cl index 96f35eb2a..9106b0d7d 100644 --- a/OpenCL/m08200-pure.cl +++ b/OpenCL/m08200-pure.cl @@ -34,7 +34,7 @@ typedef struct cloudkey } cloudkey_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m08300_a0-pure.cl b/OpenCL/m08300_a0-pure.cl index 564ada62a..c0dfc084b 100644 --- a/OpenCL/m08300_a0-pure.cl +++ b/OpenCL/m08300_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m08300_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -155,7 +155,7 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m08300_a1-pure.cl b/OpenCL/m08300_a1-pure.cl index e8a1b59ba..9958fc4e8 100644 --- a/OpenCL/m08300_a1-pure.cl +++ b/OpenCL/m08300_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m08300_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -147,7 +147,7 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m08300_a3-optimized.cl b/OpenCL/m08300_a3-optimized.cl index ce66a711d..18faae59b 100644 --- a/OpenCL/m08300_a3-optimized.cl +++ b/OpenCL/m08300_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m08300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -221,7 +221,7 @@ DECLSPEC static void m08300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m08300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m08300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m08300_a3-pure.cl b/OpenCL/m08300_a3-pure.cl index c99db5bf8..cac746e6d 100644 --- a/OpenCL/m08300_a3-pure.cl +++ b/OpenCL/m08300_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m08300_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m08300_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); } @@ -162,7 +162,7 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -171,7 +171,7 @@ KERNEL_FQ void m08300_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32 (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m08400_a3-optimized.cl b/OpenCL/m08400_a3-optimized.cl index 1e1df914c..ba99799e7 100644 --- a/OpenCL/m08400_a3-optimized.cl +++ b/OpenCL/m08400_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m08400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m08400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -235,7 +235,7 @@ DECLSPEC static void m08400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m08400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m08400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m08400_a3-pure.cl b/OpenCL/m08400_a3-pure.cl index e5243270d..47847863c 100644 --- a/OpenCL/m08400_a3-pure.cl +++ b/OpenCL/m08400_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m08400_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -240,7 +240,7 @@ KERNEL_FQ void m08400_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m08500_a0-pure.cl b/OpenCL/m08500_a0-pure.cl index 3c317c624..04cefa798 100644 --- a/OpenCL/m08500_a0-pure.cl +++ b/OpenCL/m08500_a0-pure.cl @@ -394,7 +394,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -436,7 +436,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -508,7 +508,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void transform_racf_key (const u32 w0, const u32x w1, u32x *key) +DECLSPEC void transform_racf_key (const u32 w0, const u32x w1, u32x *key) { key[0] = BOX1 (((w0 >> 0) & 0xff), c_ascii_to_ebcdic_pc) << 0 | BOX1 (((w0 >> 8) & 0xff), c_ascii_to_ebcdic_pc) << 8 diff --git a/OpenCL/m08500_a1-pure.cl b/OpenCL/m08500_a1-pure.cl index f330569a8..d7b02244b 100644 --- a/OpenCL/m08500_a1-pure.cl +++ b/OpenCL/m08500_a1-pure.cl @@ -392,7 +392,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = data[0]; u32 l = data[1]; @@ -434,7 +434,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32x *data, u32x *Kc, u32x *Kd iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -506,7 +506,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void transform_racf_key (const u32 w0, const u32x w1, u32x *key) +DECLSPEC void transform_racf_key (const u32 w0, const u32x w1, u32x *key) { key[0] = BOX1 (((w0 >> 0) & 0xff), c_ascii_to_ebcdic_pc) << 0 | BOX1 (((w0 >> 8) & 0xff), c_ascii_to_ebcdic_pc) << 8 diff --git a/OpenCL/m08500_a3-pure.cl b/OpenCL/m08500_a3-pure.cl index dfc98aebf..8ae9721c5 100644 --- a/OpenCL/m08500_a3-pure.cl +++ b/OpenCL/m08500_a3-pure.cl @@ -392,7 +392,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = data[0]; u32x l = data[1]; @@ -434,7 +434,7 @@ DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *K iv[1] = r; } -DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -506,7 +506,7 @@ DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LO } } -DECLSPEC static void transform_racf_key (const u32x w0, const u32x w1, u32x *key) +DECLSPEC void transform_racf_key (const u32x w0, const u32x w1, u32x *key) { key[0] = BOX1 (((w0 >> 0) & 0xff), c_ascii_to_ebcdic_pc) << 0 | BOX1 (((w0 >> 8) & 0xff), c_ascii_to_ebcdic_pc) << 8 @@ -519,7 +519,7 @@ DECLSPEC static void transform_racf_key (const u32x w0, const u32x w1, u32x *key | BOX1 (((w1 >> 24) & 0xff), c_ascii_to_ebcdic_pc) << 24; } -DECLSPEC static void m08500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -582,7 +582,7 @@ DECLSPEC static void m08500m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_sk } } -DECLSPEC static void m08500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08500s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m08600_a0-pure.cl b/OpenCL/m08600_a0-pure.cl index dd4d618af..c88b30787 100644 --- a/OpenCL/m08600_a0-pure.cl +++ b/OpenCL/m08600_a0-pure.cl @@ -63,7 +63,7 @@ CONSTANT_AS u32a lotus_magic_table[256] = #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) { u32 p = 0; @@ -86,7 +86,7 @@ DECLSPEC static void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC static void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32 t = out[3] >> 24; @@ -104,7 +104,7 @@ DECLSPEC static void lotus_transform_password (const u32 *in, u32x *out, LOCAL_A } } -DECLSPEC static void pad (u32 *w, const u32 len) +DECLSPEC void pad (u32 *w, const u32 len) { const u32 val = 16 - len; @@ -183,7 +183,7 @@ DECLSPEC static void pad (u32 *w, const u32 len) } } -DECLSPEC static void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32 x[12]; @@ -208,14 +208,14 @@ DECLSPEC static void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_ state[3] = x[3]; } -DECLSPEC static void mdtransform (u32 *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (u32 *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC static void domino_big_md (const u32 *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (const u32 *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32 checksum[4]; diff --git a/OpenCL/m08600_a1-pure.cl b/OpenCL/m08600_a1-pure.cl index b85c824aa..5253d21dd 100644 --- a/OpenCL/m08600_a1-pure.cl +++ b/OpenCL/m08600_a1-pure.cl @@ -61,7 +61,7 @@ CONSTANT_AS u32a lotus_magic_table[256] = #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) { u32 p = 0; @@ -84,7 +84,7 @@ DECLSPEC static void lotus_mix (u32 *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC static void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (const u32 *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32 t = out[3] >> 24; @@ -102,7 +102,7 @@ DECLSPEC static void lotus_transform_password (const u32 *in, u32x *out, LOCAL_A } } -DECLSPEC static void pad (u32 *w, const u32 len) +DECLSPEC void pad (u32 *w, const u32 len) { const u32 val = 16 - len; @@ -181,7 +181,7 @@ DECLSPEC static void pad (u32 *w, const u32 len) } } -DECLSPEC static void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32 x[12]; @@ -206,14 +206,14 @@ DECLSPEC static void mdtransform_norecalc (u32 *state, const u32x *block, LOCAL_ state[3] = x[3]; } -DECLSPEC static void mdtransform (u32 *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (u32 *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC static void domino_big_md (const u32 *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (const u32 *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32 checksum[4]; diff --git a/OpenCL/m08600_a3-pure.cl b/OpenCL/m08600_a3-pure.cl index 64dd665c7..cd596b5c0 100644 --- a/OpenCL/m08600_a3-pure.cl +++ b/OpenCL/m08600_a3-pure.cl @@ -60,7 +60,7 @@ CONSTANT_AS u32a lotus_magic_table[256] = #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -83,7 +83,7 @@ DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC static void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (const u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -101,7 +101,7 @@ DECLSPEC static void lotus_transform_password (const u32x *in, u32x *out, LOCAL_ } } -DECLSPEC static void pad (u32 *w, const u32 len) +DECLSPEC void pad (u32 *w, const u32 len) { const u32 val = 16 - len; @@ -180,7 +180,7 @@ DECLSPEC static void pad (u32 *w, const u32 len) } } -DECLSPEC static void mdtransform_norecalc (u32x *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (u32x *state, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -205,14 +205,14 @@ DECLSPEC static void mdtransform_norecalc (u32x *state, const u32x *block, LOCAL state[3] = x[3]; } -DECLSPEC static void mdtransform (u32x *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (u32x *state, u32x *checksum, const u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC static void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; @@ -226,7 +226,7 @@ DECLSPEC static void domino_big_md (const u32x *saved_key, const u32 size, u32x mdtransform_norecalc (state, checksum, s_lotus_magic_table); } -DECLSPEC static void m08600m (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08600m (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -273,7 +273,7 @@ DECLSPEC static void m08600m (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u } } -DECLSPEC static void m08600s (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08600s (LOCAL_AS u32 *s_lotus_magic_table, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m08700_a0-optimized.cl b/OpenCL/m08700_a0-optimized.cl index d4258c6a6..6cb6a3b9f 100644 --- a/OpenCL/m08700_a0-optimized.cl +++ b/OpenCL/m08700_a0-optimized.cl @@ -75,7 +75,7 @@ CONSTANT_AS u32a lotus_magic_table[256] = #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -98,7 +98,7 @@ DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC static void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -116,7 +116,7 @@ DECLSPEC static void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 } } -DECLSPEC static void pad (u32 *w, const u32 len) +DECLSPEC void pad (u32 *w, const u32 len) { const u32 val = 16 - len; @@ -195,7 +195,7 @@ DECLSPEC static void pad (u32 *w, const u32 len) } } -DECLSPEC static void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -220,14 +220,14 @@ DECLSPEC static void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u3 state[3] = x[3]; } -DECLSPEC static void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC static void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; diff --git a/OpenCL/m08700_a1-optimized.cl b/OpenCL/m08700_a1-optimized.cl index 5d2d84df2..2041e3f5d 100644 --- a/OpenCL/m08700_a1-optimized.cl +++ b/OpenCL/m08700_a1-optimized.cl @@ -73,7 +73,7 @@ CONSTANT_AS u32a lotus_magic_table[256] = #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -96,7 +96,7 @@ DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC static void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -114,7 +114,7 @@ DECLSPEC static void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 } } -DECLSPEC static void pad (u32 *w, const u32 len) +DECLSPEC void pad (u32 *w, const u32 len) { const u32 val = 16 - len; @@ -193,7 +193,7 @@ DECLSPEC static void pad (u32 *w, const u32 len) } } -DECLSPEC static void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -218,14 +218,14 @@ DECLSPEC static void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u3 state[3] = x[3]; } -DECLSPEC static void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC static void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; diff --git a/OpenCL/m08700_a3-optimized.cl b/OpenCL/m08700_a3-optimized.cl index d2fed87dc..897bc16c5 100644 --- a/OpenCL/m08700_a3-optimized.cl +++ b/OpenCL/m08700_a3-optimized.cl @@ -74,7 +74,7 @@ CONSTANT_AS u32a lotus_magic_table[256] = #define BOX1(S,i) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) { u32x p = 0; @@ -97,7 +97,7 @@ DECLSPEC static void lotus_mix (u32x *in, LOCAL_AS u32 *s_lotus_magic_table) } } -DECLSPEC static void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 *s_lotus_magic_table) { u32x t = out[3] >> 24; @@ -115,7 +115,7 @@ DECLSPEC static void lotus_transform_password (u32x *in, u32x *out, LOCAL_AS u32 } } -DECLSPEC static void pad (u32 *w, const u32 len) +DECLSPEC void pad (u32 *w, const u32 len) { const u32 val = 16 - len; @@ -194,7 +194,7 @@ DECLSPEC static void pad (u32 *w, const u32 len) } } -DECLSPEC static void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { u32x x[12]; @@ -219,14 +219,14 @@ DECLSPEC static void mdtransform_norecalc (u32x *state, u32x *block, LOCAL_AS u3 state[3] = x[3]; } -DECLSPEC static void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (u32x *state, u32x *checksum, u32x *block, LOCAL_AS u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC static void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (const u32x *saved_key, const u32 size, u32x *state, LOCAL_AS u32 *s_lotus_magic_table) { u32x checksum[4]; @@ -265,7 +265,7 @@ DECLSPEC static void domino_big_md (const u32x *saved_key, const u32 size, u32x mdtransform_norecalc (state, checksum, s_lotus_magic_table); } -DECLSPEC static void m08700m (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08700m (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -398,7 +398,7 @@ DECLSPEC static void m08700m (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l } } -DECLSPEC static void m08700s (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m08700s (LOCAL_AS u32 *s_lotus_magic_table, LOCAL_AS u32 *l_bin2asc, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m08800-pure.cl b/OpenCL/m08800-pure.cl index 75de4d055..c8e5381e6 100644 --- a/OpenCL/m08800-pure.cl +++ b/OpenCL/m08800-pure.cl @@ -31,7 +31,7 @@ typedef struct androidfde } androidfde_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m08900-pure.cl b/OpenCL/m08900-pure.cl index 0d40c6903..dfec8b535 100644 --- a/OpenCL/m08900-pure.cl +++ b/OpenCL/m08900-pure.cl @@ -23,7 +23,7 @@ typedef struct } scrypt_tmp_t; -DECLSPEC static uint4 hc_swap32_4 (uint4 v) +DECLSPEC uint4 hc_swap32_4 (uint4 v) { return (rotate ((v & 0x00FF00FF), 24u) | rotate ((v & 0xFF00FF00), 8u)); } @@ -83,7 +83,7 @@ DECLSPEC static uint4 hc_swap32_4 (uint4 v) R3 = R3 + X3; \ } -DECLSPEC static void salsa_r (uint4 *TI) +DECLSPEC void salsa_r (uint4 *TI) { uint4 R0 = TI[STATE_CNT4 - 4]; uint4 R1 = TI[STATE_CNT4 - 3]; @@ -135,7 +135,7 @@ DECLSPEC static void salsa_r (uint4 *TI) } } -DECLSPEC static void scrypt_smix (uint4 *X, uint4 *T, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix (uint4 *X, uint4 *T, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) { #define Coord(xd4,y,z) (((xd4) * ySIZE * zSIZE) + ((y) * zSIZE) + (z)) #define CO Coord(xd4,y,z) diff --git a/OpenCL/m09100-pure.cl b/OpenCL/m09100-pure.cl index b18c95adc..a0a3cd7d4 100644 --- a/OpenCL/m09100-pure.cl +++ b/OpenCL/m09100-pure.cl @@ -78,7 +78,7 @@ CONSTANT_AS u32a lotus_magic_table[256] = #define BOX1(S,i) (S)[(i)] -DECLSPEC static void lotus_mix (u32 *in, LOCAL_AS const u32 *s_lotus_magic_table) +DECLSPEC void lotus_mix (u32 *in, LOCAL_AS const u32 *s_lotus_magic_table) { u8 p = 0; @@ -101,7 +101,7 @@ DECLSPEC static void lotus_mix (u32 *in, LOCAL_AS const u32 *s_lotus_magic_table } } -DECLSPEC static void lotus_transform_password (const u32 *in, u32 *out, LOCAL_AS const u32 *s_lotus_magic_table) +DECLSPEC void lotus_transform_password (const u32 *in, u32 *out, LOCAL_AS const u32 *s_lotus_magic_table) { u8 t = (u8) (out[3] >> 24); @@ -119,7 +119,7 @@ DECLSPEC static void lotus_transform_password (const u32 *in, u32 *out, LOCAL_AS } } -DECLSPEC static void pad (u32 *w, const u32 len) +DECLSPEC void pad (u32 *w, const u32 len) { const u32 val = 16 - len; @@ -198,7 +198,7 @@ DECLSPEC static void pad (u32 *w, const u32 len) } } -DECLSPEC static void mdtransform_norecalc (u32 *state, const u32 *block, LOCAL_AS const u32 *s_lotus_magic_table) +DECLSPEC void mdtransform_norecalc (u32 *state, const u32 *block, LOCAL_AS const u32 *s_lotus_magic_table) { u32 x[12]; @@ -223,14 +223,14 @@ DECLSPEC static void mdtransform_norecalc (u32 *state, const u32 *block, LOCAL_A state[3] = x[3]; } -DECLSPEC static void mdtransform (u32 *state, u32 *checksum, const u32 *block, LOCAL_AS const u32 *s_lotus_magic_table) +DECLSPEC void mdtransform (u32 *state, u32 *checksum, const u32 *block, LOCAL_AS const u32 *s_lotus_magic_table) { mdtransform_norecalc (state, block, s_lotus_magic_table); lotus_transform_password (block, checksum, s_lotus_magic_table); } -DECLSPEC static void domino_big_md (const u32 *saved_key, const u32 size, u32 *state, LOCAL_AS const u32 *s_lotus_magic_table) +DECLSPEC void domino_big_md (const u32 *saved_key, const u32 size, u32 *state, LOCAL_AS const u32 *s_lotus_magic_table) { u32 checksum[4]; @@ -269,7 +269,7 @@ DECLSPEC static void domino_big_md (const u32 *saved_key, const u32 size, u32 *s mdtransform_norecalc (state, checksum, s_lotus_magic_table); } -DECLSPEC static void base64_encode (u8 *base64_hash, const u32 len, const u8 *base64_plain) +DECLSPEC void base64_encode (u8 *base64_hash, const u32 len, const u8 *base64_plain) { u8 *out_ptr = (u8 *) base64_hash; u8 *in_ptr = (u8 *) base64_plain; @@ -293,7 +293,7 @@ DECLSPEC static void base64_encode (u8 *base64_hash, const u32 len, const u8 *ba } } -DECLSPEC static void lotus6_base64_encode (u8 *base64_hash, const u32 salt0, const u32 salt1, const u32 a, const u32 b, const u32 c) +DECLSPEC void lotus6_base64_encode (u8 *base64_hash, const u32 salt0, const u32 salt1, const u32 a, const u32 b, const u32 c) { const uchar4 salt0c = as_uchar4 (salt0); const uchar4 salt1c = as_uchar4 (salt1); @@ -358,7 +358,7 @@ DECLSPEC static void lotus6_base64_encode (u8 *base64_hash, const u32 salt0, con base64_hash[21] = ')'; } -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m09700_a0-optimized.cl b/OpenCL/m09700_a0-optimized.cl index 7f02f574e..7a5adff36 100644 --- a/OpenCL/m09700_a0-optimized.cl +++ b/OpenCL/m09700_a0-optimized.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -148,7 +148,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static void gen336 (u32 *digest_pre, u32 *salt_buf, u32 *digest) +DECLSPEC void gen336 (u32 *digest_pre, u32 *salt_buf, u32 *digest) { u32 digest_t0[2]; u32 digest_t1[2]; diff --git a/OpenCL/m09700_a1-optimized.cl b/OpenCL/m09700_a1-optimized.cl index 861cf7586..cfef5f69f 100644 --- a/OpenCL/m09700_a1-optimized.cl +++ b/OpenCL/m09700_a1-optimized.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -146,7 +146,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static void gen336 (u32 *digest_pre, u32 *salt_buf, u32 *digest) +DECLSPEC void gen336 (u32 *digest_pre, u32 *salt_buf, u32 *digest) { u32 digest_t0[2]; u32 digest_t1[2]; diff --git a/OpenCL/m09700_a3-optimized.cl b/OpenCL/m09700_a3-optimized.cl index ccc34be24..1d75f0d44 100644 --- a/OpenCL/m09700_a3-optimized.cl +++ b/OpenCL/m09700_a3-optimized.cl @@ -28,7 +28,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -37,7 +37,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -90,7 +90,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -143,7 +143,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static void m09700m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09700m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) { /** * modifier @@ -549,7 +549,7 @@ DECLSPEC static void m09700m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 } } -DECLSPEC static void m09700s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09700s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) { /** * modifier diff --git a/OpenCL/m09710_a0-optimized.cl b/OpenCL/m09710_a0-optimized.cl index e9c84d410..6caaee208 100644 --- a/OpenCL/m09710_a0-optimized.cl +++ b/OpenCL/m09710_a0-optimized.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m09710_a1-optimized.cl b/OpenCL/m09710_a1-optimized.cl index f86f4a2f6..7d55a52a1 100644 --- a/OpenCL/m09710_a1-optimized.cl +++ b/OpenCL/m09710_a1-optimized.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m09710_a3-optimized.cl b/OpenCL/m09710_a3-optimized.cl index 746f032bb..bc3b3127a 100644 --- a/OpenCL/m09710_a3-optimized.cl +++ b/OpenCL/m09710_a3-optimized.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -146,7 +146,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static void m09710m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09710m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) { /** * modifier @@ -255,7 +255,7 @@ DECLSPEC static void m09710m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 } } -DECLSPEC static void m09710s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09710s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) { /** * modifier diff --git a/OpenCL/m09720_a0-optimized.cl b/OpenCL/m09720_a0-optimized.cl index 75a2588f3..f304a0dfb 100644 --- a/OpenCL/m09720_a0-optimized.cl +++ b/OpenCL/m09720_a0-optimized.cl @@ -24,7 +24,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC static void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) +DECLSPEC void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) { u32x digest_t0[2]; u32x digest_t1[2]; diff --git a/OpenCL/m09720_a1-optimized.cl b/OpenCL/m09720_a1-optimized.cl index 855f9ec11..a1a58e9a5 100644 --- a/OpenCL/m09720_a1-optimized.cl +++ b/OpenCL/m09720_a1-optimized.cl @@ -22,7 +22,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC static void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) +DECLSPEC void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) { u32x digest_t0[2]; u32x digest_t1[2]; diff --git a/OpenCL/m09720_a3-optimized.cl b/OpenCL/m09720_a3-optimized.cl index f9394b219..57c39df18 100644 --- a/OpenCL/m09720_a3-optimized.cl +++ b/OpenCL/m09720_a3-optimized.cl @@ -22,7 +22,7 @@ typedef struct oldoffice01 } oldoffice01_t; -DECLSPEC static void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) +DECLSPEC void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) { u32x digest_t0[2]; u32x digest_t1[2]; @@ -366,7 +366,7 @@ DECLSPEC static void gen336 (u32x *digest_pre, u32 *salt_buf, u32x *digest) md5_transform_vector (w0_t, w1_t, w2_t, w3_t, digest); } -DECLSPEC static void m09720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) { /** * modifier @@ -456,7 +456,7 @@ DECLSPEC static void m09720m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m09720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) +DECLSPEC void m09720s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice01_t)) { /** * modifier diff --git a/OpenCL/m09800_a0-optimized.cl b/OpenCL/m09800_a0-optimized.cl index 6ac8d471b..0ab96faab 100644 --- a/OpenCL/m09800_a0-optimized.cl +++ b/OpenCL/m09800_a0-optimized.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m09800_a1-optimized.cl b/OpenCL/m09800_a1-optimized.cl index 4228b2b95..278684d0a 100644 --- a/OpenCL/m09800_a1-optimized.cl +++ b/OpenCL/m09800_a1-optimized.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m09800_a3-optimized.cl b/OpenCL/m09800_a3-optimized.cl index 12c6017b3..1ab9a6d9a 100644 --- a/OpenCL/m09800_a3-optimized.cl +++ b/OpenCL/m09800_a3-optimized.cl @@ -28,7 +28,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -37,7 +37,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -90,7 +90,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -143,7 +143,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) { /** * modifier @@ -311,7 +311,7 @@ DECLSPEC static void m09800m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 } } -DECLSPEC static void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09800s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) { /** * modifier diff --git a/OpenCL/m09810_a0-optimized.cl b/OpenCL/m09810_a0-optimized.cl index 0940a5246..69e637264 100644 --- a/OpenCL/m09810_a0-optimized.cl +++ b/OpenCL/m09810_a0-optimized.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m09810_a1-optimized.cl b/OpenCL/m09810_a1-optimized.cl index 28095f638..685395dad 100644 --- a/OpenCL/m09810_a1-optimized.cl +++ b/OpenCL/m09810_a1-optimized.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m09810_a3-optimized.cl b/OpenCL/m09810_a3-optimized.cl index 9c4ec2895..0eff00807 100644 --- a/OpenCL/m09810_a3-optimized.cl +++ b/OpenCL/m09810_a3-optimized.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -146,7 +146,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 return j; } -DECLSPEC static void m09810m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09810m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) { /** * modifier @@ -240,7 +240,7 @@ DECLSPEC static void m09810m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 } } -DECLSPEC static void m09810s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09810s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) { /** * modifier diff --git a/OpenCL/m09820_a3-optimized.cl b/OpenCL/m09820_a3-optimized.cl index c7c627a9f..c17b11e46 100644 --- a/OpenCL/m09820_a3-optimized.cl +++ b/OpenCL/m09820_a3-optimized.cl @@ -22,7 +22,7 @@ typedef struct oldoffice34 } oldoffice34_t; -DECLSPEC static void m09820m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09820m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) { /** * modifier @@ -124,7 +124,7 @@ DECLSPEC static void m09820m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m09820s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) +DECLSPEC void m09820s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (oldoffice34_t)) { /** * modifier diff --git a/OpenCL/m09900_a3-optimized.cl b/OpenCL/m09900_a3-optimized.cl index 4ae488bff..6f56f1703 100644 --- a/OpenCL/m09900_a3-optimized.cl +++ b/OpenCL/m09900_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m09900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m09900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -294,7 +294,7 @@ DECLSPEC static void m09900m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m09900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m09900s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m09900_a3-pure.cl b/OpenCL/m09900_a3-pure.cl index bb8f174e8..4cad825f4 100644 --- a/OpenCL/m09900_a3-pure.cl +++ b/OpenCL/m09900_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m09900_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m09900_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m10100_a0-optimized.cl b/OpenCL/m10100_a0-optimized.cl index c9307dfd5..8ed585765 100644 --- a/OpenCL/m10100_a0-optimized.cl +++ b/OpenCL/m10100_a0-optimized.cl @@ -15,20 +15,20 @@ #include "inc_simd.cl" #endif -#define SIPROUND(v0,v1,v2,v3) \ - (v0) += (v1); \ - (v1) = hc_rotl64 ((v1), 13); \ - (v1) ^= (v0); \ - (v0) = hc_rotl64 ((v0), 32); \ - (v2) += (v3); \ - (v3) = hc_rotl64 ((v3), 16); \ - (v3) ^= (v2); \ - (v0) += (v3); \ - (v3) = hc_rotl64 ((v3), 21); \ - (v3) ^= (v0); \ - (v2) += (v1); \ - (v1) = hc_rotl64 ((v1), 17); \ - (v1) ^= (v2); \ +#define SIPROUND(v0,v1,v2,v3) \ + (v0) += (v1); \ + (v1) = hc_rotl64 ((v1), 13); \ + (v1) ^= (v0); \ + (v0) = hc_rotl64 ((v0), 32); \ + (v2) += (v3); \ + (v3) = hc_rotl64 ((v3), 16); \ + (v3) ^= (v2); \ + (v0) += (v3); \ + (v3) = hc_rotl64 ((v3), 21); \ + (v3) ^= (v0); \ + (v2) += (v1); \ + (v1) = hc_rotl64 ((v1), 17); \ + (v1) ^= (v2); \ (v2) = hc_rotl64 ((v2), 32) KERNEL_FQ void m10100_m04 (KERN_ATTR_RULES ()) diff --git a/OpenCL/m10100_a1-optimized.cl b/OpenCL/m10100_a1-optimized.cl index fa0d46f0f..61d40e2b3 100644 --- a/OpenCL/m10100_a1-optimized.cl +++ b/OpenCL/m10100_a1-optimized.cl @@ -13,20 +13,20 @@ #include "inc_simd.cl" #endif -#define SIPROUND(v0,v1,v2,v3) \ - (v0) += (v1); \ - (v1) = hc_rotl64 ((v1), 13); \ - (v1) ^= (v0); \ - (v0) = hc_rotl64 ((v0), 32); \ - (v2) += (v3); \ - (v3) = hc_rotl64 ((v3), 16); \ - (v3) ^= (v2); \ - (v0) += (v3); \ - (v3) = hc_rotl64 ((v3), 21); \ - (v3) ^= (v0); \ - (v2) += (v1); \ - (v1) = hc_rotl64 ((v1), 17); \ - (v1) ^= (v2); \ +#define SIPROUND(v0,v1,v2,v3) \ + (v0) += (v1); \ + (v1) = hc_rotl64 ((v1), 13); \ + (v1) ^= (v0); \ + (v0) = hc_rotl64 ((v0), 32); \ + (v2) += (v3); \ + (v3) = hc_rotl64 ((v3), 16); \ + (v3) ^= (v2); \ + (v0) += (v3); \ + (v3) = hc_rotl64 ((v3), 21); \ + (v3) ^= (v0); \ + (v2) += (v1); \ + (v1) = hc_rotl64 ((v1), 17); \ + (v1) ^= (v2); \ (v2) = hc_rotl64 ((v2), 32) KERNEL_FQ void m10100_m04 (KERN_ATTR_BASIC ()) diff --git a/OpenCL/m10100_a3-optimized.cl b/OpenCL/m10100_a3-optimized.cl index 7d0872d47..e45ac8f51 100644 --- a/OpenCL/m10100_a3-optimized.cl +++ b/OpenCL/m10100_a3-optimized.cl @@ -12,23 +12,23 @@ #include "inc_simd.cl" #endif -#define SIPROUND(v0,v1,v2,v3) \ - (v0) += (v1); \ - (v1) = hc_rotl64 ((v1), 13); \ - (v1) ^= (v0); \ - (v0) = hc_rotl64 ((v0), 32); \ - (v2) += (v3); \ - (v3) = hc_rotl64 ((v3), 16); \ - (v3) ^= (v2); \ - (v0) += (v3); \ - (v3) = hc_rotl64 ((v3), 21); \ - (v3) ^= (v0); \ - (v2) += (v1); \ - (v1) = hc_rotl64 ((v1), 17); \ - (v1) ^= (v2); \ +#define SIPROUND(v0,v1,v2,v3) \ + (v0) += (v1); \ + (v1) = hc_rotl64 ((v1), 13); \ + (v1) ^= (v0); \ + (v0) = hc_rotl64 ((v0), 32); \ + (v2) += (v3); \ + (v3) = hc_rotl64 ((v3), 16); \ + (v3) ^= (v2); \ + (v0) += (v3); \ + (v3) = hc_rotl64 ((v3), 21); \ + (v3) ^= (v0); \ + (v2) += (v1); \ + (v1) = hc_rotl64 ((v1), 17); \ + (v1) ^= (v2); \ (v2) = hc_rotl64 ((v2), 32) -DECLSPEC static void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -51,9 +51,13 @@ DECLSPEC static void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) v2p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); v3p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - u64 *w_ptr = (u64 *) w; - - w_ptr[pw_len / 8] |= (u64) pw_len << 56; + switch (pw_len / 8) + { + case 0: w[1] |= pw_len << 24; break; + case 1: w[3] |= pw_len << 24; break; + case 2: w[5] |= pw_len << 24; break; + case 3: w[7] |= pw_len << 24; break; + } /** * loop @@ -118,7 +122,7 @@ DECLSPEC static void m10100m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m10100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -141,9 +145,13 @@ DECLSPEC static void m10100s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) v2p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[1], salt_bufs[salt_pos].salt_buf[0]); v3p ^= hl32_to_64_S (salt_bufs[salt_pos].salt_buf[3], salt_bufs[salt_pos].salt_buf[2]); - u64 *w_ptr = (u64 *) w; - - w_ptr[pw_len / 8] |= (u64) pw_len << 56; + switch (pw_len / 8) + { + case 0: w[1] |= pw_len << 24; break; + case 1: w[3] |= pw_len << 24; break; + case 2: w[5] |= pw_len << 24; break; + case 3: w[7] |= pw_len << 24; break; + } /** * digest @@ -246,7 +254,7 @@ KERNEL_FQ void m10100_m04 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; @@ -284,7 +292,7 @@ KERNEL_FQ void m10100_m08 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; @@ -360,7 +368,7 @@ KERNEL_FQ void m10100_s04 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; @@ -398,7 +406,7 @@ KERNEL_FQ void m10100_s08 (KERN_ATTR_VECTOR ()) w[11] = 0; w[12] = 0; w[13] = 0; - w[14] = pws[gid].i[14]; + w[14] = 0; w[15] = 0; const u32 pw_len = pws[gid].pw_len & 63; diff --git a/OpenCL/m10400_a0-optimized.cl b/OpenCL/m10400_a0-optimized.cl index 8cdbac5c6..b91746073 100644 --- a/OpenCL/m10400_a0-optimized.cl +++ b/OpenCL/m10400_a0-optimized.cl @@ -57,7 +57,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -66,7 +66,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -104,7 +104,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) j += rc4_key->S[255] + d0; swap (rc4_key, 255, j); } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m10400_a1-optimized.cl b/OpenCL/m10400_a1-optimized.cl index f0f68887e..22e1a116f 100644 --- a/OpenCL/m10400_a1-optimized.cl +++ b/OpenCL/m10400_a1-optimized.cl @@ -55,7 +55,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -64,7 +64,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -102,7 +102,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) j += rc4_key->S[255] + d0; swap (rc4_key, 255, j); } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m10400_a3-optimized.cl b/OpenCL/m10400_a3-optimized.cl index ebb118672..eb6020fc4 100644 --- a/OpenCL/m10400_a3-optimized.cl +++ b/OpenCL/m10400_a3-optimized.cl @@ -55,7 +55,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -64,7 +64,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -102,7 +102,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) j += rc4_key->S[255] + d0; swap (rc4_key, 255, j); } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -155,7 +155,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_ return j; } -DECLSPEC static void m10400m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10400m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) { /** * modifier @@ -321,7 +321,7 @@ DECLSPEC static void m10400m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 } } -DECLSPEC static void m10400s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10400s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) { /** * modifier diff --git a/OpenCL/m10410_a0-optimized.cl b/OpenCL/m10410_a0-optimized.cl index 40e108e95..5f3212a29 100644 --- a/OpenCL/m10410_a0-optimized.cl +++ b/OpenCL/m10410_a0-optimized.cl @@ -57,7 +57,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -66,7 +66,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -104,7 +104,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) j += rc4_key->S[255] + d0; swap (rc4_key, 255, j); } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m10410_a1-optimized.cl b/OpenCL/m10410_a1-optimized.cl index 14dddb271..b0229a349 100644 --- a/OpenCL/m10410_a1-optimized.cl +++ b/OpenCL/m10410_a1-optimized.cl @@ -55,7 +55,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -64,7 +64,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -102,7 +102,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) j += rc4_key->S[255] + d0; swap (rc4_key, 255, j); } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m10410_a3-optimized.cl b/OpenCL/m10410_a3-optimized.cl index 4ae23d181..399672cb3 100644 --- a/OpenCL/m10410_a3-optimized.cl +++ b/OpenCL/m10410_a3-optimized.cl @@ -55,7 +55,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -64,7 +64,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -102,7 +102,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) j += rc4_key->S[255] + d0; swap (rc4_key, 255, j); } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_AS u32a *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -155,7 +155,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, CONSTANT_ return j; } -DECLSPEC static void m10410m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10410m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) { /** * modifier @@ -198,7 +198,7 @@ DECLSPEC static void m10410m (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 } } -DECLSPEC static void m10410s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10410s (LOCAL_AS RC4_KEY *rc4_keys, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) { /** * modifier diff --git a/OpenCL/m10420_a3-optimized.cl b/OpenCL/m10420_a3-optimized.cl index 7cc3b7759..815e59a15 100644 --- a/OpenCL/m10420_a3-optimized.cl +++ b/OpenCL/m10420_a3-optimized.cl @@ -46,7 +46,7 @@ typedef struct pdf } pdf_t; -DECLSPEC static void m10420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) { /** * modifier @@ -199,7 +199,7 @@ DECLSPEC static void m10420m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m10420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) +DECLSPEC void m10420s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pdf_t)) { /** * modifier diff --git a/OpenCL/m10500-pure.cl b/OpenCL/m10500-pure.cl index f4b9246dc..3ba4e85a4 100644 --- a/OpenCL/m10500-pure.cl +++ b/OpenCL/m10500-pure.cl @@ -61,7 +61,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -70,7 +70,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -126,7 +126,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll diff --git a/OpenCL/m10700-optimized.cl b/OpenCL/m10700-optimized.cl index c2ee74d92..290761db2 100644 --- a/OpenCL/m10700-optimized.cl +++ b/OpenCL/m10700-optimized.cl @@ -70,7 +70,7 @@ typedef struct } ctx_t; -DECLSPEC static void orig_sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void orig_sha256_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) { u32 t0[4]; u32 t1[4]; @@ -97,7 +97,7 @@ DECLSPEC static void orig_sha256_transform (const u32 *w0, const u32 *w1, const sha256_transform (t0, t1, t2, t3, digest); } -DECLSPEC static void orig_sha384_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest) +DECLSPEC void orig_sha384_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest) { u32 t0[4]; u32 t1[4]; @@ -144,7 +144,7 @@ DECLSPEC static void orig_sha384_transform (const u64 *w0, const u64 *w1, const sha384_transform (t0, t1, t2, t3, t4, t5, t6, t7, digest); } -DECLSPEC static void orig_sha512_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest) +DECLSPEC void orig_sha512_transform (const u64 *w0, const u64 *w1, const u64 *w2, const u64 *w3, u64 *digest) { u32 t0[4]; u32 t1[4]; @@ -210,7 +210,7 @@ DECLSPEC static void orig_sha512_transform (const u64 *w0, const u64 *w1, const #define WORDMAXSZ4 (WORDMAXSZ / 4) #define AESSZ4 (AESSZ / 4) -DECLSPEC static void make_sc (u32 *sc, const u32 *pw, const u32 pw_len, const u32 *bl, const u32 bl_len) +DECLSPEC void make_sc (u32 *sc, const u32 *pw, const u32 pw_len, const u32 *bl, const u32 bl_len) { const u32 bd = bl_len / 4; @@ -255,7 +255,7 @@ DECLSPEC static void make_sc (u32 *sc, const u32 *pw, const u32 pw_len, const u3 } } -DECLSPEC static void make_pt_with_offset (u32 *pt, const u32 offset, const u32 *sc, const u32 pwbl_len) +DECLSPEC void make_pt_with_offset (u32 *pt, const u32 offset, const u32 *sc, const u32 pwbl_len) { const u32 m = offset % pwbl_len; @@ -279,7 +279,7 @@ DECLSPEC static void make_pt_with_offset (u32 *pt, const u32 offset, const u32 * #endif } -DECLSPEC static void make_w_with_offset (ctx_t *ctx, const u32 W_len, const u32 offset, const u32 *sc, const u32 pwbl_len, u32 *iv, const u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void make_w_with_offset (ctx_t *ctx, const u32 W_len, const u32 offset, const u32 *sc, const u32 pwbl_len, u32 *iv, const u32 *ks, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { for (u32 k = 0, wk = 0; k < W_len; k += AESSZ, wk += AESSZ4) { @@ -301,7 +301,7 @@ DECLSPEC static void make_w_with_offset (ctx_t *ctx, const u32 W_len, const u32 } } -DECLSPEC static u32 do_round (const u32 *pw, const u32 pw_len, ctx_t *ctx, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 do_round (const u32 *pw, const u32 pw_len, ctx_t *ctx, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { // make scratch buffer diff --git a/OpenCL/m10700-pure.cl b/OpenCL/m10700-pure.cl index bc15f2848..63cd57cd8 100644 --- a/OpenCL/m10700-pure.cl +++ b/OpenCL/m10700-pure.cl @@ -56,7 +56,7 @@ typedef struct pdf17l8_tmp } pdf17l8_tmp_t; -DECLSPEC static void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -83,7 +83,7 @@ DECLSPEC static void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u out[3] = hc_swap32_S (out[3]); } -DECLSPEC static u32 sha256_update_aes_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 sha256_update_aes_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 ex = 0; @@ -168,7 +168,7 @@ DECLSPEC static u32 sha256_update_aes_64 (sha256_ctx_t *ctx, u32 *w0, u32 *w1, u return ex; } -DECLSPEC static void sha256_update_aes (sha256_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha256_update_aes (sha256_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 w0[4]; u32 w1[4]; @@ -220,7 +220,7 @@ DECLSPEC static void sha256_update_aes (sha256_ctx_t *ctx, const u32 *w, const i sha256_update_aes_64 (ctx, w0, w1, w2, w3, len - pos1, aes_ks, aes_iv, s_te0, s_te1, s_te2, s_te3, s_te4); } -DECLSPEC static void sha256_final_aes (sha256_ctx_t *ctx, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha256_final_aes (sha256_ctx_t *ctx, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { int pos = ctx->len & 63; @@ -256,7 +256,7 @@ DECLSPEC static void sha256_final_aes (sha256_ctx_t *ctx, const u32 *aes_ks, u32 sha256_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } -DECLSPEC static void sha384_update_aes_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha384_update_aes_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { const int pos = ctx->len & 127; @@ -391,7 +391,7 @@ DECLSPEC static void sha384_update_aes_128 (sha384_ctx_t *ctx, u32 *w0, u32 *w1, } } -DECLSPEC static void sha384_update_aes (sha384_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha384_update_aes (sha384_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 w0[4]; u32 w1[4]; @@ -479,7 +479,7 @@ DECLSPEC static void sha384_update_aes (sha384_ctx_t *ctx, const u32 *w, const i sha384_update_aes_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1, aes_ks, aes_iv, s_te0, s_te1, s_te2, s_te3, s_te4); } -DECLSPEC static void sha384_final_aes (sha384_ctx_t *ctx, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha384_final_aes (sha384_ctx_t *ctx, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { int pos = ctx->len & 127; @@ -534,7 +534,7 @@ DECLSPEC static void sha384_final_aes (sha384_ctx_t *ctx, const u32 *aes_ks, u32 sha384_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); } -DECLSPEC static void sha512_update_aes_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha512_update_aes_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { const int pos = ctx->len & 127; @@ -669,7 +669,7 @@ DECLSPEC static void sha512_update_aes_128 (sha512_ctx_t *ctx, u32 *w0, u32 *w1, } } -DECLSPEC static void sha512_update_aes (sha512_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha512_update_aes (sha512_ctx_t *ctx, const u32 *w, const int len, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 w0[4]; u32 w1[4]; @@ -757,7 +757,7 @@ DECLSPEC static void sha512_update_aes (sha512_ctx_t *ctx, const u32 *w, const i sha512_update_aes_128 (ctx, w0, w1, w2, w3, w4, w5, w6, w7, len - pos1, aes_ks, aes_iv, s_te0, s_te1, s_te2, s_te3, s_te4); } -DECLSPEC static void sha512_final_aes (sha512_ctx_t *ctx, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void sha512_final_aes (sha512_ctx_t *ctx, const u32 *aes_ks, u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { int pos = ctx->len & 127; @@ -812,7 +812,7 @@ DECLSPEC static void sha512_final_aes (sha512_ctx_t *ctx, const u32 *aes_ks, u32 sha512_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->w4, ctx->w5, ctx->w6, ctx->w7, ctx->h); } -DECLSPEC static int find_sum (const u32 *w, const u32 pw_len, u32 *bb, const u32 *aes_ks, const u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC int find_sum (const u32 *w, const u32 pw_len, u32 *bb, const u32 *aes_ks, const u32 *aes_iv, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -853,7 +853,7 @@ DECLSPEC static int find_sum (const u32 *w, const u32 pw_len, u32 *bb, const u32 return sum; } -DECLSPEC static u32 do_round (const u32 *w, const u32 pw_len, pdf17l8_tmp_t *tmp, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC u32 do_round (const u32 *w, const u32 pw_len, pdf17l8_tmp_t *tmp, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { // get previous hash (already padded) @@ -1231,7 +1231,7 @@ KERNEL_FQ void m10700_loop (KERN_ATTR_TMPS_ESALT (pdf17l8_tmp_t, pdf_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } diff --git a/OpenCL/m10800_a0-optimized.cl b/OpenCL/m10800_a0-optimized.cl index 3cf1589a9..aaf1a8bd1 100644 --- a/OpenCL/m10800_a0-optimized.cl +++ b/OpenCL/m10800_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha384.cl" #endif -DECLSPEC static void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10800_a1-optimized.cl b/OpenCL/m10800_a1-optimized.cl index c88691031..9bc1b42bd 100644 --- a/OpenCL/m10800_a1-optimized.cl +++ b/OpenCL/m10800_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha384.cl" #endif -DECLSPEC static void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m10800_a3-optimized.cl b/OpenCL/m10800_a3-optimized.cl index 14ed838ea..e2291000c 100644 --- a/OpenCL/m10800_a3-optimized.cl +++ b/OpenCL/m10800_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha384.cl" #endif -DECLSPEC static void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) +DECLSPEC void sha384_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC static void sha384_transform_intern (const u32x *w0, const u32x *w1, co digest[7] = 0; } -DECLSPEC static void m10800m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10800m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -177,7 +177,7 @@ DECLSPEC static void m10800m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m10800s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m10800s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m10800_a3-pure.cl b/OpenCL/m10800_a3-pure.cl index 0ee6ca2b4..940e5a61c 100644 --- a/OpenCL/m10800_a3-pure.cl +++ b/OpenCL/m10800_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m10800_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -99,7 +99,7 @@ KERNEL_FQ void m10800_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m10900-pure.cl b/OpenCL/m10900-pure.cl index 3edb44e4d..19613c2ca 100644 --- a/OpenCL/m10900-pure.cl +++ b/OpenCL/m10900-pure.cl @@ -32,7 +32,7 @@ typedef struct pbkdf2_sha256 } pbkdf2_sha256_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m11000_a3-optimized.cl b/OpenCL/m11000_a3-optimized.cl index 24de3034c..9ac1f844d 100644 --- a/OpenCL/m11000_a3-optimized.cl +++ b/OpenCL/m11000_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void m11000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -278,7 +278,7 @@ DECLSPEC static void m11000m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m11000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11000s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m11000_a3-pure.cl b/OpenCL/m11000_a3-pure.cl index e815aa209..63c36625c 100644 --- a/OpenCL/m11000_a3-pure.cl +++ b/OpenCL/m11000_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m11000_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -105,7 +105,7 @@ KERNEL_FQ void m11000_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m11100_a3-optimized.cl b/OpenCL/m11100_a3-optimized.cl index 5ae6448bd..76f4dab57 100644 --- a/OpenCL/m11100_a3-optimized.cl +++ b/OpenCL/m11100_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m11100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m11100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -330,7 +330,7 @@ DECLSPEC static void m11100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m11100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m11100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m11100_a3-pure.cl b/OpenCL/m11100_a3-pure.cl index 5835990cd..a9e172740 100644 --- a/OpenCL/m11100_a3-pure.cl +++ b/OpenCL/m11100_a3-pure.cl @@ -84,7 +84,7 @@ KERNEL_FQ void m11100_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -283,7 +283,7 @@ KERNEL_FQ void m11100_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m11200_a3-optimized.cl b/OpenCL/m11200_a3-optimized.cl index d82418753..34d62f10c 100644 --- a/OpenCL/m11200_a3-optimized.cl +++ b/OpenCL/m11200_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m11200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -443,7 +443,7 @@ DECLSPEC static void m11200m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m11200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11200s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m11200_a3-pure.cl b/OpenCL/m11200_a3-pure.cl index b4c321c18..7d9a898b8 100644 --- a/OpenCL/m11200_a3-pure.cl +++ b/OpenCL/m11200_a3-pure.cl @@ -44,7 +44,7 @@ KERNEL_FQ void m11200_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -185,7 +185,7 @@ KERNEL_FQ void m11200_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m11300-pure.cl b/OpenCL/m11300-pure.cl index d0e8cb721..cf0b06e7b 100644 --- a/OpenCL/m11300-pure.cl +++ b/OpenCL/m11300-pure.cl @@ -27,7 +27,7 @@ typedef struct bitcoin_wallet } bitcoin_wallet_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m11500_a0-optimized.cl b/OpenCL/m11500_a0-optimized.cl index 157021ff9..bcea197f0 100644 --- a/OpenCL/m11500_a0-optimized.cl +++ b/OpenCL/m11500_a0-optimized.cl @@ -83,7 +83,7 @@ CONSTANT_AS u32a crc32tab[0x100] = 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -DECLSPEC static u32x round_crc32 (u32x a, const u32x v) +DECLSPEC u32x round_crc32 (u32x a, const u32x v) { const u32x k = (a ^ v) & 0xff; @@ -106,7 +106,7 @@ DECLSPEC static u32x round_crc32 (u32x a, const u32x v) return a; } -DECLSPEC static u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) { u32x a = iv ^ ~0; diff --git a/OpenCL/m11500_a1-optimized.cl b/OpenCL/m11500_a1-optimized.cl index 18f297b92..bede0d4f1 100644 --- a/OpenCL/m11500_a1-optimized.cl +++ b/OpenCL/m11500_a1-optimized.cl @@ -81,7 +81,7 @@ CONSTANT_AS u32a crc32tab[0x100] = 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -DECLSPEC static u32x round_crc32 (u32x a, const u32x v) +DECLSPEC u32x round_crc32 (u32x a, const u32x v) { const u32x k = (a ^ v) & 0xff; @@ -104,7 +104,7 @@ DECLSPEC static u32x round_crc32 (u32x a, const u32x v) return a; } -DECLSPEC static u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) { u32x a = iv ^ ~0; diff --git a/OpenCL/m11500_a3-optimized.cl b/OpenCL/m11500_a3-optimized.cl index e2500341b..70af7777a 100644 --- a/OpenCL/m11500_a3-optimized.cl +++ b/OpenCL/m11500_a3-optimized.cl @@ -81,7 +81,7 @@ CONSTANT_AS u32a crc32tab[0x100] = 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -DECLSPEC static u32x round_crc32 (u32x a, const u32x v) +DECLSPEC u32x round_crc32 (u32x a, const u32x v) { const u32x k = (a ^ v) & 0xff; @@ -104,7 +104,7 @@ DECLSPEC static u32x round_crc32 (u32x a, const u32x v) return a; } -DECLSPEC static u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) +DECLSPEC u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) { u32x a = iv ^ ~0; @@ -124,7 +124,7 @@ DECLSPEC static u32x crc32 (const u32x *w, const u32 pw_len, const u32 iv) return ~a; } -DECLSPEC static void m11500m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11500m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -182,7 +182,7 @@ DECLSPEC static void m11500m (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) } } -DECLSPEC static void m11500s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11500s (u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m11600-pure.cl b/OpenCL/m11600-pure.cl index 5be47a067..ea19df0cb 100644 --- a/OpenCL/m11600-pure.cl +++ b/OpenCL/m11600-pure.cl @@ -31,7 +31,7 @@ typedef struct } seven_zip_hook_t; -DECLSPEC static void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, const u32 append, u32 *digest) +DECLSPEC void memcat8c_be (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 len, const u32 append, u32 *digest) { const u32 func_len = len & 63; diff --git a/OpenCL/m11700_a0-optimized.cl b/OpenCL/m11700_a0-optimized.cl index 9876c74cd..e42cc57ac 100644 --- a/OpenCL/m11700_a0-optimized.cl +++ b/OpenCL/m11700_a0-optimized.cl @@ -18,7 +18,7 @@ #define INITVAL 0x0101010101010101 -DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -65,7 +65,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob256_rc64[r][i]; } #ifdef _unroll @@ -104,14 +104,14 @@ KERNEL_FQ void m11700_m04 (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -262,14 +262,14 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); diff --git a/OpenCL/m11700_a0-pure.cl b/OpenCL/m11700_a0-pure.cl index f5e4c187b..d651caa92 100644 --- a/OpenCL/m11700_a0-pure.cl +++ b/OpenCL/m11700_a0-pure.cl @@ -35,21 +35,21 @@ KERNEL_FQ void m11700_mxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -108,21 +108,21 @@ KERNEL_FQ void m11700_sxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif diff --git a/OpenCL/m11700_a1-optimized.cl b/OpenCL/m11700_a1-optimized.cl index f60a60798..982e53128 100644 --- a/OpenCL/m11700_a1-optimized.cl +++ b/OpenCL/m11700_a1-optimized.cl @@ -16,7 +16,7 @@ #define INITVAL 0x0101010101010101 -DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -63,7 +63,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob256_rc64[r][i]; } #ifdef _unroll @@ -102,14 +102,14 @@ KERNEL_FQ void m11700_m04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -318,14 +318,14 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); diff --git a/OpenCL/m11700_a1-pure.cl b/OpenCL/m11700_a1-pure.cl index 589580e7f..4046115f1 100644 --- a/OpenCL/m11700_a1-pure.cl +++ b/OpenCL/m11700_a1-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11700_mxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -104,21 +104,21 @@ KERNEL_FQ void m11700_sxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif diff --git a/OpenCL/m11700_a3-optimized.cl b/OpenCL/m11700_a3-optimized.cl index b5027c112..7a13ed762 100644 --- a/OpenCL/m11700_a3-optimized.cl +++ b/OpenCL/m11700_a3-optimized.cl @@ -16,7 +16,7 @@ #define INITVAL 0x0101010101010101 -DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -57,7 +57,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob256_rc64[r][i]; } #ifdef _unroll @@ -75,7 +75,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s } } -DECLSPEC static void m11700m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11700m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -158,7 +158,7 @@ DECLSPEC static void m11700m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u3 } } -DECLSPEC static void m11700s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11700s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -271,14 +271,14 @@ KERNEL_FQ void m11700_m04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -335,14 +335,14 @@ KERNEL_FQ void m11700_m08 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -399,14 +399,14 @@ KERNEL_FQ void m11700_m16 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -463,14 +463,14 @@ KERNEL_FQ void m11700_s04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -527,14 +527,14 @@ KERNEL_FQ void m11700_s08 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -591,14 +591,14 @@ KERNEL_FQ void m11700_s16 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); diff --git a/OpenCL/m11700_a3-pure.cl b/OpenCL/m11700_a3-pure.cl index 84fe6a558..46988ca46 100644 --- a/OpenCL/m11700_a3-pure.cl +++ b/OpenCL/m11700_a3-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11700_mxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -61,7 +61,7 @@ KERNEL_FQ void m11700_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -117,21 +117,21 @@ KERNEL_FQ void m11700_sxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -157,7 +157,7 @@ KERNEL_FQ void m11700_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m11750_a0-pure.cl b/OpenCL/m11750_a0-pure.cl index 8b05f453c..8f1a4f03e 100644 --- a/OpenCL/m11750_a0-pure.cl +++ b/OpenCL/m11750_a0-pure.cl @@ -35,21 +35,21 @@ KERNEL_FQ void m11750_mxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -65,7 +65,7 @@ KERNEL_FQ void m11750_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -117,21 +117,21 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -159,7 +159,7 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m11750_a1-pure.cl b/OpenCL/m11750_a1-pure.cl index 954a20ccb..fef704bb5 100644 --- a/OpenCL/m11750_a1-pure.cl +++ b/OpenCL/m11750_a1-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11750_mxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -140,21 +140,21 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif diff --git a/OpenCL/m11750_a3-pure.cl b/OpenCL/m11750_a3-pure.cl index 8517501e6..389818a4f 100644 --- a/OpenCL/m11750_a3-pure.cl +++ b/OpenCL/m11750_a3-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11750_mxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -126,21 +126,21 @@ KERNEL_FQ void m11750_sxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif diff --git a/OpenCL/m11760_a0-pure.cl b/OpenCL/m11760_a0-pure.cl index 3476cdbde..23784cd05 100644 --- a/OpenCL/m11760_a0-pure.cl +++ b/OpenCL/m11760_a0-pure.cl @@ -35,21 +35,21 @@ KERNEL_FQ void m11760_mxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -65,7 +65,7 @@ KERNEL_FQ void m11760_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -119,21 +119,21 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -161,7 +161,7 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m11760_a1-pure.cl b/OpenCL/m11760_a1-pure.cl index 64a81967e..1f2f7fa41 100644 --- a/OpenCL/m11760_a1-pure.cl +++ b/OpenCL/m11760_a1-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11760_mxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -142,21 +142,21 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif diff --git a/OpenCL/m11760_a3-pure.cl b/OpenCL/m11760_a3-pure.cl index 76d3507a0..7096f4616 100644 --- a/OpenCL/m11760_a3-pure.cl +++ b/OpenCL/m11760_a3-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11760_mxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif @@ -128,21 +128,21 @@ KERNEL_FQ void m11760_sxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob256_sl64[0][i]; + s_sbob_sl64[1][i] = sbob256_sl64[1][i]; + s_sbob_sl64[2][i] = sbob256_sl64[2][i]; + s_sbob_sl64[3][i] = sbob256_sl64[3][i]; + s_sbob_sl64[4][i] = sbob256_sl64[4][i]; + s_sbob_sl64[5][i] = sbob256_sl64[5][i]; + s_sbob_sl64[6][i] = sbob256_sl64[6][i]; + s_sbob_sl64[7][i] = sbob256_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob256_sl64; #endif diff --git a/OpenCL/m11800_a0-optimized.cl b/OpenCL/m11800_a0-optimized.cl index af46e5e29..30b8ffc46 100644 --- a/OpenCL/m11800_a0-optimized.cl +++ b/OpenCL/m11800_a0-optimized.cl @@ -18,7 +18,7 @@ #define INITVAL 0 -DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -65,7 +65,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob512_rc64[r][i]; } #ifdef _unroll @@ -104,14 +104,14 @@ KERNEL_FQ void m11800_m04 (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -262,14 +262,14 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); diff --git a/OpenCL/m11800_a0-pure.cl b/OpenCL/m11800_a0-pure.cl index 13bfd7714..1551bd6a8 100644 --- a/OpenCL/m11800_a0-pure.cl +++ b/OpenCL/m11800_a0-pure.cl @@ -35,21 +35,21 @@ KERNEL_FQ void m11800_mxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -108,21 +108,21 @@ KERNEL_FQ void m11800_sxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl164[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m11800_a1-optimized.cl b/OpenCL/m11800_a1-optimized.cl index 9027ebc5a..34846963d 100644 --- a/OpenCL/m11800_a1-optimized.cl +++ b/OpenCL/m11800_a1-optimized.cl @@ -16,7 +16,7 @@ #define INITVAL 0 -DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -63,7 +63,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob512_rc64[r][i]; } #ifdef _unroll @@ -102,14 +102,14 @@ KERNEL_FQ void m11800_m04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -318,14 +318,14 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); diff --git a/OpenCL/m11800_a1-pure.cl b/OpenCL/m11800_a1-pure.cl index 8d8be54b9..52cb7bd02 100644 --- a/OpenCL/m11800_a1-pure.cl +++ b/OpenCL/m11800_a1-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11800_mxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -104,21 +104,21 @@ KERNEL_FQ void m11800_sxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m11800_a3-optimized.cl b/OpenCL/m11800_a3-optimized.cl index 1d1bccd89..32a2746ce 100644 --- a/OpenCL/m11800_a3-optimized.cl +++ b/OpenCL/m11800_a3-optimized.cl @@ -16,7 +16,7 @@ #define INITVAL 0 -DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) +DECLSPEC void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_sl64)[256]) { u64x k[8]; u64x s[8]; @@ -57,7 +57,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s for (int i = 0; i < 8; i++) { - t[i] = k[i] ^ sbob_rc64[r][i]; + t[i] = k[i] ^ sbob512_rc64[r][i]; } #ifdef _unroll @@ -75,7 +75,7 @@ DECLSPEC static void streebog_g (u64x *h, const u64x *m, LOCAL_AS u64 (*s_sbob_s } } -DECLSPEC static void m11800m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11800m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -158,7 +158,7 @@ DECLSPEC static void m11800m (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u3 } } -DECLSPEC static void m11800s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m11800s (LOCAL_AS u64 (*s_sbob_sl64)[256], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -271,14 +271,14 @@ KERNEL_FQ void m11800_m04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -335,14 +335,14 @@ KERNEL_FQ void m11800_m08 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -399,14 +399,14 @@ KERNEL_FQ void m11800_m16 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -463,14 +463,14 @@ KERNEL_FQ void m11800_s04 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -527,14 +527,14 @@ KERNEL_FQ void m11800_s08 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -591,14 +591,14 @@ KERNEL_FQ void m11800_s16 (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); diff --git a/OpenCL/m11800_a3-pure.cl b/OpenCL/m11800_a3-pure.cl index d4d0b8a4e..12d1899c7 100644 --- a/OpenCL/m11800_a3-pure.cl +++ b/OpenCL/m11800_a3-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11800_mxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -61,7 +61,7 @@ KERNEL_FQ void m11800_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -117,21 +117,21 @@ KERNEL_FQ void m11800_sxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -157,7 +157,7 @@ KERNEL_FQ void m11800_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m11850_a0-pure.cl b/OpenCL/m11850_a0-pure.cl index 660dbae90..703ad9ac9 100644 --- a/OpenCL/m11850_a0-pure.cl +++ b/OpenCL/m11850_a0-pure.cl @@ -35,21 +35,21 @@ KERNEL_FQ void m11850_mxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -65,7 +65,7 @@ KERNEL_FQ void m11850_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -117,21 +117,21 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -159,7 +159,7 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m11850_a1-pure.cl b/OpenCL/m11850_a1-pure.cl index 618cb3a94..6f8c93e1b 100644 --- a/OpenCL/m11850_a1-pure.cl +++ b/OpenCL/m11850_a1-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11850_mxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -140,21 +140,21 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m11850_a3-pure.cl b/OpenCL/m11850_a3-pure.cl index 7bd413120..b273a6ef4 100644 --- a/OpenCL/m11850_a3-pure.cl +++ b/OpenCL/m11850_a3-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11850_mxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -126,21 +126,21 @@ KERNEL_FQ void m11850_sxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m11860_a0-pure.cl b/OpenCL/m11860_a0-pure.cl index 0dc9406c5..0f20573ea 100644 --- a/OpenCL/m11860_a0-pure.cl +++ b/OpenCL/m11860_a0-pure.cl @@ -35,21 +35,21 @@ KERNEL_FQ void m11860_mxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -65,7 +65,7 @@ KERNEL_FQ void m11860_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -119,21 +119,21 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_RULES ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -161,7 +161,7 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m11860_a1-pure.cl b/OpenCL/m11860_a1-pure.cl index ee937f9a3..272f8a61c 100644 --- a/OpenCL/m11860_a1-pure.cl +++ b/OpenCL/m11860_a1-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11860_mxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -142,21 +142,21 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_BASIC ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m11860_a3-pure.cl b/OpenCL/m11860_a3-pure.cl index 1e421adc6..7c54204be 100644 --- a/OpenCL/m11860_a3-pure.cl +++ b/OpenCL/m11860_a3-pure.cl @@ -33,21 +33,21 @@ KERNEL_FQ void m11860_mxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -128,21 +128,21 @@ KERNEL_FQ void m11860_sxx (KERN_ATTR_VECTOR ()) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m11900-pure.cl b/OpenCL/m11900-pure.cl index 79a3c551b..b46cca1cb 100644 --- a/OpenCL/m11900-pure.cl +++ b/OpenCL/m11900-pure.cl @@ -32,7 +32,7 @@ typedef struct pbkdf2_md5_tmp } pbkdf2_md5_tmp_t; -DECLSPEC static void hmac_md5_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_md5_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12000-pure.cl b/OpenCL/m12000-pure.cl index 570b5f3ac..43fc2ac54 100644 --- a/OpenCL/m12000-pure.cl +++ b/OpenCL/m12000-pure.cl @@ -32,7 +32,7 @@ typedef struct pbkdf2_sha1 } pbkdf2_sha1_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12300-pure.cl b/OpenCL/m12300-pure.cl index 85a05566a..4b84dcab0 100644 --- a/OpenCL/m12300-pure.cl +++ b/OpenCL/m12300-pure.cl @@ -26,7 +26,7 @@ typedef struct oraclet_tmp } oraclet_tmp_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12400-pure.cl b/OpenCL/m12400-pure.cl index 241c0d2af..d0116b0ac 100644 --- a/OpenCL/m12400-pure.cl +++ b/OpenCL/m12400-pure.cl @@ -357,7 +357,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX(i,n,S) (S)[(n)][(i)] -DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -426,7 +426,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_ } } -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 mask, u32 rounds, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32 rounds, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E0 = ((mask >> 0) & 0x003f) | ((mask >> 4) & 0x3f00); @@ -546,7 +546,7 @@ KERNEL_FQ void m12400_init (KERN_ATTR_TMPS (bsdicrypt_tmp_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m12500-pure.cl b/OpenCL/m12500-pure.cl index cdc17522a..94d525cf8 100644 --- a/OpenCL/m12500-pure.cl +++ b/OpenCL/m12500-pure.cl @@ -36,7 +36,7 @@ typedef struct rar3_tmp } rar3_tmp_t; -DECLSPEC static void sha1_transform_intern (const u32 *w, u32 *digest) +DECLSPEC void sha1_transform_intern (const u32 *w, u32 *digest) { u32 A = digest[0]; u32 B = digest[1]; diff --git a/OpenCL/m12600_a3-optimized.cl b/OpenCL/m12600_a3-optimized.cl index fcec5a933..e42a0754b 100644 --- a/OpenCL/m12600_a3-optimized.cl +++ b/OpenCL/m12600_a3-optimized.cl @@ -26,7 +26,7 @@ #define uint_to_hex_upper8(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m12600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m12600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -317,7 +317,7 @@ DECLSPEC static void m12600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m12600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m12600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m12600_a3-pure.cl b/OpenCL/m12600_a3-pure.cl index 4299f28fc..d0e80b99f 100644 --- a/OpenCL/m12600_a3-pure.cl +++ b/OpenCL/m12600_a3-pure.cl @@ -78,7 +78,7 @@ KERNEL_FQ void m12600_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -237,7 +237,7 @@ KERNEL_FQ void m12600_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m12700-pure.cl b/OpenCL/m12700-pure.cl index 114d96230..3d2638062 100644 --- a/OpenCL/m12700-pure.cl +++ b/OpenCL/m12700-pure.cl @@ -27,7 +27,7 @@ typedef struct mywallet_tmp } mywallet_tmp_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12800-pure.cl b/OpenCL/m12800-pure.cl index 64b6d4283..0c32d564f 100644 --- a/OpenCL/m12800-pure.cl +++ b/OpenCL/m12800-pure.cl @@ -33,7 +33,7 @@ typedef struct pbkdf2_sha256 } pbkdf2_sha256_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m12900-pure.cl b/OpenCL/m12900-pure.cl index 7050f9dd8..095eaae52 100644 --- a/OpenCL/m12900-pure.cl +++ b/OpenCL/m12900-pure.cl @@ -32,7 +32,7 @@ typedef struct pbkdf2_sha256 } pbkdf2_sha256_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13000-pure.cl b/OpenCL/m13000-pure.cl index b838fea78..a9b56c1c4 100644 --- a/OpenCL/m13000-pure.cl +++ b/OpenCL/m13000-pure.cl @@ -26,7 +26,7 @@ typedef struct pbkdf2_sha256_tmp } pbkdf2_sha256_tmp_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13100_a0-optimized.cl b/OpenCL/m13100_a0-optimized.cl index ff4d23ab8..a42ff481e 100644 --- a/OpenCL/m13100_a0-optimized.cl +++ b/OpenCL/m13100_a0-optimized.cl @@ -34,7 +34,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -43,7 +43,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -96,7 +96,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -149,7 +149,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -200,7 +200,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -234,7 +234,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -438,7 +438,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) { /** * pads diff --git a/OpenCL/m13100_a0-pure.cl b/OpenCL/m13100_a0-pure.cl index ab45c031c..77e57e970 100644 --- a/OpenCL/m13100_a0-pure.cl +++ b/OpenCL/m13100_a0-pure.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -148,7 +148,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -282,7 +282,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); diff --git a/OpenCL/m13100_a1-optimized.cl b/OpenCL/m13100_a1-optimized.cl index a00ba5f0b..c153b1033 100644 --- a/OpenCL/m13100_a1-optimized.cl +++ b/OpenCL/m13100_a1-optimized.cl @@ -32,7 +32,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -41,7 +41,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -94,7 +94,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -147,7 +147,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -198,7 +198,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -232,7 +232,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -436,7 +436,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) { /** * pads diff --git a/OpenCL/m13100_a1-pure.cl b/OpenCL/m13100_a1-pure.cl index 44fa97ce4..c84fab54e 100644 --- a/OpenCL/m13100_a1-pure.cl +++ b/OpenCL/m13100_a1-pure.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -146,7 +146,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -280,7 +280,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); diff --git a/OpenCL/m13100_a3-optimized.cl b/OpenCL/m13100_a3-optimized.cl index eca6f5334..81b94bf9b 100644 --- a/OpenCL/m13100_a3-optimized.cl +++ b/OpenCL/m13100_a3-optimized.cl @@ -32,7 +32,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -41,7 +41,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -94,7 +94,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -147,7 +147,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -198,7 +198,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -232,7 +232,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -436,7 +436,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) { /** * pads @@ -572,7 +572,7 @@ DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_le hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest); } -DECLSPEC static void m13100 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5tgs_t)) +DECLSPEC void m13100 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5tgs_t)) { /** * modifier diff --git a/OpenCL/m13100_a3-pure.cl b/OpenCL/m13100_a3-pure.cl index 44918051b..a6be7319a 100644 --- a/OpenCL/m13100_a3-pure.cl +++ b/OpenCL/m13100_a3-pure.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -146,7 +146,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -280,7 +280,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -403,7 +403,7 @@ KERNEL_FQ void m13100_mxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -476,7 +476,7 @@ KERNEL_FQ void m13100_sxx (KERN_ATTR_VECTOR_ESALT (krb5tgs_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m13300_a3-optimized.cl b/OpenCL/m13300_a3-optimized.cl index 54817ec44..4e748dbcd 100644 --- a/OpenCL/m13300_a3-optimized.cl +++ b/OpenCL/m13300_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m13300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m13300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -264,7 +264,7 @@ DECLSPEC static void m13300m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m13300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m13300s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m13300_a3-pure.cl b/OpenCL/m13300_a3-pure.cl index 734d897f0..4657b5eb0 100644 --- a/OpenCL/m13300_a3-pure.cl +++ b/OpenCL/m13300_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m13300_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -101,7 +101,7 @@ KERNEL_FQ void m13300_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m13500_a3-optimized.cl b/OpenCL/m13500_a3-optimized.cl index 3086a05ea..7ab0f7f89 100644 --- a/OpenCL/m13500_a3-optimized.cl +++ b/OpenCL/m13500_a3-optimized.cl @@ -24,7 +24,7 @@ typedef struct pstoken } pstoken_t; -DECLSPEC static void m13500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pstoken_t)) +DECLSPEC void m13500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pstoken_t)) { /** * modifier @@ -417,7 +417,7 @@ DECLSPEC static void m13500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m13500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pstoken_t)) +DECLSPEC void m13500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (pstoken_t)) { /** * modifier diff --git a/OpenCL/m13500_a3-pure.cl b/OpenCL/m13500_a3-pure.cl index 73f19f7b9..8c0cf3d5d 100644 --- a/OpenCL/m13500_a3-pure.cl +++ b/OpenCL/m13500_a3-pure.cl @@ -75,7 +75,7 @@ KERNEL_FQ void m13500_mxx (KERN_ATTR_VECTOR_ESALT (pstoken_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -175,7 +175,7 @@ KERNEL_FQ void m13500_sxx (KERN_ATTR_VECTOR_ESALT (pstoken_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m13600-pure.cl b/OpenCL/m13600-pure.cl index e1958863c..4846a3c27 100644 --- a/OpenCL/m13600-pure.cl +++ b/OpenCL/m13600-pure.cl @@ -42,7 +42,7 @@ typedef struct zip2 } zip2_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13711-pure.cl b/OpenCL/m13711-pure.cl index 702176d04..d3f29166e 100644 --- a/OpenCL/m13711-pure.cl +++ b/OpenCL/m13711-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13712-pure.cl b/OpenCL/m13712-pure.cl index 8c060f5e9..67b09a3e8 100644 --- a/OpenCL/m13712-pure.cl +++ b/OpenCL/m13712-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13713-pure.cl b/OpenCL/m13713-pure.cl index 455e931b8..d6ea2a0e6 100644 --- a/OpenCL/m13713-pure.cl +++ b/OpenCL/m13713-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -201,7 +201,7 @@ DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13721-pure.cl b/OpenCL/m13721-pure.cl index 8761ec53a..55f3df252 100644 --- a/OpenCL/m13721-pure.cl +++ b/OpenCL/m13721-pure.cl @@ -54,7 +54,7 @@ typedef struct vc64_tmp } vc64_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13722-pure.cl b/OpenCL/m13722-pure.cl index 95a205165..2e944cb50 100644 --- a/OpenCL/m13722-pure.cl +++ b/OpenCL/m13722-pure.cl @@ -54,7 +54,7 @@ typedef struct vc64_tmp } vc64_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13723-pure.cl b/OpenCL/m13723-pure.cl index 8c1bd8989..c1dd74f80 100644 --- a/OpenCL/m13723-pure.cl +++ b/OpenCL/m13723-pure.cl @@ -54,7 +54,7 @@ typedef struct vc64_tmp } vc64_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -201,7 +201,7 @@ DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13731-pure.cl b/OpenCL/m13731-pure.cl index d9cde72fe..24d9cd1de 100644 --- a/OpenCL/m13731-pure.cl +++ b/OpenCL/m13731-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m13732-pure.cl b/OpenCL/m13732-pure.cl index a4f53605d..a5e7ee9b9 100644 --- a/OpenCL/m13732-pure.cl +++ b/OpenCL/m13732-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m13733-pure.cl b/OpenCL/m13733-pure.cl index db5c04902..38f8060e3 100644 --- a/OpenCL/m13733-pure.cl +++ b/OpenCL/m13733-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -201,7 +201,7 @@ DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) +DECLSPEC void hmac_whirlpool_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest, SHM_TYPE u32 (*s_Ch)[256], SHM_TYPE u32 (*s_Cl)[256]) { digest[ 0] = ipad[ 0]; digest[ 1] = ipad[ 1]; diff --git a/OpenCL/m13751-pure.cl b/OpenCL/m13751-pure.cl index 15b5d8f8b..8ff4e0717 100644 --- a/OpenCL/m13751-pure.cl +++ b/OpenCL/m13751-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13752-pure.cl b/OpenCL/m13752-pure.cl index af1ea1f69..135ead320 100644 --- a/OpenCL/m13752-pure.cl +++ b/OpenCL/m13752-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13753-pure.cl b/OpenCL/m13753-pure.cl index cf763e4c6..28c56ee1b 100644 --- a/OpenCL/m13753-pure.cl +++ b/OpenCL/m13753-pure.cl @@ -54,7 +54,7 @@ typedef struct vc_tmp } vc_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -85,7 +85,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -136,7 +136,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u32 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -201,7 +201,7 @@ DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m13771-pure.cl b/OpenCL/m13771-pure.cl index 921c4881e..b3b76052c 100644 --- a/OpenCL/m13771-pure.cl +++ b/OpenCL/m13771-pure.cl @@ -57,7 +57,7 @@ typedef struct vc64_sbog_tmp } vc64_sbog_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -88,7 +88,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) { const u64x nullbuf[8] = { 0 }; u64x counterbuf[8] = { 0 }; @@ -196,21 +196,21 @@ KERNEL_FQ void m13771_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -410,14 +410,14 @@ KERNEL_FQ void m13771_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -436,7 +436,7 @@ KERNEL_FQ void m13771_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) CONSTANT_AS u32a *s_te3 = te3; CONSTANT_AS u32a *s_te4 = te4; - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m13772-pure.cl b/OpenCL/m13772-pure.cl index 015efbdb1..eb7864d99 100644 --- a/OpenCL/m13772-pure.cl +++ b/OpenCL/m13772-pure.cl @@ -57,7 +57,7 @@ typedef struct vc64_sbog_tmp } vc64_sbog_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -88,7 +88,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -139,7 +139,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) { const u64x nullbuf[8] = { 0 }; u64x counterbuf[8] = { 0 }; @@ -247,21 +247,21 @@ KERNEL_FQ void m13772_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -461,14 +461,14 @@ KERNEL_FQ void m13772_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -487,7 +487,7 @@ KERNEL_FQ void m13772_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) CONSTANT_AS u32a *s_te3 = te3; CONSTANT_AS u32a *s_te4 = te4; - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m13773-pure.cl b/OpenCL/m13773-pure.cl index cdab3e317..eea140305 100644 --- a/OpenCL/m13773-pure.cl +++ b/OpenCL/m13773-pure.cl @@ -57,7 +57,7 @@ typedef struct vc64_sbog_tmp } vc64_sbog_tmp_t; -DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -88,7 +88,7 @@ DECLSPEC static int check_header_0512 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -139,7 +139,7 @@ DECLSPEC static int check_header_1024 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_AS u64 *key, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { u32 key1[8]; u32 key2[8]; @@ -204,7 +204,7 @@ DECLSPEC static int check_header_1536 (GLOBAL_AS const vc_t *esalt_bufs, GLOBAL_ return -1; } -DECLSPEC static void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) +DECLSPEC void hmac_streebog512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u64x *ipad_hash, u64x *opad_hash, u64x *ipad_raw, u64x *opad_raw, u64x *digest, SHM_TYPE u64a (*s_sbob_sl64)[256]) { const u64x nullbuf[8] = { 0 }; u64x counterbuf[8] = { 0 }; @@ -312,21 +312,21 @@ KERNEL_FQ void m13773_init (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); #else - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif @@ -526,14 +526,14 @@ KERNEL_FQ void m13773_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) for (u32 i = lid; i < 256; i += lsz) { - s_sbob_sl64[0][i] = sbob_sl64[0][i]; - s_sbob_sl64[1][i] = sbob_sl64[1][i]; - s_sbob_sl64[2][i] = sbob_sl64[2][i]; - s_sbob_sl64[3][i] = sbob_sl64[3][i]; - s_sbob_sl64[4][i] = sbob_sl64[4][i]; - s_sbob_sl64[5][i] = sbob_sl64[5][i]; - s_sbob_sl64[6][i] = sbob_sl64[6][i]; - s_sbob_sl64[7][i] = sbob_sl64[7][i]; + s_sbob_sl64[0][i] = sbob512_sl64[0][i]; + s_sbob_sl64[1][i] = sbob512_sl64[1][i]; + s_sbob_sl64[2][i] = sbob512_sl64[2][i]; + s_sbob_sl64[3][i] = sbob512_sl64[3][i]; + s_sbob_sl64[4][i] = sbob512_sl64[4][i]; + s_sbob_sl64[5][i] = sbob512_sl64[5][i]; + s_sbob_sl64[6][i] = sbob512_sl64[6][i]; + s_sbob_sl64[7][i] = sbob512_sl64[7][i]; } barrier (CLK_LOCAL_MEM_FENCE); @@ -552,7 +552,7 @@ KERNEL_FQ void m13773_loop (KERN_ATTR_TMPS_ESALT (vc64_sbog_tmp_t, vc_t)) CONSTANT_AS u32a *s_te3 = te3; CONSTANT_AS u32a *s_te4 = te4; - CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob_sl64; + CONSTANT_AS u64a (*s_sbob_sl64)[256] = sbob512_sl64; #endif diff --git a/OpenCL/m13800_a0-optimized.cl b/OpenCL/m13800_a0-optimized.cl index bdd6de5e4..c12745182 100644 --- a/OpenCL/m13800_a0-optimized.cl +++ b/OpenCL/m13800_a0-optimized.cl @@ -22,12 +22,12 @@ typedef struct win8phone } win8phone_t; -DECLSPEC static void sha256_transform_transport_vector (const u32x *w, u32x *digest) +DECLSPEC void sha256_transform_transport_vector (const u32x *w, u32x *digest) { sha256_transform_vector (w + 0, w + 4, w + 8, w + 12, digest); } -DECLSPEC static void memcat64c_be (u32x *block, const u32 offset, u32x *carry) +DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry) { const u32 mod = offset & 3; const u32 div = offset / 4; diff --git a/OpenCL/m13800_a1-optimized.cl b/OpenCL/m13800_a1-optimized.cl index 8a10e04ae..3a432d316 100644 --- a/OpenCL/m13800_a1-optimized.cl +++ b/OpenCL/m13800_a1-optimized.cl @@ -20,12 +20,12 @@ typedef struct win8phone } win8phone_t; -DECLSPEC static void sha256_transform_transport_vector (const u32x *w, u32x *digest) +DECLSPEC void sha256_transform_transport_vector (const u32x *w, u32x *digest) { sha256_transform_vector (w + 0, w + 4, w + 8, w + 12, digest); } -DECLSPEC static void memcat64c_be (u32x *block, const u32 offset, u32x *carry) +DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry) { const u32 mod = offset & 3; const u32 div = offset / 4; diff --git a/OpenCL/m13800_a3-optimized.cl b/OpenCL/m13800_a3-optimized.cl index f920acd15..46e422df4 100644 --- a/OpenCL/m13800_a3-optimized.cl +++ b/OpenCL/m13800_a3-optimized.cl @@ -19,12 +19,12 @@ typedef struct win8phone } win8phone_t; -DECLSPEC static void sha256_transform_transport_vector (const u32x *w, u32x *digest) +DECLSPEC void sha256_transform_transport_vector (const u32x *w, u32x *digest) { sha256_transform_vector (w + 0, w + 4, w + 8, w + 12, digest); } -DECLSPEC static void memcat64c_be (u32x *block, const u32 offset, u32x *carry) +DECLSPEC void memcat64c_be (u32x *block, const u32 offset, u32x *carry) { const u32 mod = offset & 3; const u32 div = offset / 4; @@ -399,7 +399,7 @@ DECLSPEC static void memcat64c_be (u32x *block, const u32 offset, u32x *carry) } } -DECLSPEC static void m13800m (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (win8phone_t)) +DECLSPEC void m13800m (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (win8phone_t)) { /** * modifier @@ -547,7 +547,7 @@ DECLSPEC static void m13800m (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, K } } -DECLSPEC static void m13800s (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (win8phone_t)) +DECLSPEC void m13800s (LOCAL_AS u32 *s_esalt, u32 *w, const u32 pw_len, KERN_ATTR_VECTOR_ESALT (win8phone_t)) { /** * modifier diff --git a/OpenCL/m13800_a3-pure.cl b/OpenCL/m13800_a3-pure.cl index 0a0ca4277..cd2877406 100644 --- a/OpenCL/m13800_a3-pure.cl +++ b/OpenCL/m13800_a3-pure.cl @@ -38,7 +38,7 @@ KERNEL_FQ void m13800_mxx (KERN_ATTR_VECTOR_ESALT (win8phone_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -47,7 +47,7 @@ KERNEL_FQ void m13800_mxx (KERN_ATTR_VECTOR_ESALT (win8phone_t)) u32x s[32]; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = esalt_bufs[digests_offset].salt_buf[idx]; } @@ -116,7 +116,7 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_VECTOR_ESALT (win8phone_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -125,7 +125,7 @@ KERNEL_FQ void m13800_sxx (KERN_ATTR_VECTOR_ESALT (win8phone_t)) u32x s[32]; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = esalt_bufs[digests_offset].salt_buf[idx]; } diff --git a/OpenCL/m13900_a3-optimized.cl b/OpenCL/m13900_a3-optimized.cl index 05d7e0dc0..10b4b93f7 100644 --- a/OpenCL/m13900_a3-optimized.cl +++ b/OpenCL/m13900_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void m13900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m13900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -208,7 +208,7 @@ DECLSPEC static void m13900m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m13900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m13900s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m13900_a3-pure.cl b/OpenCL/m13900_a3-pure.cl index 3dbea052f..b0e85397d 100644 --- a/OpenCL/m13900_a3-pure.cl +++ b/OpenCL/m13900_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m13900_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -240,7 +240,7 @@ KERNEL_FQ void m13900_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m14000_a0-pure.cl b/OpenCL/m14000_a0-pure.cl index 11a403f16..2be784b5a 100644 --- a/OpenCL/m14000_a0-pure.cl +++ b/OpenCL/m14000_a0-pure.cl @@ -380,7 +380,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -424,7 +424,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14000_a1-pure.cl b/OpenCL/m14000_a1-pure.cl index a1f438263..38367ff6a 100644 --- a/OpenCL/m14000_a1-pure.cl +++ b/OpenCL/m14000_a1-pure.cl @@ -370,7 +370,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -414,7 +414,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14000_a3-pure.cl b/OpenCL/m14000_a3-pure.cl index 3c963bf8c..1e9b51d26 100644 --- a/OpenCL/m14000_a3-pure.cl +++ b/OpenCL/m14000_a3-pure.cl @@ -55,7 +55,7 @@ #define LUT(a,b,c,d,e) u32 a; asm ("lop3.b32 %0, %1, %2, %3, "#e";" : "=r"(a): "r"(b), "r"(c), "r"(d)); -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xAA55AA5500550055, a1, a4, a6, 0xC1) LUT(xA55AA55AF0F5F0F5, a3, a6, xAA55AA5500550055, 0x9E) @@ -89,7 +89,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xEEEEEEEE99999999, a1, a2, a6, 0x97) LUT(xFFFFEEEE66666666, a5, a6, xEEEEEEEE99999999, 0x67) @@ -122,7 +122,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xA50FA50FA50FA50F, a1, a3, a4, 0xC9) LUT(xF0F00F0FF0F0F0F0, a3, a5, a6, 0x4B) @@ -156,7 +156,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x55F055F055F055F0, a1, a3, a4, 0x72) LUT(xA500F5F0A500F5F0, a3, a5, x55F055F055F055F0, 0xAD) @@ -183,7 +183,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xA0A0A0A0FFFFFFFF, a1, a3, a6, 0xAB) LUT(xFFFF00005555FFFF, a1, a5, a6, 0xB9) @@ -217,7 +217,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x5050F5F55050F5F5, a1, a3, a5, 0xB2) LUT(x6363C6C66363C6C6, a1, a2, x5050F5F55050F5F5, 0x66) @@ -250,7 +250,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(x88AA88AA88AA88AA, a1, a2, a4, 0x0B) LUT(xAAAAFF00AAAAFF00, a1, a4, a5, 0x27) @@ -283,7 +283,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x4; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { LUT(xEEEE3333EEEE3333, a1, a2, a5, 0x9D) LUT(xBBBBBBBBBBBBBBBB, a1, a1, a2, 0x83) @@ -341,7 +341,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -416,7 +416,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -487,7 +487,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -558,7 +558,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out3 ^= x21; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -612,7 +612,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -685,7 +685,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -758,7 +758,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out1 ^= x01; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -829,7 +829,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -922,7 +922,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, * The effort has been sponsored by Rapid7: http://www.rapid7.com */ -DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x55005500, x5A0F5A0F, x3333FFFF, x66666666, x22226666, x2D2D6969, x25202160; @@ -997,7 +997,7 @@ DECLSPEC static void s1 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x55550000, x00AA00FF, x33BB33FF; @@ -1068,7 +1068,7 @@ DECLSPEC static void s2 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x44444444, x0F0FF0F0, x4F4FF4F4, x00FFFF00, x00AAAA00, x4FE55EF4; u32 x3C3CC3C3, x3C3C0000, x7373F4F4, x0C840A00; @@ -1139,7 +1139,7 @@ DECLSPEC static void s3 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out3 ^= x21; } -DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x5A5A5A5A, x0F0FF0F0; u32 x33FF33FF, x33FFCC00, x0C0030F0, x0C0CC0C0, x0CF3C03F, x5EFBDA7F, @@ -1193,7 +1193,7 @@ DECLSPEC static void s4 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out4 ^= x31; } -DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x77777777, x77770000, x22225555, x11116666, x1F1F6F6F; u32 x70700000, x43433333, x00430033, x55557777, x55167744, x5A19784B; @@ -1266,7 +1266,7 @@ DECLSPEC static void s5 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x33CC33CC; u32 x3333FFFF, x11115555, x22DD6699, x22DD9966, x00220099; @@ -1339,7 +1339,7 @@ DECLSPEC static void s6 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out1 ^= x01; } -DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0FF00FF0, x3CC33CC3, x00003CC3, x0F000F00, x5A555A55, x00001841; u32 x00000F00, x33333C33, x7B777E77, x0FF0F00F, x74878E78; @@ -1410,7 +1410,7 @@ DECLSPEC static void s7 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, *out2 ^= x11; } -DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) +DECLSPEC void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, const u32 a5, const u32 a6, u32 *out1, u32 *out2, u32 *out3, u32 *out4) { u32 x0C0C0C0C, x0000F0F0, x00FFF00F, x00555005, x00515001; u32 x33000330, x77555775, x30303030, x3030CFCF, x30104745, x30555745; @@ -1529,7 +1529,7 @@ DECLSPEC static void s8 (const u32 a1, const u32 a2, const u32 a3, const u32 a4, #define KEYSET07 { k00 = K31; k01 = K35; k02 = K52; k03 = K43; k04 = K08; k05 = K37; k06 = K51; k07 = K15; k08 = K49; k09 = K30; k10 = K07; k11 = K02; k12 = K50; k13 = K21; k14 = K45; k15 = K44; k16 = K29; k17 = K16; k18 = K42; k19 = K23; k20 = K22; k21 = K14; k22 = K38; k23 = K01; k24 = K10; k25 = K47; k26 = K53; k27 = K11; k28 = K27; k29 = K26; k30 = K05; k31 = K17; k32 = K54; k33 = K41; k34 = K39; k35 = K20; k36 = K48; k37 = K13; k38 = K24; k39 = K19; k40 = K32; k41 = K40; k42 = K34; k43 = K03; k44 = K06; k45 = K18; k46 = K12; k47 = K46; } #define KEYSET17 { k00 = K15; k01 = K51; k02 = K36; k03 = K02; k04 = K49; k05 = K21; k06 = K35; k07 = K31; k08 = K08; k09 = K14; k10 = K23; k11 = K43; k12 = K09; k13 = K37; k14 = K29; k15 = K28; k16 = K45; k17 = K00; k18 = K01; k19 = K07; k20 = K38; k21 = K30; k22 = K22; k23 = K42; k24 = K26; k25 = K04; k26 = K41; k27 = K54; k28 = K39; k29 = K10; k30 = K48; k31 = K33; k32 = K11; k33 = K53; k34 = K27; k35 = K32; k36 = K05; k37 = K25; k38 = K40; k39 = K03; k40 = K20; k41 = K24; k42 = K46; k43 = K19; k44 = K18; k45 = K06; k46 = K55; k47 = K34; } -DECLSPEC static void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) +DECLSPEC void DES (const u32 K00, const u32 K01, const u32 K02, const u32 K03, const u32 K04, const u32 K05, const u32 K06, const u32 K07, const u32 K08, const u32 K09, const u32 K10, const u32 K11, const u32 K12, const u32 K13, const u32 K14, const u32 K15, const u32 K16, const u32 K17, const u32 K18, const u32 K19, const u32 K20, const u32 K21, const u32 K22, const u32 K23, const u32 K24, const u32 K25, const u32 K26, const u32 K27, const u32 K28, const u32 K29, const u32 K30, const u32 K31, const u32 K32, const u32 K33, const u32 K34, const u32 K35, const u32 K36, const u32 K37, const u32 K38, const u32 K39, const u32 K40, const u32 K41, const u32 K42, const u32 K43, const u32 K44, const u32 K45, const u32 K46, const u32 K47, const u32 K48, const u32 K49, const u32 K50, const u32 K51, const u32 K52, const u32 K53, const u32 K54, const u32 K55, u32 *D00, u32 *D01, u32 *D02, u32 *D03, u32 *D04, u32 *D05, u32 *D06, u32 *D07, u32 *D08, u32 *D09, u32 *D10, u32 *D11, u32 *D12, u32 *D13, u32 *D14, u32 *D15, u32 *D16, u32 *D17, u32 *D18, u32 *D19, u32 *D20, u32 *D21, u32 *D22, u32 *D23, u32 *D24, u32 *D25, u32 *D26, u32 *D27, u32 *D28, u32 *D29, u32 *D30, u32 *D31, u32 *D32, u32 *D33, u32 *D34, u32 *D35, u32 *D36, u32 *D37, u32 *D38, u32 *D39, u32 *D40, u32 *D41, u32 *D42, u32 *D43, u32 *D44, u32 *D45, u32 *D46, u32 *D47, u32 *D48, u32 *D49, u32 *D50, u32 *D51, u32 *D52, u32 *D53, u32 *D54, u32 *D55, u32 *D56, u32 *D57, u32 *D58, u32 *D59, u32 *D60, u32 *D61, u32 *D62, u32 *D63) { KXX_DECL u32 k00, k01, k02, k03, k04, k05; KXX_DECL u32 k06, k07, k08, k09, k10, k11; @@ -1635,7 +1635,7 @@ DECLSPEC static void DES (const u32 K00, const u32 K01, const u32 K02, const u32 } } -DECLSPEC static void transpose32c (u32 *data) +DECLSPEC void transpose32c (u32 *data) { #define swap(x,y,j,m) \ t = ((x) ^ ((y) >> (j))) & (m); \ diff --git a/OpenCL/m14100_a0-pure.cl b/OpenCL/m14100_a0-pure.cl index 5d44dc974..99ffdb703 100644 --- a/OpenCL/m14100_a0-pure.cl +++ b/OpenCL/m14100_a0-pure.cl @@ -380,7 +380,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -424,7 +424,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC static void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -468,7 +468,7 @@ DECLSPEC static void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14100_a1-pure.cl b/OpenCL/m14100_a1-pure.cl index c62b6407e..aa861b19f 100644 --- a/OpenCL/m14100_a1-pure.cl +++ b/OpenCL/m14100_a1-pure.cl @@ -370,7 +370,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -414,7 +414,7 @@ DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC static void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32 r = hc_rotl32_S (data[0], 3u); u32 l = hc_rotl32_S (data[1], 3u); @@ -458,7 +458,7 @@ DECLSPEC static void _des_crypt_decrypt (u32 *iv, u32 *data, u32 *Kc, u32 *Kd, L iv[1] = hc_rotl32_S (r, 29u); } -DECLSPEC static void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32 d, u32 *Kc, u32 *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; diff --git a/OpenCL/m14100_a3-pure.cl b/OpenCL/m14100_a3-pure.cl index a5734d450..1943413a8 100644 --- a/OpenCL/m14100_a3-pure.cl +++ b/OpenCL/m14100_a3-pure.cl @@ -370,7 +370,7 @@ CONSTANT_AS u32a c_skb[8][64] = #define BOX1(i,S) (u32x) ((S)[(i).s0], (S)[(i).s1], (S)[(i).s2], (S)[(i).s3], (S)[(i).s4], (S)[(i).s5], (S)[(i).s6], (S)[(i).s7], (S)[(i).s8], (S)[(i).s9], (S)[(i).sa], (S)[(i).sb], (S)[(i).sc], (S)[(i).sd], (S)[(i).se], (S)[(i).sf]) #endif -DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = hc_rotl32 (data[0], 3u); u32x l = hc_rotl32 (data[1], 3u); @@ -414,7 +414,7 @@ DECLSPEC static void _des_crypt_encrypt (u32x *iv, u32x *data, u32x *Kc, u32x *K iv[1] = hc_rotl32 (r, 29u); } -DECLSPEC static void _des_crypt_decrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_decrypt (u32x *iv, u32x *data, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { u32x r = hc_rotl32 (data[0], 3u); u32x l = hc_rotl32 (data[1], 3u); @@ -458,7 +458,7 @@ DECLSPEC static void _des_crypt_decrypt (u32x *iv, u32x *data, u32x *Kc, u32x *K iv[1] = hc_rotl32 (r, 29u); } -DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32x tt; @@ -530,7 +530,7 @@ DECLSPEC static void _des_crypt_keysetup (u32x c, u32x d, u32x *Kc, u32x *Kd, LO } } -DECLSPEC static void m14100m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14100m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -615,7 +615,7 @@ DECLSPEC static void m14100m (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_sk } } -DECLSPEC static void m14100s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14100s (LOCAL_AS u32 (*s_SPtrans)[64], LOCAL_AS u32 (*s_skb)[64], u32 *w, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m14400_a0-optimized.cl b/OpenCL/m14400_a0-optimized.cl index 181516cc3..f6934b1d0 100644 --- a/OpenCL/m14400_a0-optimized.cl +++ b/OpenCL/m14400_a0-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) +DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) { u32 tmp[2]; @@ -97,7 +97,7 @@ DECLSPEC static void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 } } -DECLSPEC static void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) +DECLSPEC void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) { w3[3] = w3[2] >> 16 | w3[3] << 16; w3[2] = w3[1] >> 16 | w3[2] << 16; diff --git a/OpenCL/m14400_a1-optimized.cl b/OpenCL/m14400_a1-optimized.cl index 8e161abb2..a9259b61c 100644 --- a/OpenCL/m14400_a1-optimized.cl +++ b/OpenCL/m14400_a1-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) +DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) { u32 tmp[2]; @@ -97,7 +97,7 @@ DECLSPEC static void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 } } -DECLSPEC static void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) +DECLSPEC void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) { w3[3] = w3[2] >> 16 | w3[3] << 16; w3[2] = w3[1] >> 16 | w3[2] << 16; diff --git a/OpenCL/m14400_a3-optimized.cl b/OpenCL/m14400_a3-optimized.cl index b876a92c9..07938f501 100644 --- a/OpenCL/m14400_a3-optimized.cl +++ b/OpenCL/m14400_a3-optimized.cl @@ -25,7 +25,7 @@ #define uint_to_hex_lower8_le(i) (u32x) (l_bin2asc[(i).s0], l_bin2asc[(i).s1], l_bin2asc[(i).s2], l_bin2asc[(i).s3], l_bin2asc[(i).s4], l_bin2asc[(i).s5], l_bin2asc[(i).s6], l_bin2asc[(i).s7], l_bin2asc[(i).s8], l_bin2asc[(i).s9], l_bin2asc[(i).sa], l_bin2asc[(i).sb], l_bin2asc[(i).sc], l_bin2asc[(i).sd], l_bin2asc[(i).se], l_bin2asc[(i).sf]) #endif -DECLSPEC static void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) +DECLSPEC void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 src_r0) { u32 tmp[2]; @@ -97,7 +97,7 @@ DECLSPEC static void append_4 (const u32 offset, u32 *w0, u32 *w1, u32 *w2, u32 } } -DECLSPEC static void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) +DECLSPEC void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) { w3[3] = w3[2] >> 16 | w3[3] << 16; w3[2] = w3[1] >> 16 | w3[2] << 16; @@ -117,7 +117,7 @@ DECLSPEC static void shift_2 (u32 *w0, u32 *w1, u32 *w2, u32 *w3) w0[0] = 0 | w0[0] << 16; } -DECLSPEC static void m14400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m14400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier @@ -366,7 +366,7 @@ DECLSPEC static void m14400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m14400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) +DECLSPEC void m14400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC (), LOCAL_AS u32 *l_bin2asc) { /** * modifier diff --git a/OpenCL/m14400_a3-pure.cl b/OpenCL/m14400_a3-pure.cl index 6df4818c8..7976d7bc5 100644 --- a/OpenCL/m14400_a3-pure.cl +++ b/OpenCL/m14400_a3-pure.cl @@ -62,7 +62,7 @@ KERNEL_FQ void m14400_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -344,7 +344,7 @@ KERNEL_FQ void m14400_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m14611-pure.cl b/OpenCL/m14611-pure.cl index 9837c85d0..3acddaf75 100644 --- a/OpenCL/m14611-pure.cl +++ b/OpenCL/m14611-pure.cl @@ -94,7 +94,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14612-pure.cl b/OpenCL/m14612-pure.cl index fd39f8919..b131dfa01 100644 --- a/OpenCL/m14612-pure.cl +++ b/OpenCL/m14612-pure.cl @@ -94,7 +94,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14613-pure.cl b/OpenCL/m14613-pure.cl index 832236882..f3e07ee90 100644 --- a/OpenCL/m14613-pure.cl +++ b/OpenCL/m14613-pure.cl @@ -94,7 +94,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14621-pure.cl b/OpenCL/m14621-pure.cl index 2729736ba..4265ec7e3 100644 --- a/OpenCL/m14621-pure.cl +++ b/OpenCL/m14621-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14622-pure.cl b/OpenCL/m14622-pure.cl index 35cfed9aa..a65350212 100644 --- a/OpenCL/m14622-pure.cl +++ b/OpenCL/m14622-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14623-pure.cl b/OpenCL/m14623-pure.cl index 6bcb89da9..f75802b3f 100644 --- a/OpenCL/m14623-pure.cl +++ b/OpenCL/m14623-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14631-pure.cl b/OpenCL/m14631-pure.cl index ceb441295..8b3cecf35 100644 --- a/OpenCL/m14631-pure.cl +++ b/OpenCL/m14631-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14632-pure.cl b/OpenCL/m14632-pure.cl index 5d51c701d..a2811ca4c 100644 --- a/OpenCL/m14632-pure.cl +++ b/OpenCL/m14632-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14633-pure.cl b/OpenCL/m14633-pure.cl index 020fc8e4d..a410dac44 100644 --- a/OpenCL/m14633-pure.cl +++ b/OpenCL/m14633-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14641-pure.cl b/OpenCL/m14641-pure.cl index 101a394d5..7bd30ae9a 100644 --- a/OpenCL/m14641-pure.cl +++ b/OpenCL/m14641-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14642-pure.cl b/OpenCL/m14642-pure.cl index 54a360485..a0afc08d0 100644 --- a/OpenCL/m14642-pure.cl +++ b/OpenCL/m14642-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14643-pure.cl b/OpenCL/m14643-pure.cl index 02b09880a..6514eb297 100644 --- a/OpenCL/m14643-pure.cl +++ b/OpenCL/m14643-pure.cl @@ -93,7 +93,7 @@ typedef struct luks_tmp #define MAX_ENTROPY 7.0 -DECLSPEC static void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_ripemd160_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14700-pure.cl b/OpenCL/m14700-pure.cl index 26b7fa356..fb3673d67 100644 --- a/OpenCL/m14700-pure.cl +++ b/OpenCL/m14700-pure.cl @@ -34,7 +34,7 @@ typedef struct pbkdf2_sha1_tmp } pbkdf2_sha1_tmp_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14800-pure.cl b/OpenCL/m14800-pure.cl index 3a1b1c3e4..578fe9716 100644 --- a/OpenCL/m14800-pure.cl +++ b/OpenCL/m14800-pure.cl @@ -32,7 +32,7 @@ typedef struct pbkdf2_sha256_tmp } pbkdf2_sha256_tmp_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -68,7 +68,7 @@ DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u3 sha1_transform_vector (w0, w1, w2, w3, digest); } -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m14900_a0-optimized.cl b/OpenCL/m14900_a0-optimized.cl index 37a9dbc53..36ca69d9c 100644 --- a/OpenCL/m14900_a0-optimized.cl +++ b/OpenCL/m14900_a0-optimized.cl @@ -51,7 +51,7 @@ CONSTANT_AS u8a c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -DECLSPEC static void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) +DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -64,7 +64,7 @@ DECLSPEC static void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, cons out[1] = g5; } -DECLSPEC static u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) +DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) { u32 wl[2]; u32 wr[2]; diff --git a/OpenCL/m14900_a1-optimized.cl b/OpenCL/m14900_a1-optimized.cl index 4239b703f..42c7dd6c9 100644 --- a/OpenCL/m14900_a1-optimized.cl +++ b/OpenCL/m14900_a1-optimized.cl @@ -49,7 +49,7 @@ CONSTANT_AS u8a c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -DECLSPEC static void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) +DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -62,7 +62,7 @@ DECLSPEC static void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, cons out[1] = g5; } -DECLSPEC static u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) +DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) { u32 wl[2]; u32 wr[2]; diff --git a/OpenCL/m14900_a3-optimized.cl b/OpenCL/m14900_a3-optimized.cl index aba596674..b8a7ce4b1 100644 --- a/OpenCL/m14900_a3-optimized.cl +++ b/OpenCL/m14900_a3-optimized.cl @@ -49,7 +49,7 @@ CONSTANT_AS u8a c_ftable[256] = 0xbd, 0xa8, 0x3a, 0x01, 0x05, 0x59, 0x2a, 0x46 }; -DECLSPEC static void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) +DECLSPEC void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, const u32 *wx, u32 *out) { const u32 g1 = wx[1]; const u32 g2 = wx[0]; @@ -62,7 +62,7 @@ DECLSPEC static void g (LOCAL_AS u8 *s_ftable, const u32 *key, const int k, cons out[1] = g5; } -DECLSPEC static u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) +DECLSPEC u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) { u32 wl[2]; u32 wr[2]; @@ -102,7 +102,7 @@ DECLSPEC static u32 skip32 (LOCAL_AS u8 *s_ftable, const u32 KP, const u32 *key) return r; } -DECLSPEC static void m14900m (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14900m (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -150,7 +150,7 @@ DECLSPEC static void m14900m (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, } } -DECLSPEC static void m14900s (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m14900s (LOCAL_AS u8 *s_ftable, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m15000_a0-optimized.cl b/OpenCL/m15000_a0-optimized.cl index 356e4eb7b..428997e98 100644 --- a/OpenCL/m15000_a0-optimized.cl +++ b/OpenCL/m15000_a0-optimized.cl @@ -15,7 +15,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m15000_a0-pure.cl b/OpenCL/m15000_a0-pure.cl index 1f4e74a63..eacbad4d3 100644 --- a/OpenCL/m15000_a0-pure.cl +++ b/OpenCL/m15000_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m15000_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m15000_a1-optimized.cl b/OpenCL/m15000_a1-optimized.cl index 22f6b3dc1..7257d2c19 100644 --- a/OpenCL/m15000_a1-optimized.cl +++ b/OpenCL/m15000_a1-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); diff --git a/OpenCL/m15000_a1-pure.cl b/OpenCL/m15000_a1-pure.cl index 4a24f357b..54a3c6d98 100644 --- a/OpenCL/m15000_a1-pure.cl +++ b/OpenCL/m15000_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m15000_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -97,7 +97,7 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m15000_a3-optimized.cl b/OpenCL/m15000_a3-optimized.cl index 62ef8148a..0021f624d 100644 --- a/OpenCL/m15000_a3-optimized.cl +++ b/OpenCL/m15000_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha512.cl" #endif -DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) +DECLSPEC void sha512_transform_intern (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, const u32x *w4, const u32x *w5, const u32x *w6, const u32x *w7, u64x *digest) { u64x w0_t = hl32_to_64 (w0[0], w0[1]); u64x w1_t = hl32_to_64 (w0[2], w0[3]); @@ -112,7 +112,7 @@ DECLSPEC static void sha512_transform_intern (const u32x *w0, const u32x *w1, co digest[7] = h; } -DECLSPEC static void m15000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -273,7 +273,7 @@ DECLSPEC static void m15000m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m15000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15000s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m15000_a3-pure.cl b/OpenCL/m15000_a3-pure.cl index d78d029b6..a15aa67d6 100644 --- a/OpenCL/m15000_a3-pure.cl +++ b/OpenCL/m15000_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m15000_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m15000_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -110,7 +110,7 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -119,7 +119,7 @@ KERNEL_FQ void m15000_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m15100-pure.cl b/OpenCL/m15100-pure.cl index dbb2b6682..18756cfa4 100644 --- a/OpenCL/m15100-pure.cl +++ b/OpenCL/m15100-pure.cl @@ -27,7 +27,7 @@ typedef struct pbkdf1_sha1_tmp } pbkdf1_sha1_tmp_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m15300-pure.cl b/OpenCL/m15300-pure.cl index 3387aadf9..b1c8fb0b4 100644 --- a/OpenCL/m15300-pure.cl +++ b/OpenCL/m15300-pure.cl @@ -49,7 +49,7 @@ typedef struct dpapimk_tmp_v1 } dpapimk_tmp_v1_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m15400_a0-optimized.cl b/OpenCL/m15400_a0-optimized.cl index bfe0c2ff6..a24157254 100644 --- a/OpenCL/m15400_a0-optimized.cl +++ b/OpenCL/m15400_a0-optimized.cl @@ -40,7 +40,7 @@ typedef struct chacha20 x[b] = hc_rotl32(x[b] ^ x[c], 7); \ } while (0); -DECLSPEC static void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) +DECLSPEC void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) { /** * Key expansion diff --git a/OpenCL/m15400_a1-optimized.cl b/OpenCL/m15400_a1-optimized.cl index 18f87e05c..7508ce935 100644 --- a/OpenCL/m15400_a1-optimized.cl +++ b/OpenCL/m15400_a1-optimized.cl @@ -38,7 +38,7 @@ typedef struct chacha20 x[b] = hc_rotl32(x[b] ^ x[c], 7); \ } while (0); -DECLSPEC static void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) +DECLSPEC void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) { /** * Key expansion diff --git a/OpenCL/m15400_a3-optimized.cl b/OpenCL/m15400_a3-optimized.cl index d33fd8cb6..ae57ac965 100644 --- a/OpenCL/m15400_a3-optimized.cl +++ b/OpenCL/m15400_a3-optimized.cl @@ -38,7 +38,7 @@ typedef struct chacha20 x[b] = hc_rotl32(x[b] ^ x[c], 7); \ } while (0); -DECLSPEC static void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) +DECLSPEC void chacha20_transform (const u32x *w0, const u32x *w1, const u32 *position, const u32 offset, const u32 *iv, const u32 *plain, u32x *digest) { /** * Key expansion diff --git a/OpenCL/m15500_a0-pure.cl b/OpenCL/m15500_a0-pure.cl index 67aad1fe8..eb39484fe 100644 --- a/OpenCL/m15500_a0-pure.cl +++ b/OpenCL/m15500_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m15500_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -109,7 +109,7 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m15500_a1-pure.cl b/OpenCL/m15500_a1-pure.cl index 964227c3a..f6555c5e0 100644 --- a/OpenCL/m15500_a1-pure.cl +++ b/OpenCL/m15500_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m15500_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -103,7 +103,7 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m15500_a3-optimized.cl b/OpenCL/m15500_a3-optimized.cl index 25f998e60..62c352eea 100644 --- a/OpenCL/m15500_a3-optimized.cl +++ b/OpenCL/m15500_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_sha1.cl" #endif -DECLSPEC static void m15500m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15500m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -317,7 +317,7 @@ DECLSPEC static void m15500m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m15500s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m15500s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m15500_a3-pure.cl b/OpenCL/m15500_a3-pure.cl index bb269cbe1..7c35074be 100644 --- a/OpenCL/m15500_a3-pure.cl +++ b/OpenCL/m15500_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m15500_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m15500_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -116,7 +116,7 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -125,7 +125,7 @@ KERNEL_FQ void m15500_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m15600-pure.cl b/OpenCL/m15600-pure.cl index a7f254e71..950840f57 100644 --- a/OpenCL/m15600-pure.cl +++ b/OpenCL/m15600-pure.cl @@ -83,7 +83,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = st[4 + s] ^= ~bc0 & bc1; \ } -DECLSPEC static void keccak_transform_S (u64 *st) +DECLSPEC void keccak_transform_S (u64 *st) { const u8 keccakf_rotc[24] = { @@ -164,7 +164,7 @@ DECLSPEC static void keccak_transform_S (u64 *st) } } -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m15700-pure.cl b/OpenCL/m15700-pure.cl index 960d016fb..ac3e849a9 100644 --- a/OpenCL/m15700-pure.cl +++ b/OpenCL/m15700-pure.cl @@ -30,7 +30,7 @@ typedef struct ethereum_scrypt } ethereum_scrypt_t; -DECLSPEC static uint4 hc_swap32_4 (uint4 v) +DECLSPEC uint4 hc_swap32_4 (uint4 v) { return (rotate ((v & 0x00FF00FF), 24u) | rotate ((v & 0xFF00FF00), 8u)); } @@ -90,7 +90,7 @@ DECLSPEC static uint4 hc_swap32_4 (uint4 v) R3 = R3 + X3; \ } -DECLSPEC static void salsa_r (uint4 *TI) +DECLSPEC void salsa_r (uint4 *TI) { uint4 R0 = TI[STATE_CNT4 - 4]; uint4 R1 = TI[STATE_CNT4 - 3]; @@ -142,7 +142,7 @@ DECLSPEC static void salsa_r (uint4 *TI) } } -DECLSPEC static void scrypt_smix (uint4 *X, uint4 *T, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) +DECLSPEC void scrypt_smix (uint4 *X, uint4 *T, GLOBAL_AS uint4 *V0, GLOBAL_AS uint4 *V1, GLOBAL_AS uint4 *V2, GLOBAL_AS uint4 *V3) { #define Coord(xd4,y,z) (((xd4) * ySIZE * zSIZE) + ((y) * zSIZE) + (z)) #define CO Coord(xd4,y,z) @@ -272,7 +272,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = 0x8000000000008080, 0x0000000080000001, 0x8000000080008008 }; -DECLSPEC static void keccak_transform_S (u64 *st) +DECLSPEC void keccak_transform_S (u64 *st) { const u8 keccakf_rotc[24] = { diff --git a/OpenCL/m15900-pure.cl b/OpenCL/m15900-pure.cl index db1f2de46..dbb59c80a 100644 --- a/OpenCL/m15900-pure.cl +++ b/OpenCL/m15900-pure.cl @@ -50,7 +50,7 @@ typedef struct dpapimk } dpapimk_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m16000_a0-pure.cl b/OpenCL/m16000_a0-pure.cl index 1e9869a51..ffbc3a6e2 100644 --- a/OpenCL/m16000_a0-pure.cl +++ b/OpenCL/m16000_a0-pure.cl @@ -354,7 +354,7 @@ CONSTANT_AS u32a c_tripcode_salt[128] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -423,7 +423,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m16000_a1-pure.cl b/OpenCL/m16000_a1-pure.cl index 5deebaa5e..c5af56fce 100644 --- a/OpenCL/m16000_a1-pure.cl +++ b/OpenCL/m16000_a1-pure.cl @@ -352,7 +352,7 @@ CONSTANT_AS u32a c_tripcode_salt[128] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -421,7 +421,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m16000_a3-pure.cl b/OpenCL/m16000_a3-pure.cl index 8b10cbec3..c7cb2311f 100644 --- a/OpenCL/m16000_a3-pure.cl +++ b/OpenCL/m16000_a3-pure.cl @@ -352,7 +352,7 @@ CONSTANT_AS u32a c_tripcode_salt[128] = #define BOX(i,n,S) (u32x) ((S)[(n)][(i).s0], (S)[(n)][(i).s1], (S)[(n)][(i).s2], (S)[(n)][(i).s3], (S)[(n)][(i).s4], (S)[(n)][(i).s5], (S)[(n)][(i).s6], (S)[(n)][(i).s7], (S)[(n)][(i).s8], (S)[(n)][(i).s9], (S)[(n)][(i).sa], (S)[(n)][(i).sb], (S)[(n)][(i).sc], (S)[(n)][(i).sd], (S)[(n)][(i).se], (S)[(n)][(i).sf]) #endif -DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) +DECLSPEC void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_skb)[64]) { u32 tt; @@ -421,7 +421,7 @@ DECLSPEC static void _des_crypt_keysetup (u32 c, u32x d, u32x *Kc, u32x *Kd, LOC } } -DECLSPEC static void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) +DECLSPEC void _des_crypt_encrypt (u32 *iv, u32 mask, u32x *Kc, u32x *Kd, LOCAL_AS u32 (*s_SPtrans)[64]) { const u32 E1 = (mask >> 2) & 0x3f0; const u32 E0 = mask & 0x3f; diff --git a/OpenCL/m16100_a3-optimized.cl b/OpenCL/m16100_a3-optimized.cl index e99441522..ba96def6b 100644 --- a/OpenCL/m16100_a3-optimized.cl +++ b/OpenCL/m16100_a3-optimized.cl @@ -24,7 +24,7 @@ typedef struct tacacs_plus } tacacs_plus_t; -DECLSPEC static void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (tacacs_plus_t)) +DECLSPEC void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (tacacs_plus_t)) { /** * modifier @@ -277,7 +277,7 @@ DECLSPEC static void m16100m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m16100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (tacacs_plus_t)) +DECLSPEC void m16100s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (tacacs_plus_t)) { /** * modifier diff --git a/OpenCL/m16100_a3-pure.cl b/OpenCL/m16100_a3-pure.cl index b56106574..3dfb0cc98 100644 --- a/OpenCL/m16100_a3-pure.cl +++ b/OpenCL/m16100_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m16100_mxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -217,7 +217,7 @@ KERNEL_FQ void m16100_sxx (KERN_ATTR_VECTOR_ESALT (tacacs_plus_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m16200-pure.cl b/OpenCL/m16200-pure.cl index 676e1dc9b..ee1906bee 100644 --- a/OpenCL/m16200-pure.cl +++ b/OpenCL/m16200-pure.cl @@ -36,7 +36,7 @@ typedef struct apple_secure_notes } apple_secure_notes_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m16300-pure.cl b/OpenCL/m16300-pure.cl index 46d2aee7f..908adb69f 100644 --- a/OpenCL/m16300-pure.cl +++ b/OpenCL/m16300-pure.cl @@ -85,7 +85,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = st[4 + s] ^= ~bc0 & bc1; \ } -DECLSPEC static void keccak_transform_S (u64 *st) +DECLSPEC void keccak_transform_S (u64 *st) { const u8 keccakf_rotc[24] = { @@ -166,7 +166,7 @@ DECLSPEC static void keccak_transform_S (u64 *st) } } -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m16400_a0-pure.cl b/OpenCL/m16400_a0-pure.cl index 31d4503c4..b75f2d144 100644 --- a/OpenCL/m16400_a0-pure.cl +++ b/OpenCL/m16400_a0-pure.cl @@ -15,7 +15,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -115,7 +115,7 @@ DECLSPEC static void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 digest[3] += d; } -DECLSPEC static void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -145,7 +145,7 @@ DECLSPEC static void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 * ctx->w3[3] |= w3[3]; } -DECLSPEC static void cram_md5_update (md5_ctx_t *ctx, const u32 *w, const int len) +DECLSPEC void cram_md5_update (md5_ctx_t *ctx, const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -172,7 +172,7 @@ DECLSPEC static void cram_md5_update (md5_ctx_t *ctx, const u32 *w, const int le cram_md5_update_64 (ctx, w0, w1, w2, w3, len); } -DECLSPEC static void cram_md5_final (md5_ctx_t *ctx) +DECLSPEC void cram_md5_final (md5_ctx_t *ctx) { cram_md5_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } diff --git a/OpenCL/m16400_a1-pure.cl b/OpenCL/m16400_a1-pure.cl index 7841a844e..ba2d9ee56 100644 --- a/OpenCL/m16400_a1-pure.cl +++ b/OpenCL/m16400_a1-pure.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) +DECLSPEC void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 *w2, const u32 *w3, u32 *digest) { u32 a = digest[0]; u32 b = digest[1]; @@ -113,7 +113,7 @@ DECLSPEC static void cram_md5_transform (const u32 *w0, const u32 *w1, const u32 digest[3] += d; } -DECLSPEC static void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) +DECLSPEC void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -143,7 +143,7 @@ DECLSPEC static void cram_md5_update_64 (md5_ctx_t *ctx, u32 *w0, u32 *w1, u32 * ctx->w3[3] |= w3[3]; } -DECLSPEC static void cram_md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) +DECLSPEC void cram_md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len) { u32 w0[4]; u32 w1[4]; @@ -170,7 +170,7 @@ DECLSPEC static void cram_md5_update_global (md5_ctx_t *ctx, GLOBAL_AS const u32 cram_md5_update_64 (ctx, w0, w1, w2, w3, len); } -DECLSPEC static void cram_md5_final (md5_ctx_t *ctx) +DECLSPEC void cram_md5_final (md5_ctx_t *ctx) { cram_md5_transform (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } diff --git a/OpenCL/m16400_a3-optimized.cl b/OpenCL/m16400_a3-optimized.cl index 43ddbd5d6..fd6967267 100644 --- a/OpenCL/m16400_a3-optimized.cl +++ b/OpenCL/m16400_a3-optimized.cl @@ -30,7 +30,7 @@ a -= t; \ } -DECLSPEC static void m16400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m16400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -222,7 +222,7 @@ DECLSPEC static void m16400m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) } } -DECLSPEC static void m16400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m16400s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m16400_a3-pure.cl b/OpenCL/m16400_a3-pure.cl index 095e484e6..a9b2d75f0 100644 --- a/OpenCL/m16400_a3-pure.cl +++ b/OpenCL/m16400_a3-pure.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static void cram_md5_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) +DECLSPEC void cram_md5_transform_vector (const u32x *w0, const u32x *w1, const u32x *w2, const u32x *w3, u32x *digest) { u32x a = digest[0]; u32x b = digest[1]; @@ -113,7 +113,7 @@ DECLSPEC static void cram_md5_transform_vector (const u32x *w0, const u32x *w1, digest[3] += d; } -DECLSPEC static void cram_md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) +DECLSPEC void cram_md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, u32x *w1, u32x *w2, u32x *w3, const int len) { #ifdef IS_AMD const int pos = ctx->len & 63; @@ -143,7 +143,7 @@ DECLSPEC static void cram_md5_update_vector_64 (md5_ctx_vector_t *ctx, u32x *w0, ctx->w3[3] |= w3[3]; } -DECLSPEC static void cram_md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) +DECLSPEC void cram_md5_update_vector (md5_ctx_vector_t *ctx, const u32x *w, const int len) { u32x w0[4]; u32x w1[4]; @@ -171,7 +171,7 @@ DECLSPEC static void cram_md5_update_vector (md5_ctx_vector_t *ctx, const u32x * } -DECLSPEC static void cram_md5_final_vector (md5_ctx_vector_t *ctx) +DECLSPEC void cram_md5_final_vector (md5_ctx_vector_t *ctx) { cram_md5_transform_vector (ctx->w0, ctx->w1, ctx->w2, ctx->w3, ctx->h); } @@ -195,7 +195,7 @@ KERNEL_FQ void m16400_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -262,7 +262,7 @@ KERNEL_FQ void m16400_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m16511_a1-pure.cl b/OpenCL/m16511_a1-pure.cl index 4479598e3..9d566b93c 100644 --- a/OpenCL/m16511_a1-pure.cl +++ b/OpenCL/m16511_a1-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m16511_mxx (KERN_ATTR_ESALT (jwt_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -122,7 +122,7 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_ESALT (jwt_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } diff --git a/OpenCL/m16511_a3-pure.cl b/OpenCL/m16511_a3-pure.cl index df4378cad..08841d710 100644 --- a/OpenCL/m16511_a3-pure.cl +++ b/OpenCL/m16511_a3-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m16511_mxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -108,7 +108,7 @@ KERNEL_FQ void m16511_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m16512_a1-pure.cl b/OpenCL/m16512_a1-pure.cl index 2a63045a1..14e88469b 100644 --- a/OpenCL/m16512_a1-pure.cl +++ b/OpenCL/m16512_a1-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m16512_mxx (KERN_ATTR_ESALT (jwt_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -122,7 +122,7 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_ESALT (jwt_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } diff --git a/OpenCL/m16512_a3-pure.cl b/OpenCL/m16512_a3-pure.cl index d60e618c1..8b1ff6baf 100644 --- a/OpenCL/m16512_a3-pure.cl +++ b/OpenCL/m16512_a3-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m16512_mxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -108,7 +108,7 @@ KERNEL_FQ void m16512_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m16513_a1-pure.cl b/OpenCL/m16513_a1-pure.cl index 62686a88a..c064f5d45 100644 --- a/OpenCL/m16513_a1-pure.cl +++ b/OpenCL/m16513_a1-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m16513_mxx (KERN_ATTR_ESALT (jwt_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -122,7 +122,7 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_ESALT (jwt_t)) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } diff --git a/OpenCL/m16513_a3-pure.cl b/OpenCL/m16513_a3-pure.cl index b46a2e1c8..476dd6a3d 100644 --- a/OpenCL/m16513_a3-pure.cl +++ b/OpenCL/m16513_a3-pure.cl @@ -41,7 +41,7 @@ KERNEL_FQ void m16513_mxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -108,7 +108,7 @@ KERNEL_FQ void m16513_sxx (KERN_ATTR_VECTOR_ESALT (jwt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m16600_a3-optimized.cl b/OpenCL/m16600_a3-optimized.cl index 1a0216b09..04a1a7138 100644 --- a/OpenCL/m16600_a3-optimized.cl +++ b/OpenCL/m16600_a3-optimized.cl @@ -22,7 +22,7 @@ typedef struct electrum_wallet } electrum_wallet_t; -DECLSPEC static void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_ESALT (electrum_wallet_t)) +DECLSPEC void m16600 (SHM_TYPE u32a *s_te0, SHM_TYPE u32a *s_te1, SHM_TYPE u32a *s_te2, SHM_TYPE u32a *s_te3, SHM_TYPE u32a *s_te4, SHM_TYPE u32a *s_td0, SHM_TYPE u32a *s_td1, SHM_TYPE u32a *s_td2, SHM_TYPE u32a *s_td3, SHM_TYPE u32a *s_td4, u32 *w, const u32 pw_len, KERN_ATTR_ESALT (electrum_wallet_t)) { /** * base diff --git a/OpenCL/m16600_a3-pure.cl b/OpenCL/m16600_a3-pure.cl index f7b91ff77..7a68e1ff2 100644 --- a/OpenCL/m16600_a3-pure.cl +++ b/OpenCL/m16600_a3-pure.cl @@ -93,7 +93,7 @@ KERNEL_FQ void m16600_mxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -295,7 +295,7 @@ KERNEL_FQ void m16600_sxx (KERN_ATTR_VECTOR_ESALT (electrum_wallet_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m16800-pure.cl b/OpenCL/m16800-pure.cl index 0d476ccd6..f7e3e1f9c 100644 --- a/OpenCL/m16800-pure.cl +++ b/OpenCL/m16800-pure.cl @@ -43,7 +43,7 @@ typedef struct wpa_pmkid } wpa_pmkid_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m16801-pure.cl b/OpenCL/m16801-pure.cl index ee8349adf..f040be21c 100644 --- a/OpenCL/m16801-pure.cl +++ b/OpenCL/m16801-pure.cl @@ -40,12 +40,12 @@ typedef struct wpa_pmkid } wpa_pmkid_t; #ifdef KERNEL_STATIC -DECLSPEC static u8 hex_convert (const u8 c) +DECLSPEC u8 hex_convert (const u8 c) { return (c & 15) + (c >> 6) * 9; } -DECLSPEC static u8 hex_to_u8 (const u8 *hex) +DECLSPEC u8 hex_to_u8 (const u8 *hex) { u8 v = 0; diff --git a/OpenCL/m16900-pure.cl b/OpenCL/m16900-pure.cl index cb2d4ae67..649a16b2e 100644 --- a/OpenCL/m16900-pure.cl +++ b/OpenCL/m16900-pure.cl @@ -35,7 +35,7 @@ typedef struct ansible_vault } ansible_vault_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m17300_a3-optimized.cl b/OpenCL/m17300_a3-optimized.cl index 463257bc6..2948331db 100644 --- a/OpenCL/m17300_a3-optimized.cl +++ b/OpenCL/m17300_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -214,7 +214,7 @@ DECLSPEC static void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m17400_a3-optimized.cl b/OpenCL/m17400_a3-optimized.cl index 9ff7a1e92..19051f0a2 100644 --- a/OpenCL/m17400_a3-optimized.cl +++ b/OpenCL/m17400_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -215,7 +215,7 @@ DECLSPEC static void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m17500_a3-optimized.cl b/OpenCL/m17500_a3-optimized.cl index 26e82be99..fe6863dbd 100644 --- a/OpenCL/m17500_a3-optimized.cl +++ b/OpenCL/m17500_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -214,7 +214,7 @@ DECLSPEC static void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m17600_a3-optimized.cl b/OpenCL/m17600_a3-optimized.cl index d455caec8..37fef9a7b 100644 --- a/OpenCL/m17600_a3-optimized.cl +++ b/OpenCL/m17600_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -215,7 +215,7 @@ DECLSPEC static void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m17700_a3-optimized.cl b/OpenCL/m17700_a3-optimized.cl index 98cff5561..7cdd1b22f 100644 --- a/OpenCL/m17700_a3-optimized.cl +++ b/OpenCL/m17700_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -214,7 +214,7 @@ DECLSPEC static void m17300m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17300s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m17800_a3-optimized.cl b/OpenCL/m17800_a3-optimized.cl index 09827f1db..f62ab2a0e 100644 --- a/OpenCL/m17800_a3-optimized.cl +++ b/OpenCL/m17800_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -214,7 +214,7 @@ DECLSPEC static void m17400m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17400s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m17900_a3-optimized.cl b/OpenCL/m17900_a3-optimized.cl index 91a9f31e1..afeb00627 100644 --- a/OpenCL/m17900_a3-optimized.cl +++ b/OpenCL/m17900_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -214,7 +214,7 @@ DECLSPEC static void m17500m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17500s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m18000_a3-optimized.cl b/OpenCL/m18000_a3-optimized.cl index 3a53e72ce..b6f7a33f8 100644 --- a/OpenCL/m18000_a3-optimized.cl +++ b/OpenCL/m18000_a3-optimized.cl @@ -28,7 +28,7 @@ CONSTANT_AS u64a keccakf_rndc[24] = #define KECCAK_ROUNDS 24 #endif -DECLSPEC static void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier @@ -214,7 +214,7 @@ DECLSPEC static void m17600m (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_l } } -DECLSPEC static void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) +DECLSPEC void m17600s (u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_BASIC ()) { /** * modifier diff --git a/OpenCL/m18100_a0-pure.cl b/OpenCL/m18100_a0-pure.cl index 959ca6d82..d22b3bade 100644 --- a/OpenCL/m18100_a0-pure.cl +++ b/OpenCL/m18100_a0-pure.cl @@ -36,7 +36,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -125,7 +125,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_RULES ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m18100_a1-pure.cl b/OpenCL/m18100_a1-pure.cl index 6565f7a2b..223cbece0 100644 --- a/OpenCL/m18100_a1-pure.cl +++ b/OpenCL/m18100_a1-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -41,7 +41,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -146,7 +146,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_BASIC ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = hc_swap32_S (pws[gid].i[idx]); } @@ -155,7 +155,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_BASIC ()) u32 s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m18100_a3-pure.cl b/OpenCL/m18100_a3-pure.cl index 485810da4..be4805773 100644 --- a/OpenCL/m18100_a3-pure.cl +++ b/OpenCL/m18100_a3-pure.cl @@ -32,7 +32,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -41,7 +41,7 @@ KERNEL_FQ void m18100_mxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } @@ -133,7 +133,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -142,7 +142,7 @@ KERNEL_FQ void m18100_sxx (KERN_ATTR_VECTOR ()) u32x s[64] = { 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (salt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m18200_a0-optimized.cl b/OpenCL/m18200_a0-optimized.cl index 83b4d5fc1..a520da74d 100644 --- a/OpenCL/m18200_a0-optimized.cl +++ b/OpenCL/m18200_a0-optimized.cl @@ -34,7 +34,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -43,7 +43,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -96,7 +96,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -149,7 +149,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -200,7 +200,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -234,7 +234,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -436,7 +436,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) { /** * pads diff --git a/OpenCL/m18200_a0-pure.cl b/OpenCL/m18200_a0-pure.cl index f1998522d..497ac3a3c 100644 --- a/OpenCL/m18200_a0-pure.cl +++ b/OpenCL/m18200_a0-pure.cl @@ -33,7 +33,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -42,7 +42,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -95,7 +95,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -148,7 +148,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -280,7 +280,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); diff --git a/OpenCL/m18200_a1-optimized.cl b/OpenCL/m18200_a1-optimized.cl index 36f4a2dc3..0d9efe343 100644 --- a/OpenCL/m18200_a1-optimized.cl +++ b/OpenCL/m18200_a1-optimized.cl @@ -32,7 +32,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -41,7 +41,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -94,7 +94,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -147,7 +147,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -198,7 +198,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -232,7 +232,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -434,7 +434,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) { /** * pads diff --git a/OpenCL/m18200_a1-pure.cl b/OpenCL/m18200_a1-pure.cl index 6d0803f0a..519c8498d 100644 --- a/OpenCL/m18200_a1-pure.cl +++ b/OpenCL/m18200_a1-pure.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -146,7 +146,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -278,7 +278,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); diff --git a/OpenCL/m18200_a3-optimized.cl b/OpenCL/m18200_a3-optimized.cl index 0ad9b2df8..404c56521 100644 --- a/OpenCL/m18200_a3-optimized.cl +++ b/OpenCL/m18200_a3-optimized.cl @@ -32,7 +32,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -41,7 +41,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -94,7 +94,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -147,7 +147,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) +DECLSPEC void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad) { w0[0] = w0[0] ^ 0x36363636; w0[1] = w0[1] ^ 0x36363636; @@ -198,7 +198,7 @@ DECLSPEC static void hmac_md5_pad (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, opad); } -DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) +DECLSPEC void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad, u32 *opad, u32 *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; @@ -232,7 +232,7 @@ DECLSPEC static void hmac_md5_run (u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *ipad md5_transform (w0, w1, w2, w3, digest); } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -434,7 +434,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_len, const u32 *checksum, u32 *digest, u32 *K2) { /** * pads @@ -570,7 +570,7 @@ DECLSPEC static void kerb_prepare (const u32 *w0, const u32 *w1, const u32 pw_le hmac_md5_run (w0_t, w1_t, w2_t, w3_t, ipad, opad, digest); } -DECLSPEC static void m18200 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5asrep_t)) +DECLSPEC void m18200 (LOCAL_AS RC4_KEY *rc4_key, u32 *w0, u32 *w1, u32 *w2, u32 *w3, const u32 pw_len, KERN_ATTR_ESALT (krb5asrep_t)) { /** * modifier diff --git a/OpenCL/m18200_a3-pure.cl b/OpenCL/m18200_a3-pure.cl index 22108f2a7..30c298cfd 100644 --- a/OpenCL/m18200_a3-pure.cl +++ b/OpenCL/m18200_a3-pure.cl @@ -31,7 +31,7 @@ typedef struct } RC4_KEY; -DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) +DECLSPEC void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) { u8 tmp; @@ -40,7 +40,7 @@ DECLSPEC static void swap (LOCAL_AS RC4_KEY *rc4_key, const u8 i, const u8 j) rc4_key->S[j] = tmp; } -DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) +DECLSPEC void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) { u32 v = 0x03020100; u32 a = 0x04040404; @@ -93,7 +93,7 @@ DECLSPEC static void rc4_init_16 (LOCAL_AS RC4_KEY *rc4_key, const u32 *data) } } -DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) +DECLSPEC u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS const u32 *in, u32 *out) { #ifdef _unroll #pragma unroll @@ -146,7 +146,7 @@ DECLSPEC static u8 rc4_next_16 (LOCAL_AS RC4_KEY *rc4_key, u8 i, u8 j, GLOBAL_AS return j; } -DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) +DECLSPEC int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLOBAL_AS const u32 *edata2, const u32 edata2_len, const u32 *K2, const u32 *checksum) { rc4_init_16 (rc4_key, data); @@ -278,7 +278,7 @@ DECLSPEC static int decrypt_and_check (LOCAL_AS RC4_KEY *rc4_key, u32 *data, GLO return 1; } -DECLSPEC static void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) +DECLSPEC void kerb_prepare (const u32 *K, const u32 *checksum, u32 *digest, u32 *K2) { // K1=MD5_HMAC(K,1); with 1 encoded as little indian on 4 bytes (01000000 in hexa); @@ -401,7 +401,7 @@ KERNEL_FQ void m18200_mxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -474,7 +474,7 @@ KERNEL_FQ void m18200_sxx (KERN_ATTR_VECTOR_ESALT (krb5asrep_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m18300-pure.cl b/OpenCL/m18300-pure.cl index 73c716091..6ae8fba68 100644 --- a/OpenCL/m18300-pure.cl +++ b/OpenCL/m18300-pure.cl @@ -36,7 +36,7 @@ typedef struct apple_secure_notes } apple_secure_notes_t; -DECLSPEC static void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha256_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m18400-pure.cl b/OpenCL/m18400-pure.cl index d3995e026..f7abaea8d 100644 --- a/OpenCL/m18400-pure.cl +++ b/OpenCL/m18400-pure.cl @@ -37,7 +37,7 @@ typedef struct odf12 } odf12_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m18500_a3-pure.cl b/OpenCL/m18500_a3-pure.cl index 7b0625d60..46f8624f7 100644 --- a/OpenCL/m18500_a3-pure.cl +++ b/OpenCL/m18500_a3-pure.cl @@ -59,7 +59,7 @@ KERNEL_FQ void m18500_mxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -198,7 +198,7 @@ KERNEL_FQ void m18500_sxx (KERN_ATTR_VECTOR ()) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m18600-pure.cl b/OpenCL/m18600-pure.cl index 03f9fd582..b939a4381 100644 --- a/OpenCL/m18600-pure.cl +++ b/OpenCL/m18600-pure.cl @@ -365,7 +365,7 @@ CONSTANT_AS u32a c_pbox[18] = L ^= P[17]; \ } -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m18700_a0-optimized.cl b/OpenCL/m18700_a0-optimized.cl index 5d0c8dd83..de8eabbe9 100644 --- a/OpenCL/m18700_a0-optimized.cl +++ b/OpenCL/m18700_a0-optimized.cl @@ -14,7 +14,7 @@ #include "inc_simd.cl" #endif -DECLSPEC static u32 hashCode (const u32 init, const u32 *w, const u32 pw_len) +DECLSPEC u32 hashCode (const u32 init, const u32 *w, const u32 pw_len) { u32 hash = init; diff --git a/OpenCL/m18700_a0-pure.cl b/OpenCL/m18700_a0-pure.cl index c4cc7ef1c..a7276b9eb 100644 --- a/OpenCL/m18700_a0-pure.cl +++ b/OpenCL/m18700_a0-pure.cl @@ -15,7 +15,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static u32 hashCode (const u32 init, const u32 *w, const u32 pw_len) +DECLSPEC u32 hashCode (const u32 init, const u32 *w, const u32 pw_len) { u32 hash = init; diff --git a/OpenCL/m18700_a1-optimized.cl b/OpenCL/m18700_a1-optimized.cl index 497469d14..215b0bcfc 100644 --- a/OpenCL/m18700_a1-optimized.cl +++ b/OpenCL/m18700_a1-optimized.cl @@ -14,7 +14,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static u32 hashCode_g (const u32 init, GLOBAL_AS u32 *w, const u32 pw_len) +DECLSPEC u32 hashCode_g (const u32 init, GLOBAL_AS u32 *w, const u32 pw_len) { u32 hash = init; diff --git a/OpenCL/m18700_a1-pure.cl b/OpenCL/m18700_a1-pure.cl index 82815abd1..c80a904b7 100644 --- a/OpenCL/m18700_a1-pure.cl +++ b/OpenCL/m18700_a1-pure.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static u32 hashCode_g (const u32 init, GLOBAL_AS u32 *w, const u32 pw_len) +DECLSPEC u32 hashCode_g (const u32 init, GLOBAL_AS u32 *w, const u32 pw_len) { u32 hash = init; diff --git a/OpenCL/m18700_a3-optimized.cl b/OpenCL/m18700_a3-optimized.cl index 49d5abd75..0df5cb0cc 100644 --- a/OpenCL/m18700_a3-optimized.cl +++ b/OpenCL/m18700_a3-optimized.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u32 pw_len) +DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u32 pw_len) { u32x hash = init; @@ -69,7 +69,7 @@ DECLSPEC static u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, return hash; } -DECLSPEC static void m18700m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m18700m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier @@ -101,7 +101,7 @@ DECLSPEC static void m18700m (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ( } } -DECLSPEC static void m18700s (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) +DECLSPEC void m18700s (const u32 *w, const u32 pw_len, KERN_ATTR_VECTOR ()) { /** * modifier diff --git a/OpenCL/m18700_a3-pure.cl b/OpenCL/m18700_a3-pure.cl index 8fe48ef41..4f6221724 100644 --- a/OpenCL/m18700_a3-pure.cl +++ b/OpenCL/m18700_a3-pure.cl @@ -13,7 +13,7 @@ #include "inc_hash_md5.cl" #endif -DECLSPEC static u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u32 pw_len) +DECLSPEC u32x hashCode_w0 (const u32x init, const u32x w0, const u32 *w, const u32 pw_len) { u32x hash = init; @@ -88,7 +88,7 @@ KERNEL_FQ void m18700_mxx (KERN_ATTR_VECTOR ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -147,7 +147,7 @@ KERNEL_FQ void m18700_sxx (KERN_ATTR_VECTOR ()) u32 w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m18900-pure.cl b/OpenCL/m18900-pure.cl index e74b7ee89..342a203a5 100644 --- a/OpenCL/m18900-pure.cl +++ b/OpenCL/m18900-pure.cl @@ -39,7 +39,7 @@ typedef struct android_backup } android_backup_t; -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19200-pure.cl b/OpenCL/m19200-pure.cl index e6e3322a7..e0c7c9b5e 100644 --- a/OpenCL/m19200-pure.cl +++ b/OpenCL/m19200-pure.cl @@ -24,7 +24,7 @@ typedef struct qnx_sha512_tmp } qnx_sha512_tmp_t; -DECLSPEC static u32 sha512_update_128_qnxbug (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, u32 sav) +DECLSPEC u32 sha512_update_128_qnxbug (sha512_ctx_t *ctx, u32 *w0, u32 *w1, u32 *w2, u32 *w3, u32 *w4, u32 *w5, u32 *w6, u32 *w7, const int len, u32 sav) { const int pos = ctx->len & 127; @@ -154,7 +154,7 @@ DECLSPEC static u32 sha512_update_128_qnxbug (sha512_ctx_t *ctx, u32 *w0, u32 *w return sav; } -DECLSPEC static u32 sha512_update_global_swap_qnxbug (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, u32 sav) +DECLSPEC u32 sha512_update_global_swap_qnxbug (sha512_ctx_t *ctx, GLOBAL_AS const u32 *w, const int len, u32 sav) { u32 w0[4]; u32 w1[4]; @@ -310,7 +310,7 @@ DECLSPEC static u32 sha512_update_global_swap_qnxbug (sha512_ctx_t *ctx, GLOBAL_ return sav; } -DECLSPEC static void sha512_final_qnxbug (sha512_ctx_t *ctx, u32 sav) +DECLSPEC void sha512_final_qnxbug (sha512_ctx_t *ctx, u32 sav) { const int pos = ctx->len & 127; diff --git a/OpenCL/m19300_a3-pure.cl b/OpenCL/m19300_a3-pure.cl index faedbb8ed..4b65dd687 100644 --- a/OpenCL/m19300_a3-pure.cl +++ b/OpenCL/m19300_a3-pure.cl @@ -42,7 +42,7 @@ KERNEL_FQ void m19300_mxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -129,7 +129,7 @@ KERNEL_FQ void m19300_sxx (KERN_ATTR_VECTOR_ESALT (sha1_double_salt_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } diff --git a/OpenCL/m19500_a0-pure.cl b/OpenCL/m19500_a0-pure.cl index 1c215bc16..9ec4dafb1 100644 --- a/OpenCL/m19500_a0-pure.cl +++ b/OpenCL/m19500_a0-pure.cl @@ -81,7 +81,7 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_RULES_ESALT (devise_hash_t)) const u32 glue[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); } @@ -228,7 +228,7 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_RULES_ESALT (devise_hash_t)) const u32 glue[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m19500_a1-pure.cl b/OpenCL/m19500_a1-pure.cl index f472b3de1..9760a360a 100644 --- a/OpenCL/m19500_a1-pure.cl +++ b/OpenCL/m19500_a1-pure.cl @@ -77,7 +77,7 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_ESALT (devise_hash_t)) const u32 glue[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); } @@ -220,7 +220,7 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_ESALT (devise_hash_t)) const u32 glue[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m19500_a3-pure.cl b/OpenCL/m19500_a3-pure.cl index a5db6484c..3900c5ff9 100644 --- a/OpenCL/m19500_a3-pure.cl +++ b/OpenCL/m19500_a3-pure.cl @@ -72,7 +72,7 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -86,7 +86,7 @@ KERNEL_FQ void m19500_mxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) const u32 glue[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); } @@ -230,7 +230,7 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) u32x w[64] = { 0 }; - for (int i = 0, idx = 0; i < pw_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1) { w[idx] = pws[gid].i[idx]; } @@ -244,7 +244,7 @@ KERNEL_FQ void m19500_sxx (KERN_ATTR_VECTOR_ESALT (devise_hash_t)) const u32 glue[16] = { 0x2d2d0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - for (int i = 0, idx = 0; i < salt_len; i += 4, idx += 1) + for (u32 i = 0, idx = 0; i < salt_len; i += 4, idx += 1) { s[idx] = hc_swap32_S (esalt_bufs[salt_pos].salt_buf[idx]); } diff --git a/OpenCL/m19600-pure.cl b/OpenCL/m19600-pure.cl index 923e2a993..265d7aee5 100644 --- a/OpenCL/m19600-pure.cl +++ b/OpenCL/m19600-pure.cl @@ -36,7 +36,7 @@ typedef struct krb5tgs_17_tmp } krb5tgs_17_tmp_t; -DECLSPEC static void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -63,7 +63,7 @@ DECLSPEC static void aes128_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u out[3] = hc_swap32_S (out[3]); } -DECLSPEC static void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes128_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -78,7 +78,7 @@ DECLSPEC static void aes128_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out essiv[3] = in[3]; } -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19700-pure.cl b/OpenCL/m19700-pure.cl index 42c02d72f..df9b79e6b 100644 --- a/OpenCL/m19700-pure.cl +++ b/OpenCL/m19700-pure.cl @@ -36,7 +36,7 @@ typedef struct krb5tgs_18_tmp } krb5tgs_18_tmp_t; -DECLSPEC static void aes256_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) +DECLSPEC void aes256_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u32 *in, u32 *out, SHM_TYPE u32 *s_te0, SHM_TYPE u32 *s_te1, SHM_TYPE u32 *s_te2, SHM_TYPE u32 *s_te3, SHM_TYPE u32 *s_te4) { u32 data[4]; @@ -63,7 +63,7 @@ DECLSPEC static void aes256_encrypt_cbc (const u32 *aes_ks, u32 *aes_iv, const u out[3] = hc_swap32_S (out[3]); } -DECLSPEC static void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) +DECLSPEC void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out, u32 *essiv, SHM_TYPE u32 *s_td0, SHM_TYPE u32 *s_td1, SHM_TYPE u32 *s_td2, SHM_TYPE u32 *s_td3, SHM_TYPE u32 *s_td4) { aes256_decrypt (ks1, in, out, s_td0, s_td1, s_td2, s_td3, s_td4); @@ -78,7 +78,7 @@ DECLSPEC static void aes256_decrypt_cbc (const u32 *ks1, const u32 *in, u32 *out essiv[3] = in[3]; } -DECLSPEC static void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) +DECLSPEC void hmac_sha1_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *ipad, u32x *opad, u32x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19811-pure.cl b/OpenCL/m19811-pure.cl index b4a16e030..eea61f0bd 100644 --- a/OpenCL/m19811-pure.cl +++ b/OpenCL/m19811-pure.cl @@ -33,7 +33,7 @@ typedef struct diskcryptor_esalt } diskcryptor_esalt_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19812-pure.cl b/OpenCL/m19812-pure.cl index a2939221b..46ca244a8 100644 --- a/OpenCL/m19812-pure.cl +++ b/OpenCL/m19812-pure.cl @@ -33,7 +33,7 @@ typedef struct diskcryptor_esalt } diskcryptor_esalt_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/m19813-pure.cl b/OpenCL/m19813-pure.cl index c5e37e97e..95bf43644 100644 --- a/OpenCL/m19813-pure.cl +++ b/OpenCL/m19813-pure.cl @@ -33,7 +33,7 @@ typedef struct diskcryptor_esalt } diskcryptor_esalt_t; -DECLSPEC static void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) +DECLSPEC void hmac_sha512_run_V (u32x *w0, u32x *w1, u32x *w2, u32x *w3, u32x *w4, u32x *w5, u32x *w6, u32x *w7, u64x *ipad, u64x *opad, u64x *digest) { digest[0] = ipad[0]; digest[1] = ipad[1]; diff --git a/OpenCL/markov_be.cl b/OpenCL/markov_be.cl index 9e9096218..cdf716ab9 100644 --- a/OpenCL/markov_be.cl +++ b/OpenCL/markov_be.cl @@ -10,7 +10,7 @@ #define CHARSIZ 256 -DECLSPEC static void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) +DECLSPEC void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) { GLOBAL_AS const cs_t *cs = &root_css_buf[pw_r_len]; diff --git a/OpenCL/markov_le.cl b/OpenCL/markov_le.cl index 4b24b4196..cb5a91321 100644 --- a/OpenCL/markov_le.cl +++ b/OpenCL/markov_le.cl @@ -10,7 +10,7 @@ #define CHARSIZ 256 -DECLSPEC static void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) +DECLSPEC void generate_pw (u32 *pw_buf, GLOBAL_AS const cs_t *root_css_buf, GLOBAL_AS const cs_t *markov_css_buf, const u32 pw_l_len, const u32 pw_r_len, const u32 mask80, const u32 bits14, const u32 bits15, u64 val) { GLOBAL_AS const cs_t *cs = &root_css_buf[pw_r_len]; diff --git a/docs/changes.txt b/docs/changes.txt index f00e7935a..3a1ab3c27 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -55,6 +55,8 @@ - OpenCL Runtime: Not using amd_bytealign (amd_bitalign is fine) on AMDGPU driver drastically reduces JiT segfaults - OpenCL Runtime: Update unstable mode warnings for Apple and AMDGPU drivers - OpenCL Runtime: Workaround JiT compiler error on AMDGPU driver compiling WPA-EAPOL-PBKDF2 OpenCL kernel +- OpenCL Runtime: Workaround JiT compiler error on ROCM 2.3 driver if the 'inline' keyword is used in function declaration +- OpenCL Runtime: Workaround memory allocation error on AMD driver on Windows leading to CL_MEM_OBJECT_ALLOCATION_FAILURE - Tuning Database: Updated hashcat.hctune with new models and refreshed vector width values - WPA/WPA2 cracking: In the potfile, replace password with PMK in order to detect already cracked networks across all WPA modes @@ -64,6 +66,7 @@ - Binary Distribution: Removed 32 bit binary executables - Keep Guessing: No longer automatically activate --keep-guessing for modes 9720, 9820, 14900 and 18100 +- Kernel Cache: Reactivate OpenCL runtime specific kernel caches - Mode 16800/16801 hash format: Changed separator character from '*' to ':' * changes v5.0.0 -> v5.1.0 diff --git a/docs/team.txt b/docs/team.txt index 78841431c..76ca66eb9 100644 --- a/docs/team.txt +++ b/docs/team.txt @@ -9,27 +9,19 @@ We're a group of people participating in the yearly repeating password cracking | Crack Me If You Can | DEF CON, Las Vegas | 2010 | 1st | | Crack Me If You Can | DEF CON, Las Vegas | 2011 | 2nd | | Crack Me If You Can | DEF CON, Las Vegas | 2012 | 1st | -| Crack Me If You Can | DEF CON, Las Vegas | 2013 | 2nd | -| Crack Me If You Can | DEF CON, Las Vegas | 2014 | 1st | -| Crack Me If You Can | DEF CON, Las Vegas | 2015 | 1st | -| Crack Me If You Can | DerbyCon, Louisville | 2017 | 1st | -| Crack Me If You Can | DEF CON, Las Vegas | 2018 | 2nd | - -| Competition | Conference | Year | Placed | -|---------------------|----------------------------|------|--------| | Hash Runner | Positive Hack Days, Moscow | 2012 | 1st | -| Hash Runner | Positive Hack Days, Moscow | 2013 | 2nd | -| Hash Runner | Positive Hack Days, Moscow | 2014 | 2nd | -| Hash Runner | Positive Hack Days, Moscow | 2015 | 1st | - -| Competition | Conference | Year | Placed | -|---------------------|----------------------------|------|--------| | Hashkiller | - | 2012 | 1st | +| Crack Me If You Can | DEF CON, Las Vegas | 2013 | 2nd | +| Hash Runner | Positive Hack Days, Moscow | 2013 | 2nd | +| Crack Me If You Can | DEF CON, Las Vegas | 2014 | 1st | +| Hash Runner | Positive Hack Days, Moscow | 2014 | 2nd | +| Crack Me If You Can | DEF CON, Las Vegas | 2015 | 1st | +| Hash Runner | Positive Hack Days, Moscow | 2015 | 1st | | Hashkiller | - | 2016 | 2nd | - -| Competition | Conference | Year | Placed | -|---------------------|----------------------------|------|--------| +| Crack Me If You Can | DerbyCon, Louisville | 2017 | 1st | | PCrack | SAINTCON, Utah | 2017 | 1st | +| Crack Me If You Can | DEF CON, Las Vegas | 2018 | 2nd | +| CracktheCon | Cyphercon, Milwaukee | 2019 | 1st | * Special recognition for team hashcat goes to: diff --git a/src/modules/module_01500.c b/src/modules/module_01500.c index 56e6385ea..31171ce02 100644 --- a/src/modules/module_01500.c +++ b/src/modules/module_01500.c @@ -42,6 +42,37 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const void *tmps, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, MAYBE_UNUSED const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz) +{ + u8 *ptr_src = (u8 *) src_buf; + u8 *ptr_dst = (u8 *) dst_buf; + + for (int i = 0; i < src_len; i++) + { + char v = ptr_src[i]; + + if (v & 0x80) + { + char v2 = v & 0x7f; + + if (v2 >= 0x20) + { + ptr_dst[i] = v2; + } + else + { + ptr_dst[i] = v; + } + } + else + { + ptr_dst[i] = v; + } + } + + return src_len; +} + u32 module_kernel_loops_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { u32 kernel_loops_max = KERNEL_LOOPS_MAX; @@ -203,7 +234,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_benchmark_hook_salt = MODULE_DEFAULT; module_ctx->module_benchmark_mask = MODULE_DEFAULT; module_ctx->module_benchmark_salt = MODULE_DEFAULT; - module_ctx->module_build_plain_postprocess = MODULE_DEFAULT; + module_ctx->module_build_plain_postprocess = module_build_plain_postprocess; module_ctx->module_deep_comp_kernel = MODULE_DEFAULT; module_ctx->module_dgst_pos0 = module_dgst_pos0; module_ctx->module_dgst_pos1 = module_dgst_pos1; diff --git a/src/modules/module_07900.c b/src/modules/module_07900.c index a8d9746ee..503bfdef6 100644 --- a/src/modules/module_07900.c +++ b/src/modules/module_07900.c @@ -301,12 +301,6 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE return true; } - // rocm: self-test failed. - if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) - { - return true; - } - return false; } diff --git a/src/modules/module_10100.c b/src/modules/module_10100.c index 9b4c0c8a8..03ef56cc6 100644 --- a/src/modules/module_10100.c +++ b/src/modules/module_10100.c @@ -42,23 +42,6 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } -bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - // OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: self-test failed - if (device_param->platform_vendor_id == VENDOR_ID_POCL) - { - return true; - } - - // rocm 1.2.0-20190: self-test failed - if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) - { - return true; - } - - return false; -} - int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -210,6 +193,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_11600.c b/src/modules/module_11600.c index 12bd4bb81..75b09e003 100644 --- a/src/modules/module_11600.c +++ b/src/modules/module_11600.c @@ -271,6 +271,13 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c return tmp_size; } +u32 module_kernel_accel_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) +{ + const u32 kernel_accel_max = 128; // password length affects total performance, this limits the wait times for threads with short password lengths if there's at least one thread with long password length + + return kernel_accel_max; +} + u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { // this overrides the reductions of PW_MAX in case optimized kernel is selected @@ -695,7 +702,7 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_hook_size = module_hook_size; module_ctx->module_jit_build_options = module_jit_build_options; module_ctx->module_jit_cache_disable = MODULE_DEFAULT; - module_ctx->module_kernel_accel_max = MODULE_DEFAULT; + module_ctx->module_kernel_accel_max = module_kernel_accel_max; module_ctx->module_kernel_accel_min = MODULE_DEFAULT; module_ctx->module_kernel_loops_max = MODULE_DEFAULT; module_ctx->module_kernel_loops_min = MODULE_DEFAULT; diff --git a/src/modules/module_15600.c b/src/modules/module_15600.c index 82d69be0d..12b939426 100644 --- a/src/modules/module_15600.c +++ b/src/modules/module_15600.c @@ -86,23 +86,6 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con return pw_max; } -bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed. - if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) - { - return true; - } - - // rocm 1.2.0-20190: self-test failed - if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) - { - return true; - } - - return false; -} - char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -332,6 +315,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_16300.c b/src/modules/module_16300.c index 0199010be..4f2fe3752 100644 --- a/src/modules/module_16300.c +++ b/src/modules/module_16300.c @@ -77,23 +77,6 @@ u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED c return tmp_size; } -bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) -{ - // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed. - if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) - { - return true; - } - - // rocm 1.2.0-20190: self-test failed - if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) - { - return true; - } - - return false; -} - char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -332,6 +315,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/opencl.c b/src/opencl.c index 61967522f..ff6ee8c33 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -4033,7 +4033,11 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) device_param->device_available_mem = device_param->device_global_mem - MAX_ALLOC_CHECKS_SIZE; + #if defined (_WIN) + if ((device_param->device_type & CL_DEVICE_TYPE_GPU) && (device_param->platform_vendor_id == VENDOR_ID_NV)) + #else if ((device_param->device_type & CL_DEVICE_TYPE_GPU) && ((device_param->platform_vendor_id == VENDOR_ID_NV) || (device_param->platform_vendor_id == VENDOR_ID_AMD))) + #endif { // OK, so the problem here is the following: // There's just CL_DEVICE_GLOBAL_MEM_SIZE to ask OpenCL about the total memory on the device, diff --git a/src/outfile_check.c b/src/outfile_check.c index 28fa4ff11..4a63e77c8 100644 --- a/src/outfile_check.c +++ b/src/outfile_check.c @@ -230,7 +230,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) { void *tmps = hcmalloc (hashconfig->tmp_size); - parser_status = module_ctx->module_hash_decode_potfile (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_len - 1, tmps); + parser_status = module_ctx->module_hash_decode_potfile (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_hash_len, tmps); hcfree (tmps); } @@ -238,7 +238,7 @@ static int outfile_remove (hashcat_ctx_t *hashcat_ctx) { // "normal" case: hash in the outfile is the same as the hash in the original hash file - parser_status = module_ctx->module_hash_decode (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_len - 1); + parser_status = module_ctx->module_hash_decode (hashconfig, hash_buf.digest, hash_buf.salt, hash_buf.esalt, hash_buf.hook_salt, hash_buf.hash_info, line_buf, line_hash_len); } if (parser_status != PARSER_OK) continue; diff --git a/src/shared.c b/src/shared.c index 930e93024..1ac5d9f75 100644 --- a/src/shared.c +++ b/src/shared.c @@ -486,6 +486,7 @@ void setup_environment_variables () putenv ((char *) "DISPLAY=:0"); } + /* if (getenv ("OCL_CODE_CACHE_ENABLE") == NULL) putenv ((char *) "OCL_CODE_CACHE_ENABLE=0"); @@ -494,6 +495,7 @@ void setup_environment_variables () if (getenv ("POCL_KERNEL_CACHE") == NULL) putenv ((char *) "POCL_KERNEL_CACHE=0"); + */ if (getenv ("CL_CONFIG_USE_VECTORIZER") == NULL) putenv ((char *) "CL_CONFIG_USE_VECTORIZER=False"); diff --git a/tools/test_modules/m08300.pm b/tools/test_modules/m08300.pm index 4f2bfc2f2..b3b163a62 100644 --- a/tools/test_modules/m08300.pm +++ b/tools/test_modules/m08300.pm @@ -45,11 +45,9 @@ sub module_generate_hash my $hashalg = Net::DNS::SEC->digtype ("SHA1"); - my $salt_bin = pack ("H*", $salt_hex); - my $name = lc ($word . $domain); - my $hash_buf = Net::DNS::RR::NSEC3::name2hash ($hashalg, $name, $iter, $salt_bin); + my $hash_buf = Net::DNS::RR::NSEC3::name2hash ($hashalg, $name, $iter, $salt_hex); my $hash = sprintf ("%s:%s:%s:%d", $hash_buf, $domain, $salt_hex, $iter);