TeachMeBitcoin

Components of ScriptSig

From TeachMeBitcoin, the free encyclopedia Reading time: 2 min

Components of ScriptSig

A standard ScriptSig for a P2PKH (Pay-to-Public-Key-Hash) transaction contains two specific cryptographic items.

1. The Digital Signature

The largest component of ScriptSig is the Digital Signature.

2. The Public Key

The second component is the Public Key.

3. Raw Data Structure

In the raw hex of a transaction, these components are prefixed by their length.

4. Multi-Sig ScriptSig

In more complex transactions, like Multi-Sig, the ScriptSig might contain:

Component Standard Size Purpose
Signature ~71-73 Bytes Proof of Intent/Authorization
Public Key 33 Bytes Proof of Identity
SIGHASH 1 Byte Defined signing scope
IMPORTANT

The signature in ScriptSig is created by signing the entire transaction (excluding the ScriptSigs themselves), preventing anyone from changing the amounts or recipients after you sign.

In the next section, we will explore the Stack Execution Model in detail.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!