THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

What Does OP_CHECKSIG Do in Bitcoin Script?

permalink THAMER
#bitcoin-script#ecdsa#op-checksig#schnorr#signature-verification#tapscript

OP_CHECKSIG checks whether a supplied signature is valid for a public key and the transaction data prescribed by the applicable Bitcoin script rules. It pushes a success or failure result to the stack, subject to validation rules that can also cause script failure.

Does OP_CHECKSIG always use the same signature algorithm?

No. In legacy Script and SegWit v0, familiar uses verify ECDSA signatures. In Tapscript, BIP342 specifies Schnorr signature validation for recognized public-key types. Signature message construction and validation details depend on the script version and transaction context.

Is OP_CHECKSIG enough to authorize a payment?

Not by itself. The complete script or witness program must validate, the transaction must satisfy consensus rules, and the signature must commit to the relevant transaction data under the selected sighash mode. A valid signature does not automatically make an otherwise invalid transaction acceptable.

Can it be used in Taproot scripts?

Yes. Tapscript supports OP_CHECKSIG and introduces OP_CHECKSIGADD. It disables the old OP_CHECKMULTISIG opcodes. Do not assume a legacy multisig template works unchanged in Taproot.

Further reading

  • BIP342: Tapscript: https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki

Questions & Answers

Explore all questions →

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects