mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
fix hash2rct in get_exponent
This commit is contained in:
parent
b78a40f7a4
commit
17d4fb378e
1 changed files with 6 additions and 1 deletions
|
@ -109,7 +109,12 @@ 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);
|
||||
return rct::hashToPoint(rct::hash2rct(crypto::cn_fast_hash(hashed.data(), hashed.size())));
|
||||
rct::key e;
|
||||
ge_p3 e_p3;
|
||||
rct::hash_to_p3(e_p3, rct::hash2rct(crypto::cn_fast_hash(hashed.data(), hashed.size())));
|
||||
ge_p3_tobytes(e.bytes, &e_p3);
|
||||
CHECK_AND_ASSERT_THROW_MES(!(e == rct::identity()), "Exponent is point at infinity");
|
||||
return e;
|
||||
}
|
||||
|
||||
static void init_exponents()
|
||||
|
|
Loading…
Reference in a new issue