Commit graph

18 commits

Author SHA1 Message Date
673b97b3b8
update copyright dates 2020-02-18 14:07:27 +00:00
cfa16418b3
limited Monero mnemonic seed phrase ('xmrseed') support
- 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
2020-02-12 10:38:11 +00:00
70675956b8
various fixes and cleanups throughout 2020-02-12 10:36:15 +00:00
d22fd160c5
lots of minor fixes and cleanups throughout 2019-12-07 12:20:21 +00:00
768f4b960c
test.py: add 'shared_deps' feature 2019-10-31 10:46:46 +00:00
c778636918
New die roll (base6d) wallet format
- 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
2019-10-28 15:19:54 +00:00
57682dce3f
test.py: cleanups and fixes throughout 2019-10-24 16:21:09 +00:00
15ac6c6947
new wallet format: PlainHexSeedFile (plain hexadecimal w/o checksum) 2019-10-23 12:25:24 +00:00
2a79e3647d
SeedFile -> MMGenSeedFile, HexSeedFile -> MMGenHexSeedFile 2019-10-23 12:14:41 +00:00
41d2d17b51
test.py: split ref3 cmd group into ref3, ref3_addr 2019-10-17 14:42:16 +03:00
8705e57b8f
mmgen-passgen: support BIP39 passwords
Examples:

  Generate three 24-word BIP39 mnemonic seed phrases from your default wallet
  for your Trezor device:

  $ mmgen-passgen --passwd-fmt=bip39 mytrezor 1-3

  Same, but generate 12-word seed phrases:

  $ mmgen-passgen --passwd-fmt=bip39 --passwd-len=12 mytrezor 1-3

Relevant tests:

  $ test/test.py ref ref3
2019-10-16 20:12:58 +03:00
fefea42b9c
passgen: passwd length sanity checks
- forbid attempts to generate passwords with bit length greater than seed
2019-10-16 19:39:44 +03:00
bfcfc8676d
passgen: allow hex passwords of 32 and 48 characters 2019-10-15 16:58:07 +03:00
d7fe969d8c
passgen: code cleanups, new tests, new --passwd-fmt option 2019-10-15 15:51:43 +03:00
8519b68b89
Complete BIP39 mnemonic support
- 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'
2019-07-09 15:44:17 +03:00
448e2c24bf
test.py: generated reference wallet filename checks 2019-06-11 18:57:51 +03:00
634fb2e444
py3port: use dictionary comprehensions where applicable 2019-03-16 20:45:44 +03:00
91410dd96c
test.py: refactor, modularize, cleanup code, make fully OO
- 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
2019-03-02 21:27:53 +03:00