How can I create uncompressed public key in C++?

0

I need to derive public key from my private key in uncompressed form. I know how to create compressed one with libbitcoin, but I can't find appropriate method for uncompressed form there.

Are there any other libraries in C++ which can do that?

30mb1

Posted 2018-02-24T18:26:36.473

Reputation: 13

Answers

1

I don't know much about c++ or libbitcoin, but I found a public method in the bc::wallet::ec_public class

bool to_uncompressed(ec_uncompressed& out) const;

So I guess you can probably convert your ec_public to ec_uncompressed(which is just a byte_array) by

ec_uncompressed uncomp;
<public key>.to_uncompressed(uncomp);
std::cout << "Uncompressed: " << uncomp << std::endl;

R. Lin

Posted 2018-02-24T18:26:36.473

Reputation: 120