aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2016-02-24 19:24:02 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-02-24 20:45:59 +0800
commit0c17be92fb95909b2b02a609b0399586d5f02fa5 (patch)
treef1b049b21fa3da797d1192833cab14d6b1534a15 /p2p
parentb5a0cf488c4336ded975ae13576748e721a2a1ab (diff)
downloadgo-tangerine-0c17be92fb95909b2b02a609b0399586d5f02fa5.tar
go-tangerine-0c17be92fb95909b2b02a609b0399586d5f02fa5.tar.gz
go-tangerine-0c17be92fb95909b2b02a609b0399586d5f02fa5.tar.bz2
go-tangerine-0c17be92fb95909b2b02a609b0399586d5f02fa5.tar.lz
go-tangerine-0c17be92fb95909b2b02a609b0399586d5f02fa5.tar.xz
go-tangerine-0c17be92fb95909b2b02a609b0399586d5f02fa5.tar.zst
go-tangerine-0c17be92fb95909b2b02a609b0399586d5f02fa5.zip
[release/1.3.4] p2p: backward fix for S256 curve
Diffstat (limited to 'p2p')
-rw-r--r--p2p/rlpx.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/p2p/rlpx.go b/p2p/rlpx.go
index 9d6cba5b6..533b98c67 100644
--- a/p2p/rlpx.go
+++ b/p2p/rlpx.go
@@ -311,7 +311,7 @@ func (h *encHandshake) makeAuthMsg(prv *ecdsa.PrivateKey, token []byte) (*authMs
return nil, err
}
// Generate random keypair to for ECDH.
- h.randomPrivKey, err = ecies.GenerateKey(rand.Reader, secp256k1.S256(), nil)
+ h.randomPrivKey, err = ecies.GenerateKey(rand.Reader, crypto.S256(), nil)
if err != nil {
return nil, err
}
@@ -389,7 +389,7 @@ func (h *encHandshake) handleAuthMsg(msg *authMsgV4, prv *ecdsa.PrivateKey) erro
// Generate random keypair for ECDH.
// If a private key is already set, use it instead of generating one (for testing).
if h.randomPrivKey == nil {
- h.randomPrivKey, err = ecies.GenerateKey(rand.Reader, secp256k1.S256(), nil)
+ h.randomPrivKey, err = ecies.GenerateKey(rand.Reader, crypto.S256(), nil)
if err != nil {
return err
}