aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-08-06 15:21:07 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-11 13:38:32 +0000
commit2bf636503fa09346b02964b2903ca70579f94c6b (patch)
tree8aba79518b97e20c52914759f3cb4c5bbc0d7b39 /tests/unit_tests
parentbulletproofs: scale points by 8 to ensure subgroup validity (diff)
downloadmonero-2bf636503fa09346b02964b2903ca70579f94c6b.tar.xz
bulletproofs: speed up the latest changes a bit
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/ringct.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp
index 360529b9e..3877ef785 100644
--- a/tests/unit_tests/ringct.cpp
+++ b/tests/unit_tests/ringct.cpp
@@ -1093,6 +1093,13 @@ TEST(ringct, H)
ASSERT_EQ(memcmp(&p3, &ge_p3_H, sizeof(ge_p3)), 0);
}
+TEST(ringct, mul8)
+{
+ ASSERT_EQ(rct::scalarmult8(rct::identity()), rct::identity());
+ ASSERT_EQ(rct::scalarmult8(rct::H), rct::scalarmultKey(rct::H, rct::EIGHT));
+ ASSERT_EQ(rct::scalarmultKey(rct::scalarmultKey(rct::H, rct::INV_EIGHT), rct::EIGHT), rct::H);
+}
+
TEST(ringct, aggregated)
{
static const size_t N_PROOFS = 16;