Signature Hash
The digest a signature actually signs, built from a chosen subset of the transaction. A flag names the subset, so a signature can commit to everything, to one output, or to only its own input.
Signing an input does not sign the transaction. It signs a serialisation of selected fields — version, inputs, outputs, lock time, the amount being spent — hashed twice, with a flag byte appended. The flag is also appended to the signature on the wire, so a verifier knows which digest to rebuild.
Four behaviours matter. ALL covers everything and is what nearly every payment uses. NONE covers no outputs, which authorises moving the coins anywhere. SINGLE covers one output. ANYONECANPAY restricts the input coverage to one, letting others be added freely.
The exotic combinations exist for collaborative transactions — an assurance contract where each contributor guarantees their own pair and nothing else — and they are dangerous outside those settings. A signature not covering the outputs leaves the fee, and the destinations, to whoever assembles the final transaction.
The legacy algorithm also has a defect worth knowing: with SINGLE, an input whose index exceeds the output count produces a digest of the constant 1, which anyone can reuse. SegWit and Taproot define the digest differently and do not have it; legacy inputs still do.
Where this comes up
Used in
- researchWhat Taproot Actually Changed →
Nearby terms
- UTXO
- Private Key
- Digital Signature
- Full Node
- Mempool
- Confirmation
- Fee Market
- Hash Rate
- Difficulty Adjustment
- Consensus Rules
- Lightning Network
- Multisignature
- Proof of Work
- Output Descriptor
- Partially Signed Transaction
- Coinbase Transaction
- Reorganisation
- Dust
- Weight Unit
- Replace-by-Fee
- Witness
- Taproot
- Schnorr Signature
- Soft Fork
- Hard Fork
- Merkle Root
- Derivation Path
- Cold Storage
- Block Header
- Segregated Witness
- Stale Block
- Watch-Only Wallet
- Coin Control
- Pruning
- Nonce
- Difficulty Target
- Change Output
- Address Reuse
- Light Client
- Mining Pool
- Script
- Assumeutxo
- Seed Phrase
- Timelock
- Covenant
- Sidechain
- Fee Rate
- Inscription
- Hot Wallet
Reviewed Nov 2026