PIVX Core  5.6.99
P2P Digital Currency
CoinRandomnessSchnorrSignature.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2021 The PIVX Core developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_LIBZEROCOIN_COINRANDOMNESSSCHNORRSIGNATURE_H
6 #define PIVX_LIBZEROCOIN_COINRANDOMNESSSCHNORRSIGNATURE_H
7 
8 #include "Params.h"
9 #include "Coin.h"
10 #include "serialize.h"
11 #include "hash.h"
12 
13 namespace libzerocoin {
14 
20 public:
22  template <typename Stream> explicit CoinRandomnessSchnorrSignature(Stream& strm) {strm >> *this;}
23 
30  CoinRandomnessSchnorrSignature(const ZerocoinParams* zcparams, const CBigNum randomness, const uint256 msghash);
31 
40  bool Verify(const ZerocoinParams* zcparams, const CBigNum& S, const CBigNum& C, const uint256 msghash) const;
41 
43 
44 private:
45  // signature components
47 };
48 
49 } /* namespace libzerocoin */
50 #endif // PIVX_LIBZEROCOIN_COINRANDOMNESSSCHNORRSIGNATURE_H
PublicCoin class for the Zerocoin library.
C++ wrapper for BIGNUM.
Definition: bignum.h:35
A Schnorr Signature on the hash of metadata attesting that the signer knows the randomness v necessar...
SERIALIZE_METHODS(CoinRandomnessSchnorrSignature, obj)
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.
256-bit opaque blob.
Definition: uint256.h:138
#define S(x0, x1, x2, x3, cb, r)
Definition: jh.c:494
Parameter classes for Zerocoin.
#define READWRITE(...)
Definition: serialize.h:183