Reviewed Aug 2026
DE
BA-06 · LESSON 03

Signature checks and sighashes

KEY DEFINITIONS

Terms used in this lesson

CHECKSIG
The Bitcoin Script operation that checks whether a signature is valid for the required public key and transaction message.
Sighash
The exact transaction digest and signature mode that determine which fields a Bitcoin signature authorizes.
Transaction ID
The identifier produced by hashing a Bitcoin transaction’s non-witness serialization.
SIGHASH mode
A Bitcoin signature mode describing which transaction fields the signature commits to.
SIGHASH NONE
A signature-hash choice that does not commit to transaction outputs.
SIGHASH SINGLE
A signature-hash choice that commits to the output with the same index as the signed input, subject to its defined edge cases.
ANYONECANPAY
A signature-hash modifier that commits only to the current input rather than every input.
SegWit
Segregated Witness: a Bitcoin upgrade that separates authorization data from the transaction identifier and introduces versioned witness programs.
Taproot
A Bitcoin output and spending design that can combine a public-key path with privately committed alternative scripts.
ECDSA
Elliptic Curve Digital Signature Algorithm, the signature scheme used by pre-Taproot Bitcoin outputs.
BIP340
The Bitcoin Improvement Proposal specifying Schnorr signatures for the secp256k1 curve.
Schnorr signature
Bitcoin’s Taproot signature scheme, whose algebra supports compact verification and advanced multi-party signing.
CHECKSIGVERIFY
A Bitcoin Script signature check that fails execution immediately when the signature is invalid.
BIP143
The Bitcoin Improvement Proposal that defines the version-zero SegWit transaction signature digest used by native P2WPKH and P2WSH spends.
BIP341
The Bitcoin Improvement Proposal specifying Taproot output validation and the transaction signature message used by Taproot signatures.
DER
Distinguished Encoding Rules: the structured byte encoding historically used for ECDSA signatures in Bitcoin Script.
UX
User experience: how a person understands and interacts with a product or device.

CHECKSIG validates a signature over a transaction digest selected by a sighash mode.

55 min Difficulty 2/5 Not started

Loading lesson visuals...

01

Learn the idea

OP_CHECKSIG verifies a signature for a public key against a transaction digest. A sighash mode selects which transaction fields the signature commits to. Legacy, SegWit version 0, and Taproot each define different digest algorithms. The signature is valid only for the exact digest, key, and signature encoding required by that spending context.

GUIDED EXPLANATION1/5 ideas inspected
1

Identify the spent output

Validation needs the prior output's script and, for SegWit and Taproot signature hashes, its amount and other contextual data.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionCHECKSIG verifies that the human-readable payment description was approved.

It verifies a cryptographic signature over protocol-selected transaction fields. Wallet UX must accurately translate those fields for the signer.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.