Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Assorted improvements for ethstore and ethkey #6961

Merged
merged 21 commits into from
Dec 1, 2017
Merged

Conversation

tomusdrw
Copy link
Collaborator

@tomusdrw tomusdrw commented Nov 1, 2017

  • Brute forcing presale wallet given a password list (ethstore)
  • Multi-threaded generation of prefix-matching addresses (ethkey)
  • Prefix-matching brain wallets (ethkey)
  • Brain wallets recovery phrases lookup (ethkey) - helps to find a correct phrase if you know the address you want to get yet you made a typo backing the phrase up (or forgot a word)

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Nov 1, 2017
@5chdn 5chdn added this to the 1.9 milestone Nov 1, 2017
@5chdn
Copy link
Contributor

5chdn commented Nov 1, 2017

Does this need docs?

@5chdn 5chdn added the B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. label Nov 1, 2017
@tomusdrw
Copy link
Collaborator Author

tomusdrw commented Nov 1, 2017

There are some (very undetailed) docs in the --help, I can add more if you want. Do we have a wiki page for these stuff too?

@5chdn
Copy link
Contributor

5chdn commented Nov 1, 2017

No, only the READMEs afaik

@DaleChristopher
Copy link

DaleChristopher commented Nov 2, 2017

GREAT!!!! but I'd very much appreciate some kind of instructions geared towards helping the end user/ non-programmer attempting to use this. It might seem straightforward to you guys but I have had zero training in coding and have been trying to figure out what i need to even run it for the last hours... >_<
I'm sure I will figure it out eventually but I'm teaching myself a new skill here with no prior experience. Some kind of basic step by step would be really helpful. @tomusdrw great work btw! cant wait to test it out!
trying to figure out how to "compile" something atm

.map(|word| match known_words.get(word) {
None => {
info!("Invalid word '{}', looking for potential substitutions.", word);
let substitutions = generate_substitutions(word);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if I defined words myself?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we can't help you. This recovery process is targeted at people who used parity-generated phrase but made a mistake while backing it up.
We could make a more generic recovery process (which allows you to provide your own dictionary) as an extra feature.

ethkey generate random [options]
ethkey generate prefix <prefix> <iterations> [options]
ethkey generate brain <seed> [options]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes it backward incompatible. I was using this option a lot for my personal accounts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped version of ethkey and ethstore and added relnotes llabel.

IMHO it's more consistent now, if you provide <seed> we don't really generate anything, we just print address info (similar to when you are providing the secret), there is a secret derivation in the background obviously, but I think it significantly differs from generate random and generate prefix commands.

@debris debris added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Nov 13, 2017
@tomusdrw tomusdrw added the A0-pleasereview 🤓 Pull request needs code review. label Nov 20, 2017
@tomusdrw tomusdrw removed the A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. label Nov 20, 2017
@5chdn 5chdn mentioned this pull request Nov 22, 2017

let mut handles: Vec<thread::JoinHandle<_>> = Vec::new();
let threads = num_cpus::get();
for _ in 0..threads {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be wrong but looks like Rayon may be used here instead of raw threads.

}

if let Ok(solution) = rx.recv() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that recv will return Err here? It only fails when sender is destroyed an here are max+1 senders, of which this last 1 is never destroyed. So it looks like that if all threads have failed with an error, we will hang in this recv call. I can be missing something, though :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points, thanks. Will addresss both by switching to rayon as suggested by @0x7CFE

let tx = tx.clone();
handles.push(thread::spawn(move || match t() {
Ok(solution) => {
tx.send(solution).expect("Receiving end never dropped.");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When first thread founds a solution, it is received via rx.recv() and function returns => receiving end is destroyed. Since we do not wait for other threads on successful return (is it intended?), other threads are still running and when next t() call will succeed, this would lead to panic. Not sure it is possible to have several solutions in these tasks, though...

@tomusdrw tomusdrw added A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. and removed A0-pleasereview 🤓 Pull request needs code review. labels Nov 30, 2017
@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Nov 30, 2017
@tomusdrw
Copy link
Collaborator Author

Decided to use threadpool instead of rayon, since I'm using a regular iterator and also addressed two comments from Slava by that.

@svyatonik svyatonik added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 1, 2017
@svyatonik svyatonik merged commit 7663451 into master Dec 1, 2017
@svyatonik svyatonik deleted the td-ethstore-crack branch December 1, 2017 08:40
5chdn pushed a commit that referenced this pull request Jan 30, 2018
* Update config.full.toml

* Update mod.rs

* Patch 1 (#1)

* Iterate over both buffered and unbuffered database entries

* Fix iterator issues

* no default uncles

* prepare cargo configuration for upload of crates

* update bigint version number

* update ethcore-bigint version

* rename hash crate to keccak-hash

* update memorydb

* update rlp

* update patricia-trie cargo.toml

* use error-chain in ethcore-network

* interleaved-ordered 0.1.1

* static linking for snappy

* removed redundant imports

* Add the desktop file for the snap

Now that we have added plugs to allow accessing the display, the snap needs
a desktop file. And bonus point, it will appear on the menu when it's
installed, and once you make a stable relase, it will appear in the gnome
software center app! So, one-click install for parity :)

Closes: #7056

* update icon for desktop

* Properly display Signer errors (Snackbar display popup) (#7053)

* Update to fixed @parity/ui (Errors component)

* Update ParityBar radius to align with Snackbar/Errors

* Update to latest @parity/ui

* Update dependencies @parity/signer-plugin-*

* Really pull in @parity/signer-plugin-* deps

* CHANGELOG for 1.7.8, 1.7.9, 1.8.2, and 1.8.3 (#7055)

* Update changelog for 1.7.8 stable

* Update changelog for 1.7.9 stable

* Improve wording in Changelog

* Update changelog for 1.8.2 beta

* Update changelog for 1.8.3 beta

* [ci skip] js-precompiled 20171115-103846

* ECIP-1039: Monetary policy rounding specification

Fix potential rounding errors between geth and parity in the long-term future.

* Change reward calculation to only use divide once

* SecretStore: servers set change session api (#6925)

* SecretStore: first key versions flush

* SecretStore: key versions in encryption session

* SecretStore: flush key versions negotiation session

* SecretStore: connected key version negotiation session to cluster

* SecretStore: cluster sessions container refactoring

* SecretStore: flush

* SecretStore: flush key versions

* SecretStore: flush

* SecretStore: delegation proto

* SecretStore: decryption_session_is_delegated_when_node_does_not_have_key_share

* SecretStore: fixed version in decryption session

* SecretStore: signing_session_is_delegated_when_node_does_not_have_key_share

* SecretStore: started restoring admin sessions

* SecretStore: restoring admin sessions

* SecretStore: removed obsolete ShareRemove && ShareMove sessions

* SecretStore: ShareAdd math tests only require old_t+1 nodes

* SecretStore: ShareAdd revamp using new math backend

* SecretStore: do not include isolated nodes into consensus_group

* SecretStore: ServersSetChange + ShareAdd revamp

* removed debug printlns

* SecretStore: key version negotiation tests

* SecretStore: removed debug/merge artifacts

* SecretStore: fixed master node selection

* SecretStore: cleanup + tests + fixes

* SecretStore: uncommented tests

* SecretStore: cleaning up

* SecretStore: cleaning up + tests

* SecretStore: cleaning up

* SecretStore: cleaning up && tests

* SecretStore: fixing TODOs

* SecretStore: fixing TODOs + cleanup

* SecretStore: fixing TODOs

* SecretStore: nodes_add_to_the_node_with_obsolete_version

* SecretStore: nodes_add_fails_when_not_enough_share_owners_are_connected

* SecretStore: tests

* SecretStore: signing && delegation tests

* SecretStore: signing && decryption tests when some nodes are isolated

* SecretStore: sessions_are_removed_when_initialization_fails

* SecretStore: ceaning up

* SecretStore: removed obsolete comments

* SecretStore: signing_session_completes_if_node_does_not_have_a_share

* SecretStore: initial ServersSetChange API

* SecretStore: added secretstore_signServersSet RPC

* SecretStore: ChangeServersSet parse tests

* SecretStore: fixes after manual ServersSetChange tests

* lost file

* fixed network ports overlap in tests

* lost files

* fix tests on patricia-trie

* updated eth-secp256k1

* Fix no-default-features.

* Parse payload from panic

Impl payload

empty str is none

Update tests

Clean

Update wasm-tests

* Allow localUrl in manifest

* Improve Github Issue Template: IT CROWD approved version.

* Remove seperator that causes issue descriptions to become headlines sometimes

* Add to all icon_url places

* Add appId as needed to local dapps

* localUrl only from manifest

* Update panic_payload.rs

* Use query-string for search parsing

* spaces to tabs.

* Add localUrl to serialization

* Make storage_read/write return nothing

* Update gas values

* Update wasm-tests

* Cleanup debug info

* Remove debug log

* Optimize & group dapp requests (#7083)

* Group similar methods in same grouping

* Add a shell_getMethodGroups API

* Small code clean changes

* Fix bug dapp.name not showing

* Additional error handling

* Store sources in own map

* Remove observable variables where not needed

* Refactor code and fix bug dapp not showing on approve

* [ci skip] js-precompiled 20171121-150329

* Remove unused and duplicated files in js-old (#7082)

* Cleanup v1 build process, application-only

* Remove built-in dapps from build (duplicated)

* User @parity/api instead of local version

* Update references to @parity/abi

* Remove unused js-old api/abi folders

* Remove duplicated v1 jsonrpc

* Cleanup unused routes

* Update manifest with wallet image

* Update wallet logo

* Re-add missing test.sh

* Update rpc mocks

* Update tests for Providers

* Use flex for iframe & status

* Additional cleanups (Home screen for embed)

* Keep statusbar fixed (and non-overallping with dapps)

* [ci skip] js-precompiled 20171121-164807

* Cleanup top bar, add Home icon for navigation (#7118)

* Localise images to config.js file

* Remove sample status plugin (commented)

* Update image references from config

* Remove Unknown capability & Capable (only display actions)

* Update to @parity/ui 2.2.14

* Add Home icon on statusbar (go back)

* 2.2.14 -> 2.2.x

* Builtin dapp icons where dappreg not available

* [ci skip] js-precompiled 20171122-140247

* fixed RotatingLogger after migrating to new arrayvec

* Update packages, pull in compiled-only repos (#7125)

* Update packages, pull in compiled-only repos

* Update js-precompiled to point to js-dist-paritytech

* Trigger both js & js-old builds to force update

* Update to bring scripts 100% in-sync

* Fixed build && test (#7128)

* fixed build && test

* fixed rpc tests

* Update js-precompiled ref, trigger JS build

* Add test for ECIP1017 at block 250000000

* Wrong era used in ECIP1017 test

It is era 49, and should correspond to ECIP1017/ECIP1039's era 50.

* [ci skip] js-precompiled 20171124-124119

* Push to correct shell branch (#7135)

* Push to correct shell branch

* Trigger both js & js-old builds

* [ci skip] js-precompiled 20171124-134823

* pwasm-run-test utility

* WASM Remove blockhash error (#7121)

* Remove blockhash error

* Update tests.

* Pull in new dapp-{methods,visible} dapps (#7150)

* [ci skip] js-precompiled 20171128-091552

* fixes typo in user config path (#7159)

* Cleanup JS build artifacts (#7164)

* Cleanup JS build artifacts

* Trigger js & js-old

* [ci skip] js-precompiled 20171129-135441

* Use git flag to remove old js artifacts (#7165)

* [ci skip] js-precompiled 20171129-144917

* Remove *.css.map & *.js.map (#7168)

* [ci skip] js-precompiled 20171129-172021

* Delete unused package.json (dist) (#7173)

* [ci skip] js-precompiled 20171130-103432

* Assorted improvements for ethstore and ethkey (#6961)

* Testing many passwords for presale wallet.

* Add multiple threads.

* WiP: ethkey brain wallets recover.

* Refactor pre-sale-wallet cracking.

* Generate in multiple threads. Brain with prefix.

* Validate bain wallet phrase.

* Brain wallet recovery.

* Self-review fixes.

* Fix tests.

* More docs.

* Bump versions.

* Remove cmd_find from borked merge.

* Update wasm submodules.

* Use threadpool.

* upper limit is gas limit * 10 in estimate gas

* React 16 (#7174)

* Update packages to use React 16

* Rollback to react-router v3

* Use component instead of pure one

* Remove warning about mobx

* Make webpack load css from @parity/ui

* Update enzyme to support react16

* Fix lint

* Use @parity/ui v3

* Update refs of plugin-signer-* deps

* Exclude plugin-signer-* from babel processing

* Reupdate refs to old method

* Update refs again

* [ci skip] js-precompiled 20171201-114538

* pwasm-run-test utility upgrade

* Removed ethcore-util dependency from ethcore-network (#7180)

* Removed ethcore-util dependency

* Removed snappy

* New account selector UI in top bar (#7179)

* Add a dropdown popup for account selector

* Install sui latest version for hideOnScroll bug fix

* Update ui

* Update package-lock after rebase

* Require parity/ui v3.0.3

* Pass accountStore as props

* Require parity/ui v3.0.4

* [ci skip] js-precompiled 20171204-115345

* Update mocha import stubs (#7191)

* Update mocha import stubs

* Add .md files to ignore list

* [ci skip] js-precompiled 20171205-084709

* Update FirstRun for UI-2 (#7195)

* WIP

* Update after @parity/ui update

* Update to latest

* Update semver for @parity

* Update & -> &amp;

* [ci skip] js-precompiled 20171205-102703

* Maximum uncle count transition (#7196)

* Enable delayed maximum_uncle_count activation.

* Fix tests.

* Defer kovan HF.

* mistake comment in calc difficulty (#7154)

* Send each log as a separate notifications. (#7175)

* Update config.full.toml

* Revert "Patch 1 (#1)" (#2)

This reverts commit 2fa0af6.

* Update usd_per_tx test

* Fix tests

* Fix initial_minimum
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants