<p>Yes, openssl shows a public key corresponding to a private key that is input, e.g.</p>
<pre><code>$ openssl ec -in priv_key.openssl -text -conv_form compressed
</code></pre>

CC BY-SA 4.0
2022-08-22T11:23:37.427Z
2022-08-22T11:23:37.427Z
Greg Tonoski
<p>I know that you can generate a new key pair with a command like. </p>

<p><code>openssl  ecparam -genkey -name secp256k1</code></p>

<p>And the resulting output will contain a <strong>new</strong> private key with the encoded public key.</p>

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

<p>Just to be clear I mean Bitcoin Public Key and not Public Address</p>

CC BY-SA 4.0
2020-04-03T17:41:48.930Z
Check this out, it might help you [How do these OpenSSL commands create a Bitcoin private/key from a ECDSA keypair](https://bitcoin.stackexchange.com/questions/59644/how-do-these-openssl-commands-create-a-bitcoin-private-key-from-a-ecdsa-keypair)
Allan Romanato
CC BY-SA 4.0
2020-04-04T11:36:36.273Z
@AllanRomanato Thanks but still doesn't solve my problem.
Sydwell
<private-key><public-key><openssl>
How can you generate a bitcoin Public Key from an existing Private Key using openssl?
Sydwell
# How can you generate a bitcoin Public Key from an existing Private Key using openssl?

(Asked by: username_0 on 2020-04-02)

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

**Tags:** private-key, public-key, openssl

> **Comments:**
> **username_1**: Check this out, it might help you [How do these OpenSSL commands create a Bitcoin private/key from a ECDSA keypair](https://bitcoin.stackexchange.com/questions/59644/how-do-these-openssl-commands-create-a-bitcoin-private-key-from-a-ecdsa-keypair)  
> **username_0**: @AllanRomanato Thanks but still doesn't solve my problem.  

---

## 1 answers

### Answer by username_2 on 2022-08-22. Score: 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


---

