Opcodes · crypto · enabled
OP_CHECKSIG (0xac)
Checks a transaction signature against a public key and pushes 1 or 0. Since May 2019 it accepts both ECDSA and Schnorr signatures, told apart by signature length.
Verified
- Stack in → out
- sig pubkey → ok
- Since
- Original Bitcoin script
- Cost
- Base instruction cost 100 plus 26,000 per signature check, plus hashing cost for the signing serialization (2025 VM limits). An empty signature adds no signature check. Also counted by the 2020 SigChecks limit.
- Bitcoin status
- Behaves differently in Bitcoin (BTC)BTC uses ECDSA in legacy/SegWit v0 scripts and BIP-340 Schnorr only in Tapscript; the signing serialization also differs (BCH uses SIGHASH_FORKID).
Example
<sig> <pubkey> OP_CHECKSIG Step through it opcode by opcode in Bitauth IDE, the in-browser BCH VM debugger.