|
|
|
@ -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()
|
|
|
|
|