crypto: don't use btcec directly

This commit is contained in:
Marius van der Wijden 2024-03-15 12:34:15 +01:00
parent b3e47410c9
commit 77662bae2c

View file

@ -73,7 +73,7 @@ func Sign(hash []byte, prv *ecdsa.PrivateKey) ([]byte, error) {
if len(hash) != 32 { if len(hash) != 32 {
return nil, fmt.Errorf("hash is required to be exactly 32 bytes (%d)", len(hash)) return nil, fmt.Errorf("hash is required to be exactly 32 bytes (%d)", len(hash))
} }
if prv.Curve != btcec.S256() { if prv.Curve != S256() {
return nil, errors.New("private key curve is not secp256k1") return nil, errors.New("private key curve is not secp256k1")
} }
// ecdsa.PrivateKey -> btcec.PrivateKey // ecdsa.PrivateKey -> btcec.PrivateKey