Commit graph

642 commits

Author SHA1 Message Date
622b63a19b
test suite: minor fixes and cleanups 2019-11-01 12:24:09 +00:00
18af5a1306
preprocess_key(), parse_wif(): fixes and cleanups
- wif2hex() -> parse_wif()
- reimplement both methods using bytes instead of hex strings
- fix bug with zcash-t preprocess_key() failing to call base class method,
  causing crash with edge-case privkeys
2019-11-01 09:57:02 +00:00
ac48947769
die roll wallet: handle invalid data length, add base6d tool cmds 2019-10-31 11:56:38 +00:00
99d968e4aa
minor fixes and cleanups 2019-10-31 10:59:48 +00:00
768f4b960c
test.py: add 'shared_deps' feature 2019-10-31 10:46:46 +00:00
4714ef84d5
die roll wallet: interactive input support
- Create a wallet of any MMGen-supported format by inputting rolls of a die
  interactively at the keyboard.

Testing:

  $ test/test.py -e input

Examples:

  Create a default MMGen wallet from interactive die rolls:

  $ mmgen-walletconv -i dieroll

  Create a BIP39 mnemonic seed phrase from interactive die rolls, outputting
  to screen without prompting:

  $ mmgen-walletconv -Sq -i dieroll -o bip39
2019-10-30 21:49:17 +00:00
3931cc7be1
MMGen & BIP39 mnemonic: refactor interactive input code, clean up test 2019-10-30 12:49:27 +00:00
809fd0503d
crypto.py: get_random() -> add_user_random(), UI cleanups & fixes 2019-10-30 09:33:57 +00:00
5617dcad9a
term.py: add 'sleep' option 2019-10-30 09:26:20 +00:00
56a39244f7
a few minor cleanups and fixes 2019-10-30 09:23:54 +00:00
d46eeef998
dieroll wallet: truncate seed to correct length 2019-10-30 09:20:47 +00:00
f1e7cbb7a0
baseconv: minor cleanups & fixes (import, init_mn) 2019-10-29 13:40:07 +00:00
ca994bdd74
use baseconv.{to,from}bytes() wherever feasible
- also fixes a padding bug in the b58tobytes() tool method
2019-10-28 18:45:15 +00:00
9cc0777f54
move baseconv class to its own module, baseconv.py 2019-10-28 17:35:45 +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
04a1dcaae4
pretty_hexdump() -> block_format() 2019-10-27 16:12:20 +00:00
3db6dd0d54
baseconv: add 'desc' attr, make error msgs more user-friendly 2019-10-26 14:59:57 +00:00
d67f87aed1
baseconv: remove b58encode() and b58decode() convenience methods 2019-10-26 14:14:31 +00:00
bec3dfeed2
baseconv: tohex() -> tobytes(), fromhex() -> frombytes() 2019-10-26 14:13:56 +00:00
554703e541
bip39, baseconv: don't leak private data in error messages 2019-10-26 12:06:46 +00:00
ec6f976a8c
bip39 and baseconv unit tests: reformat bad input data 2019-10-26 11:43:18 +00:00
9c603be62b
minor fixes and changes 2019-10-26 11:38:23 +00:00
186f223646
base conversion: rework pad API, forbid empty input and output 2019-10-25 15:20:07 +00:00
8e232f24bb
unit tests: use process_bad_data() helper in BIP39 test 2019-10-25 11:24:07 +00:00
1810b50b09
unit_tests.py: new UnitTestHelpers class 2019-10-24 18:30:23 +00:00
f9778043c2
unit_tests.py: add test for base conversion routines
Run test:

    $ test/unit_tests.py -v baseconv
2019-10-24 16:31: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
139484281f
new test: colortest.py - test terminal output + terminfo parsing 2019-10-23 10:44:17 +00:00
d57631695a
test suite: move path fixup code to test/tests_header.py 2019-10-23 10:01:11 +00:00
6cf4fcc7e4
Use subprocess.run() throughout, related cleanups 2019-10-23 09:31:21 +00:00
d8252c56ac
color.py: code cleanups, add terminfo entry parsing function
- handle hexadecimal values in 'colors' field (e.g. '0x100' for 256)
2019-10-23 09:30:12 +00:00
017abc3f8c
altcoin.py: use namedtuples for CoinInfo entries 2019-10-21 17:22:16 +00:00
c276f9d8fe
scrambletest.py: add vectors for 'mmgen-passgen' 2019-10-21 11:56:57 +03:00
e12eb13cea
scrambletest.py: code cleanups 2019-10-21 11:50:57 +03:00
f327ce2bf9
gentest.py: minor code cleanups 2019-10-20 17:20:35 +03:00
e5abf419c0
gentest.py: use ethkey for Ethereum tests 2019-10-20 17:09:09 +03:00
174caeebd3
MMGenImmutableAttr: allow callable dtype arg, remove 'no_type_check' option 2019-10-19 20:27:24 +03:00
3224b9c7d2
new test: objattrtest.py: test objects' immutable attributes 2019-10-19 18:22:31 +03:00
514278d616
MMGenListItem: require all immutable attrs to be set in constructor 2019-10-19 17:44:44 +03:00
2df7878ea6
improve logic for loading mmgen.devtools module 2019-10-19 17:37:27 +03:00
c1347d1080
various fixes and cleanups 2019-10-19 17:34:49 +03:00
94eda8473e
test.py: use importlib, clean up module loading code 2019-10-19 13:15:31 +03:00
9b456b0820
altcoin_subclass(): use importlib 2019-10-19 13:10:31 +03:00
c1ba807502
MMGenPasswordType: initialize all unused fields with 'None' 2019-10-18 19:59:24 +03:00
28ff467eee
MMGenImmutableAttr: allow setting attrs to None with 'set_none_ok' 2019-10-18 19:53:58 +03:00
41d2d17b51
test.py: split ref3 cmd group into ref3, ref3_addr 2019-10-17 14:42:16 +03:00
a47e472078
AddrList: new make_label() method 2019-10-17 14:35:56 +03:00
508abfb350
MMGenAddrType.mmtypes: implement values as namedtuples 2019-10-17 14:30:31 +03:00