Author

Topic: Why does OP_CHECKSIG use the scriptPubKey script from the previous transaction? (Read 523 times)

newbie
Activity: 16
Merit: 0
A bit of a technical question: when computing/verifying the signature on a transaction, why is the scriptPubKey script from the previous transaction copied into the transaction being signed? Obviously the scriptSig is not available at the time of signing, but why not just leave the script section blank?

Since the hash of the previous transaction is already included in the data being signed, I don't see any security benefit from doing this. It seems like a pointless complication to me, but I assume there's a reason. I've studied the wiki page https://en.bitcoin.it/wiki/OP_CHECKSIG but I can't figure out the motivation behind this. Anyone know?

Thanks.
Jump to: