PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
libzerocoin::CoinRandomnessSchnorrSignature Class Reference

A Schnorr Signature on the hash of metadata attesting that the signer knows the randomness v necessary to open a public coin C (which is a pedersen commitment g^S h^v mod p) with given serial number S. More...

#include <CoinRandomnessSchnorrSignature.h>

Collaboration diagram for libzerocoin::CoinRandomnessSchnorrSignature:
[legend]

Public Member Functions

 CoinRandomnessSchnorrSignature ()
 
template<typename Stream >
 CoinRandomnessSchnorrSignature (Stream &strm)
 
 CoinRandomnessSchnorrSignature (const ZerocoinParams *zcparams, const CBigNum randomness, const uint256 msghash)
 Creates a Schnorr signature object using the randomness of a public coin as private key sk. More...
 
bool Verify (const ZerocoinParams *zcparams, const CBigNum &S, const CBigNum &C, const uint256 msghash) const
 Verifies the Schnorr signature on message msghash with public key pk = Cg^-S mod p. More...
 
 SERIALIZE_METHODS (CoinRandomnessSchnorrSignature, obj)
 

Private Attributes

CBigNum alpha
 
CBigNum beta
 

Detailed Description

A Schnorr Signature on the hash of metadata attesting that the signer knows the randomness v necessary to open a public coin C (which is a pedersen commitment g^S h^v mod p) with given serial number S.

Definition at line 19 of file CoinRandomnessSchnorrSignature.h.

Constructor & Destructor Documentation

◆ CoinRandomnessSchnorrSignature() [1/3]

libzerocoin::CoinRandomnessSchnorrSignature::CoinRandomnessSchnorrSignature ( )
inline

Definition at line 21 of file CoinRandomnessSchnorrSignature.h.

◆ CoinRandomnessSchnorrSignature() [2/3]

template<typename Stream >
libzerocoin::CoinRandomnessSchnorrSignature::CoinRandomnessSchnorrSignature ( Stream &  strm)
inlineexplicit

Definition at line 22 of file CoinRandomnessSchnorrSignature.h.

◆ CoinRandomnessSchnorrSignature() [3/3]

libzerocoin::CoinRandomnessSchnorrSignature::CoinRandomnessSchnorrSignature ( const ZerocoinParams zcparams,
const CBigNum  randomness,
const uint256  msghash 
)

Creates a Schnorr signature object using the randomness of a public coin as private key sk.

Parameters
zcparamszerocoin params (group modulus, order and generators)
randomnessthe coin we are going to use for the signature (sk := randomness, pk := h^sk mod p).
msghashhash of meta data to create a signature on.

Definition at line 9 of file CoinRandomnessSchnorrSignature.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ SERIALIZE_METHODS()

libzerocoin::CoinRandomnessSchnorrSignature::SERIALIZE_METHODS ( CoinRandomnessSchnorrSignature  ,
obj   
)
inline

Definition at line 42 of file CoinRandomnessSchnorrSignature.h.

◆ Verify()

bool libzerocoin::CoinRandomnessSchnorrSignature::Verify ( const ZerocoinParams zcparams,
const CBigNum S,
const CBigNum C,
const uint256  msghash 
) const

Verifies the Schnorr signature on message msghash with public key pk = Cg^-S mod p.

Parameters
zcparamszerocoin params (group modulus, order and generators)
Sserial number of the coin used for the signature
Cvalue of the public coin (commitment to serial S and randomness v) used for the signature.
msghashhash of meta data to verify the signature on.
Returns

Definition at line 36 of file CoinRandomnessSchnorrSignature.cpp.

Member Data Documentation

◆ alpha

CBigNum libzerocoin::CoinRandomnessSchnorrSignature::alpha
private

Definition at line 46 of file CoinRandomnessSchnorrSignature.h.

◆ beta

CBigNum libzerocoin::CoinRandomnessSchnorrSignature::beta
private

Definition at line 46 of file CoinRandomnessSchnorrSignature.h.


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