diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-08-06 15:21:07 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-11 13:38:32 +0000 |
commit | 2bf636503fa09346b02964b2903ca70579f94c6b (patch) | |
tree | 8aba79518b97e20c52914759f3cb4c5bbc0d7b39 /src/ringct/rctOps.cpp | |
parent | bulletproofs: scale points by 8 to ensure subgroup validity (diff) | |
download | monero-2bf636503fa09346b02964b2903ca70579f94c6b.tar.xz |
bulletproofs: speed up the latest changes a bit
Diffstat (limited to '')
-rw-r--r-- | src/ringct/rctOps.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ringct/rctOps.cpp b/src/ringct/rctOps.cpp index df027f4b6..6c3c4500e 100644 --- a/src/ringct/rctOps.cpp +++ b/src/ringct/rctOps.cpp @@ -211,6 +211,20 @@ namespace rct { return aP; } + //Computes 8P + key scalarmult8(const key & P) { + ge_p3 p3; + CHECK_AND_ASSERT_THROW_MES_L1(ge_frombytes_vartime(&p3, P.bytes) == 0, "ge_frombytes_vartime failed at "+boost::lexical_cast<std::string>(__LINE__)); + ge_p2 p2; + ge_p3_to_p2(&p2, &p3); + ge_p1p1 p1; + ge_mul8(&p1, &p2); + ge_p1p1_to_p2(&p2, &p1); + rct::key res; + ge_tobytes(res.bytes, &p2); + return res; + } + //Computes aL where L is the curve order bool isInMainSubgroup(const key & a) { ge_p3 p3; |