Metadata-Version: 2.1
Name: blns-recovery
Version: 0.1.2
Summary: BLNS paper backup recovery tool
Home-page: https://github.com/blns-ltd/blns-recovery-python
Author: Dusan Klinec
Author-email: dusan.klinec@gmail.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Security
Provides-Extra: dev
Provides-Extra: docs
License-File: LICENSE

blns Paper backup recovery
==========================

Minimalistic python tool to recover blns paper backup.

Paper backup consists of two parts: - part 1 is sent together with the
card, starts with ``blns1`` keyword - part 2 is produced after signup
flow on the phone, starts with ``blns2`` keyword

Recovery tool returns root seed and its
`BIP-39 <https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt>`__
mnemonic representation.

For more information on Bitcoin keys generation please refer to `Bitcoin
book <https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#creating-an-hd-wallet-from-the-seed>`__
or `learnmeabitcoin.com on extended
keys <https://learnmeabitcoin.com/technical/extended-keys>`__.

For a web browser-based recovery tool, visit the `recovery
tool <https://blns-ltd.github.io/blns-recovery/recovery>`__, sources on
https://github.com/blns-ltd/blns-recovery.

Pip installation
----------------

BoolTest is available via ``pip``:

::

   pip3 install blns-recovery

If the package is uploaded on Pypi. If it is not the case, use local pip
installation below.

Local installation
------------------

From the local dir:

::

   pip3 install --upgrade --find-links=. .

Usage
-----

Enter part1 and part2 as command line arguments. The tool computes your
master seed and outputs it as a hex-coded string. Use it to recover your
funds to a newly created wallet. After the recovery, do not use
recovered seed anymore.

::

   $> blns-recovery --part1 'blns1 road there connect clap divert nothing hunt angle slush lesson glide lunar vocal scrub bubble clean unique hammer charge wreck satoshi glare surge urge memory gather' \
     --part2 'blns2 quit exchange miracle winter cupboard solve wing zero this leader auction result firm manage they total mimic stadium host borrow spray list canyon brick refuse april'

   Recovered master seed: c166420301445f404a92acf30b39370aa0ed39991a5b27b7116ef7546bcc9936
   BIP-39 mnemonic: scrap craft liar action echo parent clean few vessel flush evidence best attract orphan good enter chicken review forum upgrade effort town gospel shell

Usage:

::

   usage: blns-recovery [-h] [--part1 PART1] [--part2 PART2]
                        [--part1-hex PART1_HEX] [--part2-hex PART2_HEX]
                        [--bip-language BIP_LANGUAGE] [--show-btc-secret]

   BLNS paper backup recovery

   optional arguments:
     -h, --help            show this help message and exit
     --part1 PART1         Part 1 of the paper backup
     --part2 PART2         Part 2 of the paper backup
     --part1-hex PART1_HEX
                           Part 1 of the paper backup in the hexadecimal form
     --part2-hex PART2_HEX
                           Part 2 of the paper backup in the hexadecimal form
     --bip-language BIP_LANGUAGE
                           BIP39 mnemonic language to use
     --show-btc-secret     Show BTC master private keys

Key derivation scheme
---------------------

Inputs: - paper backup ``part1`` - paper backup ``part2``

::

   seed = HMAC-SHA512(key=0xFE42EF, msg=part1 || part2)

The ``seed`` is a root seed that can be used to recover your wallets.
