diff options
author | Sarang Noether <32460187+SarangNoether@users.noreply.github.com> | 2020-04-01 08:31:00 -0400 |
---|---|---|
committer | Sarang Noether <32460187+SarangNoether@users.noreply.github.com> | 2020-04-01 08:31:00 -0400 |
commit | 80d5320fff9c948f54b4379f3c2f3bc684e7f356 (patch) | |
tree | be950820fe376cd19e8a5349680f24ffb62adb36 /src/multisig | |
parent | Merge pull request #6336 (diff) | |
download | monero-80d5320fff9c948f54b4379f3c2f3bc684e7f356.tar.xz |
Hash domain separation
Diffstat (limited to 'src/multisig')
-rw-r--r-- | src/multisig/multisig.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/multisig/multisig.cpp b/src/multisig/multisig.cpp index 14df4d554..999894db0 100644 --- a/src/multisig/multisig.cpp +++ b/src/multisig/multisig.cpp @@ -33,19 +33,22 @@ #include "cryptonote_basic/account.h" #include "cryptonote_basic/cryptonote_format_utils.h" #include "multisig.h" +#include "cryptonote_config.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "multisig" using namespace std; -static const rct::key multisig_salt = { {'M', 'u', 'l', 't' , 'i', 's', 'i', 'g', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }; - namespace cryptonote { //----------------------------------------------------------------- crypto::secret_key get_multisig_blinded_secret_key(const crypto::secret_key &key) { + rct::key multisig_salt; + static_assert(sizeof(rct::key) == sizeof(config::HASH_KEY_MULTISIG), "Hash domain separator is an unexpected size"); + memcpy(multisig_salt.bytes, config::HASH_KEY_MULTISIG, sizeof(rct::key)); + rct::keyV data; data.reserve(2); data.push_back(rct::sk2rct(key)); |