aboutsummaryrefslogtreecommitdiff
path: root/src/ringct/bulletproofs.cc
diff options
context:
space:
mode:
authorSarang Noether <32460187+SarangNoether@users.noreply.github.com>2019-08-27 16:22:44 -0400
committerSarang Noether <32460187+SarangNoether@users.noreply.github.com>2019-08-27 16:22:44 -0400
commit3a0451a8be43154f0da06dd9c693ed6f0c657042 (patch)
tree298545ee6661a331d615de049359e74e5a9e5ca2 /src/ringct/bulletproofs.cc
parentMerge pull request #5641 (diff)
downloadmonero-3a0451a8be43154f0da06dd9c693ed6f0c657042.tar.xz
MLSAG speedup and additional checks
Diffstat (limited to 'src/ringct/bulletproofs.cc')
-rw-r--r--src/ringct/bulletproofs.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ringct/bulletproofs.cc b/src/ringct/bulletproofs.cc
index 6270d4d14..ff6fee95c 100644
--- a/src/ringct/bulletproofs.cc
+++ b/src/ringct/bulletproofs.cc
@@ -101,7 +101,10 @@ 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);
- const rct::key e = 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;
}