Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: BookLover on February 23, 2013, 05:11:18 PM



Title: Help me understand the intricacies off transactions
Post by: BookLover on February 23, 2013, 05:11:18 PM
Generally when one sends coins two transactions are made, one to the desired recipient, and one to a "change" address.  For example:

Lets say I have 10 coins in address A.  I send 7 coins to Bob.  Now Bob has 7 coins, address A has zero coins, and I have a "change" address with 3 coins.

So the transaction is signed with A's private key and now everyone knows the private key for address A.  What happens if someone sends 10 more coins to Address A?  Can anyone access the coins in address A now?

Thanks for spending your time reading and hopefully answering this question! ;) :D


Title: Re: Help me understand the intricacies off transactions
Post by: deeplink on February 23, 2013, 05:15:00 PM
So the transaction is signed with A's private key and now everyone knows the private key for address A.  What happens if someone sends 10 more coins to Address A?  Can anyone access the coins in address A now?

If A signes the transaction with the private key, it can be validated with A's public key. The private key always remains unknown to anyone but A.

See Public-key cryptography (http://en.wikipedia.org/wiki/Public-key_cryptography)


Title: Re: Help me understand the intricacies off transactions
Post by: Akka on February 23, 2013, 05:16:00 PM
So the transaction is signed with A's private key and now everyone knows the private key for address A. 

No, you Private key is still a secret. When you know the public key (BTC-Adress) you can proof that a message has been signed with it. For more read: http://en.wikipedia.org/wiki/Public-key_cryptography

You Address A is still good.


Title: Re: Help me understand the intricacies off transactions
Post by: deeplink on February 23, 2013, 05:17:38 PM
lol Akka, we think alike  ;)


Title: Re: Help me understand the intricacies off transactions
Post by: BookLover on February 23, 2013, 06:45:12 PM
Thanks, for the fast replies and the links.  This has been very helpful.


Title: Re: Help me understand the intricacies off transactions
Post by: Stephen Gornick on February 23, 2013, 11:13:08 PM
Generally when one sends coins two transactions are made, one to the desired recipient, and one to a "change" address.

Just to clarify that, there are not two transactions.  There is still just one transaction but that transaction has two outputs.   


Title: Re: Help me understand the intricacies off transactions
Post by: BookLover on February 24, 2013, 03:11:12 PM
It is also possible for transactions to have multiple inputs.  But all that wasn't really relevant to the question.  I only mentioned the "change" address because I thought it might have something to do with the answer.