Skip to content

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

OP_CHECKSIG

Network & Protocol

Definition

OP_CHECKSIG (opcode 0xac) is the workhorse signature-verification operation in Bitcoin Script. It pops two items from the stack — a public key on top, and a signature below it — and checks whether that signature was produced by the private key corresponding to the public key, over the transaction data selected by the signature's SIGHASH flag. If the check succeeds it pushes true (1) onto the stack; otherwise it pushes false (0). Its strict variant, OP_CHECKSIGVERIFY, aborts the script immediately on failure instead of leaving a boolean.

Where it appears

OP_CHECKSIG sits at the end of nearly every common locking script. In a Pay-to-Public-Key-Hash (P2PKH) output the script OP_DUP OP_HASH160 <hash> OP_EQUALVERIFY OP_CHECKSIG first proves the spender's key hashes to the committed value, then confirms a valid signature over it. The much simpler Pay-to-Public-Key (P2PK) form is just <pubkey> OP_CHECKSIG.

What changed under Taproot

In legacy and SegWit v0 scripts, OP_CHECKSIG validates ECDSA signatures. Under Tapscript (BIP 342), the same opcode is redefined to validate 64-byte Schnorr signatures per BIP 340, and an empty signature is treated as a clean failure rather than an error — a property that makes batched and conditional spending paths far cleaner to construct.

OP_CHECKSIG is the foundation that opcodes like OP_CHECKSIGADD and the consensus structure of the sigop budget build upon, and it works alongside hashing primitives such as OP_HASH160 in standard address scripts.

In Simple Terms

OP_CHECKSIG (opcode 0xac) is the workhorse signature-verification operation in Bitcoin Script. It pops two items from the stack — a public key on top, and…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Mining Glossary

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Compare Miners