ScriptSig
The scriptSig is the unlocking script in a bitcoin transaction input, supplying the data that satisfies the locking script of the output being spent. For a legacy pay-to-public-key-hash spend it contains exactly two items, a signature of about 72 bytes and the spender's public key, which together prove authorization without revealing the private key.
Why it matters
The scriptSig embodies bitcoin's core security bargain: anyone in the world can verify a spend is legitimate, while only the key holder can produce one. It also carries historical significance, since the scriptSig of a coinbase transaction may contain arbitrary data. Satoshi Nakamoto used the genesis block's scriptSig to embed the newspaper headline about bank bailouts dated January 3, 2009, and miners still use the field to tag their blocks. Its design flaw mattered too: signatures inside the scriptSig could be altered without invalidating them, the malleability problem SegWit was built to fix.
How it works
During validation, a node pushes the scriptSig's items onto a stack and then executes the output's scriptPubKey against them; the spend is valid if execution ends with true. For pay-to-script-hash inputs the scriptSig also carries the redeem script itself. In SegWit transactions the unlocking data moves to the witness and the scriptSig is left empty or nearly so, which is why the field shrinks toward vestigial as older address formats fade from use.
Related Terms
Ready to convert your gold to Bitcoin?
Get Your Free Kit →