Commit Graph

139 Commits

Author SHA1 Message Date
Felix Lange
6fdd0893c3 all: fix go vet warnings 2016-04-15 11:17:27 +02:00
Felix Lange
85e6c40c00 accounts, crypto: move keystore to package accounts
The account management API was originally implemented as a thin layer
around crypto.KeyStore, on the grounds that several kinds of key stores
would be implemented later on. It turns out that this won't happen so
KeyStore is a superflous abstraction.

In this commit crypto.KeyStore and everything related to it moves to
package accounts and is unexported.
2016-04-12 15:56:49 +02:00
Felix Lange
83877a0f9d tests: remove eth, node, accounts dependencies
Unlocking the accounts in the test doesn't help with anything.
2016-04-12 15:34:39 +02:00
Péter Szilágyi
45d08a8aa7 crypto: expose key encryption method, add ping-pong test 2016-02-24 16:28:25 +02:00
Péter Szilágyi
0969b35eec crypto: code polish + ensure key file contents match with name 2016-02-24 16:27:32 +02:00
Péter Szilágyi
cda91ee180 crypto: expose key decryption method to parse a string direclty 2016-02-24 16:27:32 +02:00
Ricardo Catalinas Jiménez
3d971c5a34 crypto: Remove dead code 2016-02-21 22:46:31 +00:00
Ricardo Catalinas Jiménez
0c6665558a crypto: Add backward compatible aliases for Sha3{,Hash}() 2016-02-21 22:46:31 +00:00
Ricardo Catalinas Jiménez
436fc8d76a all: Rename crypto.Sha3{,Hash}() to crypto.Keccak256{,Hash}()
As we aren't really using the standarized SHA-3
2016-02-21 22:34:34 +00:00
Ricardo Catalinas Jiménez
c20d6e5e4e crypto/sha3: Export Keccak-256 hash function
This hash function is slightly different from the standarized NIST SHA-3
as both of them use different domain separation bits.
2016-02-21 22:34:34 +00:00
Ricardo Catalinas Jiménez
5387ad760f crypto/sha3: Remove import path checking from vendored code 2016-02-21 22:34:34 +00:00
Ricardo Catalinas Jiménez
e4b138a593 crypto/sha3: Copy latest code from "golang.org/x/crypto/sha3"
Revision: 1f22c0103821b9390939b6776727195525381532
2016-02-21 22:34:34 +00:00
Ricardo Catalinas Jiménez
0a1da69fac crypto/sha3: Delete old copied code 2016-02-21 22:34:34 +00:00
Jeffrey Wilcke
f8d98f7fcd Merge pull request #2116 from obscuren/homestead
core, core/vm: consensus changes necessary for the homestead release
2016-02-19 14:41:57 +01:00
Gustav Simonsson
371871d685 parmas, crypto, core, core/vm: homestead consensus protocol changes
* change gas cost for contract creating txs
* invalidate signature with s value greater than secp256k1 N / 2
* OOG contract creation if not enough gas to store code
* new difficulty adjustment algorithm
* new DELEGATECALL op code
2016-02-18 10:08:11 +01:00
Felix Lange
fdb936ee95 crypto/ecies: make authenticated shared data work
The s2 parameter was not actually written to the MAC.
2016-02-12 09:49:18 +01:00
Jeffrey Wilcke
787d71d659 Merge pull request #2056 from fjl/fix-account-format
crypto: "Crypto" -> "crypto" in web3 key format
2015-12-10 10:45:00 +01:00
Felix Lange
032453b3e7 crypto: "Crypto" -> "crypto" in web3 key format 2015-12-07 17:01:29 +01:00
Felix Lange
02356b36d6 crypto/secp256k1: remove dependency on libgmp
Turns out we actually don't need it, USE_NUM_NONE works
because we also set USE_FIELD_INV_BUILTIN.
2015-12-03 21:12:13 +01:00
Gustav Simonsson
c8ad64f33c crypto, crypto/ecies, crypto/secp256k1: libsecp256k1 scalar mult
thanks to Felix Lange (fjl) for help with design & impl
2015-11-30 13:43:32 +01:00
Gustav Simonsson
27a50c8f4b core/secp256k1: update libsecp256k1 Go wrapper and tests 2015-11-30 13:24:04 +01:00
Felix Lange
e344e1d490 crypto/secp256k1: drop pkgsrc paths from CFLAGS
They cause compiler warnings for people who don't have these
directories. People with pkgsrc can add the directory through CGO_CFLAGS
instead.
2015-11-17 09:53:10 +01:00
Felix Lange
5159f8f649 crypto/secp256k1: raise internal errors as recoverable Go panic 2015-11-17 09:53:10 +01:00
Felix Lange
1b29aed128 crypto/secp256k1: verify recovery ID before calling libsecp256k1
The C library treats the recovery ID as trusted input and crashes
the process for invalid values, so it needs to be verified before
calling into C. This will inhibit the crash in #1983.

Also remove VerifySignature because we don't use it.
2015-11-17 09:51:59 +01:00
Felix Lange
16b0bc7c3b crypto/secp256k1: add C compiler flags for pkgsrc
pkgsrc is a cross-platform package manager that also
supports OS X.
2015-11-03 10:33:31 +01:00
Drake Burroughs
05ea8926c3 cmd/utils, crypto: add --lightkdf flag for lighter KDF 2015-10-28 18:46:39 +01:00
zelig
8b81ad1fc4 console:
* lines with leading space are ommitted from history
* exit processed even with whitespace around
* all whitespace lines (not only empty ones) are ignored

add 7 missing commands to admin api autocomplete

registrar: methods now return proper error if reg addresses are not set. fixes #1457

rpc/console: fix personal.newAccount() regression. Now all comms accept interactive password

registrar: add registrar tests for errors

crypto: catch AES decryption error on presale wallet import + fix error msg format. fixes #1580

CLI: improve error message when starting a second instance of geth. fixes #1564

cli/accounts: unlock multiple accounts. fixes #1785
* make unlocking multiple accounts work with inline <() fd
* passwdfile now correctly read only once
* improve logs
* fix CLI help text for unlocking

fix regression with docRoot / admin API
* docRoot/jspath passed to rpc/api ParseApis, which passes onto adminApi
* docRoot field for JS console in order to pass when RPC is (re)started
* improve flag desc for jspath

common/docserver: catch http errors from response

fix rpc/api tests

common/natspec: fix end to end test (skipped because takes 8s)

registrar: fix major regression:
* deploy registrars on frontier
* register HashsReg and UrlHint in GlobalRegistrar.
* set all 3 contract addresses in code
* zero out addresses first in tests
2015-10-22 00:22:39 +02:00
Jeffrey Wilcke
f466243417 Merge pull request #1853 from Gustav-Simonsson/libsecp256k1_update
Update libsecp256k1, Go wrapper and tests
2015-10-15 10:46:57 -07:00
Jeffrey Wilcke
2f1f2e4811 Merge pull request #1887 from Gustav-Simonsson/icap
common, crypto: add ICAP functions
2015-10-15 10:32:05 -07:00
Gustav Simonsson
2db9798646 common, crypto: add ICAP functions 2015-10-13 17:44:14 +02:00
Gustav Simonsson
f32fa075f1 core/secp256k1: update libsecp256k1 Go wrapper and tests 2015-10-09 14:47:55 +02:00
Gustav Simonsson
1d20b0247c Update libsecp256k1 2015-09-28 17:46:38 +02:00
Gustav Simonsson
3340b56593 crypto: correct sig validation, add more unit tests 2015-09-22 17:33:39 +02:00
Jeff R. Allen
0d40727775 Change go-uuid to use the current supported repository. 2015-09-12 16:49:24 +06:00
zelig
d4da2f630e crypto: remove obsolete key files 2015-08-18 01:25:04 +02:00
Pavol Rusnak
3f07afbbd2 remove elliptic.P224 usage
Fedora/RedHat distros comply with US patent law and remove this curve,
which makes it impossible to run ethereum with distro provided Golang.

File crypto/ecies/README claims it is unsupported anyway.
2015-07-30 12:47:45 +02:00
Fynn
7065ebd2ed FreeBSD support 2015-07-28 19:16:16 -03:00
Jeffrey Wilcke
1fad8798ec Merge pull request #1515 from fjl/license-fixes
all: fix license headers one more time
2015-07-28 04:29:42 -07:00
Felix Lange
453d2c9ce1 crypto: fix build with Go 1.5 2015-07-27 19:13:45 +02:00
Felix Lange
67598d9d08 crypto/sha3: add full license headers 2015-07-24 12:32:58 +02:00
Felix Lange
bfbcfbe4a9 all: fix license headers one more time
I forgot to update one instance of "go-ethereum" in commit 3f047be5a.
2015-07-23 18:35:11 +02:00
Felix Lange
3f047be5aa all: update license headers to distiguish GPL/LGPL
All code outside of cmd/ is licensed as LGPL. The headers
now reflect this by calling the whole work "the go-ethereum library".
2015-07-22 18:51:45 +02:00
Felix Lange
f4acdea402 crypto: fix license of curve.go
crypto/curve.go is not our code and has its own license. This commit
excludes it in update-license.go and removes our GPL header.
2015-07-22 18:50:31 +02:00
Felix Lange
06d5898d6a crypto: remove debug print call after decrypting a key from disk 2015-07-20 18:04:23 +02:00
zelig
589f1c85b9 : colon => dash - in keyfile name - slight deviation from ISO8601 for WIN FS compatibility 2015-07-09 13:55:09 +01:00
Felix Lange
4fb28e0dab all: goimports -w 2015-07-07 14:12:45 +02:00
Felix Lange
e813626ee1 all: remove @author comments 2015-07-07 14:12:44 +02:00
Felix Lange
ea54283b30 all: update license information 2015-07-07 14:12:44 +02:00
zelig
1959346793 account update: migrate or change password
* account.Update
* KeyStore.Cleanup
* fix dir rm for old format deleteKey
2015-07-03 07:52:37 +01:00
zelig
fc17a527bc fix account ordering
* chronological order of creation
* new naming scheme keystore/UTC--<created_at UTC ISO8601>-<address hex>
* KeyStore2 -> KeyStore
* backward compatibility
* refactor keyStore methods
2015-07-03 03:19:32 +01:00