<p>I'm voting to close since this is very similar to the other question, but what you want to be doing is scalar multiplication of the private key to the generator point using Elliptical Curve Cryptography. The curve parameters, including the generator point is defined in SECP256K1. The resulting x and y coordinates are encoded via SEC uncompressed format to get the public key.</p>

CC BY-SA 3.0
2016-07-01T19:07:24.177Z
2016-07-01T19:07:24.177Z
Jimmy Song
<p>How can I take a bitcoin private key encoded in hex:</p>

<pre><code>d1d9a2e9fd3da7e7710310ea17a9edff9e08845c7a6f2ea3d650ba4ae7ee0d3b
</code></pre>

<p>and convert it to the corresponding public key:</p>

<pre><code>0478a2a9be183f26e2745c9254957e3b714e8bf161f8bf992f9c628fbddc634e149f52aab6a45cd93187593e2413baf14378e7b2c14c0429f98cbe90c723e1e179
</code></pre>

<p>I am NOT looking for a program/tool that does this, but how to do this mathematically. If you can't find that out, you can also give a solution in python 3, which I can understand and convert to something mathematical</p>

<private-key><public-key><ecdsa><base58>
How can I convert a bitcoin private key (hex) into a Bitcoin public key?
Sreehari
# How can I convert a bitcoin private key (hex) into a Bitcoin public key?

(Asked by: username_0 on 2016-07-01)

How can I take a bitcoin private key encoded in hex:

```
d1d9a2e9fd3da7e7710310ea17a9edff9e08845c7a6f2ea3d650ba4ae7ee0d3b

```

and convert it to the corresponding public key:

```
0478a2a9be183f26e2745c9254957e3b714e8bf161f8bf992f9c628fbddc634e149f52aab6a45cd93187593e2413baf14378e7b2c14c0429f98cbe90c723e1e179

```

I am NOT looking for a program/tool that does this, but how to do this mathematically. If you can't find that out, you can also give a solution in python 3, which I can understand and convert to something mathematical

**Tags:** private-key, public-key, ecdsa, base58


---

## 1 answers

### Answer by username_1 on 2016-07-01. Score: 0 | Accepted answer

I'm voting to close since this is very similar to the other question, but what you want to be doing is scalar multiplication of the private key to the generator point using Elliptical Curve Cryptography. The curve parameters, including the generator point is defined in SECP256K1. The resulting x and y coordinates are encoded via SEC uncompressed format to get the public key.


---

