Author

Topic: Is it possible to obtain the public key from any address? (Read 246 times)

newbie
Activity: 4
Merit: 3
In the new P2TR (pay-to-taproot) single key address type, the bech32 decoded address is also a public key.
newbie
Activity: 24
Merit: 9
No, i'm not "cookiebro", i'm a long-time lurker who only had a reason to post recently.

I'm now learning about the technology.

Why is my gut feeling telling me that DeepComplex is just an alt of cookiebro and that the whole purpose of this thread is for either of the two to get some merits? If I am wrong, I apologize to both users.

The fact is that both registered on the same day and coincidentally ended up posting in the same thread. 
legendary
Activity: 2730
Merit: 7065
Why is my gut feeling telling me that DeepComplex is just an alt of cookiebro and that the whole purpose of this thread is for either of the two to get some merits? If I am wrong, I apologize to both users.

The fact is that both registered on the same day and coincidentally ended up posting in the same thread. 
legendary
Activity: 2268
Merit: 18748
I usually get it via the "decodescript" command hash value via the Bitcoin core, but this particular hash doesn't contain the public key, as far as I can tell.
Not all addresses have a public key. It could be that you are trying to decode a P2SH or P2WSH address which is using a hash of the locking script instead of a hash of the public key, for example.

Can you share the script you are decoding and then we can tell you exactly what is going on?
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
The addresses are designed to not reveal to you the public key, that's why you cannot find the one for your address.

In particular, decoding the hash does not reveal the public key, it only reveals the script and also the HASH160 that it's pushing to the stack to compare for equality. There is no public key in this process at this stage (only when you sign the transaction and the public key is fed into the script to get Boolean true/false accepted/rejected value).
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
When someone funds a bitcoin address, they lock those funds in a hash of the public key which is, essentially, the address. Those funds can be unlocked only if the public key, that once hashed gives the same hash, is provided along with a message that says they want to spend that UTXO plus a valid signature.

If there's no spent transaction output from an address, you only have the base58 representation of the hash, which means you only have the hash.
newbie
Activity: 24
Merit: 9
The Public Key is only disclosed after a spending transaction has occurred. As long as no bitcoin has been sent from the address the key is unknown.

 
newbie
Activity: 7
Merit: 1
Hey,

I need to know if it's possible to obtain the public key from any given BTC address. And if so, how?

I usually get it via the "decodescript" command hash value via the Bitcoin core, but this particular hash doesn't contain the public key, as far as I can tell.

Ta
Jump to: