Skip to content

Commit

Permalink
schnorr: bip-340 compliant verification
Browse files Browse the repository at this point in the history
  • Loading branch information
wydengyre committed Aug 12, 2023
1 parent 0aaa7c5 commit ab9338d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions btcec/schnorr/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ func ParseSignature(sig []byte) (*Signature, error) {
return nil, signatureError(ecdsa_schnorr.ErrSigRTooBig, str)
}
var s btcec.ModNScalar
if overflow := s.SetByteSlice(sig[32:64]); overflow {
str := "invalid signature: s >= group order"
return nil, signatureError(ecdsa_schnorr.ErrSigSTooBig, str)
}
s.SetByteSlice(sig[32:64])

// Return the signature.
return NewSignature(&r, &s), nil
Expand Down

0 comments on commit ab9338d

Please sign in to comment.