Changeset View
Changeset View
Standalone View
Standalone View
src/pubkey.h
Show First 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Verify a DER-serialized ECDSA signature (~72 bytes). | * Verify a DER-serialized ECDSA signature (~72 bytes). | ||||
* If this public key is not fully valid, the return value will be false. | * If this public key is not fully valid, the return value will be false. | ||||
*/ | */ | ||||
bool VerifyECDSA(const uint256 &hash, | bool VerifyECDSA(const uint256 &hash, | ||||
const std::vector<uint8_t> &vchSig) const; | const std::vector<uint8_t> &vchSig) const; | ||||
/** | /** | ||||
* Verify a Schnorr signature (=64 bytes). | |||||
* If this public key is not fully valid, the return value will be false. | |||||
*/ | |||||
bool VerifySchnorr(const uint256 &hash, | |||||
const std::vector<uint8_t> &vchSig) const; | |||||
/** | |||||
* Check whether a DER-serialized ECDSA signature is normalized (lower-S). | * Check whether a DER-serialized ECDSA signature is normalized (lower-S). | ||||
*/ | */ | ||||
static bool | static bool | ||||
CheckLowS(const boost::sliced_range<const std::vector<uint8_t>> &vchSig); | CheckLowS(const boost::sliced_range<const std::vector<uint8_t>> &vchSig); | ||||
static bool CheckLowS(const std::vector<uint8_t> &vchSig) { | static bool CheckLowS(const std::vector<uint8_t> &vchSig) { | ||||
return CheckLowS(vchSig | boost::adaptors::sliced(0, vchSig.size())); | return CheckLowS(vchSig | boost::adaptors::sliced(0, vchSig.size())); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |