Standard CLI tool to calculate a public key out of a private key

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.

Adam Matan

Posted 2017-11-23T07:58:36.857

Reputation: 547

Answers

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

FedFranzoni

Posted 2017-11-23T07:58:36.857

Reputation: 490

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

dark knight

Posted 2017-11-23T07:58:36.857

Reputation: 1 532