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