Commit Graph

96 Commits

Author SHA1 Message Date
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
zelig a4df9d74ea accounts order by keyfile ctime 2015-07-02 23:29:07 +01:00
Gustav Simonsson d23ec6c419 Change keystore to version 3
* Change password protection crypto in keystore to version 3
* Update KeyStoreTests/basic_tests.json
* Add support for PBKDF2 with HMAC-SHA256
* Change MAC and encryption key to avoid unnecessary hashing
* Add tests for test vectors in new wiki page defining version 3
* Add tests for new keystore tests in ethereum/tests repo
* Move JSON loading util to common for use in both tests and
  crypto packages
* Add backwards compatibility with key store version 1
2015-06-24 06:03:23 +02:00
obscuren 0f51ee6c88 crypto: return common.Address rather than raw bytes 2015-06-04 19:28:39 +02:00
Jeffrey Wilcke 02f785af70 Merge pull request #1166 from Gustav-Simonsson/add_ec_sig_validations
Add EC signature validations before call to libsecp256k1
2015-06-03 08:11:24 -07:00
Gustav Simonsson edbd902a1b Initialise curve N value in package init 2015-06-03 14:44:29 +02:00
Péter Szilágyi 14e7192d9c crypto/sha3: pull in latest keccak from go crypto (45% speed increase) 2015-06-03 12:00:39 +03:00
Gustav Simonsson 32e1b104f8 Add EC signature validations before call to libsecp256k1 2015-06-01 21:06:52 +02:00
Gustav Simonsson 56a5592ea0 Update keystore code comments 2015-05-13 18:33:31 +02:00
Gustav Simonsson e389585f1f Change default keystore dir 2015-05-12 18:33:04 +02:00
Gustav Simonsson 2c1b0ff17e Update key store to new spec but keep address field for now
* Also fix address types post-rebase
2015-05-12 17:22:17 +02:00
Gustav Simonsson f98e002d98 Address pull request comments; key header and hex encoding
* Remove key header from unencrypted key file format and replace
  it with a version field
* Change encoding of bytes in key files from base64 to hex
2015-05-12 17:22:17 +02:00
Gustav Simonsson 313eec33ad Revert "Add key header to unencrypted key file"
This reverts commit a94d4ba0b53c4558ab838aaed635a2ff66ddfa53.
2015-05-12 17:19:39 +02:00
Gustav Simonsson cd88295f5a Add key header to unencrypted key file 2015-05-12 17:19:39 +02:00
Gustav Simonsson 29a5a92d13 Add key header to encrypted keys
* Add key header containing key version, kdf and kdf params
* Store key header as JSON in the key file
* Read in KDF params from key header
* Include key header in MAC calculation and MAC verification
2015-05-12 17:19:39 +02:00
Gustav Simonsson da9fe951da Use common.Address type for accounts.Address 2015-05-12 17:19:39 +02:00
Gustav Simonsson 6b23094cff Improve key store passphrase crypto
* Change MAC-then-Encrypt to Encrypt-then-MAC
* Change AES256 to AES128
* Use first 16 bytes of KDF derived key for AES and
  remaining 16 for MAC
2015-05-12 17:18:30 +02:00
Gustav Simonsson 9918b6c84e Remove the awesome, ever misunderstood entropy mixing 2015-05-12 17:18:30 +02:00
Bas van Kervel b79dd188d9 replaced several path.* with filepath.* which is platform independent 2015-05-12 14:24:11 +02:00
Gustav Simonsson 34c94d5fcd Add loading of block test privkey if present 2015-04-27 20:30:26 +02:00
Gustav Simonsson b0bf12ec87 Remove unneeded allocation 2015-04-24 19:40:28 +02:00
Gustav Simonsson 4d1887093d Use make instead of new for allocation 2015-04-24 17:41:38 +02:00
Gustav Simonsson 9d2a156453 Fix ignore of unexpected files in key dir 2015-04-23 05:52:41 +02:00
Noel Maersk 958c04e79a doc: crypto/secp256k1 GMP dependency package name.
Linux build documentation is mostly geared towards Ubuntu 14.04 (LTS).
Appropriate package is called `libgmp-dev` there.

Note that on pristine installations building `geth` with godep will
fail because this header is missing. This is not documented in the
top-level README, but is on the wiki:

https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu#building-geth-command-line-client

That page recommends `libgmp3-dev`, which ATM provides same version
as `libgmp-dev`.
2015-04-23 17:33:48 +03:00
Maran 04e216319e Adding flags to facilitate cross compiling to ARM 2015-04-22 17:04:46 +02:00
Felix Lange 4907d28967 crypto: update {Load,Save}ECDSA comments to mention hex encoding 2015-04-19 01:33:00 +02:00
Bas van Kervel ef393da933 removed utility function and implemented hex conversation in crypto functions 2015-04-09 10:59:37 +02:00
Bas van Kervel b3a3fdf9a4 Support for import/export hex encoded keys, closes #635 2015-04-08 23:03:47 +02:00
Gustav Simonsson aa4ff52d84 Add IsOnCurve check to EC unmarshalling in ECIES decryption 2015-04-07 23:50:04 +02:00
Jeffrey Wilcke 758205b187 Merge pull request #648 from Gustav-Simonsson/forward_ecrecover_err_and_remove_dup_checks
Forward and log EC recover err and remove dup pubkey len check
2015-04-07 20:48:56 +02:00
Gustav Simonsson 941f051358 libsecp256k1 #define NDEBUG 2015-04-07 18:09:58 +02:00
obscuren 50bbdfe582 Link GMP 2015-04-07 15:20:24 +02:00
Gustav Simonsson 3f306f63d4 Forward and log EC recover err and remove dup pubkey len check 2015-04-07 12:48:19 +02:00
Gustav Simonsson d9b37b6da7 Update Go wrapper around libbsecp256k1 2015-04-07 12:40:31 +02:00
Gustav Simonsson f4d4f1ccb2 Update bitcoin secp256k1 lib 2015-04-07 12:14:05 +02:00
obscuren 61c5edcb57 Cleanup. 2015-03-29 15:02:49 +02:00
zelig 4ec38e3932 common: remove WriteFile and ReadAllFile (use ioutil instead) 2015-03-26 19:00:18 +00:00
zelig c4ea921876 import/export accounts
- cli: add passwordfile flag
- cli: change unlock flag only takes account
- cli: with unlock you are prompted for password or use passfile with password flag
- cli: unlockAccount used in normal client start (run) and accountExport
- cli: getPassword used in accountCreate and accountImport
- accounts: Manager.Import, Manager.Export
- crypto: SaveECDSA (to complement LoadECDSA) to save to file
- crypto: NewKeyFromECDSA added (used in accountImport and New = generated constructor)
2015-03-26 19:00:18 +00:00
Felix Lange c388e7eac0 crypto: remove use of common.Value.Encode
This seems to be the last remaining use of it.
2015-03-20 14:00:26 +01:00
Felix Lange ee7202fa00 Merge remote-tracking branch 'ethereum/conversion' into conversion 2015-03-17 12:01:40 +01:00
obscuren 515d9432fc converted vm 2015-03-17 11:19:23 +01:00
Felix Lange ad78db4d62 crypto: fix Sha3Hash and add a test for it 2015-03-17 01:32:35 +01:00
Felix Lange 64490897f3 crypto: add Sha3Hash 2015-03-16 17:27:24 +01:00
obscuren b523441361 Moved ethutil => common 2015-03-16 11:27:38 +01:00