diff options
author | SChernykh <sergey.v.chernykh@gmail.com> | 2019-02-14 20:42:50 +0100 |
---|---|---|
committer | SChernykh <sergey.v.chernykh@gmail.com> | 2019-02-14 20:42:50 +0100 |
commit | 9da0892b102b7b5a85a0769ea2022b0abe0046d7 (patch) | |
tree | df37d6399e506b0fdf23d38c071b5a670ff44c71 /src/crypto/variant4_random_math.h | |
parent | Cryptonight variant 4 aka CryptonightR (diff) | |
download | monero-9da0892b102b7b5a85a0769ea2022b0abe0046d7.tar.xz |
Adding cnv4-2 tweaks
Co-Authored-By: Lee Clagett <vtnerd@users.noreply.github.com>
Diffstat (limited to '')
-rw-r--r-- | src/crypto/variant4_random_math.h | 6 |
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..f3e41a001 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] = -38; // change seed // Set data_index past the last byte in data // to trigger full data update with blake hash |