mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-23 14:40:44 +01:00
Merge pull request #2018 from wydengyre/bip340-schnorr-verification
schnorr: bip-340 compliant verification
This commit is contained in:
commit
0bed86b3f0
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue