From bacf0a1e2ff54ef1fc77e3f6ec92e87946084c1a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 3 Feb 2018 14:36:29 +0000 Subject: bulletproofs: add aggregated verification Ported from sarang's java code --- tests/unit_tests/ringct.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests/unit_tests/ringct.cpp') diff --git a/tests/unit_tests/ringct.cpp b/tests/unit_tests/ringct.cpp index 6e3958f8a..d4e942176 100644 --- a/tests/unit_tests/ringct.cpp +++ b/tests/unit_tests/ringct.cpp @@ -1085,3 +1085,20 @@ TEST(ringct, zeroCommmit) const rct::key manual = rct::addKeys(a, b); ASSERT_EQ(z, manual); } + +TEST(ringct, aggregated) +{ + static const size_t N_PROOFS = 16; + std::vector s(N_PROOFS); + std::vector sp(N_PROOFS); + + for (size_t n = 0; n < N_PROOFS; ++n) + { + static const uint64_t inputs[] = {1000, 1000}; + static const uint64_t outputs[] = {500, 1500}; + s[n] = make_sample_simple_rct_sig(NELTS(inputs), inputs, NELTS(outputs), outputs, 0); + sp[n] = &s[n]; + } + + ASSERT_TRUE(verRctSemanticsSimple(sp)); +} -- cgit v1.2.3