When signing a Bitcoin transaction, there's a space within the transaction data reserved for the signature itself. Obviously, since the signature hasn't been created yet, we can't fill in the actual signature at this point—we create it later and insert it.
The issue is that instead of just leaving this space empty, it's filled in with the locking script (scriptPubKey) of the UTXO being spent. Does anyone know why it's done this way?
Is there some vulnerability that would arise if we left it blank when signing, or did Satoshi just design it this way arbitrarily, and now it's too late to change?
I asked an AI, but either I asked poorly or it just gave me nonsense answers.
#asknostr #devstr #bitcoin
Login to reply
Replies (7)
I read the blog post you linked, but I still don't understand. In the attached screenshot, the blog states that the reason for putting the previous locking script in the empty signature space is to indicate that we recognize the original locking script. Does that make sense? It's not hidden information; anyone can find it since the txid and vout are specified.


Got it. Yes, Greg even calls it "a place-holder". You should email him your question. I'm a non-tech pleb and he has answered my questions in the past.
Right, I’ll follow your suggestion and ask by email. The blog looks very professional, and I think he’ll be able to answer my question well. Thanks for recommending
post the answer
Don’t rush. I still haven’t gotten an answer, lol.
I asked that person about the question, and he also didn't think there was any particular reason it had to be that way. It seems likely to be one of those things in Bitcoin’s history that weren't technically necessary, but were simply implemented by Satoshi that way—and now it can't really be changed, so it's just left as-is. Looks like my guess was right.