boost: moveonly: create eccryptoverify.h|cpp and move helper functions there

Eventually (after 0.10) these files will hold the logic for crypto
verification routines, and CKey/CPubKey will call into them.
This commit is contained in:
Cory Fields
2014-10-21 16:05:51 -04:00
parent 8d2396c9c4
commit 900078aeb4
5 changed files with 88 additions and 52 deletions

View File

@@ -9,6 +9,7 @@
#include "crypto/ripemd160.h"
#include "crypto/sha1.h"
#include "crypto/sha2.h"
#include "eccryptoverify.h"
#include "key.h"
#include "script/script.h"
#include "uint256.h"
@@ -122,7 +123,7 @@ bool static IsLowDERSignature(const valtype &vchSig) {
// If the S value is above the order of the curve divided by two, its
// complement modulo the order could have been used instead, which is
// one byte shorter when encoded correctly.
if (!CKey::CheckSignatureElement(S, nLenS, true))
if (!eccrypto::CheckSignatureElement(S, nLenS, true))
return error("Non-canonical signature: S value is unnecessarily high");
return true;