I'm reading through Satoshi's paper, and in Section 2. Transactions, he starts by saying:
We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the next by digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin. A payee can verify the signatures to verify the chain of ownership.
Then there is a good diagram that shows this in the paper
So, effectively if BTC0 is the previous transaction, the new transaction is:
hash := H(BTC0,Kp(Owner1))
Kp(Owner1) is the public key fo the recipient (Owner1)
hash := H(BTC0,Kp(Owner1)) is the Hash of the prev transaction together with the pub key of the recipient
- S(hash,Ks(Owner0)) is the previously computed hash, signed with the private key sender (Owner0)
I have a couple of questions:
Here I've indicated the 'previous transaction' is BTC0- is this the previous transaction for that Coin, or the previous transaction on the chain? Danielle Drainville suggests it is "the previous transaction in which this coin was used is hashed together with the recipient's public key" in her paper (An Analysis of the Bitcoin Electronic Cash System)
If so, there must be some kind of search for the previous transaction first?
And, if I understand correctly, there are no 'Coins' in your wallet...the wallet stores the Block Chain, that is, the Transactions log, and your pub/pri key(s). When you're wallet displays to you, the number of bitcoins 'in' it, its actually the result of a search of the Block Chain?