aboutsummaryrefslogtreecommitdiff
path: root/src/key.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2014-02-07 02:19:48 +0100
committerPieter Wuille <sipa@ulyssis.org>2014-03-10 20:38:32 +0100
commit6fd7ef2bbf1f941c8dee302ffdeb44e603148723 (patch)
tree76cebc090b484368a68781cb393b1e1be7ad1717 /src/key.h
parenta63f8b7b36e39722024a0ba061ca214f00a8f1bd (diff)
Also switch the (unused) verification code to low-s instead of even-s.
a81cd968 introduced a malleability breaker for signatures (using an even value for S). In e0e14e43 this was changed to the lower of two potential values, rather than the even one. Only the signing code was changed though, the (for now unused) verification code wasn't adapted.
Diffstat (limited to 'src/key.h')
-rw-r--r--src/key.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/key.h b/src/key.h
index cf1165d3d0..37a06810b4 100644
--- a/src/key.h
+++ b/src/key.h
@@ -269,6 +269,9 @@ public:
// Load private key and check that public key matches.
bool Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck);
+
+ // Check whether an element of a signature (r or s) is valid.
+ static bool CheckSignatureElement(const unsigned char *vch, int len, bool half);
};
struct CExtPubKey {