Signature verification does malleability check.
BitCoin requires canonical signature, but we doesn't. So, we will not
use this verify function, so let it work as expected.
Previous patch was for detecting reason for failure. And It's found
that all failure comes from malleability check.
@@ -139,17 +139,6 @@ func (sig *Signature) Verify(msg []byte, pubKey *PublicKey) bool {
return false
}
ret := secp256k1.VerifySignature(msg, s, pubKey.bytes)
- // TODO disable malleability check?
- // if ret == 0 {
- // // TODO why?
- // if (s[32] >> 7) == 1 {
- // log.Println("VALID SIG but fails malleability")
- // }
- // // TODO why?
- // if s[64] >= 4 {
- // log.Println("RECOVER BYTE INVALID")
- // }
- // }
return ret != 0
}
