mirror of
https://github.com/btcsuite/btcd.git
synced 2025-01-19 05:33:36 +01:00
schnorr: bip-340 compliant signing
fixes https://github.com/btcsuite/btcd/issues/2021
This commit is contained in:
parent
0bed86b3f0
commit
1c0bc470e8
@ -174,10 +174,7 @@ func schnorrVerify(sig *Signature, hash []byte, pubKeyBytes []byte) error {
|
||||
)
|
||||
|
||||
var e btcec.ModNScalar
|
||||
if overflow := e.SetBytes((*[32]byte)(commitment)); overflow != 0 {
|
||||
str := "hash of (r || P || m) too big"
|
||||
return signatureError(ecdsa_schnorr.ErrSchnorrHashValue, str)
|
||||
}
|
||||
e.SetBytes((*[32]byte)(commitment))
|
||||
|
||||
// Negate e here so we can use AddNonConst below to subtract the s*G
|
||||
// point from e*P.
|
||||
|
Loading…
Reference in New Issue
Block a user