From 9b0af513867fad4aeb3516e4711dd0ea4f5bc90c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Sat, 18 Feb 2017 09:24:12 +0100 Subject: 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 --- accounts/keystore/key.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'accounts') diff --git a/accounts/keystore/key.go b/accounts/keystore/key.go index e2bdf09fe..292b47b44 100644 --- a/accounts/keystore/key.go +++ b/accounts/keystore/key.go @@ -32,7 +32,6 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/pborman/uuid" ) @@ -157,7 +156,7 @@ func NewKeyForDirectICAP(rand io.Reader) *Key { panic("key generation: could not read from random source: " + err.Error()) } reader := bytes.NewReader(randBytes) - privateKeyECDSA, err := ecdsa.GenerateKey(secp256k1.S256(), reader) + privateKeyECDSA, err := ecdsa.GenerateKey(crypto.S256(), reader) if err != nil { panic("key generation: ecdsa.GenerateKey failed: " + err.Error()) } @@ -169,7 +168,7 @@ func NewKeyForDirectICAP(rand io.Reader) *Key { } func newKey(rand io.Reader) (*Key, error) { - privateKeyECDSA, err := ecdsa.GenerateKey(secp256k1.S256(), rand) + privateKeyECDSA, err := ecdsa.GenerateKey(crypto.S256(), rand) if err != nil { return nil, err } -- cgit