user132451: Creating an HD wallet as per BIP39, adapted from O'Reilly's Mastering Bitcoin by Andreas Antonopoulos

Generate pseudo-random number as 32 hex characters

$ bx seed > entropy

Convert random number to 12-word mnemonic "sentence" for backup

$ bx hd-mnemonic < entropy > words

Q1 Presumably the checksumming was included?

$ bx mnemonic-decode < words

Q2 Why would we need to go back?


Derive the root / master key, basis for BIP32 derivation of the hierarchy of keys

$ bx hd-new < entropy > master

Q3 Why is the (supposedly optional) passphrase as salt left out?

Q4 I do not have access to run the bx tools ATM, are there detailed docs that show the --help output text?

Q5 Finally, is bx the canonical CLI tool for air-gapped tasks like creating new BIP39/BIP32 wallets, hashing / encoding different formats etc? I get a bit confused using the GUI / JS tools.



user13866: 
adapted from O'Reilly's Mastering Bitcoin by Andreas Antonopoulos

Note that the bx command set has since changed significantly.

Q1 Presumably the checksumming was included?

$ bx seed -b 512 > entropy

$ bx mnemonic-new < entropy > words

$ cat words
injury motor machine bench toy repair thumb mushroom prevent toward expand 
rural then market endorse replace chief frozen forum model click payment fan 
mechanic dwarf hobby want innocent cloud ready violin boy provide faith 
favorite print broom save crowd only tonight track dinner nominee remind obtain 
pulp average

$ bx mnemonic-to-seed < words
6705d4927c78a7ef9f409e652d0631214ee0757b44cd3de434f3c0f1a9d7e52f
5be3face8ee9092409f2eebb283a091601934b89939bcef0633bc9a646f8ef81

Note

the above result agrees with https://iancoleman.io/bip39/
the words "pulp" and "average" are both acceptable dictionary words. Repeated words are permissible in mnemonics AFAIK. We can use this to test checksumming.

$ sed 's/average/pulp/' words | bx mnemonic-to-seed
WARNING: The specified words are not a valid mnemonic in any supported 
dictionary.
cc546ef85e654fdefb6bd37ffec86ae5c5f1a0e9a28e1a252368510e6d05945f
35ebb8538a6c676fe72780390c33a4eeb5851da554061015fcbae4b96ad2fdaa

I guess that warning might be because of the checksum failure I induced.


Q2 Why would we need to go back?

wallet recovery?


Q3 Why is the (supposedly optional) passphrase as salt left out?

Because it is optional?
$ bx mnemonic-to-seed -h

Usage: bx mnemonic-to-seed [-h] [--config value] [--language value]
[--passphrase value] [WORD]...

Info: Convert a mnemonic seed (BIP39) to its numeric representation.

Options (named):

-c [--config]        The path to the configuration settings file.
-h [--help]          Get a description and instructions for this command.
-l [--language]      The language identifier of the dictionary of the
                     mnemonic. Options are 'en', 'es', 'fr', 'it', 'ja',
                     'cs', 'ru', 'uk', 'zh_Hans', 'zh_Hant' and 'any',
                     defaults to 'any'.
-p [--passphrase]    An optional passphrase for converting the mnemonic
                     to a seed.

Arguments (positional):

WORD                 The set of words that that make up the mnemonic. If
                     not specified the words are read from STDIN.



Q4 are there detailed docs that show the --help output text?

https://github.com/libbitcoin/libbitcoin-explorer says

Documentation is available on the wiki.

Which it is.


Q5 is bx the canonical CLI tool

No idea, sorry.
I guess you mean "most popular" as there are not really any lawmakers in Bitcoin who can make canon law. At least, not about which implementations you should use.
Some tools seem popular but I don't know of any credible survey results.

132451: <p>Creating an HD wallet as per BIP39, adapted from O'Reilly's <em>Mastering Bitcoin</em> by Andreas Antonopoulos</p>
<ol>
<li>Generate pseudo-random number as 32 hex characters</li>
</ol>
<p><code>$ bx seed &gt; entropy</code></p>
<ol start="2">
<li>Convert random number to 12-word mnemonic &quot;sentence&quot; for backup</li>
</ol>
<p><code>$ bx hd-mnemonic &lt; entropy &gt; words</code></p>
<ul>
<li>Q1 Presumably the checksumming was included?</li>
</ul>
<p><code>$ bx mnemonic-decode &lt; words</code></p>
<ul>
<li>Q2 Why would we need to go back?</li>
</ul>
<ol start="3">
<li>Derive the root / master key, basis for BIP32 derivation of the hierarchy of keys</li>
</ol>
<p><code>$ bx hd-new &lt; entropy &gt; master</code></p>
<ul>
<li><p>Q3 Why is the (supposedly optional) passphrase as salt left out?</p>
</li>
<li><p>Q4 I do not have access to run the <em>bx</em> tools ATM, are there detailed docs that show the <em>--help</em> output text?</p>
</li>
<li><p>Q5 Finally, is <em>bx</em> the canonical CLI tool for air-gapped tasks like creating new BIP39/BIP32 wallets, hashing / encoding different formats etc? I get a bit confused using the GUI / JS tools.</p>
</li>
</ul>
 13866: <blockquote>
<p><strong>adapted from O'Reilly's Mastering Bitcoin by Andreas Antonopoulos</strong></p>
</blockquote>
<p>Note that the bx command set has since changed significantly.</p>
<blockquote>
<p><strong>Q1 Presumably the checksumming was included?</strong></p>
</blockquote>
<pre><code>$ bx seed -b 512 &gt; entropy

$ bx mnemonic-new &lt; entropy &gt; words

$ cat words
injury motor machine bench toy repair thumb mushroom prevent toward expand 
rural then market endorse replace chief frozen forum model click payment fan 
mechanic dwarf hobby want innocent cloud ready violin boy provide faith 
favorite print broom save crowd only tonight track dinner nominee remind obtain 
pulp average

$ bx mnemonic-to-seed &lt; words
6705d4927c78a7ef9f409e652d0631214ee0757b44cd3de434f3c0f1a9d7e52f
5be3face8ee9092409f2eebb283a091601934b89939bcef0633bc9a646f8ef81
</code></pre>
<p>Note</p>
<ul>
<li>the above result agrees with <a href="https://iancoleman.io/bip39/" rel="nofollow noreferrer">https://iancoleman.io/bip39/</a></li>
<li>the words &quot;pulp&quot; and &quot;average&quot; are both acceptable dictionary words. Repeated words are permissible in mnemonics AFAIK. We can use this to test checksumming.</li>
</ul>
<pre><code>$ sed 's/average/pulp/' words | bx mnemonic-to-seed
WARNING: The specified words are not a valid mnemonic in any supported 
dictionary.
cc546ef85e654fdefb6bd37ffec86ae5c5f1a0e9a28e1a252368510e6d05945f
35ebb8538a6c676fe72780390c33a4eeb5851da554061015fcbae4b96ad2fdaa
</code></pre>
<p>I guess that warning <em>might be</em> because of the checksum failure I induced.</p>
<hr />
<blockquote>
<p><strong>Q2 Why would we need to go back?</strong></p>
</blockquote>
<p>wallet recovery?</p>
<hr />
<blockquote>
<p><strong>Q3 Why is the (supposedly optional) passphrase as salt left out?</strong></p>
</blockquote>
<p>Because it is optional?</p>
<pre><code>$ bx mnemonic-to-seed -h

Usage: bx mnemonic-to-seed [-h] [--config value] [--language value]
[--passphrase value] [WORD]...

Info: Convert a mnemonic seed (BIP39) to its numeric representation.

Options (named):

-c [--config]        The path to the configuration settings file.
-h [--help]          Get a description and instructions for this command.
-l [--language]      The language identifier of the dictionary of the
                     mnemonic. Options are 'en', 'es', 'fr', 'it', 'ja',
                     'cs', 'ru', 'uk', 'zh_Hans', 'zh_Hant' and 'any',
                     defaults to 'any'.
-p [--passphrase]    An optional passphrase for converting the mnemonic
                     to a seed.

Arguments (positional):

WORD                 The set of words that that make up the mnemonic. If
                     not specified the words are read from STDIN.
</code></pre>
<hr />
<blockquote>
<p><strong>Q4 are there detailed docs that show the --help output text?</strong></p>
</blockquote>
<p><a href="https://github.com/libbitcoin/libbitcoin-explorer" rel="nofollow noreferrer">https://github.com/libbitcoin/libbitcoin-explorer</a> says</p>
<blockquote>
<p><a href="https://github.com/libbitcoin/libbitcoin-explorer/wiki" rel="nofollow noreferrer">Documentation</a> is available on the wiki.</p>
</blockquote>
<p>Which it is.</p>
<hr />
<blockquote>
<p><strong>Q5 is bx the canonical CLI tool</strong></p>
</blockquote>
<p>No idea, sorry.</p>
<p>I guess you mean &quot;most popular&quot; as there are not really any lawmakers in Bitcoin who can make canon law. At least, not about which implementations you should use.</p>
<p>Some tools <em>seem</em> popular but I don't know of any credible survey results.</p>
