Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing rogue reference #64

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.21
require (
github.com/cloudflare/circl v1.3.7
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
github.com/ethereum/go-ethereum v1.14.5
github.com/go-openapi/errors v0.20.4
github.com/go-openapi/runtime v0.26.0
github.com/go-openapi/strfmt v0.21.7
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=
github.com/ethereum/go-ethereum v1.14.5 h1:szuFzO1MhJmweXjoM5nSAeDvjNUH3vIQoMzzQnfvjpw=
github.com/ethereum/go-ethereum v1.14.5/go.mod h1:VEDGGhSxY7IEjn98hJRFXl/uFvpRgbIIf2PpXiyGGgc=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
Expand Down
7 changes: 3 additions & 4 deletions pkg/apikey/ecdsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"math/big"

dcrec "github.com/decred/dcrd/dcrec/secp256k1/v4"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -96,7 +95,7 @@ func DecodeTurnkeyPublicECDSAKey(encodedPublicKey string, scheme signatureScheme
curve = elliptic.P256()
x, y = elliptic.UnmarshalCompressed(curve, bytes)
case SchemeSECP256K1:
curve = secp256k1.S256()
curve = dcrec.S256()

pubkey, err := dcrec.ParsePubKey(bytes)
if err != nil {
Expand Down Expand Up @@ -125,7 +124,7 @@ func newECDSAKey(scheme signatureScheme) (*Key, error) {
case SchemeP256:
curve = elliptic.P256()
case SchemeSECP256K1:
curve = secp256k1.S256()
curve = dcrec.S256()
default:
// should be unreachable since scheme type is non-exported with discreet options
return nil, fmt.Errorf("invalid signature scheme type: %s", scheme)
Expand Down Expand Up @@ -161,7 +160,7 @@ func fromTurnkeyECDSAKey(encodedPrivateKey string, scheme signatureScheme) (*Key
case SchemeP256:
curve = elliptic.P256()
case SchemeSECP256K1:
curve = secp256k1.S256()
curve = dcrec.S256()
default:
// should be unreachable since scheme type is non-exported with discreet options
return nil, fmt.Errorf("invalid signature scheme type: %s", scheme)
Expand Down
Loading