![]() |
Anoncoin
0.9.4
P2P Digital Currency
|
A commitment, complete with contents and opening randomness. More...
#include <Commitment.h>
Public Member Functions | |
Commitment (const IntegerGroupParams *p, const Bignum &value) | |
Generates a Pedersen commitment to the given value. More... | |
Commitment (const IntegerGroupParams *p, const Bignum &value, const Bignum &g, const Bignum &h) | |
Generates a Pedersen commitment to the given value. More... | |
Bignum | getCommitmentValue () const |
Bignum | getRandomness () const |
Bignum | getContents () const |
Private Member Functions | |
void | _init (const IntegerGroupParams *p, const Bignum &value) |
Private Attributes | |
const IntegerGroupParams * | params |
Bignum | commitmentValue |
Bignum | randomness |
const Bignum | contents |
Bignum | g |
Bignum | h |
A commitment, complete with contents and opening randomness.
These should remain secret. Publish only the commitment value.
Definition at line 32 of file Commitment.h.
libzerocoin::Commitment::Commitment | ( | const IntegerGroupParams * | p, |
const Bignum & | value | ||
) |
Generates a Pedersen commitment to the given value.
p | the group parameters for the coin |
value | the value to commit to |
Definition at line 19 of file Commitment.cpp.
libzerocoin::Commitment::Commitment | ( | const IntegerGroupParams * | p, |
const Bignum & | value, | ||
const Bignum & | g, | ||
const Bignum & | h | ||
) |
Generates a Pedersen commitment to the given value.
p | the group parameters for the coin |
value | the value to commit to |
g | the value of generator g (overrides the group) |
h | the value of generator h (overrides the group) |
Definition at line 29 of file Commitment.cpp.
|
private |
Bignum libzerocoin::Commitment::getCommitmentValue | ( | ) | const |
Bignum libzerocoin::Commitment::getContents | ( | ) | const |
Bignum libzerocoin::Commitment::getRandomness | ( | ) | const |
|
private |
Definition at line 54 of file Commitment.h.
|
private |
Definition at line 56 of file Commitment.h.
|
private |
Definition at line 57 of file Commitment.h.
|
private |
Definition at line 57 of file Commitment.h.
|
private |
Definition at line 53 of file Commitment.h.
|
private |
Definition at line 55 of file Commitment.h.