diff --git a/OpenCL/inc_hash_streebog256.cl b/OpenCL/inc_hash_streebog256.cl index a6758023d..d4b89eff2 100644 --- a/OpenCL/inc_hash_streebog256.cl +++ b/OpenCL/inc_hash_streebog256.cl @@ -1155,22 +1155,22 @@ DECLSPEC void streebog256_hmac_init (streebog256_hmac_ctx_t *ctx, const u32 *w, streebog256_final (&tmp); - w0[0] = h32_from_64_S (tmp.h[0]); - w0[1] = l32_from_64_S (tmp.h[0]); - w0[2] = h32_from_64_S (tmp.h[1]); - w0[3] = l32_from_64_S (tmp.h[1]); - w1[0] = h32_from_64_S (tmp.h[2]); - w1[1] = l32_from_64_S (tmp.h[2]); - w1[2] = h32_from_64_S (tmp.h[3]); - w1[3] = l32_from_64_S (tmp.h[3]); - w2[0] = h32_from_64_S (tmp.h[4]); - w2[1] = l32_from_64_S (tmp.h[4]); - w2[2] = h32_from_64_S (tmp.h[5]); - w2[3] = l32_from_64_S (tmp.h[5]); - w3[0] = h32_from_64_S (tmp.h[6]); - w3[1] = l32_from_64_S (tmp.h[6]); - w3[2] = h32_from_64_S (tmp.h[7]); - w3[3] = l32_from_64_S (tmp.h[7]); + w0[0] = h32_from_64_S (tmp.h[3]); + w0[1] = l32_from_64_S (tmp.h[3]); + w0[2] = h32_from_64_S (tmp.h[2]); + w0[3] = l32_from_64_S (tmp.h[2]); + w1[0] = h32_from_64_S (tmp.h[1]); + w1[1] = l32_from_64_S (tmp.h[1]); + w1[2] = h32_from_64_S (tmp.h[0]); + w1[3] = l32_from_64_S (tmp.h[0]); + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; } else { @@ -1212,22 +1212,22 @@ DECLSPEC void streebog256_hmac_init_swap (streebog256_hmac_ctx_t *ctx, const u32 streebog256_final (&tmp); - w0[0] = h32_from_64_S (tmp.h[0]); - w0[1] = l32_from_64_S (tmp.h[0]); - w0[2] = h32_from_64_S (tmp.h[1]); - w0[3] = l32_from_64_S (tmp.h[1]); - w1[0] = h32_from_64_S (tmp.h[2]); - w1[1] = l32_from_64_S (tmp.h[2]); - w1[2] = h32_from_64_S (tmp.h[3]); - w1[3] = l32_from_64_S (tmp.h[3]); - w2[0] = h32_from_64_S (tmp.h[4]); - w2[1] = l32_from_64_S (tmp.h[4]); - w2[2] = h32_from_64_S (tmp.h[5]); - w2[3] = l32_from_64_S (tmp.h[5]); - w3[0] = h32_from_64_S (tmp.h[6]); - w3[1] = l32_from_64_S (tmp.h[6]); - w3[2] = h32_from_64_S (tmp.h[7]); - w3[3] = l32_from_64_S (tmp.h[7]); + w0[0] = h32_from_64_S (tmp.h[3]); + w0[1] = l32_from_64_S (tmp.h[3]); + w0[2] = h32_from_64_S (tmp.h[2]); + w0[3] = l32_from_64_S (tmp.h[2]); + w1[0] = h32_from_64_S (tmp.h[1]); + w1[1] = l32_from_64_S (tmp.h[1]); + w1[2] = h32_from_64_S (tmp.h[0]); + w1[3] = l32_from_64_S (tmp.h[0]); + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; } else { @@ -1786,22 +1786,22 @@ DECLSPEC void streebog256_hmac_init_vector (streebog256_hmac_ctx_vector_t *ctx, streebog256_final_vector (&tmp); - w0[0] = h32_from_64 (tmp.h[0]); - w0[1] = l32_from_64 (tmp.h[0]); - w0[2] = h32_from_64 (tmp.h[1]); - w0[3] = l32_from_64 (tmp.h[1]); - w1[0] = h32_from_64 (tmp.h[2]); - w1[1] = l32_from_64 (tmp.h[2]); - w1[2] = h32_from_64 (tmp.h[3]); - w1[3] = l32_from_64 (tmp.h[3]); - w2[0] = h32_from_64 (tmp.h[4]); - w2[1] = l32_from_64 (tmp.h[4]); - w2[2] = h32_from_64 (tmp.h[5]); - w2[3] = l32_from_64 (tmp.h[5]); - w3[0] = h32_from_64 (tmp.h[6]); - w3[1] = l32_from_64 (tmp.h[6]); - w3[2] = h32_from_64 (tmp.h[7]); - w3[3] = l32_from_64 (tmp.h[7]); + w0[0] = h32_from_64 (tmp.h[3]); + w0[1] = l32_from_64 (tmp.h[3]); + w0[2] = h32_from_64 (tmp.h[2]); + w0[3] = l32_from_64 (tmp.h[2]); + w1[0] = h32_from_64 (tmp.h[1]); + w1[1] = l32_from_64 (tmp.h[1]); + w1[2] = h32_from_64 (tmp.h[0]); + w1[3] = l32_from_64 (tmp.h[0]); + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; } else { @@ -1843,22 +1843,22 @@ DECLSPEC void streebog256_hmac_init_vector_swap (streebog256_hmac_ctx_vector_t * streebog256_final_vector (&tmp); - w0[0] = h32_from_64 (tmp.h[0]); - w0[1] = l32_from_64 (tmp.h[0]); - w0[2] = h32_from_64 (tmp.h[1]); - w0[3] = l32_from_64 (tmp.h[1]); - w1[0] = h32_from_64 (tmp.h[2]); - w1[1] = l32_from_64 (tmp.h[2]); - w1[2] = h32_from_64 (tmp.h[3]); - w1[3] = l32_from_64 (tmp.h[3]); - w2[0] = h32_from_64 (tmp.h[4]); - w2[1] = l32_from_64 (tmp.h[4]); - w2[2] = h32_from_64 (tmp.h[5]); - w2[3] = l32_from_64 (tmp.h[5]); - w3[0] = h32_from_64 (tmp.h[6]); - w3[1] = l32_from_64 (tmp.h[6]); - w3[2] = h32_from_64 (tmp.h[7]); - w3[3] = l32_from_64 (tmp.h[7]); + w0[0] = h32_from_64 (tmp.h[3]); + w0[1] = l32_from_64 (tmp.h[3]); + w0[2] = h32_from_64 (tmp.h[2]); + w0[3] = l32_from_64 (tmp.h[2]); + w1[0] = h32_from_64 (tmp.h[1]); + w1[1] = l32_from_64 (tmp.h[1]); + w1[2] = h32_from_64 (tmp.h[0]); + w1[3] = l32_from_64 (tmp.h[0]); + w2[0] = 0; + w2[1] = 0; + w2[2] = 0; + w2[3] = 0; + w3[0] = 0; + w3[1] = 0; + w3[2] = 0; + w3[3] = 0; } else { diff --git a/OpenCL/inc_hash_streebog512.cl b/OpenCL/inc_hash_streebog512.cl index e62a23b78..541522632 100644 --- a/OpenCL/inc_hash_streebog512.cl +++ b/OpenCL/inc_hash_streebog512.cl @@ -1155,22 +1155,22 @@ DECLSPEC void streebog512_hmac_init (streebog512_hmac_ctx_t *ctx, const u32 *w, streebog512_final (&tmp); - w0[0] = h32_from_64_S (tmp.h[0]); - w0[1] = l32_from_64_S (tmp.h[0]); - w0[2] = h32_from_64_S (tmp.h[1]); - w0[3] = l32_from_64_S (tmp.h[1]); - w1[0] = h32_from_64_S (tmp.h[2]); - w1[1] = l32_from_64_S (tmp.h[2]); - w1[2] = h32_from_64_S (tmp.h[3]); - w1[3] = l32_from_64_S (tmp.h[3]); - w2[0] = h32_from_64_S (tmp.h[4]); - w2[1] = l32_from_64_S (tmp.h[4]); - w2[2] = h32_from_64_S (tmp.h[5]); - w2[3] = l32_from_64_S (tmp.h[5]); - w3[0] = h32_from_64_S (tmp.h[6]); - w3[1] = l32_from_64_S (tmp.h[6]); - w3[2] = h32_from_64_S (tmp.h[7]); - w3[3] = l32_from_64_S (tmp.h[7]); + w0[0] = h32_from_64_S (tmp.h[7]); + w0[1] = l32_from_64_S (tmp.h[7]); + w0[2] = h32_from_64_S (tmp.h[6]); + w0[3] = l32_from_64_S (tmp.h[6]); + w1[0] = h32_from_64_S (tmp.h[5]); + w1[1] = l32_from_64_S (tmp.h[5]); + w1[2] = h32_from_64_S (tmp.h[4]); + w1[3] = l32_from_64_S (tmp.h[4]); + w2[0] = h32_from_64_S (tmp.h[3]); + w2[1] = l32_from_64_S (tmp.h[3]); + w2[2] = h32_from_64_S (tmp.h[2]); + w2[3] = l32_from_64_S (tmp.h[2]); + w3[0] = h32_from_64_S (tmp.h[1]); + w3[1] = l32_from_64_S (tmp.h[1]); + w3[2] = h32_from_64_S (tmp.h[0]); + w3[3] = l32_from_64_S (tmp.h[0]); } else { @@ -1212,22 +1212,22 @@ DECLSPEC void streebog512_hmac_init_swap (streebog512_hmac_ctx_t *ctx, const u32 streebog512_final (&tmp); - w0[0] = h32_from_64_S (tmp.h[0]); - w0[1] = l32_from_64_S (tmp.h[0]); - w0[2] = h32_from_64_S (tmp.h[1]); - w0[3] = l32_from_64_S (tmp.h[1]); - w1[0] = h32_from_64_S (tmp.h[2]); - w1[1] = l32_from_64_S (tmp.h[2]); - w1[2] = h32_from_64_S (tmp.h[3]); - w1[3] = l32_from_64_S (tmp.h[3]); - w2[0] = h32_from_64_S (tmp.h[4]); - w2[1] = l32_from_64_S (tmp.h[4]); - w2[2] = h32_from_64_S (tmp.h[5]); - w2[3] = l32_from_64_S (tmp.h[5]); - w3[0] = h32_from_64_S (tmp.h[6]); - w3[1] = l32_from_64_S (tmp.h[6]); - w3[2] = h32_from_64_S (tmp.h[7]); - w3[3] = l32_from_64_S (tmp.h[7]); + w0[0] = h32_from_64_S (tmp.h[7]); + w0[1] = l32_from_64_S (tmp.h[7]); + w0[2] = h32_from_64_S (tmp.h[6]); + w0[3] = l32_from_64_S (tmp.h[6]); + w1[0] = h32_from_64_S (tmp.h[5]); + w1[1] = l32_from_64_S (tmp.h[5]); + w1[2] = h32_from_64_S (tmp.h[4]); + w1[3] = l32_from_64_S (tmp.h[4]); + w2[0] = h32_from_64_S (tmp.h[3]); + w2[1] = l32_from_64_S (tmp.h[3]); + w2[2] = h32_from_64_S (tmp.h[2]); + w2[3] = l32_from_64_S (tmp.h[2]); + w3[0] = h32_from_64_S (tmp.h[1]); + w3[1] = l32_from_64_S (tmp.h[1]); + w3[2] = h32_from_64_S (tmp.h[0]); + w3[3] = l32_from_64_S (tmp.h[0]); } else { @@ -1786,22 +1786,22 @@ DECLSPEC void streebog512_hmac_init_vector (streebog512_hmac_ctx_vector_t *ctx, streebog512_final_vector (&tmp); - w0[0] = h32_from_64 (tmp.h[0]); - w0[1] = l32_from_64 (tmp.h[0]); - w0[2] = h32_from_64 (tmp.h[1]); - w0[3] = l32_from_64 (tmp.h[1]); - w1[0] = h32_from_64 (tmp.h[2]); - w1[1] = l32_from_64 (tmp.h[2]); - w1[2] = h32_from_64 (tmp.h[3]); - w1[3] = l32_from_64 (tmp.h[3]); - w2[0] = h32_from_64 (tmp.h[4]); - w2[1] = l32_from_64 (tmp.h[4]); - w2[2] = h32_from_64 (tmp.h[5]); - w2[3] = l32_from_64 (tmp.h[5]); - w3[0] = h32_from_64 (tmp.h[6]); - w3[1] = l32_from_64 (tmp.h[6]); - w3[2] = h32_from_64 (tmp.h[7]); - w3[3] = l32_from_64 (tmp.h[7]); + w0[0] = h32_from_64 (tmp.h[7]); + w0[1] = l32_from_64 (tmp.h[7]); + w0[2] = h32_from_64 (tmp.h[6]); + w0[3] = l32_from_64 (tmp.h[6]); + w1[0] = h32_from_64 (tmp.h[5]); + w1[1] = l32_from_64 (tmp.h[5]); + w1[2] = h32_from_64 (tmp.h[4]); + w1[3] = l32_from_64 (tmp.h[4]); + w2[0] = h32_from_64 (tmp.h[3]); + w2[1] = l32_from_64 (tmp.h[3]); + w2[2] = h32_from_64 (tmp.h[2]); + w2[3] = l32_from_64 (tmp.h[2]); + w3[0] = h32_from_64 (tmp.h[1]); + w3[1] = l32_from_64 (tmp.h[1]); + w3[2] = h32_from_64 (tmp.h[0]); + w3[3] = l32_from_64 (tmp.h[0]); } else { @@ -1843,22 +1843,22 @@ DECLSPEC void streebog512_hmac_init_vector_swap (streebog512_hmac_ctx_vector_t * streebog512_final_vector (&tmp); - w0[0] = h32_from_64 (tmp.h[0]); - w0[1] = l32_from_64 (tmp.h[0]); - w0[2] = h32_from_64 (tmp.h[1]); - w0[3] = l32_from_64 (tmp.h[1]); - w1[0] = h32_from_64 (tmp.h[2]); - w1[1] = l32_from_64 (tmp.h[2]); - w1[2] = h32_from_64 (tmp.h[3]); - w1[3] = l32_from_64 (tmp.h[3]); - w2[0] = h32_from_64 (tmp.h[4]); - w2[1] = l32_from_64 (tmp.h[4]); - w2[2] = h32_from_64 (tmp.h[5]); - w2[3] = l32_from_64 (tmp.h[5]); - w3[0] = h32_from_64 (tmp.h[6]); - w3[1] = l32_from_64 (tmp.h[6]); - w3[2] = h32_from_64 (tmp.h[7]); - w3[3] = l32_from_64 (tmp.h[7]); + w0[0] = h32_from_64 (tmp.h[7]); + w0[1] = l32_from_64 (tmp.h[7]); + w0[2] = h32_from_64 (tmp.h[6]); + w0[3] = l32_from_64 (tmp.h[6]); + w1[0] = h32_from_64 (tmp.h[5]); + w1[1] = l32_from_64 (tmp.h[5]); + w1[2] = h32_from_64 (tmp.h[4]); + w1[3] = l32_from_64 (tmp.h[4]); + w2[0] = h32_from_64 (tmp.h[3]); + w2[1] = l32_from_64 (tmp.h[3]); + w2[2] = h32_from_64 (tmp.h[2]); + w2[3] = l32_from_64 (tmp.h[2]); + w3[0] = h32_from_64 (tmp.h[1]); + w3[1] = l32_from_64 (tmp.h[1]); + w3[2] = h32_from_64 (tmp.h[0]); + w3[3] = l32_from_64 (tmp.h[0]); } else { diff --git a/tools/test_modules/m11760.pm b/tools/test_modules/m11760.pm index 9cad60370..827b16bd8 100644 --- a/tools/test_modules/m11760.pm +++ b/tools/test_modules/m11760.pm @@ -8,7 +8,7 @@ use strict; use warnings; -sub module_constraints { [[0, 255], [0, 55], [-1, -1], [-1, -1], [-1, -1]] } +sub module_constraints { [[0, 255], [0, 255], [-1, -1], [-1, -1], [-1, -1]] } sub module_generate_hash { diff --git a/tools/test_modules/m11850.pm b/tools/test_modules/m11850.pm index 717fc7106..37c801ba2 100644 --- a/tools/test_modules/m11850.pm +++ b/tools/test_modules/m11850.pm @@ -8,7 +8,7 @@ use strict; use warnings; -sub module_constraints { [[0, 55], [0, 55], [-1, -1], [-1, -1], [-1, -1]] } +sub module_constraints { [[0, 255], [0, 255], [-1, -1], [-1, -1], [-1, -1]] } sub module_generate_hash { diff --git a/tools/test_modules/m11860.pm b/tools/test_modules/m11860.pm index 422497495..0518b5950 100644 --- a/tools/test_modules/m11860.pm +++ b/tools/test_modules/m11860.pm @@ -8,7 +8,7 @@ use strict; use warnings; -sub module_constraints { [[0, 255], [0, 55], [-1, -1], [-1, -1], [-1, -1]] } +sub module_constraints { [[0, 255], [0, 255], [-1, -1], [-1, -1], [-1, -1]] } sub module_generate_hash {