diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-02-18 16:24:12 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-02-18 16:24:12 +0800 |
commit | 9b0af513867fad4aeb3516e4711dd0ea4f5bc90c (patch) | |
tree | b37d808d57873c6aec550431534e26602dfd0475 /accounts/keystore | |
parent | bf21549faa7de6e2b920855468b14856c6f503c4 (diff) | |
download | go-tangerine-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar go-tangerine-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.gz go-tangerine-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.bz2 go-tangerine-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.lz go-tangerine-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.xz go-tangerine-9b0af513867fad4aeb3516e4711dd0ea4f5bc90c.tar.zst go-tangerine-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 'accounts/keystore')
-rw-r--r-- | accounts/keystore/key.go | 5 |
1 files changed, 2 insertions, 3 deletions
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 } |