Monero Cryptonight variants, and add one for v7

This is the first variant of many, with the intent to improve
Monero's resistance to ASICs and encourage mining decentralization.
This commit is contained in:
moneromooo-monero 2018-02-07 19:07:36 +00:00
parent 0d150aca5c
commit 608fd6f14a
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
9 changed files with 71 additions and 17 deletions

View file

@ -51,6 +51,12 @@ extern "C" {
}
tree_hash((const char (*)[32]) data, length >> 5, hash);
}
static void cn_slow_hash_0(const void *data, size_t length, char *hash) {
return cn_slow_hash(data, length, hash, 0);
}
static void cn_slow_hash_1(const void *data, size_t length, char *hash) {
return cn_slow_hash(data, length, hash, 1);
}
}
POP_WARNINGS
@ -58,9 +64,10 @@ extern "C" typedef void hash_f(const void *, size_t, char *);
struct hash_func {
const string name;
hash_f &f;
} hashes[] = {{"fast", cn_fast_hash}, {"slow", cn_slow_hash}, {"tree", hash_tree},
} hashes[] = {{"fast", cn_fast_hash}, {"slow", cn_slow_hash_0}, {"tree", hash_tree},
{"extra-blake", hash_extra_blake}, {"extra-groestl", hash_extra_groestl},
{"extra-jh", hash_extra_jh}, {"extra-skein", hash_extra_skein}};
{"extra-jh", hash_extra_jh}, {"extra-skein", hash_extra_skein},
{"slow-1", cn_slow_hash_1}};
int main(int argc, char *argv[]) {
hash_f *f;