From f46c23d792ccc2dfe4fda20741929584c6bd24db Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Thu, 10 Dec 2020 02:34:09 +0100 Subject: [PATCH] add comments to unused code, fixed test file --- OpenCL/m20710_a0-optimized.cl | 8 ++++---- OpenCL/m20710_a1-optimized.cl | 8 ++++---- OpenCL/m20710_a3-optimized.cl | 8 ++++---- tools/test_modules/m20710.pm | 3 ++- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/OpenCL/m20710_a0-optimized.cl b/OpenCL/m20710_a0-optimized.cl index 42b2d7702..a0a218d57 100644 --- a/OpenCL/m20710_a0-optimized.cl +++ b/OpenCL/m20710_a0-optimized.cl @@ -381,7 +381,7 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_RULES ()) wf_t = salt_buf3[3]; // sha256_update_64: pos 0 - +/* if (salt_len == 64) { // sha256 transform @@ -489,7 +489,7 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_RULES ()) we_t = 0; wf_t = 0; } - +*/ const int ctx_len = 64 + salt_len; const int pos = ctx_len & 63; @@ -1087,7 +1087,7 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_RULES ()) wf_t = salt_buf3[3]; // sha256_update_64: pos 0 - +/* if (salt_len == 64) { // sha256 transform @@ -1195,7 +1195,7 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_RULES ()) we_t = 0; wf_t = 0; } - +*/ const int ctx_len = 64 + salt_len; const int pos = ctx_len & 63; diff --git a/OpenCL/m20710_a1-optimized.cl b/OpenCL/m20710_a1-optimized.cl index 05f6b0908..2f1f81999 100644 --- a/OpenCL/m20710_a1-optimized.cl +++ b/OpenCL/m20710_a1-optimized.cl @@ -437,7 +437,7 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_BASIC ()) wf_t = salt_buf3[3]; // sha256_update_64: pos 0 - +/* if (salt_len == 64) { // sha256 transform @@ -545,7 +545,7 @@ KERNEL_FQ void m20710_m04 (KERN_ATTR_BASIC ()) we_t = 0; wf_t = 0; } - +*/ const int ctx_len = 64 + salt_len; const int pos = ctx_len & 63; @@ -1201,7 +1201,7 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_BASIC ()) wf_t = salt_buf3[3]; // sha256_update_64: pos 0 - +/* if (salt_len == 64) { // sha256 transform @@ -1309,7 +1309,7 @@ KERNEL_FQ void m20710_s04 (KERN_ATTR_BASIC ()) we_t = 0; wf_t = 0; } - +*/ const int ctx_len = 64 + salt_len; const int pos = ctx_len & 63; diff --git a/OpenCL/m20710_a3-optimized.cl b/OpenCL/m20710_a3-optimized.cl index 7a0df4363..d4764033c 100644 --- a/OpenCL/m20710_a3-optimized.cl +++ b/OpenCL/m20710_a3-optimized.cl @@ -338,7 +338,7 @@ DECLSPEC void m20710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u wf_t = salt_buf3[3]; // sha256_update_64: pos 0 - +/* if (salt_len == 64) { // sha256 transform @@ -446,7 +446,7 @@ DECLSPEC void m20710m (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u we_t = 0; wf_t = 0; } - +*/ const int ctx_len = 64 + salt_len; const int pos = ctx_len & 63; @@ -995,7 +995,7 @@ DECLSPEC void m20710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u wf_t = salt_buf3[3]; // sha256_update_64: pos 0 - +/* if (salt_len == 64) { // sha256 transform @@ -1103,7 +1103,7 @@ DECLSPEC void m20710s (u32 *w, const u32 pw_len, KERN_ATTR_VECTOR (), LOCAL_AS u we_t = 0; wf_t = 0; } - +*/ const int ctx_len = 64 + salt_len; const int pos = ctx_len & 63; diff --git a/tools/test_modules/m20710.pm b/tools/test_modules/m20710.pm index 3a68ada40..ed4f3f35f 100644 --- a/tools/test_modules/m20710.pm +++ b/tools/test_modules/m20710.pm @@ -10,7 +10,8 @@ use warnings; use Digest::SHA qw (sha256_hex); -sub module_constraints { [[0, 256], [0, 256], [0, 55], [16, 16], [-1, -1]] } +#sub module_constraints { [[0, 256], [0, 256], [0, 55], [16, 16], [-1, -1]] } +sub module_constraints { [[0, 256], [0, 256], [0, 55], [0, 51], [-1, -1]] } sub module_generate_hash {