1

Is there a standard, or at least well-accepted, CLI tool that calculates the public key out of a private key?

I've done my homework erading How do you get a Bitcoin Public Key from a Private Key, but it's from May 2014, and hopefully tooling has improved since then.

1

To the best of my knowledge there is no standard CLI utility. However, there are some tools which seem to be generally accepted, like bitcoin-bash-tools

Alternatively, you can use some script library, such as pycoin (written in Python), or bitcoinjs.

Personally I like Bitcore libraries (Bitcore is not Bitcoin Core, despite their names are similar). They are also written in Javascript. I wrote a simple library for handling keys/addresses that can be used from the command line with the NodeJS interpreter: https://github.com/frz-dev/btcutils/blob/master/bitcore-keys-utils.js. In your case you can use the getPubKey function, passing the private key object.

Hope this helps

0

In fact, there are few CLI utilies that allow you this:

  • sx : command line Bitcoin to empower the sysadmin

    cat key| sx pubkey

  • pybitcointools : SImple, common-sense Bitcoin-themed Python ECC library

    pybtctool privtopub key

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.