modified: Getting-Started-with-MMGen.md

modified:   Home.md
	modified:   Install-MMGen-on-Debian-or-Ubuntu-Linux.md
	modified:   man-addrgen.md
	modified:   man-keygen.md
	modified:   man-passgen.md
	modified:   man-tool.md
MMGen 2017-12-28 22:03:13 +03:00
commit 58c1088eeb
Signed by untrusted user who does not match committer: mmgen
GPG key ID: 62DBE9E5212F05BE
7 changed files with 319 additions and 241 deletions

@ -27,7 +27,10 @@
* <a href='#a_rbf_onl'>With an online (hot) wallet</a>
* <a href='#a_rbf_onf'>With an offline (cold storage) wallet</a>
#### <a href='#a_alt'>Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,DASH,ZEC)</a>
#### <a href='#a_alt'>Forkcoin and Altcoin support</a>
* <a href='#a_bch'>Full support for Bcash (BCH) and Litecoin</a>
* <a href='#a_es'>Enhanced key/address generation support for Zcash (ZEC) and Monero (XMR)</a>
* <a href='#a_kg'>Key/address generation support for ETH, ETC and 144 Bitcoin-derived altcoins</a>
### <a name='a_i'>Preliminaries</a>
@ -67,10 +70,10 @@ options on the command line.
Sample MMGen command invocations:
$ mmgen-txcreate --help
$ mmgen-addrgen --verbose 1-10
$ mmgen-walletgen
$ mmgen-walletgen --quiet --seed-len 128
$ mmgen-txcreate --help
$ mmgen-addrgen --verbose 1-10
$ mmgen-walletgen
$ mmgen-walletgen --quiet --seed-len 128
#### <a name='a_cf'>Configuration file</a>
@ -118,9 +121,9 @@ source in all commands where a seed source is required.*
On your offline computer, generate an MMGen wallet:
$ mmgen-walletgen
...
MMGen wallet written to file '/home/username/.mmgen/89ABCDEF-76543210[256,3].mmdat'
$ mmgen-walletgen
...
MMGen wallet written to file '/home/username/.mmgen/89ABCDEF-76543210[256,3].mmdat'
‘89ABCDEF’ is the Seed ID; ‘76543210’ is the Key ID. These are randomly
generated, so your IDs will of course be different than these.
@ -152,23 +155,23 @@ surprisingly easy.
Now generate ten Segwit addresses with your just-created wallet:
$ mmgen-addrgen --type=segwit 1-10
...
Addresses written to file '89ABCDEF-S[1-10].addrs'
$ mmgen-addrgen --type=segwit 1-10
...
Addresses written to file '89ABCDEF-S[1-10].addrs'
$ cat '89ABCDEF-S[1-10].addrs'
89ABCDEF SEGWIT {
1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE
2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc
3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N
4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s
5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7
6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf
7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1
8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv
9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd
10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh
}
$ cat '89ABCDEF-S[1-10].addrs'
89ABCDEF SEGWIT {
1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE
2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc
3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N
4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s
5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7
6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf
7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1
8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv
9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd
10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh
}
Note that the address range ‘1-10’ specified on the command line is included in
the resulting filename.
@ -183,21 +186,21 @@ installations, and it's unlikely you'll wish to generate them. Compressed
addresses are the preferred choice for Bitcoin Cash (BCH) wallets, since Bitcoin
Cash doesn't support Segwit.
# legacy uncompressed
$ mmgen-addrgen 1-10
...
$ cat '89ABCDEF[1-10].addrs'
89ABCDEF {
1 12GiSWo9zIQgkCmjAaLIrbPwXhKry2jHhj
...
# legacy uncompressed
$ mmgen-addrgen 1-10
...
$ cat '89ABCDEF[1-10].addrs'
89ABCDEF {
1 12GiSWo9zIQgkCmjAaLIrbPwXhKry2jHhj
...
# compressed P2PKH
$ mmgen-addrgen --type=compressed 1-10
...
$ cat '89ABCDEF-C[1-10].addrs'
89ABCDEF COMPRESSED {
1 13jbRxWjswXtaDzLBJDboMcIe6nLohFb9M
...
# compressed P2PKH
$ mmgen-addrgen --type=compressed 1-10
...
$ cat '89ABCDEF-C[1-10].addrs'
89ABCDEF COMPRESSED {
1 13jbRxWjswXtaDzLBJDboMcIe6nLohFb9M
...
Note that for non-legacy address types the code letter is included in the
filename.
@ -215,27 +218,27 @@ provide the addresses with labels. We’ll use the labels ‘Donations’, ‘S
Make a copy of the address file
$ cp '89ABCDEF-S[1-10].addrs' my.addrs
$ cp '89ABCDEF-S[1-10].addrs' my.addrs
and edit it using the text editor of your choice,
$ nano my.addrs
$ nano my.addrs
adding labels to the addresses you’ve chosen to spend to:
# My first MMGen addresses
89ABCDEF SEGWIT {
1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations
2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1
3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2
4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3
5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7
6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf
7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1
8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv
9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd
10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh
}
# My first MMGen addresses
89ABCDEF SEGWIT {
1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations
2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1
3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2
4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3
5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7
6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf
7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1
8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv
9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd
10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh
}
Any line beginning with ‘#’ is a comment. Comments may be placed at the ends
of lines as well.
@ -249,22 +252,22 @@ existing 'wallet.dat' file out of harm’s way. Start bitcoind and let it
generate a new 'wallet.dat'; this you’ll use as your tracking wallet. Import
your ten addresses into the new tracking wallet with the command:
$ mmgen-addrimport --batch my.addrs
$ mmgen-addrimport --batch my.addrs
These addresses will now be tracked: any BTC transferred to them will show up in
your listing of address balances. Balances can be viewed using `mmgen-tool
listaddresses` (the `showempty` option requests the inclusion of addresses with
empty balances).
$ mmgen-tool listaddresses showempty=1
MMGenID ADDRESS COMMENT BALANCE
89ABCDEF:S:1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations 0
89ABCDEF:S:2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 0
89ABCDEF:S:3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 0
89ABCDEF:S:4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 0
89ABCDEF:S:5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 0
...
TOTAL: 0 BTC
$ mmgen-tool listaddresses showempty=1
MMGenID ADDRESS COMMENT BALANCE
89ABCDEF:S:1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations 0
89ABCDEF:S:2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 0
89ABCDEF:S:3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 0
89ABCDEF:S:4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 0
89ABCDEF:S:5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 0
...
TOTAL: 0 BTC
*While not covered in this introduction, note that it’s also possible to [import
ordinary Bitcoin addresses into your tracking wallet][01]. This allows you to
@ -282,13 +285,13 @@ them over the Bitcoin network. If you send 0.1, 0.2, 0.3 and 0.4 BTC
respectively, your address listing will look like this after the transactions
have confirmed:
$ mmgen-tool listaddresses
MMGenID COMMENT BALANCE
89ABCDEF:S:1 Donations 0.1
89ABCDEF:S:2 Storage 1 0.2
89ABCDEF:S:3 Storage 2 0.3
89ABCDEF:S:4 Storage 3 0.4
TOTAL: 1 BTC
$ mmgen-tool listaddresses
MMGenID COMMENT BALANCE
89ABCDEF:S:1 Donations 0.1
89ABCDEF:S:2 Storage 1 0.2
89ABCDEF:S:3 Storage 2 0.3
89ABCDEF:S:4 Storage 3 0.4
TOTAL: 1 BTC
#### <a name='a_ct'>Create a transaction (online computer)</a>
@ -303,7 +306,7 @@ To send 0.1 BTC to the a third-party address 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,
for example, and send the change back to yourself at address 89ABCDEF:S:5, you’d
issue the following command:
$ mmgen-txcreate 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5
$ mmgen-txcreate 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5
'mmgen-txcreate' accepts either MMGen IDs or Bitcoin addresses as arguments.
@ -314,7 +317,7 @@ from the MMGen ID. Thus address ‘89ABCDEF:L:5’ may be expressed as
To send 0.1 BTC to each of addresses 89ABCDEF:S:6 and 89ABCDEF:S:7 and return
the change to 89ABCDEF:S:8, you’d do this:
$ mmgen-txcreate 89ABCDEF:S:6,0.1 89ABCDEF:S:7,0.1 89ABCDEF:S:8
$ mmgen-txcreate 89ABCDEF:S:6,0.1 89ABCDEF:S:7,0.1 89ABCDEF:S:8
As you can see, each send address is followed by a comma and the amount. The
address with no amount is the change address. All addresses belonging to your
@ -330,20 +333,20 @@ criteria: transaction ID, address, amount and transaction age. Your overall
balance in BTC appears at the top of the screen. In our example, the display
will look something like this:
UNSPENT OUTPUTS (sort order: Age) Total BTC: 1
Num TX id Vout Address Amt(BTC) Age(d)
1) e9742b16... 5 3L3kxmi.. 89ABCDEF:S:1 Donations 0.1 1
2) fa84d709... 6 3N4dSGj.. 89ABCDEF:S:2 Storage 1 0.2 1
3) 8dde8ef5... 6 3M1fVDc.. 89ABCDEF:S:3 Storage 1 0.3 1
4) c76874c7... 0 3E8MFoC.. 89ABCDEF:S:4 Storage 3 0.4 1
UNSPENT OUTPUTS (sort order: Age) Total BTC: 1
Num TX id Vout Address Amt(BTC) Age(d)
1) e9742b16... 5 3L3kxmi.. 89ABCDEF:S:1 Donations 0.1 1
2) fa84d709... 6 3N4dSGj.. 89ABCDEF:S:2 Storage 1 0.2 1
3) 8dde8ef5... 6 3M1fVDc.. 89ABCDEF:S:3 Storage 1 0.3 1
4) c76874c7... 0 3E8MFoC.. 89ABCDEF:S:4 Storage 3 0.4 1
Sort options: [t]xid, [a]mount, a[d]dress, [A]ge, [r]everse, [M]mgen addr
Display options: show [D]ays, [g]roup, show [m]mgen addr, r[e]draw screen
'q'=quit view, 'p'=print to file, 'v'=pager view, 'w'=wide view, 'l'=add label:
Sort options: [t]xid, [a]mount, a[d]dress, [A]ge, [r]everse, [M]mgen addr
Display options: show [D]ays, [g]roup, show [m]mgen addr, r[e]draw screen
'q'=quit view, 'p'=print to file, 'v'=pager view, 'w'=wide view, 'l'=add label:
After quitting the menu with 'q', you’ll see the following prompt:
Enter a range or space-separated list of outputs to spend:
Enter a range or space-separated list of outputs to spend:
Here you must choose unspent outputs of sufficient value to cover the send
amount of 0.1 BTC, plus the transaction fee (for more on fees, see ‘Transaction
@ -351,7 +354,7 @@ Fees’ under ‘Advanced Topics’ below). Output #2 is worth 0.2 BTC, which i
sufficient, so we’ll choose that. After several more prompts and confirmations,
your transaction will be saved:
Transaction written to file 'FEDCBA[0.1].rawtx'
Transaction written to file 'FEDCBA[0.1].rawtx'
Note that the transaction filename consists of a unique MMGen Transaction ID
plus the non-change spend amount.
@ -364,9 +367,9 @@ and change addresses. This feature will be appreciated by privacy-conscious use
Now transfer the the raw transaction file to your offline computer and sign it
using your default wallet:
$ mmgen-txsign FEDCBA[0.1].rawtx
...
Signed transaction written to file 'FEDCBA[0.1].sigtx'
$ mmgen-txsign FEDCBA[0.1].rawtx
...
Signed transaction written to file 'FEDCBA[0.1].sigtx'
Note that the signed transaction file has a new extension, '.sigtx'.
@ -377,9 +380,9 @@ network. Start bitcoind if it's not already running, and make sure your
blockchain is fully synced. Then copy the signed transaction file to your
online computer and issue the command:
$ mmgen-txsend FEDCBA[0.1].sigtx
...
Transaction sent: abcd1234....
$ mmgen-txsend FEDCBA[0.1].sigtx
...
Transaction sent: abcd1234....
Like all MMGen commands, 'mmgen-txsend' is interactive, so you’ll be prompted
before the transaction is actually broadcast. If the send was successful, a
@ -389,13 +392,13 @@ in our case).
Once the transaction is broadcast to the network and confirmed, your address
listing should look something like this:
$ mmgen-tool listaddresses minconf=1
MMGenID COMMENT BALANCE
89ABCDEF:S:1 Donations 0.1
89ABCDEF:S:3 Storage 2 0.3
89ABCDEF:S:4 Storage 3 0.4
89ABCDEF:S:5 Storage 1 0.0999
TOTAL: 0.8999 BTC
$ mmgen-tool listaddresses minconf=1
MMGenID COMMENT BALANCE
89ABCDEF:S:1 Donations 0.1
89ABCDEF:S:3 Storage 2 0.3
89ABCDEF:S:4 Storage 3 0.4
89ABCDEF:S:5 Storage 1 0.0999
TOTAL: 0.8999 BTC
Since you’ve sent 0.1 BTC to a third party, your balance has declined by 0.1 BTC
plus the tx fee of 0.0001 BTC. To verify that your transaction’s received its
@ -410,14 +413,14 @@ of MMGen’s more advanced features, continue reading.
Using your default wallet from the exercises above, generate a mnemonic:
$ mmgen-walletconv -o words
...
Mnemonic data written to file '89ABCDEF.mmwords'
$ mmgen-walletconv -o words
...
Mnemonic data written to file '89ABCDEF.mmwords'
$ cat 89ABCDEF.mmwords
pleasure tumble spider laughter many stumble secret bother after search
float absent path strong curtain savior worst suspend bright touch away
dirty measure thorn
$ cat 89ABCDEF.mmwords
pleasure tumble spider laughter many stumble secret bother after search
float absent path strong curtain savior worst suspend bright touch away
dirty measure thorn
Since our seed is 256 bits long, the mnemonic contains 24 words. 128-bit and
192-bit seeds generate shorter mnemonics of 12 and 18 words, respectively.
@ -435,21 +438,21 @@ The mnemonic is a complete representation of your seed and may be used anywhere
where you’d use an MMGen wallet. You can generate addresses with it just as you
do with a wallet:
$ mmgen-addrgen --type=segwit 89ABCDEF.mmwords 1-10
...
Address data written to file '89ABCDEF-S[1-10].addrs'
$ mmgen-addrgen --type=segwit 89ABCDEF.mmwords 1-10
...
Address data written to file '89ABCDEF-S[1-10].addrs'
You can use it to sign transactions:
$ mmgen-txsign FEDCBA[0.1].rawtx 89ABCDEF.mmwords
...
Signed transaction written to file 'FEDCBA[0.1].sigtx'
$ mmgen-txsign FEDCBA[0.1].rawtx 89ABCDEF.mmwords
...
Signed transaction written to file 'FEDCBA[0.1].sigtx'
The mnemonic can also be used to regenerate a lost wallet:
$ mmgen-walletconv 89ABCDEF.mmwords
...
MMGen wallet written to file '89ABCDEF-01234567[256,3].mmdat'
$ mmgen-walletconv 89ABCDEF.mmwords
...
MMGen wallet written to file '89ABCDEF-01234567[256,3].mmdat'
Note that the regenerated wallet has a different Key ID but of course the same
Seed ID.
@ -458,50 +461,50 @@ An alternative to mnemonics, seed files provide yet another way of representing
your seed. They bear the extension '.mmseed' and are generated exactly the same
way as mnemonic files:
$ mmgen-walletconv -o seed
...
Seed data written to file '89ABCDEF.mmseed'
$ mmgen-walletconv -o seed
...
Seed data written to file '89ABCDEF.mmseed'
They can be used just like mnemonics to regenerate a wallet:
$ mmgen-walletconv 89ABCDEF.mmseed
...
MMGen wallet written to file '89ABCDEF-23456701[256,3].mmdat'
$ mmgen-walletconv 89ABCDEF.mmseed
...
MMGen wallet written to file '89ABCDEF-23456701[256,3].mmdat'
Here’s a sample seed file for a 256-bit seed:
$ cat 8B7392ED.mmseed
f4c84b C5ZT wWpT Jsoi wRVw 2dm9 Aftd WLb8 FggQ eC8h Szjd da9L
$ cat 8B7392ED.mmseed
f4c84b C5ZT wWpT Jsoi wRVw 2dm9 Aftd WLb8 FggQ eC8h Szjd da9L
And for a 128-bit seed:
$ cat 8E0DFB78.mmseed
0fe02f XnyC NfPH piuW dQ2d nM47 VU
$ cat 8E0DFB78.mmseed
0fe02f XnyC NfPH piuW dQ2d nM47 VU
As you can see, seed files are short enough to be easily written out by hand or
memorized. And their built-in checksum makes it easy to test your memory using
a simple Unix shell command:
$ echo -n XnyC NfPH piuW dQ2d nM47 VU | tr -d ' '| sha256sum | cut -c 1-6
0fe02f
$ echo -n XnyC NfPH piuW dQ2d nM47 VU | tr -d ' '| sha256sum | cut -c 1-6
0fe02f
Or you can do the same thing with 'mmgen-tool':
$ mmgen-tool str2id6 'XnyC NfPH piuW dQ2d nM47 VU'
0fe02f
$ mmgen-tool str2id6 'XnyC NfPH piuW dQ2d nM47 VU'
0fe02f
Beginning with version 0.9.0, MMGen also supports seed files in hexadecimal
(hexseed) format. Hexseed files are identical to seed files but encoded in
hexadecimal rather than base 58. They bear the extension '.mmhex':
$ cat FE3C6545.mmhex
afc3fe 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e
$ cat FE3C6545.mmhex
afc3fe 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e
You can easily check that a hexseed is correct by generating its Seed ID with
standard command-line tools:
$ echo 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e | tr -d ' ' | xxd -r -p | sha256sum -b | xxd -r -p | sha256sum -b | cut -c 1-8
fe3c6545
$ echo 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e | tr -d ' ' | xxd -r -p | sha256sum -b | xxd -r -p | sha256sum -b | cut -c 1-8
fe3c6545
Mnemonics and hexseeds can be used to generate keys even without the MMGen
software, using basic command-line utilities, as explained in [this
@ -513,12 +516,12 @@ All MMGen commands that take mnemonic, seed or hexseed data may receive the data
from a prompt instead of a file. Just omit the file name and specify the input
format:
$ mmgen-addrgen -i words 1-10
...
Choose a mnemonic length: 1) 12 words, 2) 18 words, 3) 24 words: 1
Mnemonic length of 12 words chosen. OK? (Y/n): y
Enter your 12-word mnemonic, hitting RETURN or SPACE after each word:
Enter word #1:
$ mmgen-addrgen -i words 1-10
...
Choose a mnemonic length: 1) 12 words, 2) 18 words, 3) 24 words: 1
Mnemonic length of 12 words chosen. OK? (Y/n): y
Enter your 12-word mnemonic, hitting RETURN or SPACE after each word:
Enter word #1:
MMGen prompts you for each of the mnemonic's words individually, checking it for
validity and reprompting if necessary. What you type is not displayed on the
@ -557,28 +560,28 @@ If you plan to store your incognito wallet in an insecure location such as cloud
storage, you’re advised to use a strong scrypt (hash) preset and a strong
password. These can be changed using the 'mmgen-passchg' utility:
$ mmgen-passchg -p 5 89ABCDEF-01234567[256,3].mmdat
...
Hash preset of wallet: '3'
Enter old passphrase for MMGen wallet: <old weak passphrase>
...
Hash preset changed to '5'
Enter new passphrase for MMGen wallet: <new strong passphrase>
...
MMGen wallet written to file '89ABCDEF-87654321[256,5].mmdat'
$ mmgen-passchg -p 5 89ABCDEF-01234567[256,3].mmdat
...
Hash preset of wallet: '3'
Enter old passphrase for MMGen wallet: <old weak passphrase>
...
Hash preset changed to '5'
Enter new passphrase for MMGen wallet: <new strong passphrase>
...
MMGen wallet written to file '89ABCDEF-87654321[256,5].mmdat'
The scrypt preset is the numeral in the wallet filename following the seed
length. As you can see, it’s now changed to '5'. Now export your new toughened
wallet to incognito format, using the `-k` option to leave the passphrase
unchanged:
$ mmgen-walletconv -k -o incog 89ABCDEF-87654321[256,5].mmdat
...
Reusing passphrase at user request
...
New Incog Wallet ID: ECA86420
...
Incognito data written to file '89ABCDEF-87654321-ECA86420[256,5].mmincog'
$ mmgen-walletconv -k -o incog 89ABCDEF-87654321[256,5].mmdat
...
Reusing passphrase at user request
...
New Incog Wallet ID: ECA86420
...
Incognito data written to file '89ABCDEF-87654321-ECA86420[256,5].mmincog'
Incog wallets have a special identifier, the Incog ID, which can be used to
locate the wallet data if you’ve forgotten where you hid it (see the example
@ -587,15 +590,15 @@ should be kept secret.
Incog wallets can also be output to hexadecimal format:
$ mmgen-walletconv -k -o incox 89ABCDEF-87654321[256,5].mmdat
...
Hex incognito data written to file '89ABCDEF-87654321-CA86420E[256,5].mmincox'
$ mmgen-walletconv -k -o incox 89ABCDEF-87654321[256,5].mmdat
...
Hex incognito data written to file '89ABCDEF-87654321-CA86420E[256,5].mmincox'
$ cat 89ABCDEF-87654321-1EE402F4[256,5].mmincox
6772 edb2 10cf ad0d c7dd 484b cc7e 42e9
4fe6 e07a 1ce2 da02 6da7 94e4 c068 57a8
3706 c5ce 56e0 7590 e677 6c6e 750a d057
b43a 21f9 82c7 6bd1 fe96 bad9 2d54 c4c0
$ cat 89ABCDEF-87654321-1EE402F4[256,5].mmincox
6772 edb2 10cf ad0d c7dd 484b cc7e 42e9
4fe6 e07a 1ce2 da02 6da7 94e4 c068 57a8
3706 c5ce 56e0 7590 e677 6c6e 750a d057
b43a 21f9 82c7 6bd1 fe96 bad9 2d54 c4c0
Note that the Incog ID is different here: it’s generated from an init vector,
which is a different random number each time, making the incog data as a whole
@ -608,14 +611,14 @@ the wrong hands.
Your incognito wallet (whether hex or binary) can be used just like any other
MMGen wallet, mnemonic or seed file to generate addresses and sign transactions:
$ mmgen-addrgen --type=segwit 89ABCDEF-87654321-CA86420E[256,5].mmincox 101-110
...
Generated 10 addresses
Addresses written to file '89ABCDEF-S[101-110].addrs'
$ mmgen-addrgen --type=segwit 89ABCDEF-87654321-CA86420E[256,5].mmincox 101-110
...
Generated 10 addresses
Addresses written to file '89ABCDEF-S[101-110].addrs'
$ mmgen-txsign FABCDE[0.3].rawtx 89ABCDEF-87654321-CA86420E[256,5].mmincox
...
Signed transaction written to file FABCDE[0.3].sigtx
$ mmgen-txsign FABCDE[0.3].rawtx 89ABCDEF-87654321-CA86420E[256,5].mmincox
...
Signed transaction written to file FABCDE[0.3].sigtx
##### <a name='a_hi'>Hidden incognito wallets</a>
@ -624,14 +627,14 @@ a specified offset in a file or partition in a single convenient operation, with
the random file being created automatically if necessary. Here’s how you’d
create a 1GB file 'random.dat' and hide a wallet in it at offset 123456789:
$ mmgen-walletconv -k -o hincog -J random.dat,123456789 89ABCDEF-87654321[256,5].mmdat
...
New Incog Wallet ID: ED1F2ACB
...
Requested file 'random.dat' does not exist. Create? (Y/n): Y
Enter file size: 1G
...
Data written to file 'random.dat' at offset 123456789
$ mmgen-walletconv -k -o hincog -J random.dat,123456789 89ABCDEF-87654321[256,5].mmdat
...
New Incog Wallet ID: ED1F2ACB
...
Requested file 'random.dat' does not exist. Create? (Y/n): Y
Enter file size: 1G
...
Data written to file 'random.dat' at offset 123456789
Your ‘random’ file can now be uploaded to a cloud storage service, for example,
or some other location on the Net, preferably non-public one (in a real-life
@ -642,9 +645,9 @@ Now let’s say at some point in the future you download this file to recover
your wallet and realize you’ve forgotten the offset where the data is hidden.
If you’ve saved your Incog ID, you’re in luck:
$ mmgen-tool find_incog_data random.dat ED1F2ACB
...
Incog data for ID ED1F2ACB found at offset 123456789
$ mmgen-tool find_incog_data random.dat ED1F2ACB
...
Incog data for ID ED1F2ACB found at offset 123456789
The search process can be slow, so patience is required. In addition, on
large files ‘false positives’ are a distinct possibility, in which case you’ll
@ -654,13 +657,13 @@ real offset.
Hidden incog wallets are nearly as convenient to use as ordinary ones.
Generating ten addresses with your hidden incog data is as easy as this:
$ mmgen-addrgen -H random.dat,123456789 101-110
$ mmgen-addrgen -H random.dat,123456789 101-110
Transaction signing uses the same syntax:
$ mmgen-txsign -H random.dat,123456789 ABCDEF[0.1].rawtx
...
Signed transaction written to file 'ABCDEF[0.1].sigtx'
$ mmgen-txsign -H random.dat,123456789 ABCDEF[0.1].rawtx
...
Signed transaction written to file 'ABCDEF[0.1].sigtx'
### <a name='a_at'>Advanced Topics</a>
@ -692,9 +695,9 @@ well as addresses, thus functioning as a hot wallet for a range of addresses.
Assuming your hot address range begins at 1001, you could start by creating a
key-address file for a hundred hot addresses like this:
$ mmgen-keygen --type=segwit 1001-1100
...
Secret keys written to file '89ABCDEF-S[1001-1100].akeys.mmenc'
$ mmgen-keygen --type=segwit 1001-1100
...
Secret keys written to file '89ABCDEF-S[1001-1100].akeys.mmenc'
`mmgen-keygen` prompts you for a password to encrypt the key-address file with.
This is a wise precaution, as it provides at least some security for keys that
@ -703,14 +706,14 @@ will be stored on an online machine.
Now copy the key-address file to your online machine and import the addresses
into your tracking wallet:
$ mmgen-addrimport --batch --keyaddr-file '89ABCDEF-S[1001-1100].akeys.mmenc'
$ mmgen-addrimport --batch --keyaddr-file '89ABCDEF-S[1001-1100].akeys.mmenc'
After funding your hot wallet by spending into some addresses in this range you
can do quickie transactions with these funds using the `mmgen-txdo` command:
$ mmgen-txdo -M '89ABCDEF-S[1001-1100].akeys.mmenc' 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:1010
...
Transaction sent: dcea1357....
$ mmgen-txdo -M '89ABCDEF-S[1001-1100].akeys.mmenc' 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:1010
...
Transaction sent: dcea1357....
The `--mmgen-keys-from-file` or `-M` option is required when using a key-address
file in place of a default wallet. Note that your change address
@ -721,7 +724,7 @@ Using `mmgen-txdo` with a default online hot wallet is even simpler. For a hot
wallet with Seed ID 0FDE89AB, for instance, creating and sending a transaction
would look like this:
$ mmgen-txdo 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:10
$ mmgen-txdo 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:10
#### <a name='a_fee'>Transaction Fees</a>
@ -773,11 +776,11 @@ incrementally increasing fees will created online and then signed offline.
Create, sign and send a BIP 125 replaceable transaction with a fee of 50
satoshis per byte:
$ mmgen-txdo --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:5
...
Signed transaction written to file 'FEDCBB[0.1,50].sigtx'
...
Transaction sent: dcba4321....
$ mmgen-txdo --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:5
...
Signed transaction written to file 'FEDCBB[0.1,50].sigtx'
...
Transaction sent: dcba4321....
Here you've sent 0.1 BTC to a third-party address and the change back to
yourself at address #5 of your default hot wallet with Seed ID 0FDE89AB.
@ -788,11 +791,11 @@ of the fee in the filename identifies the transaction as replaceable.
If the transaction fails to confirm in your desired timeframe, then create, sign
and send a replacement transaction with a higher fee, say 100 satoshis per byte:
$ mmgen-txbump --send --tx-fee 100s --output-to-reduce c 'FEDCBB[0.1,50].sigtx'
...
Signed transaction written to file 'DAE123[0.1,100].sigtx'
...
Transaction sent: eef01357....
$ mmgen-txbump --send --tx-fee 100s --output-to-reduce c 'FEDCBB[0.1,50].sigtx'
...
Signed transaction written to file 'DAE123[0.1,100].sigtx'
...
Transaction sent: eef01357....
The `--send` switch instructs `mmgen-txbump` to sign and send the transaction
after creating it. The `--output-to-reduce` switch with an argument of 'c'
@ -815,44 +818,48 @@ you'll need to supply it on the command line as a parameter to the `-M` option.
To achieve the same result as in the above example using a cold wallet, just
create the initial transaction with `mmgen-txcreate` instead of `mmgen-txdo`:
$ mmgen-txcreate --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5
...
Transaction written to file 'FEDCBC[0.1,50].rawtx'
$ mmgen-txcreate --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5
...
Transaction written to file 'FEDCBC[0.1,50].rawtx'
Now create a series of transactions with incrementally increasing fees for
offline signing:
$ mmgen-txbump --tx-fee 100s --output-to-reduce c 'FEDCBC[0.1,50].rawtx'
$ mmgen-txbump --tx-fee 150s --output-to-reduce c 'FEDCBC[0.1,50].rawtx'
$ mmgen-txbump --tx-fee 200s --output-to-reduce c 'FEDCBC[0.1,50].rawtx'
$ mmgen-txbump --tx-fee 100s --output-to-reduce c 'FEDCBC[0.1,50].rawtx'
$ mmgen-txbump --tx-fee 150s --output-to-reduce c 'FEDCBC[0.1,50].rawtx'
$ mmgen-txbump --tx-fee 200s --output-to-reduce c 'FEDCBC[0.1,50].rawtx'
To speed things up, add the `--yes` switch to make `mmgen-txbump` completely
non-interactive.
The result will be four raw transaction files with increasing fees, like this:
FEDCBC[0.1,50].rawtx
3EBB00[0.1,100].rawtx
124FFF[0.1,150].rawtx
73DABB[0.1,200].rawtx
FEDCBC[0.1,50].rawtx
3EBB00[0.1,100].rawtx
124FFF[0.1,150].rawtx
73DABB[0.1,200].rawtx
Copy the files to an empty folder, transfer the folder to your offline machine and batch sign them:
$ mmgen-txsign -d my_folder --yes my_folder/*.rawtx
$ mmgen-txsign -d my_folder --yes my_folder/*.rawtx
Then copy the signed transaction files back to your online machine and broadcast
them in turn until you get a confirmation:
$ mmgen-txsend FEDCBC[0.1,50].sigtx # ...if this doesn't confirm, then
$ mmgen-txsend 3EBB00[0.1,100].sigtx # ...if this doesn't confirm, then
$ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then
$ mmgen-txsend 73DABB[0.1,200].sigtx
$ mmgen-txsend FEDCBC[0.1,50].sigtx # ...if this doesn't confirm, then
$ mmgen-txsend 3EBB00[0.1,100].sigtx # ...if this doesn't confirm, then
$ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then
$ mmgen-txsend 73DABB[0.1,200].sigtx
### <a name='a_alt'>Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,DASH,ZEC)</a>
### <a name='a_alt'>Forkcoin and Altcoin support</a>
To use MMGen with Bitcoin Cash (BCH) or Litecoin (LTC), first make sure the
Bitcoin ABC or Litecoin daemon is properly installed
([source][si])([binaries][bi]), [running][p8] and synced.
#### <a name='a_bch'>Full support for Bcash (BCH) and Litecoin</a>
Bcash and Litecoin are fully supported by MMGen, on the same level as Bitcoin.
To use MMGen with Bcash or Litecoin, first make sure the respective Bitcoin ABC
and Litecoin daemons are properly installed ([source][si])([binaries][bi]),
[running][p8] and synced.
MMGen requires that the bitcoin-abc daemon be listening on non-standard
[RPC port 8442][p8].
@ -860,18 +867,82 @@ MMGen requires that the bitcoin-abc daemon be listening on non-standard
Then just add the `--coin=bch` or `--coin=ltc` option to all your MMGen
commands. It's that simple!
Key and address generation is supported for ETH, ETC, DASH and ZEC. The
following examples show how to generate ten key/address pairs for each
supported altcoin using your default wallet:
#### <a name='a_es'>Enhanced key/address generation support for Zcash (ZEC) and Monero (XMR)</a>
$ mmgen-keygen --coin=eth 1-10 # Ethereum
$ mmgen-keygen --coin=etc 1-10 # Ethereum Classic
$ mmgen-keygen --coin=dash 1-10 # DASH
$ mmgen-keygen --coin=zec 1-10 # Zcash t-address
$ mmgen-keygen --coin=zec --type=zcash_z 1-10 # Zcash z-address
MMGen has complete key/address generation support for Zcash and Monero.
Encrypted key-address files can be decrypted using the command `mmgen-tool
decrypt`.
Generate ten Zcash z-address key/address pairs from your default wallet:
$ mmgen-keygen --coin=zec --type=zcash_z 1-10
The addresses' view keys are included in the file as well.
NOTE: Since your key/address file will probably be used on an online computer,
you should encrypt it with a good password when prompted to do so. The file can
decrypted as required using the `mmgen-tool decrypt` command. If you choose a
non-standard Scrypt hash preset, take care to remember it.
To generate Zcash t-addresses, just omit the `--type` argument:
$ mmgen-keygen --coin=zec 1-10
Generate ten Monero address pairs from your default wallet:
$ mmgen-keygen --coin=xmr 1-10
In addition to spend and view keys, Monero key/address files also include a
wallet password for each address (the password is the double Sha256 of the spend
key, truncated to 16 bytes). This allows you to easily generate wallets for
each address by running the following command
$ monero-wallet-cli --generate-from-spend-key MyMoneroWallet
and pasting in the key and password data when prompted. Monerod must be
running and `monero-wallet-cli` be located in your executable path.
This process can be completely automated with the `mmgen-tool` utility:
$ mmgen-tool keyaddrlist2monerowallet *XMR*.akeys.mmenc
This will generate Monero wallets for each key/address pair in the key/address
file and encrypt them with their respective passwords. No user interaction is
required. By default, wallets are synced to the current block height, as
they're assumed to be empty. This behavior can be overridden:
$ mmgen-tool keyaddrlist2monerowallet *XMR*.akeys.mmenc blockheight=123456
#### <a name='a_kg'>Key/address generation support for ETH, ETC and 144 Bitcoin-derived altcoins</a>
To generate key/address pairs for these coins, just specify the coin's symbol
with the `--coin` argument:
# For DASH:
$ mmgen-keygen --coin=dash 1-10
# For Emercoin:
$ mmgen-keygen --coin=emc 1-10
If it's just the addresses you want, then use `mmgen-addrgen` instead:
$ mmgen-addrgen --coin=dash 1-10
Regarding encryption of key/address files, see the note for Zcash above.
Here's a complete list of supported altcoins as of this writing:
2give,42,611,ac,acoin,alf,anc,apex,arco,arg,aur,bcf,blk,bmc,bqc,bsty,btcd,
btq,bucks,cann,cash,cat,cbx,ccn,cdn,chc,clam,con,cpc,crps,csh,dash,dcr,dfc,
dgb,dgc,doge,doged,dope,dvc,efl,emc,emd,enrg,esp,fai,fc2,fibre,fjc,flo,flt,
fst,ftc,gcr,good,grc,gun,ham,html5,hyp,icash,infx,inpay,ipc,jbs,judge,lana,
lat,ldoge,lmc,ltc,mars,mcar,mec,mint,mobi,mona,moon,mrs,mue,mxt,myr,myriad,
mzc,neos,neva,nka,nlg,nmc,nto,nvc,ok,omc,omni,onion,onx,part,pink,pivx,pkb,
pnd,pot,ppc,ptc,pxc,qrk,rain,rbt,rby,rdd,ric,sdc,sib,smly,song,spr,start,
sys,taj,tit,tpc,trc,ttc,tx,uno,via,vpn,vtc,wash,wdc,wisc,wkc,wsx,xcn,xgb,
xmg,xpm,xpoke,xred,xst,xvc,zet,zlq,zoom,zrc,bch,etc,eth,ltc,xmr,zec
Note that support for these coins is EXPERIMENTAL. Many of them have received
only minimal testing, or no testing at all. At startup you'll be informed of
the level of your selected coin's support reliability as deemed by the MMGen
Project.
[01]: https://github.com/mmgen/mmgen/wiki/Tracking-and-spending-ordinary-Bitcoin-addresses
[02]: https://tpfaucet.appspot.com

@ -15,4 +15,4 @@
> #### [Recovering your keys without the MMGen software](Recovering-Your-Keys-Without-the-MMGen-Software)
> #### [Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,DASH,ZEC)](Getting-Started-with-MMGen#a_alt)
> #### [Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,ZEC,XMR and 144 Bitcoin-derived alts)](Getting-Started-with-MMGen#a_alt)

@ -2,7 +2,11 @@
> Install required Debian/Ubuntu packages:
$ sudo apt-get install python-dev python-pexpect python-ecdsa python-scrypt libssl-dev git autoconf libtool wipe python-setuptools libgmp-dev python-crypto python-nacl python-pysha3
$ sudo apt-get install python-dev python-pexpect python-ecdsa python-scrypt libssl-dev git autoconf libtool wipe python-setuptools libgmp-dev python-crypto python-nacl python-pysha3 python-pip
> Install fast ed25519 Python package (optional, but recommended for Monero addresses):
$ sudo pip install ed25519ll
> Install the secp256k1 library:

@ -37,11 +37,12 @@
If available, the secp256k1 library will be used for address generation.
ADDRESS TYPES:
'S','segwit' - Segwit P2SH-P2WPKH address
'C','compressed' - Compressed P2PKH address
'Z','zcash_z' - Zcash z-address
'E','ethereum' - Ethereum address
'M','monero' - Monero address
'L','legacy' - Legacy uncompressed address
'S','segwit' - Segwit P2SH-P2WPKH address
'Z','zcash_z' - Zcash z-address
NOTES FOR ALL GENERATOR COMMANDS

@ -41,11 +41,12 @@
If available, the secp256k1 library will be used for address generation.
ADDRESS TYPES:
'S','segwit' - Segwit P2SH-P2WPKH address
'C','compressed' - Compressed P2PKH address
'Z','zcash_z' - Zcash z-address
'E','ethereum' - Ethereum address
'M','monero' - Monero address
'L','legacy' - Legacy uncompressed address
'S','segwit' - Segwit P2SH-P2WPKH address
'Z','zcash_z' - Zcash z-address
NOTES FOR ALL GENERATOR COMMANDS

@ -5,6 +5,7 @@
-h, --help Print this help message
--longhelp Print help message for long options (common options)
-b, --base32 Generate passwords in Base32 format instead of Base58
-x, --hex Generate passwords in raw hex format instead of Base58
-d, --outdir d Output files to directory 'd' instead of working dir
-e, --echo-passphrase Echo passphrase or mnemonic to screen upon entry
-i, --in-fmt f Input is from wallet format 'f' (see FMT CODES below)
@ -12,9 +13,9 @@
'f' at offset 'o' (comma-separated)
-O, --old-incog-fmt Specify old-format incognito input
-L, --passwd-len l Specify length of generated passwords
(default: 20 chars [base58], 24 chars [base32]).
An argument of 'h' will generate passwords of half
the default length.
(default: 20 chars [base58], 24 chars [base32],
64 chars [hex]). An argument of 'h' will generate
passwords of half the default length.
-l, --seed-len l Specify wallet seed length of 'l' bits. This option
is required only for brainwallet and incognito inputs
with non-standard (< 256-bit) seed lengths

@ -15,7 +15,7 @@
Cryptocoin address/key operations (compressed public keys supported):
addr2hexaddr - convert coin address from base58 to hex format
hex2wif - convert a private key from hex to WIF format (use 'pubkey_type=zcash_z' for zcash-z key)
hex2wif - convert a private key from hex to WIF format (use '--type=zcash_z' for zcash-z key)
pubhash2addr - convert public key hash to address
privhex2addr - generate coin address from private key in hex format
privhex2pubhex - generate a hex public key from a hex private key