<p>The Bitcoin-Explorer (bx) v3.0 implementation described below has had <strong>FULL</strong> BIP 38 functionality for over a year, and has extended BIP 38 to numerous altcoins. </p>

<p>See <a href="https://github.com/libbitcoin/libbitcoin/wiki/Altcoin-Version-Mappings#bx---key-encryption-commands" rel="nofollow noreferrer"><strong>5) Extended AES256Encrypt and AES256Decrypt BIP 38 CLI Example Set</strong></a>, and use <strong>-v 0</strong> for Bitcoin instead of <strong>-v 76</strong> for Dash. See the 4th column of <a href="https://github.com/libbitcoin/libbitcoin/wiki/Altcoin-Version-Mappings#bip44-altcoin-version-mapping-table" rel="nofollow noreferrer"><strong>BIP44 Altcoin Version Mapping Table</strong></a> for version mappings for various coins. </p>

<p>Use <a href="https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-wif-to-ec" rel="nofollow noreferrer">wif-to-ec</a> to convert your WIF-encoded keys to hexadecimal.  Use <a href="https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-ec-to-wif" rel="nofollow noreferrer">ec-to-wif</a> to go the opposite direction as needed.</p>

<p>The full round robin example below is for Bitcoin, not Dash, but contrast: </p>

<p><code>% bx wif-to-ec L5b1xYjJCxfPsr9b4896DwMqoGb3TyNrwUvfGacm2RQoUoKGqjny</code>
<strong>f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269</strong></p>

<p><code>% bx ec-to-ek -v 0 "Hello it is me" f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269</code>
<strong>6PYK35faHFxireTJyhtjm9weuBFMuc2uF7fBKmHzDvakT6TRek9RwfyX9a</strong></p>

<p><code>% bx ek-to-ec "Hello it is me" 6PYK35faHFxireTJyhtjm9weuBFMuc2uF7fBKmHzDvakT6TRek9RwfyX9a</code>
<strong>f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269</strong></p>

<p><code>% bx ec-to-wif -v 128 f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269</code>
<strong>L5b1xYjJCxfPsr9b4896DwMqoGb3TyNrwUvfGacm2RQoUoKGqjny</strong></p>

<p>The ec-to-wif command needs to use integer values for the 3rd column of <a href="https://github.com/libbitcoin/libbitcoin/wiki/Altcoin-Version-Mappings#bip44-altcoin-version-mapping-table" rel="nofollow noreferrer"><strong>BIP44 Altcoin Version Mapping Table</strong></a> corresponding to the crypto-coin being used. If version integers are dropped, bx assumes the operations are for Bitcoin.</p>

<p>Be forewarned that BIP 38 isn't standardized for altcoins with Bitcoin heritage yet. Many wallet tools claiming to provide BIP 38 functionality use the prefix <strong>6P</strong> for altcoins. The prefix <strong>6P</strong> should be different for altcoins to minimize confusion.  This <a href="https://github.com/libbitcoin/libbitcoin/wiki/Altchain-Encrypted-Private-Keys#sample-map" rel="nofollow noreferrer"><strong>sample mapping</strong></a> shows -v 0 maps to a <strong>6P</strong> prefix for Bitcoin, while -v 76 maps to a <strong>7f</strong> prefix for Dash, (76 base 10 == 4c base 16).</p>

CC BY-SA 3.0
2016-12-27T17:11:55.687Z
2016-12-27T17:11:55.687Z
skaht
<p>How do I go about encrypting some existing private keys using BIP38 in an offline manner?  I have looked at bitaddress.org and that site only lets you BIP38 keys which the bitaddress.org site itself created.</p>

<p>I basically want to generate my own bitcoin private keys using bitcoin-core, and then BIP38 encrypt them in an offline manner so I can have a copy of my private keys in paper form just as an extra backup to my existing digital encrypted backups.</p>

<bitcoin-core><encryption><paper-wallet><offline><bip38>
How to BIP38 existing private keys offline
oshirowanen
# How to BIP38 existing private keys offline

(Asked by: username_0 on 2016-12-27)

How do I go about encrypting some existing private keys using BIP38 in an offline manner? I have looked at bitaddress.org and that site only lets you BIP38 keys which the bitaddress.org site itself created.

I basically want to generate my own bitcoin private keys using bitcoin-core, and then BIP38 encrypt them in an offline manner so I can have a copy of my private keys in paper form just as an extra backup to my existing digital encrypted backups.

**Tags:** bitcoin-core, encryption, paper-wallet, offline, bip38


---

## 1 answers

### Answer by username_1 on 2016-12-27. Score: 1

The Bitcoin-Explorer (bx) v3.0 implementation described below has had **FULL** BIP 38 functionality for over a year, and has extended BIP 38 to numerous altcoins.

See [**5) Extended AES256Encrypt and AES256Decrypt BIP 38 CLI Example Set**](https://github.com/libbitcoin/libbitcoin/wiki/Altcoin-Version-Mappings#bx---key-encryption-commands), and use **-v 0** for Bitcoin instead of **-v 76** for Dash. See the 4th column of [**BIP44 Altcoin Version Mapping Table**](https://github.com/libbitcoin/libbitcoin/wiki/Altcoin-Version-Mappings#bip44-altcoin-version-mapping-table) for version mappings for various coins.

Use [wif-to-ec](https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-wif-to-ec) to convert your WIF-encoded keys to hexadecimal. Use [ec-to-wif](https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-ec-to-wif) to go the opposite direction as needed.

The full round robin example below is for Bitcoin, not Dash, but contrast:

`% bx wif-to-ec L5b1xYjJCxfPsr9b4896DwMqoGb3TyNrwUvfGacm2RQoUoKGqjny`
**f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269**

`% bx ec-to-ek -v 0 "Hello it is me" f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269`
**6PYK35faHFxireTJyhtjm9weuBFMuc2uF7fBKmHzDvakT6TRek9RwfyX9a**

`% bx ek-to-ec "Hello it is me" 6PYK35faHFxireTJyhtjm9weuBFMuc2uF7fBKmHzDvakT6TRek9RwfyX9a`
**f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269**

`% bx ec-to-wif -v 128 f9a8f6d4a24b99d4944ee3db83c85383e9c13e85cb50ad60a9e1a96e02f6d269`
**L5b1xYjJCxfPsr9b4896DwMqoGb3TyNrwUvfGacm2RQoUoKGqjny**

The ec-to-wif command needs to use integer values for the 3rd column of [**BIP44 Altcoin Version Mapping Table**](https://github.com/libbitcoin/libbitcoin/wiki/Altcoin-Version-Mappings#bip44-altcoin-version-mapping-table) corresponding to the crypto-coin being used. If version integers are dropped, bx assumes the operations are for Bitcoin.

Be forewarned that BIP 38 isn't standardized for altcoins with Bitcoin heritage yet. Many wallet tools claiming to provide BIP 38 functionality use the prefix **6P** for altcoins. The prefix **6P** should be different for altcoins to minimize confusion. This [**sample mapping**](https://github.com/libbitcoin/libbitcoin/wiki/Altchain-Encrypted-Private-Keys#sample-map) shows -v 0 maps to a **6P** prefix for Bitcoin, while -v 76 maps to a **7f** prefix for Dash, (76 base 10 == 4c base 16).


---

