modified: Altcoin-and-Forkcoin-Support.md

modified:   Install-Bitcoind.md
	modified:   Install-MMGen-on-Debian-or-Ubuntu-Linux.md
	modified:   Recovering-Your-Keys-Without-the-MMGen-Software.md
The MMGen Project 2019-11-12 15:38:13 +00:00
commit 70ff9466dd
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
4 changed files with 22 additions and 24 deletions

@ -244,7 +244,7 @@ key in the key/address file by running the following command:
and pasting in the key and password data when prompted. [Monerod][M] must be
installed and running and `monero-wallet-cli` be located in your executable
path.
path. Launch monerod with the `--bg-mining-enable` switch.
To save your time and labor, the `mmgen-tool` utility includes a command that
completely automates this process:

@ -8,7 +8,7 @@ machine.
The bitcoin daemon on the **online computer** requires a complete and
up-to-date blockchain for tracking addresses. Since its work is more CPU and
disk intensive, a more powerful computer is required here. You'll also need
plenty of free disk space for the growing blockchain (~220GB at the time of
plenty of free disk space for the growing blockchain (~265GB at the time of
writing).
Two blockchain operations are especially resource-intensive: **synchronizing

@ -3,7 +3,7 @@
Install required Debian/Ubuntu packages:
$ sudo apt-get install autoconf git libgmp-dev libssl-dev libtool wipe
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-cryptography python3-nacl python3-pip python3-gmpy2
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-cryptography python3-nacl python3-pip python3-gmpy2 python3-sha3
Using the [pip3][P] installer, install the Python scrypt library

@ -31,9 +31,9 @@ generated with the `mmgen-passgen` command.
To keep things simple, we’ll assume you have a copy of your seed in hexadecimal
(mmhex) format. If your backup’s in mnemonic format, skip to the section
’Converting an MMGen mnemonic to hexadecimal format’ below and return here when
you’ve finished. If your backup is an MMGen wallet, it will need to be
decrypted. That case will be covered in a future tutorial.
[Converting an MMGen mnemonic to hexadecimal format](#a_mh) below and return
here when you’ve finished. If your backup is an MMGen wallet, it will need to
be decrypted. That case will be covered in a future tutorial.
Okay, so let’s say you have a 128-bit seed with Seed ID `FE3C6545` and funds in
the first three legacy uncompressed (`L`) addresses of this seed. Here are the
@ -273,11 +273,11 @@ Now all that remains is to convert our hexadecimal key to decimal and then Base
out at the Python prompt:
# uncompressed example:
$ python
$ python3
>>> b58a = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
>>> num = int('8005d7219524b983290138a60ada101370007f59a625c43a46f0f8d92950955e367b818629',16)
>>> result = [b58a[num / 58**e % 58] for e in range(60)]
>>> print ''.join(reversed(result)).lstrip('1')
>>> result = [b58a[num // 58**e % 58] for e in range(60)]
>>> print(''.join(reversed(result)).lstrip('1'))
5HrrmMdQbELyW7iCns5kvSbN9GCPTqEfG7iP1PZiYk49yDDivTi # matches key for FE3C6545:L:1 above
# Segwit example has the following differences:
@ -299,7 +299,7 @@ clearer:
result = []
while n:
result = result + [b58a[n % 58]] # divide n by 58 and take the remainder
n = n / 58
n = n // 58
return result
result = numtob58(num)
@ -310,12 +310,12 @@ Adapting our code a bit and putting it in a file gives us have a handy
conversion utility we can use for any key:
$ cat hex2b58.py
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
b58a = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
num = int(sys.argv[1],16)
result = [b58a[num / 58**e % 58] for e in range(60)]
print ''.join(reversed(result)).lstrip('1')
result = [b58a[num // 58**e % 58] for e in range(60)]
print(''.join(reversed(result)).lstrip('1'))
$ ./hex2b58.py 8005d7219524b983290138a60ada101370007f59a625c43a46f0f8d92950955e367b818629
5HrrmMdQbELyW7iCns5kvSbN9GCPTqEfG7iP1PZiYk49yDDivTi
@ -358,7 +358,7 @@ and ends like this:
yet (1621), young (1622), yours (1623), yourself (1624), youth (1625)
(Type `mmgen-tool mn_printlist` to see the full list)
(Type `mmgen-tool mn_printlist enum=true` to see the full enumerated list)
The words of the Electrum wordlist thus make up a base-1626 numbering system,
just like the ten digits of our familiar base-10 system.
@ -383,8 +383,8 @@ along with the value of each word corresponding to its position in the wordlist:
foot - 562
dude - 439
All that remains is to multiply the values by increasing powers of 1626 and sum
the results:
All that remains is to multiply the values by increasing powers of the base and
sum the results, just as we did in our ‘1234’ example above:
200 x 1626⁰ +
59 x 1626¹ +
@ -399,24 +399,22 @@ the results:
562 x 1626¹⁰ +
439 x 1626¹¹
While we could theoretically do the math with pencil and paper, a few lines of
While we could theoretically do the math with a calculator, a few lines of
Python will make our work much easier:
$ python
$ python3
>>> sum = exp = 0
>>> for word in 200,59,1384,221,379,1493,1433,1348,1459,386,562,439:
>>> for word in (200,59,1384,221,379,1493,1433,1348,1459,386,562,439):
>>> sum += word * 1626 ** exp
>>> exp += 1
>>> print sum
92285275468192044354531703963345906238 # the result in decimal
>>> print '{:x}'.format(sum)
456d7f5f1c4bfe3bc916b87560ae6a3e # the result in hexadecimal: matches our original hex seed above
>>> print(hex(sum))
0x456d7f5f1c4bfe3bc916b87560ae6a3e # the result in hexadecimal: matches our original hex seed above
In case you’re wondering why 1626 was chosen as the base: 1626 is just large
enough to allow a 128-bit seed to be represented by twelve words. This can also
be demonstrated at the Python prompt:
$ python
$ python3
>>> 1626**12 >= 2**128
True
>>> 1625**12 >= 2**128