BIP39 is a Deterministic Key Generation method and it is used to derive encryption keys for a known seed. This seed can be a series of human readable string of random words. The BX command can support English ('en'), Spanish ('es') French ('fr'), Italian ('it'), Japanese ('ja'), Russian ('ru'), Traditional Chinese ('zh_Hant') or Simplified Chinese ('zh_Hans').
Mnemonic BIP39 for different languages |
Theory
With Bitcoin, we create a 256-bit random value for the private key and then convert it to Wallet Interchange Format key (WiF) format, which is a Base-58 form for the random key. This is the format that is stored in the Bitcoin Wallet. For example, a sample private key is:
Private key: 813df008a62628550cf702f8832f0194e18c9665c7829d2a
We then convert this into WiF format (Base-58) to give:
KwUEKbV3U4FdUmCJmXbEn4Ad1Fxib8oDhHQpAjGYGnMLbasXeZZm
Next we can convert this into a memorable format with BIP39 for Italian:
mnemonico uffa acrobata europa gruppo cespo cremoso sveglio vestale barca saraceno ceramica balzano estimare pace umile perdonato fresco
$lan='es' $lan = $Args[0] $seed = bx seed "Seed: ",$seed $pri = bx ec-new $seed "`nEC private key: ",$pri $wif = bx ec-to-wif $pri "`nWif: ",$wif $mn = bx mnemonic-new -l $lan $seed "`nmnemonic: ",$mn
A sample run for Italian gives:
Seed: 813df008a62628550cf702f8832f0194e18c9665c7829d2a EC private key: 07782cbb904d9dbfa1007593a58341731afd8819b1a135b018ad84eec2e94a4b Wif: KwUEKbV3U4FdUmCJmXbEn4Ad1Fxib8oDhHQpAjGYGnMLbasXeZZm mnemonic: mnemonico uffa acrobata europa gruppo cespo cremoso sveglio vestale barca saraceno ceramica balzano estimare pace umile perdonato fresco