Bitcoin Forum
September 09, 2025, 04:32:20 AM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why does OP_CHECKSIG use the scriptPubKey script from the previous transaction?  (Read 567 times)
kens (OP)
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
December 29, 2013, 11:17:52 PM
 #1

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.
mmeijeri
Hero Member
*****
Offline Offline

Activity: 714
Merit: 500

Martijn Meijering


View Profile
December 29, 2013, 11:19:53 PM
 #2

See:

Why TxPrev.PkScript is inserted into TxCopy during signature check?

ROI is not a verb, the term you're looking for is 'to break even'.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!