Bitcoin Forum
May 27, 2024, 05:02:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Obtaining the public key from the public address  (Read 653 times)
Shevek (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250



View Profile
April 03, 2013, 10:55:46 AM
 #1

I'm sure it is a dumb question, answered a lot of times. But it is difficult to search such topic over this forums.

So: the public address (that is propagated) is a hash of the public key. The public key is needed for checking transactions. But reversing the public address to obtain the public key is impossible, because of the nature of hash functions.

What is the solution!?

TIA.

Proposals for improving bitcoin are like asses: everybody has one
1SheveKuPHpzpLqSvPSavik9wnC51voBa
dust
Hero Member
*****
Offline Offline

Activity: 840
Merit: 1000



View Profile WWW
April 03, 2013, 11:00:19 AM
 #2

The public key corresponding to an address is revealed when coins are first spent from that address.

Cryptocoin Mining Info | OTC | PGP | Twitter | freenode: dust-otc | BTC: 1F6fV4U2xnpAuKtmQD6BWpK3EuRosKzF8U
fpgaminer
Hero Member
*****
Offline Offline

Activity: 560
Merit: 517



View Profile WWW
April 03, 2013, 11:01:46 AM
 #3

When bitcoins are sent to an address, they are sent using the standard pay-to-hash output script:

Code:
OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

For the receiver to spend this output, they need to supply a scriptSig of:

Code:
<sig> <pubKey>

And thus you see that the public key is revealed when the receiver spends the bitcoins.  Until such a time, the public key may remain unknown.

Shevek (OP)
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250



View Profile
April 03, 2013, 01:55:09 PM
 #4

Yeeeaap!

Thanks!

Proposals for improving bitcoin are like asses: everybody has one
1SheveKuPHpzpLqSvPSavik9wnC51voBa
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!