mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
crypto: simplify check
This commit is contained in:
parent
df04f9e470
commit
b6be57f421
1 changed files with 2 additions and 1 deletions
|
|
@ -87,7 +87,8 @@ func VerifySignature(pubkey, hash, signature []byte) bool {
|
|||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if !ValidateSignatureValues(0, sig.R, sig.S, true) {
|
||||
// Reject malleable signatures. libsecp256k1 does this check but btcec doesn't.
|
||||
if s.Cmp(secp256k1_halfN) > 0 {
|
||||
return false
|
||||
}
|
||||
return sig.Verify(hash, key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue