Getting bx to create a private key from known chain code and a private EC WIF key? I was trying to get strong feedback that I really understood a portion of the Mastering Bitcoin Book concerning HD wallets. The picture below is the reference for the question.



I checked out the functionality exposed by a Javascript Brain Wallet. By entering "123" (is a very poor secret) into a field for a HD brainwallet and the following extended private key emerged: xprv9s21ZrQH143K2hYgcmBxsUfRw3Kbu3eEGXFJrM8Cqtewuqa6Y6nXbB7tv9HnrBajqjptPsRjL9FmnwLa317jHWJ5dpwTc99C2AiPztPRaxk.

Clicking the button to the right of the private key got me to another page indicating the master private chain code is 40675733fc35303c1c75bc598716f24af225528da686192ceb567c88313f8885 and the master private key is L4h3ZSQ3yfFNbovQjTGumvUGEfB1a7oFAhbkhMMFGsdDKoTSwwU8.  

Given these last two pieces of information and an index of 0, is it possible to issue a number a number of bx commands and concatenate their output results to feed a HMAC-SHA512 hash to arrive at private WIF key of KwMsDozFYQG7SZFwfvFRwWDhfuMJjkE669WxP6SqrpDPsCBrPV4p public address 15jbcT7wE81s8n2dbEGRFGf65zp7PHrjxh?  If so, how is this accomplished or does bx need to be complemented by some other command that renders HMAC-SHA512 functionality?
No need for an external program at all:

$ KEY=xprv9s21ZrQH143K2hYgcmBxsUfRw3Kbu3eEGXFJrM8Cqtewuqa6Y6nXbB7tv9HnrBajqjptPsRjL9FmnwLa317jHWJ5dpwTc99C2AiPztPRaxk
$ echo $KEY | bx hd-public -i 0 | bx hd-to-address
15jbcT7wE81s8n2dbEGRFGf65zp7PHrjxh


Or, because this is non-hardened, you can use the extended public key:

$ KEY=xpub661MyMwAqRbcFBd9iniyEccAV5A6JWN5dkAuejXpQEBvnduF5e6n8ySNmP8uWeqNbwFXLHEQkV1shXbNtBV8YCUJPMSuE7bGCvDaZJfUBuP
$ echo $KEY | bx hd-public -i 0 | bx hd-to-address
15jbcT7wE81s8n2dbEGRFGf65zp7PHrjxh