Skip to content

Commit

Permalink
always use fastsign option on btcec schnorr.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Dec 2, 2024
1 parent a546203 commit 6f778f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (evt Event) CheckSignature() (bool, error) {
}

// Sign signs an event with a given privateKey.
func (evt *Event) Sign(secretKey string, signOpts ...schnorr.SignOption) error {
func (evt *Event) Sign(secretKey string) error {
s, err := hex.DecodeString(secretKey)
if err != nil {
return fmt.Errorf("Sign called with invalid secret key '%s': %w", secretKey, err)
Expand All @@ -57,7 +57,7 @@ func (evt *Event) Sign(secretKey string, signOpts ...schnorr.SignOption) error {
evt.PubKey = hex.EncodeToString(pkBytes[1:])

h := sha256.Sum256(evt.Serialize())
sig, err := schnorr.Sign(sk, h[:], signOpts...)
sig, err := schnorr.Sign(sk, h[:], schnorr.FastSign())
if err != nil {
return err
}
Expand Down

0 comments on commit 6f778f8

Please sign in to comment.