aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
Diffstat (limited to 'p2p')
-rw-r--r--p2p/discover/node.go3
-rw-r--r--p2p/rlpx.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/p2p/discover/node.go b/p2p/discover/node.go
index 8d4af166b..a7d9ce736 100644
--- a/p2p/discover/node.go
+++ b/p2p/discover/node.go
@@ -25,7 +25,6 @@ import (
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/ethereum/go-ethereum/p2p/enode"
)
@@ -64,7 +63,7 @@ func (e encPubkey) id() enode.ID {
// recoverNodeKey computes the public key used to sign the
// given hash from the signature.
func recoverNodeKey(hash, sig []byte) (key encPubkey, err error) {
- pubkey, err := secp256k1.RecoverPubkey(hash, sig)
+ pubkey, err := crypto.Ecrecover(hash, sig)
if err != nil {
return key, err
}
diff --git a/p2p/rlpx.go b/p2p/rlpx.go
index 0697ef3b0..0636431f5 100644
--- a/p2p/rlpx.go
+++ b/p2p/rlpx.go
@@ -38,7 +38,6 @@ import (
"github.com/ethereum/go-ethereum/common/bitutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/ecies"
- "github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/ethereum/go-ethereum/rlp"
"github.com/golang/snappy"
"golang.org/x/crypto/sha3"
@@ -400,7 +399,7 @@ func (h *encHandshake) handleAuthMsg(msg *authMsgV4, prv *ecdsa.PrivateKey) erro
return err
}
signedMsg := xor(token, h.initNonce)
- remoteRandomPub, err := secp256k1.RecoverPubkey(signedMsg, msg.Signature[:])
+ remoteRandomPub, err := crypto.Ecrecover(signedMsg, msg.Signature[:])
if err != nil {
return err
}