- snip -
if we both have the Private Key for a bit coin
- snip -
- snip -
Wouldn't the seller that I buy from also have access to the BitCoins private key from before he sold it to me?
- snip -
You are misunderstanding how bitcoin works. Bitcoins don't have private keys.
The seller received bitcoins at an
address for which he has the associated private key.
When he "sends you the bitcoins", what actually happens is that he broadcasts a transaction that re-assigns that value using an address for which you have the private key.
Lets say you receive 1 bitcoin at an address of 1LF1egUsL8gidjW29Y3uqgapN4D85YpmNx and that you control the private key that is associated with that address...
The transaction that transfers control to you effectively says:
"Encumber 1 BTC of value with the following requirement that must be met when it is used to fund a transaction in the future: The transaction must include an ECDSA digital signature that can be validated with the public key that is associated with the address of 1LF1egUsL8gidjW29Y3uqgapN4D85YpmNx"
Since the ONLY way to provide such a signature is to know the private key that is associated with the public key that is associated with that address, only someone that has access to that private key can spend that 1 BTC.
When you spend it, you create and broadcast a new transaction. Lets say you then send that 1 BTC to address 1JRm54UFCSjhBk9oWxPt7WpsmAteFUYy4e...
Your transaction will include the necessary digital signature that meets the requirement that the 1 BTC is encumbered by. Therefore you will be allowed to supply the 1 BTC of value to the transaciton. Then your transaction will effectively say:
"Encumber 1 BTC of value with the following requirement that must be met when it is used to fund a transaction in the future: The transaction must include an ECDSA digital signature that can be validated with the public key that is associated with the address of 1JRm54UFCSjhBk9oWxPt7WpsmAteFUYy4e"
Note that the recipient never receives the private key that is associated with 1LF1egUsL8gidjW29Y3uqgapN4D85YpmNx. The entire network gets to see the signature so that it can be validated with the public key, but it is not possible to calculate the private key from the signature.