diff --git a/Home.md b/Home.md
index 7eb977f..7a1466e 100644
--- a/Home.md
+++ b/Home.md
@@ -9,6 +9,8 @@
> #### See [Getting Started with MMGen](Getting-Started-with-MMGen)
+> #### [MMGen command help](cmdhelp/Command-Help)
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[**Forum**](https://bitcointalk.org/index.php?topic=567069.0) |
diff --git a/cmdhelp/Command-Help.md b/cmdhelp/Command-Help.md
new file mode 100644
index 0000000..4d45827
--- /dev/null
+++ b/cmdhelp/Command-Help.md
@@ -0,0 +1,13 @@
+## MMGen Command Help
+
+* [mmgen-addrgen](mmgen-addrgen)
+* [mmgen-addrimport](mmgen-addrimport)
+* [mmgen-keygen](mmgen-keygen)
+* [mmgen-passchg](mmgen-passchg)
+* [mmgen-pywallet](mmgen-pywallet)
+* [mmgen-tool](mmgen-tool)
+* [mmgen-txcreate](mmgen-txcreate)
+* [mmgen-txsend](mmgen-txsend)
+* [mmgen-txsign](mmgen-txsign)
+* [mmgen-walletchk](mmgen-walletchk)
+* [mmgen-walletgen](mmgen-walletgen)
diff --git a/cmdhelp/mmgen-addrgen.md b/cmdhelp/mmgen-addrgen.md
new file mode 100644
index 0000000..29a42e7
--- /dev/null
+++ b/cmdhelp/mmgen-addrgen.md
@@ -0,0 +1,57 @@
+#### mmgen-addrgen --help
+ MMGEN-ADDRGEN: Generate a list or range of addresses from an MMGen wallet,
+ mnemonic, seed or password
+ USAGE: mmgen-addrgen [opts] [infile]
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -e, --echo-passphrase Echo passphrase or mnemonic to screen upon entry
+ -H, --show-hash-presets Show information on available hash presets
+ -K, --no-keyconv Use internal libraries for address generation
+ instead of 'keyconv'
+ -l, --seed-len N Length of seed. Options: 128, 192, 256
+ (default: 256)
+ -p, --hash-preset p Use scrypt.hash() parameters from preset 'p' when
+ hashing password (default: '3')
+ -P, --passwd-file f Get passphrase from file 'f'
+ -q, --quiet Suppress warnings; overwrite files without
+ prompting
+ -S, --stdout Print addresses to stdout
+ -v, --verbose Produce more verbose output
+
+ -b, --from-brain l,p Generate addresses from a user-created password,
+ i.e. a "brainwallet", using seed length 'l' and
+ hash preset 'p' (comma-separated)
+ -g, --from-incog Generate addresses from an incognito wallet
+ -X, --from-incog-hex Generate addresses from incognito hexadecimal wallet
+ -G, --from-incog-hidden f,o,l Generate addresses from incognito data in file
+ 'f' at offset 'o', with seed length of 'l'
+ -m, --from-mnemonic Generate addresses from an electrum-like mnemonic
+ -s, --from-seed Generate addresses from a seed in .mmseed format
+
+ Addresses are given in a comma-separated list. Hyphen-separated ranges are
+ also allowed.
+
+ If available, the external 'keyconv' program will be used for address
+ generation.
+
+ Data for the --from- options will be taken from if
+ is specified. Otherwise, the user will be prompted to enter the data.
+
+ For passphrases all combinations of whitespace are equal, and leading and
+ trailing space are ignored. This permits reading passphrase data from a
+ multi-line file with free spacing and indentation. This is particularly
+ convenient for long brainwallet passphrases, for example.
+
+ BRAINWALLET NOTE:
+
+ As brainwallets require especially strong hashing to thwart dictionary
+ attacks, the brainwallet hash preset must be specified by the user, using
+ the 'p' parameter of the '--from-brain' option
+
+ The '--from-brain' option also requires the user to specify a seed length
+ (the 'l' parameter)
+
+ For a brainwallet passphrase to always generate the same keys and addresses,
+ the same 'l' and 'p' parameters to '--from-brain' must be used in all future
+ invocations with that passphrase
diff --git a/cmdhelp/mmgen-addrimport.md b/cmdhelp/mmgen-addrimport.md
new file mode 100644
index 0000000..8fd2960
--- /dev/null
+++ b/cmdhelp/mmgen-addrimport.md
@@ -0,0 +1,10 @@
+#### mmgen-addrimport --help
+ MMGEN-ADDRIMPORT: Import addresses (both MMGen and non-MMGen) into a bitcoind
+ watching wallet
+ USAGE: mmgen-addrimport [opts] [mmgen address file]
+ OPTIONS:
+ -h, --help Print this help message
+ -l, --addrlist f Import the non-mmgen Bitcoin addresses listed in file 'f'
+ -q, --quiet Suppress warnings
+ -r, --rescan Rescan the blockchain. Required if address to import is
+ on the blockchain and has a balance. Rescanning is slow.
diff --git a/cmdhelp/mmgen-keygen.md b/cmdhelp/mmgen-keygen.md
new file mode 100644
index 0000000..9e57f60
--- /dev/null
+++ b/cmdhelp/mmgen-keygen.md
@@ -0,0 +1,63 @@
+#### mmgen-keygen --help
+ MMGEN-KEYGEN: Generate a list or range of keys from an MMGen wallet,
+ mnemonic, seed or password
+ USAGE: mmgen-keygen [opts] [infile]
+ OPTIONS:
+ -h, --help Print this help message
+ -A, --no-addresses Print only secret keys, no addresses
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -e, --echo-passphrase Echo passphrase or mnemonic to screen upon entry
+ -f, --flat-list Produce a flat list of keys suitable for use with
+ 'mmgen-txsign'
+ -H, --show-hash-presets Show information on available hash presets
+ -K, --no-keyconv Use internal libraries for address generation
+ instead of 'keyconv'
+ -l, --seed-len N Length of seed. Options: 128, 192, 256
+ (default: 256)
+ -p, --hash-preset p Use scrypt.hash() parameters from preset 'p' when
+ hashing password (default: '3')
+ -P, --passwd-file f Get passphrase from file 'f'
+ -q, --quiet Suppress warnings; overwrite files without
+ prompting
+ -S, --stdout Print keys to stdout
+ -v, --verbose Produce more verbose output
+ -x, --b16 Print secret keys in hexadecimal too
+
+ -b, --from-brain l,p Generate keys from a user-created password,
+ i.e. a "brainwallet", using seed length 'l' and
+ hash preset 'p' (comma-separated)
+ -g, --from-incog Generate keys from an incognito wallet
+ -X, --from-incog-hex Generate keys from incognito hexadecimal wallet
+ -G, --from-incog-hidden f,o,l Generate keys from incognito data in file
+ 'f' at offset 'o', with seed length of 'l'
+ -m, --from-mnemonic Generate keys from an electrum-like mnemonic
+ -s, --from-seed Generate keys from a seed in .mmseed format
+
+ Addresses are given in a comma-separated list. Hyphen-separated ranges are
+ also allowed.
+
+ By default, both addresses and secret keys are generated.
+
+ If available, the external 'keyconv' program will be used for address
+ generation.
+
+ Data for the --from- options will be taken from if
+ is specified. Otherwise, the user will be prompted to enter the data.
+
+ For passphrases all combinations of whitespace are equal, and leading and
+ trailing space are ignored. This permits reading passphrase data from a
+ multi-line file with free spacing and indentation. This is particularly
+ convenient for long brainwallet passphrases, for example.
+
+ BRAINWALLET NOTE:
+
+ As brainwallets require especially strong hashing to thwart dictionary
+ attacks, the brainwallet hash preset must be specified by the user, using
+ the 'p' parameter of the '--from-brain' option
+
+ The '--from-brain' option also requires the user to specify a seed length
+ (the 'l' parameter)
+
+ For a brainwallet passphrase to always generate the same keys and addresses,
+ the same 'l' and 'p' parameters to '--from-brain' must be used in all future
+ invocations with that passphrase
diff --git a/cmdhelp/mmgen-passchg.md b/cmdhelp/mmgen-passchg.md
new file mode 100644
index 0000000..b543743
--- /dev/null
+++ b/cmdhelp/mmgen-passchg.md
@@ -0,0 +1,22 @@
+#### mmgen-passchg --help
+ MMGEN-PASSCHG: Change the passphrase, hash preset or label of an MMGen
+ deterministic wallet
+ USAGE: mmgen-passchg [opts] [filename]
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -H, --show-hash-presets Show information on available hash presets
+ -k, --keep-old-passphrase Keep old passphrase (use when changing hash
+ strength or label only)
+ -L, --label l Change the wallet's label to 'l'
+ -p, --hash-preset p Change scrypt.hash() parameters to preset 'p'
+ (default: '3')
+ -P, --passwd-file f Get new passphrase from file 'f'
+ -r, --usr-randchars n Get 'n' characters of additional randomness from
+ user (min=10, max=80)
+ -q, --quiet Suppress warnings; overwrite files without
+ prompting
+ -v, --verbose Produce more verbose output
+
+ NOTE: The key ID will change if either the passphrase or hash preset are
+ changed
diff --git a/cmdhelp/mmgen-pywallet.md b/cmdhelp/mmgen-pywallet.md
new file mode 100644
index 0000000..72abb5f
--- /dev/null
+++ b/cmdhelp/mmgen-pywallet.md
@@ -0,0 +1,13 @@
+#### mmgen-pywallet --help
+ MMGEN-PYWALLET: Dump contents of a bitcoind wallet to file
+ USAGE: mmgen-pywallet [opts]
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -e, --echo-passphrase Display passphrase on screen upon entry
+ -j, --json Dump wallet in json format
+ -k, --keys Dump all private keys (flat list)
+ -a, --addrs Dump all addresses (flat list)
+ -K, --keysforaddrs f Dump private keys for addresses listed in file 'f'
+ -P, --passwd-file f Get passphrase from file 'f'
+ -S, --stdout Dump to stdout rather than file
diff --git a/cmdhelp/mmgen-tool.md b/cmdhelp/mmgen-tool.md
new file mode 100644
index 0000000..b4bb879
--- /dev/null
+++ b/cmdhelp/mmgen-tool.md
@@ -0,0 +1,69 @@
+#### mmgen-tool --help
+ MMGEN-TOOL: Perform various BTC-related operations
+ USAGE: mmgen-tool [opts]
+ OPTIONS:
+ -h, --help Print this help message
+ -q, --quiet Produce quieter output
+ -r, --usr-randchars n Get 'n' characters of additional randomness from
+ user (min=10, max=80)
+ -v, --verbose Produce more verbose output
+
+ COMMANDS:
+ File operations
+ hexdump - encode data into formatted hexadecimal form (file or stdin)
+ unhexdump - decode formatted hexadecimal data (file or stdin)
+
+ MMGen-specific operations
+ id8 - generate 8-character MMGen ID checksum for file (or stdin)
+ id6 - generate 6-character MMGen ID checksum for file (or stdin)
+ check_addrfile - compute checksum and address list for MMGen address file
+
+ Bitcoin operations:
+ strtob58 - convert a string to base 58
+ hextob58 - convert a hexadecimal number to base 58
+ b58tohex - convert a base 58 number to hexadecimal
+ b58randenc - generate a random 32-byte number and convert it to base 58
+ randwif - generate a random private key in WIF format
+ randpair - generate a random private key/address pair
+ wif2hex - convert a private key from WIF to hex format
+ hex2wif - convert a private key from hex to WIF format
+ wif2addr - generate a Bitcoin address from a key in WIF format
+ pubkey2addr - convert Bitcoin public key to address
+ pubkey2hexaddr - convert Bitcoin public key to address in hex format
+ hexaddr2addr - convert Bitcoin address from hex to base58 format
+ addr2hexaddr - convert Bitcoin address from base58 to hex format
+ privhex2addr - generate Bitcoin address from private key in hex format
+
+ Miscellaneous operations:
+ hexreverse - reverse bytes of a hexadecimal string
+ hexlify - display string in hexadecimal format
+ sha256x2 - compute a double sha256 hash of data
+ getrand - print 'n' bytes (default 32) of random data in hex format
+
+ Encryption operations:
+ encrypt - encrypt a file using MMGen's encryption suite
+ decrypt - decrypt an MMGen-encrypted file
+ MMGen encryption suite:
+ * Key: Scrypt (user-configurable hash parameters, 32-byte salt)
+ * Enc: AES256_CTR, 16-byte rand IV, sha256 hash + 32-byte nonce + data
+ * The encrypted file is indistinguishable from random data
+
+ Mnemonic operations (choose "electrum" (default), "tirosh" or "all"
+ wordlists):
+ mn_rand128 - generate random 128-bit mnemonic
+ mn_rand192 - generate random 192-bit mnemonic
+ mn_rand256 - generate random 256-bit mnemonic
+ mn_stats - show stats for mnemonic wordlist
+ mn_printlist - print mnemonic wordlist
+
+ Bitcoind operations (bitcoind must be running):
+ listaddresses - show MMGen addresses and their balances
+ getbalance - like 'bitcoind getbalance' but shows confirmed/unconfirmed,
+ spendable/unspendable
+ viewtx - show raw/signed MMGen transaction in human-readable form
+
+ IMPORTANT NOTE: Though MMGen mnemonics use the Electrum wordlist, they're
+ computed using a different algorithm and are NOT Electrum-compatible!
+
+ Type 'mmgen-tool --help for usage information on a particular
+ command
diff --git a/cmdhelp/mmgen-txcreate.md b/cmdhelp/mmgen-txcreate.md
new file mode 100644
index 0000000..fabf7ec
--- /dev/null
+++ b/cmdhelp/mmgen-txcreate.md
@@ -0,0 +1,23 @@
+#### mmgen-txcreate --help
+ MMGEN-TXCREATE: Create a BTC transaction with outputs to specified addresses
+ USAGE: mmgen-txcreate [opts] ... [change addr] [addr file] ...
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -e, --echo-passphrase Print passphrase to screen when typing it
+ -f, --tx-fee f Transaction fee (default: 0.0001 BTC)
+ -i, --info Display unspent outputs and exit
+ -q, --quiet Suppress warnings; overwrite files without
+ prompting
+
+ Transaction inputs are chosen from a list of the user's unpent outputs
+ via an interactive menu.
+
+ Ages of transactions are approximate based on an average block creation
+ interval of 8.5 minutes.
+
+ Addresses on the command line can be Bitcoin addresses or MMGen addresses
+ of the form :.
+
+ To send all inputs (minus TX fee) to a single output, specify one address
+ with no amount on the command line.
diff --git a/cmdhelp/mmgen-txsend.md b/cmdhelp/mmgen-txsend.md
new file mode 100644
index 0000000..ba1d396
--- /dev/null
+++ b/cmdhelp/mmgen-txsend.md
@@ -0,0 +1,7 @@
+#### mmgen-txsend --help
+ MMGEN-TXSEND: Send a Bitcoin transaction signed by mmgen-txsign
+ USAGE: mmgen-txsend [opts]
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -q, --quiet Suppress warnings; overwrite files without prompting
diff --git a/cmdhelp/mmgen-txsign.md b/cmdhelp/mmgen-txsign.md
new file mode 100644
index 0000000..1dd0b5c
--- /dev/null
+++ b/cmdhelp/mmgen-txsign.md
@@ -0,0 +1,54 @@
+#### mmgen-txsign --help
+ MMGEN-TXSIGN: Sign Bitcoin transactions generated by mmgen-txcreate
+ USAGE: mmgen-txsign [opts] .. [mmgen wallet/seed/words/brainwallet file] .. [addrfile] ..
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -e, --echo-passphrase Print passphrase to screen when typing it
+ -i, --info Display information about the transaction and exit
+ -I, --tx-id Display transaction ID and exit
+ -k, --keys-from-file f Provide additional keys for non-MMGen addresses
+ -K, --all-keys-from-file f Like '-k', only use the keyfile as key source
+ for ALL inputs, including MMGen ones. Can be used
+ for online signing without an MMGen seed source.
+ MMGen-to-BTC mappings can optionally be verified
+ using address file(s) listed on the command line
+ -P, --passwd-file f Get passphrase from file 'f'
+ -q, --quiet Suppress warnings; overwrite files without
+ prompting
+ -V, --skip-key-preverify Skip optional key pre-verification step
+ -b, --from-brain l,p Generate keys from a user-created password,
+ i.e. a "brainwallet", using seed length 'l' and
+ hash preset 'p'
+ -w, --use-wallet-dat Get keys from a running bitcoind
+ -g, --from-incog Generate keys from an incognito wallet
+ -X, --from-incog-hex Generate keys from an incognito hexadecimal wallet
+ -G, --from-incog-hidden f,o,l Generate keys from incognito data in file
+ 'f' at offset 'o', with seed length of 'l'
+ -m, --from-mnemonic Generate keys from an electrum-like mnemonic
+ -s, --from-seed Generate keys from a seed in .mmseed format
+
+ Transactions with either MMGen or non-MMGen input addresses may be signed.
+ For non-MMGen inputs, the bitcoind wallet.dat is used as the key source.
+ For MMGen inputs, key data is generated from your seed as with the
+ mmgen-addrgen and mmgen-keygen utilities.
+
+ Data for the --from- options will be taken from a file if a second
+ file is specified on the command line. Otherwise, the user will be
+ prompted to enter the data.
+
+ In cases of transactions with mixed MMGen and non-MMGen inputs, non-MMGen
+ keys must be supplied in a separate file (WIF format, one key per line)
+ using the '--keys-from-file' option. Alternatively, one may get keys from
+ a running bitcoind using the '--force-wallet-dat' option. First import the
+ required MMGen keys using 'bitcoind importprivkey'.
+
+ For transaction outputs that are MMGen addresses, MMGen-to-Bitcoin address
+ mappings are verified. Therefore, seed material for these addresses must
+ be supplied on the command line (but see '--all-keys-from-file').
+
+ Seed data supplied in files must have the following extensions:
+ wallet: '.mmdat'
+ seed: '.mmseed'
+ mnemonic: '.mmwords'
+ brainwallet: '.mmbrain'
diff --git a/cmdhelp/mmgen-walletchk.md b/cmdhelp/mmgen-walletchk.md
new file mode 100644
index 0000000..0695190
--- /dev/null
+++ b/cmdhelp/mmgen-walletchk.md
@@ -0,0 +1,26 @@
+#### mmgen-walletchk --help
+ MMGEN-WALLETCHK: Check integrity of an MMGen deterministic wallet, display
+ its information, and export seed and mnemonic data.
+ USAGE: mmgen-walletchk [opts] [filename]
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -e, --echo-passphrase Print passphrase to screen when typing it
+ -P, --passwd-file f Get passphrase from file 'f'
+ -q, --quiet Suppress warnings; overwrite files without prompting
+ -r, --usr-randchars n Get 'n' characters of additional randomness from
+ user (min=10, max=80)
+ -S, --stdout Print seed or mnemonic data to standard output
+ -v, --verbose Produce more verbose output
+ -g, --export-incog Export wallet to incognito format
+ -X, --export-incog-hex Export wallet to incognito hexadecimal format
+ -G, --export-incog-hidden f,o Hide incognito data in existing file 'f'
+ at offset 'o' (comma-separated)
+ -m, --export-mnemonic Export the wallet's mnemonic to file
+ -s, --export-seed Export the wallet's seed to file
+
+ Since good randomness is particularly important for incognito wallets,
+ the '--usr-randchars' option is turned on by default to gather additional
+ entropy from the user when one of the '--export-incog*' options is
+ selected. If you fully trust your OS's random number generator and wish
+ to disable this option, then specify '-r0' on the command line.
diff --git a/cmdhelp/mmgen-walletgen.md b/cmdhelp/mmgen-walletgen.md
new file mode 100644
index 0000000..26d9d45
--- /dev/null
+++ b/cmdhelp/mmgen-walletgen.md
@@ -0,0 +1,59 @@
+#### mmgen-walletgen --help
+ MMGEN-WALLETGEN: Generate an MMGen deterministic wallet
+ USAGE: mmgen-walletgen [opts] [infile]
+ OPTIONS:
+ -h, --help Print this help message
+ -d, --outdir d Specify an alternate directory 'd' for output
+ -e, --echo-passphrase Print passphrase to screen when typing it
+ -H, --show-hash-presets Show information on available hash presets
+ -l, --seed-len n Create seed of length 'n'. Options: 128,192,256
+ (default: 256)
+ -L, --label l Label to identify this wallet (32 chars max.
+ Allowed symbols: A-Z, a-z, 0-9, " ", "_", ".")
+ -p, --hash-preset p Use scrypt.hash() parameters from preset 'p'
+ (default: '3')
+ -P, --passwd-file f Get passphrase from file 'f'
+ -q, --quiet Produce quieter output; overwrite files without
+ prompting
+ -r, --usr-randchars n Get 'n' characters of additional randomness from
+ user (min=10, max=80)
+ -v, --verbose Produce more verbose output
+
+ -b, --from-brain l,p Generate wallet from a user-created passphrase,
+ i.e. a "brainwallet", using seed length 'l' and
+ hash preset 'p' (comma-separated)
+ -g, --from-incog Generate wallet from an incognito-format wallet
+ -m, --from-mnemonic Generate wallet from an Electrum-like mnemonic
+ -s, --from-seed Generate wallet from a seed in .mmseed format
+
+ By default (i.e. when invoked without any of the '--from-' options),
+ mmgen-walletgen generates a wallet based on a random seed.
+
+ Data for the --from- options will be taken from if
+ is specified. Otherwise, the user will be prompted to enter the data.
+
+ For passphrases all combinations of whitespace are equal, and leading and
+ trailing space are ignored. This permits reading passphrase data from a
+ multi-line file with free spacing and indentation. This is particularly
+ convenient for long brainwallet passphrases, for example.
+
+ Since good randomness is particularly important when generating wallets,
+ the '--usr-randchars' option is turned on by default to gather additional
+ entropy from the user. If you fully trust your OS's random number gener-
+ ator and wish to disable this option, specify '-r0' on the command line.
+
+ BRAINWALLET NOTE:
+
+ As brainwallets require especially strong hashing to thwart dictionary
+ attacks, the brainwallet hash preset must be specified by the user, using
+ the 'p' parameter of the '--from-brain' option. This preset should be
+ stronger than the one used for hashing the seed (i.e. the default value or
+ the one specified in the '--hash-preset' option).
+
+ The '--from-brain' option also requires the user to specify a seed length
+ (the 'l' parameter), which overrides both the default and any one given in
+ the '--seed-len' option.
+
+ For a brainwallet passphrase to always generate the same keys and
+ addresses, the same 'l' and 'p' parameters to '--from-brain' must be used
+ in all future invocations with that passphrase.