aboutsummaryrefslogtreecommitdiff
path: root/src/pubkey.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2015-07-28 20:11:20 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2015-11-15 16:06:57 +0100
commit6e182686163ce3c15b878bd78c41d8d18db344f1 (patch)
treed4e0997b1459def528557d640a480937ffc207fd /src/pubkey.h
parentb632145edeb376b4d1597f192ca00634f7d2866c (diff)
Switch to libsecp256k1-based validation for ECDSA
Diffstat (limited to 'src/pubkey.h')
-rw-r--r--src/pubkey.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pubkey.h b/src/pubkey.h
index cce9c826e5..a1d437e706 100644
--- a/src/pubkey.h
+++ b/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