mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2025-09-17 23:44:27 +00:00
v3.8.7.1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user