aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ecies/asn1.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2017-02-18 16:24:12 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2017-02-18 16:24:12 +0800
commit9b0af513867fad4aeb3516e4711dd0ea4f5bc90c (patch)
treeb37d808d57873c6aec550431534e26602dfd0475 /crypto/ecies/asn1.go
parentbf21549faa7de6e2b920855468b14856c6f503c4 (diff)
downloaddexon-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar
dexon-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.gz
dexon-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.bz2
dexon-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.lz
dexon-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.xz
dexon-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.zst
dexon-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.zip
crypto: add btcec fallback for sign/recover without cgo (#3680)
* vendor: add github.com/btcsuite/btcd/btcec * crypto: add btcec fallback for sign/recover without cgo This commit adds a non-cgo fallback implementation of secp256k1 operations. * crypto, core/vm: remove wrappers for sha256, ripemd160
Diffstat (limited to 'crypto/ecies/asn1.go')
-rw-r--r--crypto/ecies/asn1.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ecies/asn1.go b/crypto/ecies/asn1.go
index 508a645cd..d3e77d849 100644
--- a/crypto/ecies/asn1.go
+++ b/crypto/ecies/asn1.go
@@ -42,7 +42,7 @@ import (
"hash"
"math/big"
- "github.com/ethereum/go-ethereum/crypto/secp256k1"
+ ethcrypto "github.com/ethereum/go-ethereum/crypto"
)
var (
@@ -120,7 +120,7 @@ func (curve secgNamedCurve) Equal(curve2 secgNamedCurve) bool {
func namedCurveFromOID(curve secgNamedCurve) elliptic.Curve {
switch {
case curve.Equal(secgNamedCurveS256):
- return secp256k1.S256()
+ return ethcrypto.S256()
case curve.Equal(secgNamedCurveP256):
return elliptic.P256()
case curve.Equal(secgNamedCurveP384):
@@ -139,7 +139,7 @@ func oidFromNamedCurve(curve elliptic.Curve) (secgNamedCurve, bool) {
return secgNamedCurveP384, true
case elliptic.P521():
return secgNamedCurveP521, true
- case secp256k1.S256():
+ case ethcrypto.S256():
return secgNamedCurveS256, true
}