Skip to content

bx ec to ek

Eric Voskuil edited this page Sep 10, 2015 · 36 revisions

Encrypt an EC private key as an encrypted private key (BIP38).

$ bx ec-to-ek --help
Usage: bx ec-to-ek [-hu] [--config VALUE] [--version VALUE] [PASSPHRASE] 
[EC_PRIVATE_KEY]                                                         

Info: Encrypt an EC private key as an encrypted private key (BIP38).     

Options (named):

-c [--config]        The path to the configuration settings file.        
-h [--help]          Get a description and instructions for this command.
-u [--uncompressed]  Use the uncompressed public key format.             
-v [--version]       The desired payment address version.                

Arguments (positional):

PASSPHRASE           The passphrase for encrypting the private key.      
EC_PRIVATE_KEY       The EC private key to encrypt. If not specified the 
                     key is read from STDIN.

See also ek-to-ec.

Example 1

$ bx ec-to-ek "my passphrase" 261fc32e9f29c70e3d898aa7db028c81ede0658e8ff8ffab8160073c048ae83f
6PYXCdvtrs4NN1TjUYbGS5Sd2gjsVsDm7GttqERRWvRjWDsrhQfJeEHrg5

Example 2

piped commands

$ bx seed | bx ec-new | bx ec-to-ek "my passphrase"
349e9b1e16620f3af0c8cdd313540c8c4174fc9aa7100f7e
261fc32e9f29c70e3d898aa7db028c81ede0658e8ff8ffab8160073c048ae83f
6PYXCdvtrs4NN1TjUYbGS5Sd2gjsVsDm7GttqERRWvRjWDsrhQfJeEHrg5

Example 3

--uncompressed

$ bx ec-to-ek -u "my passphrase" 261fc32e9f29c70e3d898aa7db028c81ede0658e8ff8ffab8160073c048ae83f
6PRPDbKfv3A45QPPfEtvcxM4oA6ShVL7t72VP74P1W3JEUHPrZXNy39FKe

Example 4

--version 111 (testnet)

$ bx ec-to-ek -v 111 "my passphrase" 261fc32e9f29c70e3d898aa7db028c81ede0658e8ff8ffab8160073c048ae83f
9CN9KKcQFYmiMJZys527kMUk1djmR2vhtocCf6whHkxGXbu5pybpX32VxkP

The --version option is experimental.

BX Menu

Clone this wiki locally