aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-04-04 12:44:45 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-04-04 12:44:45 -0500
commit081d49c59f0f19ee82f0d8e1b33371dc43c37938 (patch)
tree623ff53c8fb6797e3ecc41e9ca6140cb27af1e28 /src/cryptonote_basic
parentMerge pull request #6335 (diff)
parentHash domain separation (diff)
downloadmonero-081d49c59f0f19ee82f0d8e1b33371dc43c37938.tar.xz
Merge pull request #6338
80d5320 Hash domain separation (SarangNoether)
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/account.cpp6
-rw-r--r--src/cryptonote_basic/cryptonote_format_utils.cpp2
2 files changed, 2 insertions, 6 deletions
diff --git a/src/cryptonote_basic/account.cpp b/src/cryptonote_basic/account.cpp
index a9aec163b..02eca289e 100644
--- a/src/cryptonote_basic/account.cpp
+++ b/src/cryptonote_basic/account.cpp
@@ -40,13 +40,11 @@ extern "C"
}
#include "cryptonote_basic_impl.h"
#include "cryptonote_format_utils.h"
+#include "cryptonote_config.h"
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "account"
-#define KEYS_ENCRYPTION_SALT 'k'
-
-
using namespace std;
DISABLE_VS_WARNINGS(4244 4345)
@@ -69,7 +67,7 @@ DISABLE_VS_WARNINGS(4244 4345)
static_assert(sizeof(base_key) == sizeof(crypto::hash), "chacha key and hash should be the same size");
epee::mlocked<tools::scrubbed_arr<char, sizeof(base_key)+1>> data;
memcpy(data.data(), &base_key, sizeof(base_key));
- data[sizeof(base_key)] = KEYS_ENCRYPTION_SALT;
+ data[sizeof(base_key)] = config::HASH_KEY_MEMORY;
crypto::generate_chacha_key(data.data(), sizeof(data), key, 1);
}
//-----------------------------------------------------------------
diff --git a/src/cryptonote_basic/cryptonote_format_utils.cpp b/src/cryptonote_basic/cryptonote_format_utils.cpp
index 651d61b06..80747dd89 100644
--- a/src/cryptonote_basic/cryptonote_format_utils.cpp
+++ b/src/cryptonote_basic/cryptonote_format_utils.cpp
@@ -44,8 +44,6 @@ using namespace epee;
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "cn"
-#define ENCRYPTED_PAYMENT_ID_TAIL 0x8d
-
// #define ENABLE_HASH_CASH_INTEGRITY_CHECK
using namespace crypto;