Switch to libsecp256k1-based validation for ECDSA
This commit is contained in:
committed by
Jack Grigg
parent
c1afe40a17
commit
3d02d0f63a
16
src/pubkey.h
16
src/pubkey.h
@@ -177,6 +177,11 @@ public:
|
||||
*/
|
||||
bool Verify(const uint256& hash, const std::vector<unsigned char>& vchSig) const;
|
||||
|
||||
/**
|
||||
* Check whether a signature is normalized (lower-S).
|
||||
*/
|
||||
static bool CheckLowS(const std::vector<unsigned char>& vchSig);
|
||||
|
||||
//! Recover a public key from a compact signature.
|
||||
bool RecoverCompact(const uint256& hash, const std::vector<unsigned char>& vchSig);
|
||||
|
||||
@@ -205,4 +210,15 @@ struct CExtPubKey {
|
||||
bool Derive(CExtPubKey& out, unsigned int nChild) const;
|
||||
};
|
||||
|
||||
/** Users of this module must hold an ECCVerifyHandle. The constructor and
|
||||
* destructor of these are not allowed to run in parallel, though. */
|
||||
class ECCVerifyHandle
|
||||
{
|
||||
static int refcount;
|
||||
|
||||
public:
|
||||
ECCVerifyHandle();
|
||||
~ECCVerifyHandle();
|
||||
};
|
||||
|
||||
#endif // BITCOIN_PUBKEY_H
|
||||
|
||||
Reference in New Issue
Block a user