Skip to content

Commit

Permalink
chg: comment on SigSize check deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 committed Sep 17, 2024
1 parent 68c241d commit d367048
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crypto/secp256k1/secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,13 @@ 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 {
//if len(sigStr) != SigSize {
// return false
//}
// HV2: this check is removed because the sigSize validation is performed in ethCrypto.VerifySignature

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

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

0 comments on commit d367048

Please sign in to comment.