2018-08-30 19:57:27 +02:00
|
|
|
## ethkey-cli
|
2016-06-20 00:10:34 +02:00
|
|
|
|
2018-08-30 19:57:27 +02:00
|
|
|
Parity Ethereum keys generator.
|
2016-06-20 00:10:34 +02:00
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
```
|
2018-08-30 19:57:27 +02:00
|
|
|
Parity Ethereum keys generator.
|
|
|
|
Copyright 2015-2018 Parity Technologies (UK) Ltd.
|
2016-06-20 00:10:34 +02:00
|
|
|
|
|
|
|
Usage:
|
2017-12-01 09:40:07 +01:00
|
|
|
ethkey info <secret-or-phrase> [options]
|
2016-06-20 00:10:34 +02:00
|
|
|
ethkey generate random [options]
|
2017-12-01 09:40:07 +01:00
|
|
|
ethkey generate prefix <prefix> [options]
|
2016-06-20 00:10:34 +02:00
|
|
|
ethkey sign <secret> <message>
|
2016-06-20 10:02:02 +02:00
|
|
|
ethkey verify public <public> <signature> <message>
|
|
|
|
ethkey verify address <address> <signature> <message>
|
2017-12-01 09:40:07 +01:00
|
|
|
ethkey recover <address> <known-phrase>
|
2016-06-20 00:10:34 +02:00
|
|
|
ethkey [-h | --help]
|
|
|
|
|
|
|
|
Options:
|
|
|
|
-h, --help Display this message and exit.
|
2018-08-30 19:57:27 +02:00
|
|
|
-s, --secret Display only the secret key.
|
|
|
|
-p, --public Display only the public key.
|
2016-06-20 00:10:34 +02:00
|
|
|
-a, --address Display only the address.
|
2018-08-30 19:57:27 +02:00
|
|
|
-b, --brain Use parity brain wallet algorithm. Not recommended.
|
2016-06-20 00:10:34 +02:00
|
|
|
|
|
|
|
Commands:
|
2018-08-30 19:57:27 +02:00
|
|
|
info Display public key and address of the secret.
|
|
|
|
generate random Generates new random Ethereum key.
|
|
|
|
generate prefix Random generation, but address must start with a prefix ("vanity address").
|
|
|
|
sign Sign message using a secret key.
|
|
|
|
verify Verify signer of the signature by public key or address.
|
2017-12-01 09:40:07 +01:00
|
|
|
recover Try to find brain phrase matching given address from partial phrase.
|
2016-06-20 00:10:34 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Examples
|
|
|
|
|
|
|
|
#### `info <secret>`
|
|
|
|
*Display info about private key.*
|
|
|
|
|
|
|
|
- `<secret>` - ethereum secret, 32 bytes long
|
|
|
|
|
|
|
|
```
|
|
|
|
ethkey info 17d08f5fe8c77af811caa0c9a187e668ce3b74a99acc3f6d976f075fa8e0be55
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
secret: 17d08f5fe8c77af811caa0c9a187e668ce3b74a99acc3f6d976f075fa8e0be55
|
|
|
|
public: 689268c0ff57a20cd299fa60d3fb374862aff565b20b5f1767906a99e6e09f3ff04ca2b2a5cd22f62941db103c0356df1a8ed20ce322cab2483db67685afd124
|
|
|
|
address: 26d1ec50b4e62c1d1a40d16e7cacc6a6580757d5
|
|
|
|
```
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
2017-12-01 09:40:07 +01:00
|
|
|
#### `info --brain <phrase>`
|
|
|
|
*Display info about private key generate from brain wallet recovery phrase.*
|
2016-06-20 00:10:34 +02:00
|
|
|
|
2017-12-01 09:40:07 +01:00
|
|
|
- `<phrase>` - Parity recovery phrase, 12 words
|
2016-06-20 00:10:34 +02:00
|
|
|
|
|
|
|
```
|
2017-12-01 09:40:07 +01:00
|
|
|
ethkey info --brain "this is sparta"
|
2016-06-20 00:10:34 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
2017-12-01 09:40:07 +01:00
|
|
|
The recover phrase was not generated by Parity: The word 'this' does not come from the dictionary.
|
|
|
|
|
|
|
|
secret: aa22b54c0cb43ee30a014afe5ef3664b1cde299feabca46cd3167a85a57c39f2
|
|
|
|
public: c4c5398da6843632c123f543d714d2d2277716c11ff612b2a2f23c6bda4d6f0327c31cd58c55a9572c3cc141dade0c32747a13b7ef34c241b26c84adbb28fcf4
|
|
|
|
address: 006e27b6a72e1f34c626762f3c4761547aff1421
|
2016-06-20 00:10:34 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
#### `generate random`
|
|
|
|
*Generate new keypair randomly.*
|
|
|
|
|
|
|
|
```
|
|
|
|
ethkey generate random
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
secret: 7d29fab185a33e2cd955812397354c472d2b84615b645aa135ff539f6b0d70d5
|
|
|
|
public: 35f222d88b80151857a2877826d940104887376a94c1cbd2c8c7c192eb701df88a18a4ecb8b05b1466c5b3706042027b5e079fe3a3683e66d822b0e047aa3418
|
|
|
|
address: a8fa5dd30a87bb9e3288d604eb74949c515ab66e
|
|
|
|
```
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2017-12-01 09:40:07 +01:00
|
|
|
#### `generate random --brain`
|
|
|
|
*Generate new keypair with recovery phrase randomly.*
|
|
|
|
|
|
|
|
```
|
|
|
|
ethkey generate random --brain
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
recovery phrase: thwarting scandal creamer nuzzle asparagus blast crouch trusting anytime elixir frenzied octagon
|
|
|
|
secret: 001ce488d50d2f7579dc190c4655f32918d505cee3de63bddc7101bc91c0c2f0
|
|
|
|
public: 4e19a5fdae82596e1485c69b687c9cc52b5078e5b0668ef3ce8543cd90e712cb00df822489bc1f1dcb3623538a54476c7b3def44e1a51dc174e86448b63f42d0
|
|
|
|
address: 00cf3711cbd3a1512570639280758118ba0b2bcb
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
#### `generate prefix <prefix>`
|
2016-06-20 00:10:34 +02:00
|
|
|
*Generate new keypair randomly with address starting with prefix.*
|
|
|
|
|
|
|
|
- `<prefix>` - desired address prefix, 0 - 32 bytes long.
|
|
|
|
|
|
|
|
```
|
2017-12-01 09:40:07 +01:00
|
|
|
ethkey generate prefix ff
|
2016-06-20 00:10:34 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
secret: 2075b1d9c124ea673de7273758ed6de14802a9da8a73ceb74533d7c312ff6acd
|
|
|
|
public: 48dbce4508566a05509980a5dd1335599fcdac6f9858ba67018cecb9f09b8c4066dc4c18ae2722112fd4d9ac36d626793fffffb26071dfeb0c2300df994bd173
|
|
|
|
address: fff7e25dff2aa60f61f9d98130c8646a01f31649
|
|
|
|
```
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2017-12-01 09:40:07 +01:00
|
|
|
#### `generate prefix --brain <prefix>`
|
|
|
|
*Generate new keypair with recovery phrase randomly with address starting with prefix.*
|
|
|
|
|
|
|
|
- `<prefix>` - desired address prefix, 0 - 32 bytes long.
|
|
|
|
|
|
|
|
```
|
|
|
|
ethkey generate prefix --brain 00cf
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
recovery phrase: thwarting scandal creamer nuzzle asparagus blast crouch trusting anytime elixir frenzied octagon
|
|
|
|
secret: 001ce488d50d2f7579dc190c4655f32918d505cee3de63bddc7101bc91c0c2f0
|
|
|
|
public: 4e19a5fdae82596e1485c69b687c9cc52b5078e5b0668ef3ce8543cd90e712cb00df822489bc1f1dcb3623538a54476c7b3def44e1a51dc174e86448b63f42d0
|
|
|
|
address: 00cf3711cbd3a1512570639280758118ba0b2bcb
|
|
|
|
```
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2016-06-20 00:10:34 +02:00
|
|
|
#### `sign <secret> <message>`
|
|
|
|
*Sign a message with a secret.*
|
|
|
|
|
|
|
|
- `<secret>` - ethereum secret, 32 bytes long
|
|
|
|
- `<message>` - message to sign, 32 bytes long
|
|
|
|
|
|
|
|
```
|
|
|
|
ethkey sign 17d08f5fe8c77af811caa0c9a187e668ce3b74a99acc3f6d976f075fa8e0be55 bd50b7370c3f96733b31744c6c45079e7ae6c8d299613246d28ebcef507ec987
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
c1878cf60417151c766a712653d26ef350c8c75393458b7a9be715f053215af63dfd3b02c2ae65a8677917a8efa3172acb71cb90196e42106953ea0363c5aaf200
|
|
|
|
```
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2016-06-20 10:02:02 +02:00
|
|
|
#### `verify public <public> <signature> <message>`
|
2016-06-20 00:10:34 +02:00
|
|
|
*Verify the signature.*
|
|
|
|
|
2016-06-20 10:02:02 +02:00
|
|
|
- `<public>` - ethereum public, 64 bytes long
|
2016-06-20 00:10:34 +02:00
|
|
|
- `<signature>` - message signature, 65 bytes long
|
|
|
|
- `<message>` - message, 32 bytes long
|
|
|
|
|
|
|
|
```
|
2016-06-20 10:02:02 +02:00
|
|
|
ethkey verify public 689268c0ff57a20cd299fa60d3fb374862aff565b20b5f1767906a99e6e09f3ff04ca2b2a5cd22f62941db103c0356df1a8ed20ce322cab2483db67685afd124 c1878cf60417151c766a712653d26ef350c8c75393458b7a9be715f053215af63dfd3b02c2ae65a8677917a8efa3172acb71cb90196e42106953ea0363c5aaf200 bd50b7370c3f96733b31744c6c45079e7ae6c8d299613246d28ebcef507ec987
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
true
|
|
|
|
```
|
|
|
|
|
|
|
|
--
|
|
|
|
|
|
|
|
#### `verify address <address> <signature> <message>`
|
|
|
|
*Verify the signature.*
|
|
|
|
|
|
|
|
- `<address>` - ethereum address, 20 bytes long
|
|
|
|
- `<signature>` - message signature, 65 bytes long
|
|
|
|
- `<message>` - message, 32 bytes long
|
|
|
|
|
|
|
|
```
|
|
|
|
ethkey verify address 689268c0ff57a20cd299fa60d3fb374862aff565b20b5f1767906a99e6e09f3ff04ca2b2a5cd22f62941db103c0356df1a8ed20ce322cab2483db67685afd124 c1878cf60417151c766a712653d26ef350c8c75393458b7a9be715f053215af63dfd3b02c2ae65a8677917a8efa3172acb71cb90196e42106953ea0363c5aaf200 bd50b7370c3f96733b31744c6c45079e7ae6c8d299613246d28ebcef507ec987
|
2016-06-20 00:10:34 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
true
|
|
|
|
```
|
|
|
|
|
2017-12-01 09:40:07 +01:00
|
|
|
--
|
|
|
|
|
|
|
|
#### `recover <address> <known-phrase>`
|
|
|
|
*Try to recover an account given expected address and partial (too short or with invalid words) recovery phrase.*
|
|
|
|
|
|
|
|
- `<address>` - ethereum address, 20 bytes long
|
|
|
|
- `<known-phrase>` - known phrase, can be in a form of `thwarting * creamer`
|
|
|
|
|
|
|
|
```
|
|
|
|
RUST_LOG="info" ethkey recover "00cf3711cbd3a1512570639280758118ba0b2bcb" "thwarting scandal creamer nuzzle asparagus blast crouch trusting anytime elixir frenzied octag"
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
INFO:ethkey::brain_recover: Invalid word 'octag', looking for potential substitutions.
|
|
|
|
INFO:ethkey::brain_recover: Closest words: ["ocean", "octagon", "octane", "outage", "tag", "acting", "acts", "aorta", "cage", "chug"]
|
|
|
|
INFO:ethkey::brain_recover: Starting to test 7776 possible combinations.
|
|
|
|
|
|
|
|
thwarting scandal creamer nuzzle asparagus blast crouch trusting anytime elixir frenzied octagon
|
|
|
|
secret: 001ce488d50d2f7579dc190c4655f32918d505cee3de63bddc7101bc91c0c2f0
|
|
|
|
public: 4e19a5fdae82596e1485c69b687c9cc52b5078e5b0668ef3ce8543cd90e712cb00df822489bc1f1dcb3623538a54476c7b3def44e1a51dc174e86448b63f42d0
|
|
|
|
address: 00cf3711cbd3a1512570639280758118ba0b2bcb
|
|
|
|
```
|
|
|
|
|
2018-08-30 19:57:27 +02:00
|
|
|
## Parity Ethereum toolchain
|
|
|
|
_This project is a part of the Parity Ethereum toolchain._
|
2016-06-20 00:10:34 +02:00
|
|
|
|
2018-08-30 19:57:27 +02:00
|
|
|
- [evmbin](https://github.com/paritytech/parity-ethereum/blob/master/evmbin/) - EVM implementation for Parity Ethereum.
|
|
|
|
- [ethabi](https://github.com/paritytech/ethabi) - Parity Ethereum function calls encoding.
|
|
|
|
- [ethstore](https://github.com/paritytech/parity-ethereum/blob/master/ethstore/) - Parity Ethereum key management.
|
|
|
|
- [ethkey](https://github.com/paritytech/parity-ethereum/blob/master/ethkey/) - Parity Ethereum keys generator.
|
|
|
|
- [whisper](https://github.com/paritytech/parity-ethereum/blob/master/whisper/) - Implementation of Whisper-v2 PoC.
|