- only 256-bit (25-word) new-style mnemonics are supported
Testing:
$ test/unit_tests.py baseconv
$ test/tooltest2.py hex2mn mn2hex
$ test/scrambletest.py pw
$ test/test.py ref_xmrseed_25_passwdgen_3
$ test/test.py ref_passwdfile_chk_xmrseed_25
The following operations are supported:
Generate a random Monero mnemonic:
$ mmgen-tool mn_rand256 fmt=xmrseed
Generate a Monero mnemonic from hexadecimal data:
$ mmgen-tool hex2mn deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef fmt=xmrseed
Convert the resulting mnemonic back to hexadecimal data:
$ mmgen-tool mn2hex 'viewpoint donuts ardent template unveil agile meant unafraid urgent athlete rustled mime azure jaded hawk baby jagged haystack baby jagged haystack ramped oncoming point template' fmt=xmrseed
Note that the result of the reversal does not match the original input. This
is because input data is reduced to a spendkey before conversion so that a
canonical seed phrase is produced. This is required because Monero seeds,
unlike ordinary wallet seeds, are tied to a concrete key/address pair. The
spendkey can be generated directly using the `hex2wif` command:
$ mmgen-tool --coin=xmr hex2wif deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef
Generate a list of passwords in Monero mnemonic format with ID 'mymonero':
$ mmgen-passgen -f xmrseed 'mymonero' 1-10
- Permits the creation of wallets by repeated rolls of a die: 50 rolls for
128-bit, 75 for 192-bit, and 100 for 256-bit seeds. The base6d format
uses the digits from one to six, so that user doesn't have to subtract
one from each roll.
Testing:
$ test/unit_tests.py baseconv
$ test/test.py ref3 conv
Example:
NOTE: when creating a real wallet, the following steps must be performed in a
secure offline environment, and preferably with the use of a text editor and
a file written in volatile memory (e.g. /dev/shm), rather than the `echo`
command. A more private and user-friendly data input method will be provided
in a forthcoming patch.
Sample 128-bit data obtained by rolling a die 50 times and entering each roll
on the keyboard as a digit:
15146 56446 53415 45431 55141 32115 41325 16311 32553 43533
Here spaces have been added for greater readability. Newlines are also
permitted.
Save the data in a file with the extension .b6d:
$ echo 15146 56446 53415 45431 55141 32115 41325 16311 32553 43533 > myseed.b6d
Convert to MMGen's default wallet format:
$ mmgen-walletconv -o wallet myseed.b6d
Convert the wallet back to base6d:
$ mmgen-walletconv -o dieroll FE3C6545*.mmdat
Base6d die roll seed data written to file 'FE3C6545[128].b6d'
$ cat 'FE3C6545[128].b6d'
15146 56446 53415 45431 55141
32115 41325 16311 32553 43533
- provided as an alternative to MMGen's native mnemonic format
# Run the BIP39 unit test:
$ test/unit_tests.py -v bip39
# Generate a random 128-bit BIP39 seed phrase:
$ mmgen-tool mn_rand128 fmt=bip39
# Export your default wallet to BIP39 format:
$ mmgen-walletconv -o bip39
...
BIP39 mnemonic data written to file '98831F3A[256].bip39'
# Generate ten addresses from the exported wallet:
$ mmgen-addrgen '98831F3A[256].bip39' 1-10
...
Addresses written to file '98831F3A[1-10].addrs'
# Generate ten addresses directly from your BIP39 seed phrase:
$ mmgen-addrgen -q -i bip39 1-10
...
Addresses written to file '98831F3A[1-10].addrs'
# Export subwallet 10L of your default wallet to BIP39 format:
$ mmgen-subwalletgen -o bip39 10L
...
BIP39 mnemonic data written to file 'A17F8E90[256].bip39'
- test groups are now separate classes in separate modules
- test data and code is loaded on an as-needed basis
- new TestSuiteRunner and CmdGroupMgr classes
- simplified invocation: if arguments are omitted, all default tests relevant
for given network and option are run. The following set of invocations
provides nearly complete coverage of MMGen's core functionality:
test/test.py
test/test.py --segwit-random
test/test.py --bech32
test/test.py --coin=ltc
test/test.py --coin=ltc --segwit-random
test/test.py --coin=ltc --bech32
test/test.py --coin=bch
test/test.py --coin=eth
test/test.py --coin=etc