I know that you can generate a new key pair with a command like.

openssl ecparam -genkey -name secp256k1

And the resulting output will contain a new private key with the encoded public key.

Is it possible for openssl to generate the public key straight from an existing private key only?

Just to be clear I mean Bitcoin Public Key and not Public Address


1 Answer 1


Yes, openssl shows a public key corresponding to a private key that is input, e.g.

$ openssl ec -in priv_key.openssl -text -conv_form compressed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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