Post
Topic
Board Development & Technical Discussion
Re: same public key
by
DeathAndTaxes
on 30/06/2013, 14:38:23 UTC
Exactly it is that simple.  The Bitcoin network has no concept of "ownership" only authentication.  If one can sign a transaction with a valid private key they can spend the coins.  If someone generates an address which produces the same public key as your address then they can spend your coins.



And what would happen with money that is transferred to an address that exists twice? would this money be doubled?

No.  If you make a backup of your wallet the address exists twice but it doesn't double your money.

Imagine you had a safety deposit box which only had one key and you put $500 into it.  Thus only you can spend the $500, and to do so requires the key.  
Now imagine the bank screwed up and gave a second copy of your key to someone else by mistake.  Same deposit box, same $500 inside it but now two keys which open the box.  Has the money been doubled?  Can it be spent twice?  Of course not it simply means whoever use the box first can spend it and once spent the funds are gone.

Bitcoin works the same way.  Your client/wallet doesn't have any coins.  It has a set of keys which allow it to transfer ownership of coins in the blockchain.  Instead of one safety deposit box "your coins" are distributed across tens of thousands of nodes all over the planet.  When you spend coins you send a message to the network saying "hey those coins at address 1xyz... please transfer control of them to 1abc...  I have signed this message with the private key for 1xyz so you know it is a valid request".  The bitcoin network includes the transaction in the next block and the global consensus on where coins are located has been updated.  All nodes now agree the coins are not at 1xyz... they are at 1abc... .