Gustav Simonsson
edbd902a1b
Initialise curve N value in package init
10 years ago
Gustav Simonsson
32e1b104f8
Add EC signature validations before call to libsecp256k1
10 years ago
Gustav Simonsson
e389585f1f
Change default keystore dir
10 years ago
Gustav Simonsson
2c1b0ff17e
Update key store to new spec but keep address field for now
...
* Also fix address types post-rebase
10 years ago
Gustav Simonsson
da9fe951da
Use common.Address type for accounts.Address
10 years ago
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
10 years ago
Gustav Simonsson
34c94d5fcd
Add loading of block test privkey if present
10 years ago
Felix Lange
4907d28967
crypto: update {Load,Save}ECDSA comments to mention hex encoding
10 years ago
Bas van Kervel
ef393da933
removed utility function and implemented hex conversation in crypto functions
10 years ago
Bas van Kervel
b3a3fdf9a4
Support for import/export hex encoded keys, closes #635
10 years ago
Gustav Simonsson
3f306f63d4
Forward and log EC recover err and remove dup pubkey len check
10 years ago
obscuren
61c5edcb57
Cleanup.
10 years ago
zelig
4ec38e3932
common: remove WriteFile and ReadAllFile (use ioutil instead)
10 years ago
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)
10 years ago
obscuren
515d9432fc
converted vm
10 years ago
Felix Lange
ad78db4d62
crypto: fix Sha3Hash and add a test for it
10 years ago
Felix Lange
64490897f3
crypto: add Sha3Hash
10 years ago
obscuren
b523441361
Moved ethutil => common
10 years ago
Felix Lange
119bea22aa
crypto: switch to golang.org/x/crypto
...
code.google.com/p/go.crypto is deprecated and will cause
problems in future versions of Go.
10 years ago
obscuren
84f7c966f7
Moved ECIES to repo & added secondary title for webview
...
* ECIES moved from obscuren to ethereum
* Added html META[name=badge] to reflect menuItem.secondaryTitle
10 years ago
Felix Lange
0c7df37351
crypto: add key loading functions
10 years ago
Felix Lange
410b35e913
crypto: make it easier to run Sha3 on multiple inputs
...
crypto.Sha3(append(foo, bar)) --> crypto.Sha3(foo, bar)
crypto.Sha3([]byte{}) --> crypto.Sha3()
10 years ago
obscuren
c48644490f
Fixed whisper pub key bug
...
* Unrecoverable messages would cause segfault when recovering invalid
pub key
10 years ago
Gustav Simonsson
8d9752a557
Address pull request comments
...
* Use crypto.Sign instead of directly calling secp256k1 lib
* Rename UserAccount to Account and Addr to Address (for consistency)
* Change AccountManager.Sign to take ptr to Account instead of
address byte array
* Simplify copying of Accounts in Accounts()
* PubkeyToAddress and GetEntropyCSPRNG now exported
10 years ago
Gustav Simonsson
512ffa2bf4
Add accounts package and refactor key stores
...
* Add initial UserAccount and AccountManager structs
* Add NewAccount, Sign and Accounts functions
* Refactor key stores to use key address as main identifier
while keeping the UUID.
* Use key address as file/dir names instead of UUID
10 years ago
obscuren
0dfe511370
Use curve params instead of hardcoded 32 bytes
10 years ago
obscuren
d4cc2d3503
Pad private key when signing & length check for hashes in sign
10 years ago
obscuren
67f9783e6a
Moved `obscuren` secp256k1-go
10 years ago
obscuren
6eaa404187
Moved sha3 from `obscuren`
10 years ago
Gustav Simonsson
8af42d42da
CamelCase aesCBCDecrypt
10 years ago
Gustav Simonsson
1f8290ca44
Add ImportPreSaleKey
...
* ImportPreSaleKey takes a KeyStore, a presale key JSON (e.g. file content)
and a password string. It stores the key in the given key store.
* Refactored common AES decryption and moved some functions to crypto.go
10 years ago
obscuren
06e76422b5
Added length checkes
10 years ago
obscuren
0f5c6c5e2d
Changed new methods to use ecdsa package for pub prv keys
10 years ago
obscuren
87adff7e18
Added Encrypt & Decrypt using the ECIES w/ tests
10 years ago
obscuren
fd9da72536
ethcrypto => crypto
10 years ago
obscuren
9d86a49a73
Renamed Sha3Bin to Sha3
10 years ago
obscuren
11ace54307
ECRECOVER RIPEMD160 SHA256
10 years ago
obscuren
8ef17c2fb1
fi crypto
10 years ago
obscuren
adabd71a4a
Changed back to FIPS 180
10 years ago
obscuren
627b7c9fd7
Updated to latest sha3 implementation. Fixes #48
10 years ago
obscuren
54715586ab
Changed sha3 to official one
10 years ago
obscuren
81bc721c5c
Fixed address generation
11 years ago
zelig
4be3521727
import math/big
11 years ago
zelig
e3b911652d
move CreateAddress from ethutil/common to ethcrypto
11 years ago
zelig
d085133c6d
move ethutil helper crypto functions to ethcrypto/crypto
11 years ago