aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-05-30 08:56:23 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-08-28 21:27:50 +0100
commit84948eabae1d08ef6ac93c576fa3a9f8a39cb290 (patch)
tree93f096ced0121ef0808d2dd209d4e0f70ff6fd95 /tests/unit_tests
parentFix sc_0 to skGen in ProveRange (diff)
downloadmonero-84948eabae1d08ef6ac93c576fa3a9f8a39cb290.tar.xz
ringct: add a test for prooveRange being non deterministic
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/ringct.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp
index 2e791ff70..cd1dfbe51 100644
--- a/tests/unit_tests/ringct.cpp
+++ b/tests/unit_tests/ringct.cpp
@@ -498,3 +498,12 @@ TEST(ringct, d2b)
ASSERT_TRUE(amount == b2d(b));
}
}
+
+TEST(ringct, prooveRange_is_non_deterministic)
+{
+ key C[2], mask[2];
+ for (int n = 0; n < 2; ++n)
+ proveRange(C[n], mask[n], 80);
+ ASSERT_TRUE(memcmp(C[0].bytes, C[1].bytes, sizeof(C[0].bytes)));
+ ASSERT_TRUE(memcmp(mask[0].bytes, mask[1].bytes, sizeof(mask[0].bytes)));
+}