aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/variant4_random_math.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2019-02-12 17:45:05 -0500
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-02-14 14:44:27 +0000
commitc2b8037a4296a542fd4170c86b0914b5f6470f5b (patch)
tree1ede9cb9356e4644f02d10631827fb7ce9fd6b1a /src/crypto/variant4_random_math.h
parentCryptonight variant 4 aka CryptonightR (diff)
downloadmonero-c2b8037a4296a542fd4170c86b0914b5f6470f5b.tar.xz
Adding cnv4-2 tweaks
Diffstat (limited to '')
-rw-r--r--src/crypto/variant4_random_math.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/variant4_random_math.h b/src/crypto/variant4_random_math.h
index 8549498c4..be5447395 100644
--- a/src/crypto/variant4_random_math.h
+++ b/src/crypto/variant4_random_math.h
@@ -39,10 +39,9 @@ enum V4_InstructionList
// V4_InstructionDefinition is used to generate code from random data
// Every random sequence of bytes is a valid code
//
-// There are 8 registers in total:
+// There are 9 registers in total:
// - 4 variable registers
-// - 4 constant registers initialized from loop variables
-//
+// - 5 constant registers initialized from loop variables
// This is why dst_index is 2 bits
enum V4_InstructionDefinition
{
@@ -201,6 +200,7 @@ static inline int v4_random_math_init(struct V4_Instruction* code, const uint64_
memset(data, 0, sizeof(data));
uint64_t tmp = SWAP64LE(height);
memcpy(data, &tmp, sizeof(uint64_t));
+ data[20] = 0xda; // change seed
// Set data_index past the last byte in data
// to trigger full data update with blake hash