Hi,
ECDSA stands for
Elliptic
Curve
Digital
Signature
Algorithm and is therefore an algorithm used to create a
signature from a
message (here the transaction).
Now if Bob makes a transaction, the transaction is signed with a
Digital
Signature
Algorithm using an
Elliptic
Curve and more precisely the secp256k1 curve (
https://en.bitcoin.it/wiki/Secp256k1).
- Alice can decode the signature with Bob's public key.
Actually she does not need to do that. Here is roughly what happens :
- Bob constructs a transaction. A transaction
unlocks some coins in order to
lock them (or part of them) so that only the receiver private key can unlock them. Actually being spent some coins to your address, it is just that someone made a transaction that locks coin that only your private key can unlock.
- Bob signs the transaction. To sign a message you must provide a private key, and
unlocking some coins is, roughly, providing a valid signature (meaning "Hey, I have the private key !").
- The signature is then appended to the transaction (in a special field).
- The transaction is broadcasted to the whole Bitcoin network. (Alice knows about the transaction but her wallet says it is
unconfirmed)
- The transaction is put in a block by a miner. (Alice know sees the transaction as
confirmed)
Alice does not have to decode the signature, when the transaction is broadcasted every node of the network checks that the signature that Bob provided to unlock the coins is valid. A valid signature is a one which is from a private key corresponding to the address for which the coin have been locked.
- So, if the transaction is not hashed, how can Alice know if the transaction has been modified ?
Actually hashing the message is part of ECDSA, the transaction (=the message) is hashed (with a double sha256) and this is the hash which is signed.
English is not my first language so I don't know if I've been clear enough.