<blockquote>
<p>is this really the [private] key [...]</p>
</blockquote>
<p>According to <a href="https://www.oreilly.com/library/view/mastering-bitcoin-2nd/9781491954379/ch04.html" rel="nofollow noreferrer">Mastering Bitcoin, 2nd Edition by Andreas M. Antonopoulos</a>, 66 characters is a possible compressed key in hex</p>
<p>and</p>
<blockquote>
<p>This compressed public key corresponds to the same private key, meaning it is generated from the same private key. However, it looks different from the uncompressed public key. More importantly, if we convert this compressed public key to a bitcoin address using the double-hash function (RIPEMD160(SHA256(K))) it will produce a different bitcoin address. This can be confusing, because it means that <strong>a single private key can produce a public key expressed in two different formats (compressed and uncompressed) that produce two different bitcoin addresses</strong>. However, the private key is identical for both bitcoin addresses.</p>
</blockquote>
<p>(my emphasis)</p>
<p>Antonopulos also gives an example of a compressed <em>private</em> key that I count as 66 characters long.</p>
<hr />
<p>I would also check the format of your string against the examples in answers to <a href="https://bitcoin.stackexchange.com/q/115203/13866">how does the blockchain addresses relate to the blockchain WIF?</a></p>
<p>I strongly suggest no one ever puts a possible private key into any web-site. To me that is less safe than giving your physical wallet and bank login details to a passing stranger at a train station and asking them to come back next week and tell you if the contents are valid.</p>
<blockquote>
<p>[...] and if [it is, how can I] import it?</p>
</blockquote>
<p>See <a href="https://bitcoin.stackexchange.com/q/5941/13866">How do I import a private key into Bitcoin-Core?</a> but remember, with many wallets you have to make a separate backup of the private key because imported keys are not recovered when using the recovery phrase. I think with Bitcoin core it may be enough to use it's &quot;backup wallet&quot; option and keep fresh copies of the backup on several different devices in different buildings. It is a good idea to test recovery from offsite backups before assuming your money is safe.</p>

CC BY-SA 4.0
2023-01-11T09:53:33.043Z
2023-01-21T16:32:30.680Z
2023-01-21T16:32:30.680Z
RedGrittyBrick
<p>So after long digging I finally found my private key which is in hex format. When I paste it in one website it does validate the address, it is a legacy address, it is in hex format, but it's 66 characters long, I know privkey is 64 long, but when I uncompress it like I thought it may be just the public key, it shows different address I mean nothing close to mine? I'm confused literally, also what am I doing wrong, is this really the privkey, and if it is how can I import it?</p>

<bitcoin-core><public-key><private-key-import>
How to check whether a hex string is a key or an address and how to import it?
Nikolai Tringov
# How to check whether a hex string is a key or an address and how to import it?

(Asked by: username_0 on 2023-01-11)

So after long digging I finally found my private key which is in hex format. When I paste it in one website it does validate the address, it is a legacy address, it is in hex format, but it's 66 characters long, I know privkey is 64 long, but when I uncompress it like I thought it may be just the public key, it shows different address I mean nothing close to mine? I'm confused literally, also what am I doing wrong, is this really the privkey, and if it is how can I import it?

**Tags:** bitcoin-core, public-key, private-key-import


---

## 1 answers

### Answer by username_1 on 2023-01-11. Score: 1

> is this really the [private] key [...]

According to [Mastering Bitcoin, 2nd Edition by Andreas M. Antonopoulos](https://www.oreilly.com/library/view/mastering-bitcoin-2nd/9781491954379/ch04.html), 66 characters is a possible compressed key in hex

and

> This compressed public key corresponds to the same private key, meaning it is generated from the same private key. However, it looks different from the uncompressed public key. More importantly, if we convert this compressed public key to a bitcoin address using the double-hash function (RIPEMD160(SHA256(K))) it will produce a different bitcoin address. This can be confusing, because it means that **a single private key can produce a public key expressed in two different formats (compressed and uncompressed) that produce two different bitcoin addresses**. However, the private key is identical for both bitcoin addresses.

(my emphasis)

Antonopulos also gives an example of a compressed *private* key that I count as 66 characters long.

---

I would also check the format of your string against the examples in answers to [how does the blockchain addresses relate to the blockchain WIF?](https://bitcoin.stackexchange.com/q/115203/13866)

I strongly suggest no one ever puts a possible private key into any web-site. To me that is less safe than giving your physical wallet and bank login details to a passing stranger at a train station and asking them to come back next week and tell you if the contents are valid.

> [...] and if [it is, how can I] import it?

See [How do I import a private key into Bitcoin-Core?](https://bitcoin.stackexchange.com/q/5941/13866) but remember, with many wallets you have to make a separate backup of the private key because imported keys are not recovered when using the recovery phrase. I think with Bitcoin core it may be enough to use it's "backup wallet" option and keep fresh copies of the backup on several different devices in different buildings. It is a good idea to test recovery from offsite backups before assuming your money is safe.


---

