![]() |
Anoncoin
0.9.4
P2P Digital Currency
|
A private coin. More...
#include <Coin.h>
Public Member Functions | |
template<typename Stream > | |
PrivateCoin (const Params *p, Stream &strm) | |
PrivateCoin (const Params *p, const CoinDenomination denomination) | |
PublicCoin | getPublicCoin () const |
Bignum | getSerialNumber () const |
Bignum | getRandomness () const |
void | mintCoin (const CoinDenomination denomination) |
Mint a new coin. More... | |
void | mintCoinFast (const CoinDenomination denomination) |
Mint a new coin using a faster process. More... | |
Public Attributes | |
IMPLEMENT_SERIALIZE(READWRITE(publicCoin);READWRITE(randomness);READWRITE(serialNumber);) private PublicCoin | publicCoin |
Bignum | randomness |
Bignum | serialNumber |
A private coin.
As the name implies, the content of this should stay private except PublicCoin.
Contains a coin's serial number, a commitment to it, and opening randomness for the commitment.
|
inline |
libzerocoin::PrivateCoin::PrivateCoin | ( | const Params * | p, |
const CoinDenomination | denomination | ||
) |
PublicCoin libzerocoin::PrivateCoin::getPublicCoin | ( | ) | const |
Bignum libzerocoin::PrivateCoin::getRandomness | ( | ) | const |
Bignum libzerocoin::PrivateCoin::getSerialNumber | ( | ) | const |
void libzerocoin::PrivateCoin::mintCoin | ( | const CoinDenomination | denomination | ) |
Mint a new coin.
denomination | the denomination of the coin to mint |
ZerocoinException | if the process takes too long |
Generates a new Zerocoin by (a) selecting a random serial number, (b) committing to this serial number and repeating until the resulting commitment is prime. Stores the resulting commitment (coin) and randomness (trapdoor).
Definition at line 84 of file Coin.cpp.
void libzerocoin::PrivateCoin::mintCoinFast | ( | const CoinDenomination | denomination | ) |
Mint a new coin using a faster process.
denomination | the denomination of the coin to mint |
ZerocoinException | if the process takes too long |
Generates a new Zerocoin by (a) selecting a random serial number, (b) committing to this serial number and repeating until the resulting commitment is prime. Stores the resulting commitment (coin) and randomness (trapdoor). This routine is substantially faster than the mintCoin() routine, but could be more vulnerable to timing attacks. Don't use it if you think someone could be timing your coin minting.
Definition at line 117 of file Coin.cpp.
IMPLEMENT_SERIALIZE ( READWRITE(publicCoin); READWRITE(randomness); READWRITE(serialNumber); ) private PublicCoin libzerocoin::PrivateCoin::publicCoin |