mirror of
https://github.com/monero-project/monero.git
synced 2025-08-03 22:14:17 -04:00
Hash domain separation
This commit is contained in:
parent
6c7d928f19
commit
80d5320fff
9 changed files with 34 additions and 34 deletions
|
@ -100,8 +100,8 @@ static inline bool is_reduced(const rct::key &scalar)
|
|||
|
||||
static rct::key get_exponent(const rct::key &base, size_t idx)
|
||||
{
|
||||
static const std::string salt("bulletproof");
|
||||
std::string hashed = std::string((const char*)base.bytes, sizeof(base)) + salt + tools::get_varint_data(idx);
|
||||
static const std::string domain_separator(config::HASH_KEY_BULLETPROOF_EXPONENT);
|
||||
std::string hashed = std::string((const char*)base.bytes, sizeof(base)) + domain_separator + tools::get_varint_data(idx);
|
||||
rct::key e;
|
||||
ge_p3 e_p3;
|
||||
rct::hash_to_p3(e_p3, rct::hash2rct(crypto::cn_fast_hash(hashed.data(), hashed.size())));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue