![]() |
Anoncoin
0.9.4
P2P Digital Currency
|
A witness that a PublicCoin is in the accumulation of a set of coins. More...
#include <Accumulator.h>
Public Member Functions | |
template<typename Stream > | |
AccumulatorWitness (const Params *p, Stream &strm) | |
AccumulatorWitness (const Params *p, const Accumulator &checkpoint, const PublicCoin coin) | |
Constructs a witness. More... | |
void | AddElement (const PublicCoin &c) |
Adds element to the set whose accumulation we are proving coin is a member of. More... | |
Bignum | getValue () const |
bool | VerifyWitness (const Accumulator &a, const PublicCoin &publicCoin) const |
Checks that this is a witness to the accumulation of coin. More... | |
AccumulatorWitness & | operator+= (const PublicCoin &rhs) |
Adds rhs to the set whose accumulation we're proving coin is a member of. More... | |
Private Attributes | |
const Params * | params |
Accumulator | witness |
const PublicCoin | element |
A witness that a PublicCoin is in the accumulation of a set of coins.
Definition at line 100 of file Accumulator.h.
|
inline |
Definition at line 103 of file Accumulator.h.
libzerocoin::AccumulatorWitness::AccumulatorWitness | ( | const Params * | p, |
const Accumulator & | checkpoint, | ||
const PublicCoin | coin | ||
) |
Constructs a witness.
You must add all elements after the witness
p | pointer to params |
checkpoint | the last known accumulator value before the element was added |
coin | the coin we want a witness to |
Definition at line 89 of file Accumulator.cpp.
void libzerocoin::AccumulatorWitness::AddElement | ( | const PublicCoin & | c | ) |
Adds element to the set whose accumulation we are proving coin is a member of.
c | the coin to add |
Definition at line 93 of file Accumulator.cpp.
Bignum libzerocoin::AccumulatorWitness::getValue | ( | ) | const |
Definition at line 99 of file Accumulator.cpp.
AccumulatorWitness & libzerocoin::AccumulatorWitness::operator+= | ( | const PublicCoin & | rhs | ) |
Adds rhs to the set whose accumulation we're proving coin is a member of.
rhs | the PublicCoin to add |
Definition at line 109 of file Accumulator.cpp.
bool libzerocoin::AccumulatorWitness::VerifyWitness | ( | const Accumulator & | a, |
const PublicCoin & | publicCoin | ||
) | const |
Checks that this is a witness to the accumulation of coin.
a | the accumulator we are checking against. |
publicCoin | the coin we're providing a witness for |
Definition at line 103 of file Accumulator.cpp.
|
private |
Definition at line 142 of file Accumulator.h.
|
private |
Definition at line 140 of file Accumulator.h.
|
private |
Definition at line 141 of file Accumulator.h.