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

Proof that two commitments open to the same value. More...

#include <Commitment.h>

Public Member Functions

 CommitmentProofOfKnowledge (const IntegerGroupParams *ap, const IntegerGroupParams *bp)
 
 CommitmentProofOfKnowledge (const IntegerGroupParams *aParams, const IntegerGroupParams *bParams, const Commitment &a, const Commitment &b)
 Generates a proof that two commitments, a and b, open to the same value. More...
 
template<typename Stream >
 CommitmentProofOfKnowledge (const IntegerGroupParams *aParams, const IntegerGroupParams *bParams, Stream &strm)
 
const Bignum calculateChallenge (const Bignum &a, const Bignum &b, const Bignum &commitOne, const Bignum &commitTwo) const
 
bool Verify (const Bignum &A, const Bignum &B) const
 Verifies the proof. More...
 

Public Attributes

IMPLEMENT_SERIALIZE(READWRITE(S1);READWRITE(S2);READWRITE(S3);READWRITE(challenge);) private Bignum S1
 
IMPLEMENT_SERIALIZE(READWRITE(S1);READWRITE(S2);READWRITE(S3);READWRITE(challenge);) private Bignum S2
 
IMPLEMENT_SERIALIZE(READWRITE(S1);READWRITE(S2);READWRITE(S3);READWRITE(challenge);) private Bignum S3
 
IMPLEMENT_SERIALIZE(READWRITE(S1);READWRITE(S2);READWRITE(S3);READWRITE(challenge);) private Bignum challenge
 

Detailed Description

Proof that two commitments open to the same value.

Definition at line 71 of file Commitment.h.

Constructor & Destructor Documentation

libzerocoin::CommitmentProofOfKnowledge::CommitmentProofOfKnowledge ( const IntegerGroupParams ap,
const IntegerGroupParams bp 
)

Definition at line 59 of file Commitment.cpp.

libzerocoin::CommitmentProofOfKnowledge::CommitmentProofOfKnowledge ( const IntegerGroupParams aParams,
const IntegerGroupParams bParams,
const Commitment a,
const Commitment b 
)

Generates a proof that two commitments, a and b, open to the same value.

Parameters
apthe IntegerGroup for commitment a
bpthe IntegerGroup for commitment b
athe first commitment
bthe second commitment

Definition at line 62 of file Commitment.cpp.

Here is the call graph for this function:

template<typename Stream >
libzerocoin::CommitmentProofOfKnowledge::CommitmentProofOfKnowledge ( const IntegerGroupParams aParams,
const IntegerGroupParams bParams,
Stream &  strm 
)
inline

Definition at line 84 of file Commitment.h.

Member Function Documentation

const Bignum libzerocoin::CommitmentProofOfKnowledge::calculateChallenge ( const Bignum &  a,
const Bignum &  b,
const Bignum &  commitOne,
const Bignum &  commitTwo 
) const

Definition at line 161 of file Commitment.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool libzerocoin::CommitmentProofOfKnowledge::Verify ( const Bignum &  A,
const Bignum &  B 
) const

Verifies the proof.

Returns
true if the proof is valid.Verifies the proof of equality of the two commitments
Parameters
Avalue of commitment one
Bvalue of commitment two
Returns

Definition at line 119 of file Commitment.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

IMPLEMENT_SERIALIZE ( READWRITE(S1); READWRITE(S2); READWRITE(S3); READWRITE(challenge); ) private Bignum libzerocoin::CommitmentProofOfKnowledge::challenge

Definition at line 104 of file Commitment.h.

IMPLEMENT_SERIALIZE ( READWRITE(S1); READWRITE(S2); READWRITE(S3); READWRITE(challenge); ) private Bignum libzerocoin::CommitmentProofOfKnowledge::S1

Definition at line 104 of file Commitment.h.

IMPLEMENT_SERIALIZE ( READWRITE(S1); READWRITE(S2); READWRITE(S3); READWRITE(challenge); ) private Bignum libzerocoin::CommitmentProofOfKnowledge::S2

Definition at line 104 of file Commitment.h.

IMPLEMENT_SERIALIZE ( READWRITE(S1); READWRITE(S2); READWRITE(S3); READWRITE(challenge); ) private Bignum libzerocoin::CommitmentProofOfKnowledge::S3

Definition at line 104 of file Commitment.h.


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