Browse Source

mmgen-seedsplit: add BIP39 example; 'secp256k1' -> 'libsecp256k1'

The MMGen Project 5 years ago
parent
commit
4b2c76c9c9
3 changed files with 21 additions and 3 deletions
  1. 18 0
      mmgen/common.py
  2. 2 2
      mmgen/globalvars.py
  3. 1 1
      mmgen/main_addrgen.py

+ 18 - 0
mmgen/common.py

@@ -71,6 +71,24 @@ master share index is used in all split and join commands.
 
 EXAMPLES:
 
+  Split a BIP39 seed phrase into two BIP39 shares.  Rejoin the split:
+
+    $ echo 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' > sample.bip39
+
+    $ mmgen-seedsplit -o bip39 sample.bip39 1:2
+    BIP39 mnemonic data written to file '03BAE887-default-1of2[D51CB683][128].bip39'
+
+    $ mmgen-seedsplit -o bip39 sample.bip39 2:2
+    BIP39 mnemonic data written to file '03BAE887-default-2of2[67BFD36E][128].bip39'
+
+    $ mmgen-seedjoin -o bip39 \\
+        '03BAE887-default-2of2[67BFD36E][128].bip39' \\
+        '03BAE887-default-1of2[D51CB683][128].bip39'
+    BIP39 mnemonic data written to file '03BAE887[128].bip39'
+
+    $ cat '03BAE887[128].bip39'
+    zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong
+
   Create a 3-way default split of your default wallet, outputting all shares
   to default wallet format.  Rejoin the split:
 

+ 2 - 2
mmgen/globalvars.py

@@ -225,8 +225,8 @@ class g(object):
 	aesctr_dfl_iv  = b'\x00' * (aesctr_iv_len-1) + b'\x01'
 	hincog_chk_len = 8
 
-	key_generators = 'python-ecdsa','secp256k1' # '1','2'
-	key_generator  = 2 # secp256k1 is default
+	key_generators = ('python-ecdsa','libsecp256k1') # '1','2'
+	key_generator  = 2 # libsecp256k1 is default
 
 	force_standalone_scrypt_module = False
 	# Scrypt params: 'id_num': [N, p, r] (N is an exponent of two)

+ 1 - 1
mmgen/main_addrgen.py

@@ -86,7 +86,7 @@ opts_data = {
 Address indexes are given as a comma-separated list and/or hyphen-separated
 range(s).
 
-{n_addrkey}If available, the secp256k1 library will be used for address generation.
+{n_addrkey}If available, the libsecp256k1 library will be used for address generation.
 
 ADDRESS TYPES:
   {n_at}