Anoncoin  0.9.4
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
libzerocoin::Commitment Class Reference

A commitment, complete with contents and opening randomness. More...

#include <Commitment.h>

Collaboration diagram for libzerocoin::Commitment:
[legend]

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 IntegerGroupParamsparams
 
Bignum commitmentValue
 
Bignum randomness
 
const Bignum contents
 
Bignum g
 
Bignum h
 

Detailed Description

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.

Constructor & Destructor Documentation

libzerocoin::Commitment::Commitment ( const IntegerGroupParams p,
const Bignum &  value 
)

Generates a Pedersen commitment to the given value.

Parameters
pthe group parameters for the coin
valuethe value to commit to

Definition at line 19 of file Commitment.cpp.

Here is the call graph for this function:

libzerocoin::Commitment::Commitment ( const IntegerGroupParams p,
const Bignum &  value,
const Bignum &  g,
const Bignum &  h 
)

Generates a Pedersen commitment to the given value.

Parameters
pthe group parameters for the coin
valuethe value to commit to
gthe value of generator g (overrides the group)
hthe value of generator h (overrides the group)

Definition at line 29 of file Commitment.cpp.

Here is the call graph for this function:

Member Function Documentation

void libzerocoin::Commitment::_init ( const IntegerGroupParams p,
const Bignum &  value 
)
private

Definition at line 40 of file Commitment.cpp.

Here is the caller graph for this function:

Bignum libzerocoin::Commitment::getCommitmentValue ( ) const

Definition at line 46 of file Commitment.cpp.

Here is the caller graph for this function:

Bignum libzerocoin::Commitment::getContents ( ) const

Definition at line 54 of file Commitment.cpp.

Here is the caller graph for this function:

Bignum libzerocoin::Commitment::getRandomness ( ) const

Definition at line 50 of file Commitment.cpp.

Here is the caller graph for this function:

Member Data Documentation

Bignum libzerocoin::Commitment::commitmentValue
private

Definition at line 54 of file Commitment.h.

const Bignum libzerocoin::Commitment::contents
private

Definition at line 56 of file Commitment.h.

Bignum libzerocoin::Commitment::g
private

Definition at line 57 of file Commitment.h.

Bignum libzerocoin::Commitment::h
private

Definition at line 57 of file Commitment.h.

const IntegerGroupParams* libzerocoin::Commitment::params
private

Definition at line 53 of file Commitment.h.

Bignum libzerocoin::Commitment::randomness
private

Definition at line 55 of file Commitment.h.


The documentation for this class was generated from the following files: