Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
update docs for coincurve installation & for OS X
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
gurnec committed Aug 17, 2017
1 parent f113867 commit 9d28ff9
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 61 deletions.
1 change: 1 addition & 0 deletions btcrecover/btcrseed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,7 @@ def show_mnemonic_gui(mnemonic_sentence):
entry.select_range(0, tk.END)
entry.pack(side=tk.LEFT, fill=tk.X, expand=True, padx=padding, pady=padding)
tk_root.deiconify()
tk_root.lift()
entry.focus_set()
tk_root.mainloop() # blocks until the user closes the window
pause_at_exit = False
10 changes: 5 additions & 5 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ Locate your wallet type in the list below, and follow the instructions in the se
* Armory 0.92.x on Windows - [Python 2.7](#python-27) **32-bit** (x86)
* Armory 0.93+ on Windows - [Python 2.7](#python-27) **64-bit** (x86-64)
* Armory 0.92+ on Linux - no additional requirements
* Armory 0.92+ on OS X - please read both OS X sections [here](Seedrecover_Quick_Start_Guide.md#os-x)
* Armory 0.92+ on OS X - some version of Armory may not work correctly on OS X, if in doubt use version 0.95.1
* Bitcoin Unlimited/Classic/XT/Core - [Python 2.7](#python-27), optional: [PyCrypto](#pycrypto)
* MultiBit Classic - [Python 2.7](#python-27), recommended: [PyCrypto](#pycrypto)
* MultiBit HD - [Python 2.7](#python-27), [scrypt](#scrypt), optional: [PyCrypto](#pycrypto)
* Electrum (1.x or 2.x) - [Python 2.7](#python-27), recommended: [PyCrypto](#pycrypto)
* Electrum 2.8+ fully encrypted wallets - [Python 2.7](#python-27) (2.7.8+ recommended), [Armory 0.92+](Seedrecover_Quick_Start_Guide.md#installation), optional: [PyCrypto](#pycrypto)
* BIP-39 Bitcoin passphrases (e.g. TREZOR) - [Python 2.7](#python-27) (2.7.8+ recommended), [Armory 0.92+](Seedrecover_Quick_Start_Guide.md#installation)
* BIP-39 Ethereum passphrases (e.g. TREZOR) - [Python 2.7](#python-27) (2.7.8+ recommended), [Armory 0.92+ and pysha3](Seedrecover_Quick_Start_Guide.md#installation)
* Electrum 2.8+ fully encrypted wallets - [Python 2.7](#python-27) (2.7.8+ recommended), [coincurve](Seedrecover_Quick_Start_Guide.md#installation), optional: [PyCrypto](#pycrypto)
* BIP-39 Bitcoin passphrases (e.g. TREZOR) - [Python 2.7](#python-27) (2.7.8+ recommended), [coincurve](Seedrecover_Quick_Start_Guide.md#installation)
* BIP-39 Ethereum passphrases (e.g. TREZOR) - [Python 2.7](#python-27) (2.7.8+ recommended), [coincurve and pysha3](Seedrecover_Quick_Start_Guide.md#installation)
* Hive for OS X - [Python 2.7](#python-27), [scrypt](#scrypt), [Google protobuf](#google-protocol-buffers), optional: [PyCrypto](#pycrypto)
* mSIGNA (CoinVault) - [Python 2.7](#python-27), recommended: [PyCrypto](#pycrypto)
* Blockchain.info - [Python 2.7](#python-27) (2.7.8+ recommended), recommended: [PyCrypto](#pycrypto)
* Bitcoin Wallet for Android/BlackBerry backup - [Python 2.7](#python-27), recommended: [PyCrypto](#pycrypto)
* Bitcoin Wallet for Android/BlackBerry spending PIN - [Python 2.7](#python-27), [scrypt](#scrypt), [Google protobuf](#google-protocol-buffers), optional: [PyCrypto](#pycrypto)
* KnC Wallet for Android backup - [Python 2.7](#python-27), recommended: [PyCrypto](#pycrypto)
* Bither - [Python 2.7](#python-27), [scrypt](#scrypt), [Armory 0.92+](Seedrecover_Quick_Start_Guide.md#installation), optional: [PyCrypto](#pycrypto)
* Bither - [Python 2.7](#python-27), [scrypt](#scrypt), [coincurve](Seedrecover_Quick_Start_Guide.md#installation), optional: [PyCrypto](#pycrypto)
* Litecoin-Qt - [Python 2.7](#python-27), optional: [PyCrypto](#pycrypto)
* Electrum-LTC - [Python 2.7](#python-27), recommended: [PyCrypto](#pycrypto)
* Litecoin Wallet for Android - [Python 2.7](#python-27), recommended: [PyCrypto](#pycrypto)
Expand Down
67 changes: 24 additions & 43 deletions docs/Seedrecover_Quick_Start_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,44 @@ Just download the latest version from <https://github.com/gurnec/btcrecover/arch

Additional requirements are described below.

Note that *seedrecover.py* uses Armory (Bitcoin wallet software) to accelerate the Eliptic Curve math it needs to perform; you do not need to start Armory for any reason.

### Windows ###

1. Follow [these instructions](INSTALL.md#python-27) to download and install Python 2.7.

2. Visit this page to download Armory for Windows: <https://github.com/goatpig/BitcoinArmory/releases>. If you installed the 64-bit version of Python, download the latest version of Armory ending in `.exe` (but avoid any `Pre-release` versions). If you installed the 32-bit version of Python, download a **0.93.x** version of Armory ending in `.exe`.

3. Double-click the downloaded file to install Armory.
2. Open a command prompt window, and type this to install the required Python libraries:

4. For Ethereum wallets only, open a command prompt window, and type this to install pysha3:
C:\Python27\Scripts\pip install coincurve==5.2.0 pysha3

C:\Python27\Scripts\pip install pysha3

5. (optional) Follow [these instructions](INSTALL.md#windows) to download and install pywin32.
3. (optional) Follow [these instructions](INSTALL.md#windows) to download and install pywin32 which allows *seedrecover.py* to run as a low-priority process so it doesn’t hog your CPU.

### Linux ###

Because Armory has a number of dependencies, installing it on Linux isn't always easy. For Debian-like distributions, a shell script has been provided (in the same directory as this README file) which will automatically download and install Armory along with all of its required dependencies. Simply run it from a terminal window:

bash install-armory.sh

Alternatively you can manually download and install the latest version of Armory from here (but avoid any `Pre-release` versions): <https://github.com/goatpig/BitcoinArmory/releases>.

For Ethereum wallets only, install the pysha3 library, for example on Debian-like distributions (including Ubuntu), open a terminal window and type this:
Most distributions include Python 2.7 pre-installed. Two additional Python libraries, coincurve and (for Ethereum wallets) pysha3 are required. For example on Debian-like distributions (including Ubuntu), open a terminal window and type this:

sudo apt-get install python-pip
sudo pip install pysha3
sudo pip install coincurve==5.2.0 pysha3

### OS X ###

Please read the [Running *seedrecover.py*](#running-seedrecoverpy) section first to check if *seedrecover.py* will work with your wallet on OS X.
1. Open a terminal window (open the Launchpad and search for "terminal"). Type this and then choose `Install` to install the command line developer tools:

1. Download the latest version of Armory for `osx` from here: <https://github.com/goatpig/BitcoinArmory/releases> (but avoid any `Pre-release` versions).
xcode-select --install

2. Open your Downloads, and double-click the Armory file to decompress it.
2. Type this to install the GNU Multiple Precision Arithmetic Library:

curl -O https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz
tar xf gmp-6.1.2.tar.xz
cd gmp-6.1.2
./configure --prefix=/usr/local/opt/gmp
make && make check
sudo make install
cd ..
rm -rf gmp-6.1.2 gmp-6.1.2.tar.xz

3. Drag the new Armory app into your Applications folder (just to the left, in the sidebar).
3. Type this to install Python pip, coincurve, and (for Ethereum wallets) pysha3:

Please also read the OS X section below.
curl https://bootstrap.pypa.io/get-pip.py | sudo python
sudo pip install coincurve==5.2.0 pysha3


## Running *seedrecover.py* ##
Expand All @@ -63,43 +61,26 @@ In order to run *seedrecover.py*, you'll need these two things:
3. a receiving address that was generated by your wallet from your seed, along with a good estimate of how many addresses you created before the receiving address you'd like to use, *or*
4. an "address database". If you don't have i., ii., or iii. from above, please see the [Recovery with an Address Database](#recovery-with-an-address-database) section below.

**Note** that seed recovery based on addresses (option iii. or iv. above) is not currently supported on OS X.

Actually running *seedrecover.py* on Windows or Linux is simple: just double-click it. If you're given an option between running it in a terminal or without one, choose *Run in Terminal*. Next, you'll be asked a short series of questions:
To start *seedrecover.py* on OS X, first rename the `seedrecover.py` script file to `seedrecover.command`. Aside from this, starting it is the same for every system: just double-click the `seedrecover.py` (or `seedrecover.command`) file. If you're asked about running it in a terminal, choose *Run in Terminal*. Next, you'll be asked a short series of questions:

1. First you'll be asked to open your wallet file. If you have an Electrum wallet file, find it now - the rest of the steps will then be skipped. Otherwise, click `Cancel` to continue.

2. Next, select your wallet type. If you're unsure of what to choose, feel free to open an [issue on GitHub](https://github.com/gurnec/btcrecover/issues/new) to see if your wallet software is supported.

3. Next you'll be asked for your master public key. If you don't have yours stored anywhere, click `Cancel` to continue.

4. If you don't have your master public key, next you'll be asked for your Bitcoin addresses. Find as many of your addresses associated with this wallet as you can, and enter them here (separated by spaces). Addresses you created early in your wallet's lifetime are prefereable. If your wallet supports multiple "accounts" each with their own address list, only addresses from your first account are useful here.
4. If you don't have your master public key, next you'll be asked for your Bitcoin addresses. Find as many of your addresses associated with this wallet as you can, and enter them here (separated by spaces). Addresses you created early in your wallet's lifetime are prefereable. If your wallet supports multiple "accounts" each with their own address list, only addresses from your first account should be entered here.

5. If you entered Bitcoin addresses above, next you'll be asked to enter the "address generation limit". *seedrecover.py* works by generating one or more addresses based on each seed it tries. The generation limit is the number of addresses it generates for each seed. Generating fewer addresses will improve *seedrecover.py*'s speed, however if it generates too few, it will miss the correct seed entirely.

For example, let's say you found and entered three Bitcoin addresses in step 4. If you're reasonably sure that all three were within the first 10 addresses ever created in your wallet, you should use `10` for the address generation limit.

### OS X ###

Running *seedrecover.py* (or *btcrecover* with Armory support) is not quite as easy on OS X.

To run *seedrecover.py*, you must use the version of Python which is included with Armory. Open a terminal window (open the Launchpad and search for "terminal"), `cd` to the directory where the `seedrecover.py` script is, and then run it using the full path. Below is an example, note that the first line may differ if the `seedrecover.py` script is in a different location.

cd Downloads/btcrecover-master
/Applications/Armory.app/Contents/Frameworks/Python.framework/Versions/2.7/bin/python seedrecover.py

Then you can continue with the numbered steps listed above.

For *btcrecover* users, the process is similar. You must use the full path:

/Applications/Armory.app/Contents/Frameworks/Python.framework/Versions/2.7/bin/python btcrecover.py [other-options...]
Finally, you'll be asked for your best guess of what your seed is.

### Recovery with an Address Database ###

When *seedrecover.py* tries different guesses based on the seed you entered, it needs a way to determine which seed guess is correct. Normally it uses each seed guess to create a master public key (an *mpk*) and compare it to the mpk you entered, or to create Bitcoin addresses and compare them to the addresses you entered. If you have neither your mpk nor any of your addresses, it's still possible to use *seedrecover.py* but it is more complicated and time consuming.

**Note** that seed recovery based on an address database is not currently supported on OS X.

This works by generating Bitcoin addresses, just as above, and then looking for each generated address in the entire Bitcoin blockchain. In order to do this, you must first create a database of addresses based on the full blockchain:

1. You must use a computer with at least 150GB of free drive space to store the full blockchain and at least 8 GB of RAM (you could probably get away with 6 GB of RAM, but no less).
Expand All @@ -110,7 +91,7 @@ This works by generating Bitcoin addresses, just as above, and then looking for

4. Once your Bitcoin client is synced, close the Bitcoin software.

5. Double-click on the `create-address-db.py` script (in the same folder as `seedrecover.py`) to build the address database using the fully-synced blockchain (it will be saved into the same directory as `create-address-db.py` with the name `addresses.db`) . This process will take about one hour, and use about 4 GB of both RAM and drive space.
5. (On OS X, rename the `create-address-db.py` script file to `create-address-db.command`.) Double-click on the `create-address-db.py` script (in the same folder as `seedrecover.py`) to build the address database using the fully-synced blockchain (it will be saved into the same directory as `create-address-db.py` with the name `addresses.db`) . This process will take about one hour, and use about 4 GB of both RAM and drive space.

6. Follow the steps listed in the [Running *seedrecover.py*](#running-seedrecoverpy) section, except that when you get to the address entry window in step 4, click `Cancel`.

Expand Down
13 changes: 0 additions & 13 deletions docs/install-armory.sh

This file was deleted.

0 comments on commit 9d28ff9

Please sign in to comment.