ringct: add a test for prooveRange being non deterministic

This commit is contained in:
moneromooo-monero 2016-05-30 08:56:23 +01:00
parent 09fb9f4b75
commit 84948eabae
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3

View file

@ -498,3 +498,12 @@ TEST(ringct, d2b)
ASSERT_TRUE(amount == b2d(b)); 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)));
}