<p>See <a href="https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses#How_to_create_Bitcoin_Address" rel="nofollow noreferrer">this wiki page</a> to convert the public key to an address.</p>

CC BY-SA 4.0
2019-03-25T03:05:49.730Z
2019-03-25T03:05:49.730Z
Fraggle
<p>Running on headless Ubuntu Linux. I would like to use <a href="https://github.com/SjorsO/keys-generator" rel="nofollow noreferrer">this keypair generator</a>, and check the public keys generated with each run against a single other public key.</p>

<p>I know that "recovering" a lost private key is impossible and what not. But I'm not asking if this is a good or bad idea, I'm asking how I can accomplish the process of generating the keypairs and checking the public key. The address I'm checking against is pre-HD wallets. I don't know if that makes a difference, but may be relevant.</p>

<p>Consider this a proof-of-concept, demonstration.
I would like to generate the keys, compare against the known public key string, then if a match is found: record the public and private key information to a file.</p>

<p>I'm thinking I would grep/sed this, or maybe awk, but ultimately, need some direction.</p>

CC BY-SA 4.0
2019-03-19T22:04:29.513Z
Why not just make the function do nothing? It’ll never succeed to make a match anyway, so you save some effort.
Claris
<recover-private-key>
How can I generate keypairs, and check the public key against a known public key to check for a match?
Matt Zabojnik
# How can I generate keypairs, and check the public key against a known public key to check for a match?

(Asked by: username_0 on 2019-03-19)

Running on headless Ubuntu Linux. I would like to use [this keypair generator](https://github.com/SjorsO/keys-generator), and check the public keys generated with each run against a single other public key.

I know that "recovering" a lost private key is impossible and what not. But I'm not asking if this is a good or bad idea, I'm asking how I can accomplish the process of generating the keypairs and checking the public key. The address I'm checking against is pre-HD wallets. I don't know if that makes a difference, but may be relevant.

Consider this a proof-of-concept, demonstration.
I would like to generate the keys, compare against the known public key string, then if a match is found: record the public and private key information to a file.

I'm thinking I would grep/sed this, or maybe awk, but ultimately, need some direction.

**Tags:** recover-private-key

> **Comments:**
> **username_1**: Why not just make the function do nothing? It’ll never succeed to make a match anyway, so you save some effort.  

---

## 1 answers

### Answer by username_2 on 2019-03-25. Score: -1

See [this wiki page](https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses#How_to_create_Bitcoin_Address) to convert the public key to an address.


---

