mirror of
https://github.com/monero-project/monero.git
synced 2025-08-09 11:52:19 -04:00
bulletproofs: add aggregated verification
Ported from sarang's java code
This commit is contained in:
parent
e895c3def1
commit
bacf0a1e2f
11 changed files with 453 additions and 259 deletions
|
@ -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<rctSig> s(N_PROOFS);
|
||||
std::vector<const rctSig*> 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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue