<p>It is practically impossible. The idea of a public/private key pair is that you can publish your public key without anyone being able to efficiently deduce your private key from it. That's why you can only spend bitcoin from addresses that you have the private key for.</p>
<p>There are two ways that come to my mind how to obtain a private key given the public key, however both are (currently) unfeasible:</p>
<ol>
<li>Brute force: generate random private keys and test if they are by chance the one private keys for your public key. But this process will take unimaginably long.</li>
<li><a href="https://en.wikipedia.org/wiki/Shor%27s_algorithm" rel="nofollow noreferrer">Shor's algorithm</a>: which is a quantum computer algorithm for integer factorization that allows you to calculate the private key given the public key, however we don't have quantum computers with the required number of qubits yet.</li>
</ol>

CC BY-SA 4.0
2021-09-14T21:13:22.337Z
The most practical algorithm on traditional (non-quantum) hardware is Pollard's Rho for Discrete Logarithms. It only needs ~2^128 group operations to find the private key on average, while brute force needs ~2^256: https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm_for_logarithms
Pieter Wuille
CC BY-SA 4.0
2021-09-14T16:20:38.103Z
2021-09-14T16:20:38.103Z
Heye
<p>Guys who know how to get private key (hex) if I know public key (hex) ?Thx for support</p>

CC BY-SA 4.0
2021-09-14T15:45:10.667Z
One of the core principle of bitcoin security is to hide the private key from the public key.
Saxtheowl
<public-key>
Private key (hex) from public key
Bill Longlley
# Private key (hex) from public key

(Asked by: username_0 on 2021-09-14)

Guys who know how to get private key (hex) if I know public key (hex) ?Thx for support

**Tags:** public-key

> **Comments:**
> **username_1**: One of the core principle of bitcoin security is to hide the private key from the public key.  

---

## 1 answers

### Answer by username_2 on 2021-09-14. Score: 4

It is practically impossible. The idea of a public/private key pair is that you can publish your public key without anyone being able to efficiently deduce your private key from it. That's why you can only spend bitcoin from addresses that you have the private key for.

There are two ways that come to my mind how to obtain a private key given the public key, however both are (currently) unfeasible:

1. Brute force: generate random private keys and test if they are by chance the one private keys for your public key. But this process will take unimaginably long.
2. [Shor's algorithm](https://en.wikipedia.org/wiki/Shor%27s_algorithm): which is a quantum computer algorithm for integer factorization that allows you to calculate the private key given the public key, however we don't have quantum computers with the required number of qubits yet.

> **Comments:**
> **username_3**: The most practical algorithm on traditional (non-quantum) hardware is Pollard's Rho for Discrete Logarithms. It only needs ~2^128 group operations to find the private key on average, while brute force needs ~2^256: https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm_for_logarithms  

---

