Skip to content

Commit

Permalink
chg: restore sig check
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Sep 18, 2024
1 parent d367048 commit e405636
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crypto/secp256k1/secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,10 @@ func (pubKey PubKey) Type() string {
// VerifySignature verifies a signature of the form R || S || V.
// It rejects signatures which are not in lower-S form.
func (pubKey PubKey) VerifySignature(msg []byte, sigStr []byte) bool {
// HV2: this check is removed because the sigSize validation is performed in ethCrypto.VerifySignature
if len(sigStr) != SigSize {

/*
if len(sigStr) != SigSize {
return false
}
*/
return false
}

hash := ethCrypto.Keccak256(msg)
return ethCrypto.VerifySignature(pubKey, hash, sigStr[:64])
Expand Down

0 comments on commit e405636

Please sign in to comment.