Bitcoin

Transaction – Spending Security

I am new to Bitcoin. If you look at the tx structure, the input is signed to be “unlocked”. What prevents an attacker from taking this and spending it however they want? That is, Alice wants to send 1 BTC of the 2 BTC she has (output from another tx) to Bob, so she sends 2 BTC with her signature and 2 outputs (1 to Bob and 1 to herself). Create a tx using (ignoring the fee here): Just before sending the tx, Charlie sniffs the signature, references those 2 BTC, generates a new tx using Alice’s signature, and sends it to where the output is for him. What is stopping him from doing so?

Related Articles

Back to top button