From 218cef337ac44d3ed9468ac288b1adaeffdc2725 Mon Sep 17 00:00:00 2001 From: Jay D Dee Date: Tue, 10 Apr 2018 21:49:06 -0400 Subject: [PATCH] v3.8.7.1 --- RELEASE_NOTES | 5 +++++ algo-gate-api.c | 6 +++--- algo/argon2/argon2d/argon2d-gate.c | 3 +++ algo/argon2/argon2d/argon2d/argon2.h | 10 ++++++++++ algo/argon2/argon2d/argon2d/opt.c | 18 +++++++++--------- configure | 20 ++++++++++---------- configure.ac | 2 +- 7 files changed, 41 insertions(+), 23 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 1c63cc9..d1a6cec 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -160,6 +160,11 @@ Support for even older x86_64 without AES_NI or SSE2 is not availble. Change Log ---------- +v3.8.7.1 + +Fixed argon2d-uis low difficulty rejects. +Fixed argon2d aliases. + v3.8.7 Added argon2d4096 (alias argon2d-uis) for Unitus (UIS). diff --git a/algo-gate-api.c b/algo-gate-api.c index 6208cfa..bff9c80 100644 --- a/algo-gate-api.c +++ b/algo-gate-api.c @@ -289,9 +289,9 @@ void exec_hash_function( int algo, void *output, const void *pdata ) const char* const algo_alias_map[][2] = { // alias proper - { "argon2d-crds" "argon2d250" }, - { "argon2d-dyn" "argon2d500" }, - { "argon2d-uis" "argon2d4096" }, + { "argon2d-crds", "argon2d250" }, + { "argon2d-dyn", "argon2d500" }, + { "argon2d-uis", "argon2d4096" }, { "bitcore", "timetravel10" }, { "bitzeny", "yescryptr8" }, { "blake256r8", "blakecoin" }, diff --git a/algo/argon2/argon2d/argon2d-gate.c b/algo/argon2/argon2d/argon2d-gate.c index 70d3e63..0f24e0b 100644 --- a/algo/argon2/argon2d/argon2d-gate.c +++ b/algo/argon2/argon2d/argon2d-gate.c @@ -71,6 +71,7 @@ bool register_argon2d_crds_algo( algo_gate_t* gate ) gate->hash = (void*)&argon2d_crds_hash; gate->set_target = (void*)&scrypt_set_target; gate->optimizations = SSE2_OPT | AVX2_OPT | AVX512_OPT; + ARGON2_VERSION_NUMBER = ARGON2_VERSION_10; return true; } @@ -140,6 +141,7 @@ bool register_argon2d_dyn_algo( algo_gate_t* gate ) gate->hash = (void*)&argon2d_dyn_hash; gate->set_target = (void*)&scrypt_set_target; gate->optimizations = SSE2_OPT | AVX2_OPT | AVX512_OPT; + ARGON2_VERSION_NUMBER = ARGON2_VERSION_10; return true; } @@ -189,6 +191,7 @@ bool register_argon2d4096_algo( algo_gate_t* gate ) gate->set_target = (void*)&scrypt_set_target; gate->get_max64 = (void*)&get_max64_0x1ff; gate->optimizations = SSE2_OPT | AVX2_OPT | AVX512_OPT; + ARGON2_VERSION_NUMBER = ARGON2_VERSION_13; return true; } diff --git a/algo/argon2/argon2d/argon2d/argon2.h b/algo/argon2/argon2d/argon2d/argon2.h index b75d10b..dfa953c 100644 --- a/algo/argon2/argon2d/argon2d/argon2.h +++ b/algo/argon2/argon2d/argon2d/argon2.h @@ -224,12 +224,22 @@ typedef enum Argon2_type { Argon2_id = 2 } argon2_type; +// Version implementation sucks, needs to be changed. +// It should be set in the ctx before calling the argon2_ctx. +// It should be a function arg of *hash_raw & *hash_encoded. +// Then remove initialization from gate register function. /* Version of the algorithm */ +/* typedef enum Argon2_version { ARGON2_VERSION_10 = 0x10, ARGON2_VERSION_13 = 0x13, ARGON2_VERSION_NUMBER = ARGON2_VERSION_10 } argon2_version; +*/ + +#define ARGON2_VERSION_10 0x10 +#define ARGON2_VERSION_13 0x13 +uint32_t ARGON2_VERSION_NUMBER; /* * Function that gives the string representation of an argon2_type. diff --git a/algo/argon2/argon2d/argon2d/opt.c b/algo/argon2/argon2d/argon2d/opt.c index 5c30e4d..87ff4cc 100644 --- a/algo/argon2/argon2d/argon2d/opt.c +++ b/algo/argon2/argon2d/argon2d/opt.c @@ -345,15 +345,15 @@ void fill_segment(const argon2_instance_t *instance, ref_block = instance->memory + instance->lane_length * ref_lane + ref_index; curr_block = instance->memory + curr_offset; - // if (ARGON2_VERSION_10 == instance->version) { - // /* version 1.2.1 and earlier: overwrite, not XOR */ - // fill_block(state, ref_block, curr_block, 0); - // } else { - // if(0 == position.pass) { + if (ARGON2_VERSION_10 == instance->version) { + /* version 1.2.1 and earlier: overwrite, not XOR */ + fill_block(state, ref_block, curr_block, 0); + } else { + if(0 == position.pass) { fill_block(state, ref_block, curr_block, 0); - // } else { - // fill_block(state, ref_block, curr_block, 1); - // } - // } + } else { + fill_block(state, ref_block, curr_block, 1); + } + } } } diff --git a/configure b/configure index a1334b8..22ae829 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.8.7. +# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.8.7.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='cpuminer-opt' PACKAGE_TARNAME='cpuminer-opt' -PACKAGE_VERSION='3.8.7' -PACKAGE_STRING='cpuminer-opt 3.8.7' +PACKAGE_VERSION='3.8.7.1' +PACKAGE_STRING='cpuminer-opt 3.8.7.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1321,7 +1321,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures cpuminer-opt 3.8.7 to adapt to many kinds of systems. +\`configure' configures cpuminer-opt 3.8.7.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1392,7 +1392,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cpuminer-opt 3.8.7:";; + short | recursive ) echo "Configuration of cpuminer-opt 3.8.7.1:";; esac cat <<\_ACEOF @@ -1497,7 +1497,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cpuminer-opt configure 3.8.7 +cpuminer-opt configure 3.8.7.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2000,7 +2000,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by cpuminer-opt $as_me 3.8.7, which was +It was created by cpuminer-opt $as_me 3.8.7.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2981,7 +2981,7 @@ fi # Define the identity of the package. PACKAGE='cpuminer-opt' - VERSION='3.8.7' + VERSION='3.8.7.1' cat >>confdefs.h <<_ACEOF @@ -6677,7 +6677,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cpuminer-opt $as_me 3.8.7, which was +This file was extended by cpuminer-opt $as_me 3.8.7.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6743,7 +6743,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cpuminer-opt config.status 3.8.7 +cpuminer-opt config.status 3.8.7.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 3d792dd..fae6f70 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([cpuminer-opt], [3.8.7]) +AC_INIT([cpuminer-opt], [3.8.7.1]) AC_PREREQ([2.59c]) AC_CANONICAL_SYSTEM