---
title: "BIP 348 (OP_CHECKSIGFROMSTACKVERIFY) — definition | Nuri Glossary"
description: "A proposed opcode for verifying a signature over arbitrary stack data, not only over the transaction itself."
lang: "en"
type: "glossary-term"
canonical: "https://nuri.com/glossary/bip-348"
---

# BIP 348 (OP_CHECKSIGFROMSTACKVERIFY)

A proposed opcode for verifying a signature over arbitrary stack data, not only over the transaction itself.

## Basically

BIP 348 would let a Bitcoin script check a signature on any message supplied to it. OP_CHECKSIG only checks signatures for the transaction being spent.

## Key Takeaways

- BIP 348 defines OP_CHECKSIGFROMSTACK (CSFS), a proposed opcode that verifies a digital signature against any arbitrary message on the stack, rather than only the spending transaction's hash like OP_CHECKSIG.
- Brandon Black and Jeremy Rubin authored BIP 348, which uses BIP 340 Schnorr verification and deploys through the OP_SUCCESS upgrade path in tapscript, making it a backwards-compatible soft fork.
- BIP 348 is a core component of the LNHANCE soft fork bundle alongside CTV (BIP 119) and OP_INTERNALKEY (BIP 349), targeting Lightning Symmetry channels, covenant constructions and delegated spending.

## What Is BIP 348?

BIP 348 is a Bitcoin Improvement Proposal that introduces OP_CHECKSIGFROMSTACK (CSFS), a new Bitcoin Script opcode. Existing signature opcodes like OP_CHECKSIG can only verify whether a signature authorises the current spending transaction, while CSFS verifies a signature against any arbitrary message provided on the stack. That seemingly small change unlocks entirely new categories of programmability in Bitcoin.
Brandon Black and Jeremy Rubin authored the proposal. Its formal specification assigns opcode 0xcc, replacing OP_SUCCESS204, and restricts operation to BIP 342 tapscript (leaf version 0xc0). CSFS is therefore available exclusively within Taproot spend paths, not in legacy or SegWit v0 scripts.
The concept originated on Blockstream's Elements Alpha sidechain, where CSFS was deployed alongside OP_CAT and used to build production covenant contracts on the Liquid Network. BIP 348 formalises the opcode for Bitcoin mainnet and incorporates lessons from that sidechain experience. CSFS covenants require transaction data to be pushed onto the stack during spending, which increases witness size but provides full transaction introspection.

## How It Works

BIP 348 changes what a signature can be checked against. OP_CHECKSIG uses transaction-bound verification, while CSFS uses message-bound verification.

## OP_CHECKSIG: Transaction-Bound Only

OP_CHECKSIG pops a public key and a signature from the stack when it executes. It then internally computes the transaction's sighash, a hash of the transaction data according to the active sighash flag. The script never controls what message is being verified: it is always "did this key authorise this specific transaction?"

## CSFS: Arbitrary Message Verification

BIP 348's OP_CHECKSIGFROMSTACK pops three elements from the stack instead of two. OP_CHECKSIG pops only two elements.
CSFS verifies the signature against the provided message and public key using BIP 340 Schnorr verification rules. Three outcomes are possible.

## Key Type Handling

BIP 348 follows the same key type semantics as BIP 342. Both proposals therefore handle key types in the same way.

## Soft Fork Deployment

BIP 348 uses the OP_SUCCESS upgrade mechanism from BIP 342. Nodes that have not upgraded encounter opcode 0xcc and treat it as OP_SUCCESS, marking the entire script as valid without further evaluation, while upgraded nodes interpret 0xcc as OP_CHECKSIGFROMSTACK and perform full signature verification. BIP 348 is therefore a clean soft fork: the new rules only restrict validity, never expand it.
CSFS operations count against the tapscript sigops budget, the same resource accounting that applies to OP_CHECKSIG and OP_CHECKSIGADD. That limit prevents abuse through excessive signature verification within a single script execution.

## Oracle Attestations

BIP 348 allows Bitcoin scripts to verify that an oracle has signed a specific piece of data. An oracle publishes a signed attestation, such as a price feed, a sports result or a weather reading, and the spending script uses CSFS to verify that attestation before releasing funds. CSFS is closely related to discreet log contracts (DLCs), but provides a more direct and flexible on-chain verification mechanism without requiring the oracle to be aware of the contract structure.

## Delegated Spending Authority

CSFS lets a key holder sign a message authorising another party to spend coins under specific conditions. The delegate presents two proofs when spending: the delegation authorisation, verified via CSFS, and their own spending signature, verified via standard OP_CHECKSIG. Delegated spending avoids creating a new multisig arrangement or moving funds on-chain, making it more private and efficient than alternatives.

## Covenant Constructions

CSFS alone does not implement covenants: it verifies signatures but does not inherently bind those signatures to transaction structure. CSFS must be combined with other opcodes to enforce spending restrictions on future transactions.
The Bitcoin covenants research article provides a deeper comparison of these approaches. It compares the available covenant constructions in more detail.

## Lightning Symmetry (Eltoo)

BIP 348 could enable Lightning Symmetry channels, one of its most anticipated applications. Current Lightning channels use a penalty-based mechanism: if one party broadcasts an old state, the counterparty can claim all channel funds. Symmetry channels replace that mechanism with a simpler model where any newer state can spend any older state, with no penalty risk.
Symmetry channels require SIGHASH_ANYPREVOUT behaviour: signatures that are not bound to a specific input. BIP 348's CSFS, combined with CTV, can emulate that behaviour without a separate sighash flag change. CTV constrains the transaction outputs while CSFS verifies authorisation without committing to a specific previous output, which would significantly simplify Lightning channel management and reduce the storage burden on watchtowers.

## The LNHANCE Bundle

BIP 348 is a central component of the LNHANCE soft fork proposal. LNHANCE bundles three opcodes as a combined upgrade.
The LNHANCE proposal argues that these three opcodes together provide the minimal toolkit needed for symmetry channels, vault designs and efficient covenant constructions. Each opcode is narrowly scoped and well-understood, which proponents consider a lower-risk path than broader opcodes like OP_CAT. The OP_CTV research article explains how CTV works independently.
BIP 448 is a newer proposal alongside the original LNHANCE bundle. It bundles OP_TEMPLATEHASH (BIP 446) with BIP 348 and BIP 349, offering a related but distinct approach to the same goal of enabling Lightning Symmetry and covenant functionality.

## History: From Elements to Bitcoin

OP_CHECKSIGFROMSTACK was first deployed on Blockstream's Elements Alpha sidechain. It was combined with OP_CAT and other re-enabled opcodes to build production covenant contracts on the Liquid Network. Developers used it to construct a proof-of-concept vault based on the Möser-Eyal-Sirer design.
Elements provided one key lesson: CSFS-based covenants are more complex than purpose-built alternatives because transaction data must be pushed onto the stack during spending. That requirement increases witness size and script complexity. Running CSFS on a federated sidechain was specifically intended to identify common usage patterns that could inform optimised opcodes for Bitcoin mainnet.
BIP 348 incorporates these lessons. Restricting CSFS to tapscript and using Schnorr signatures exclusively avoids the complexity of supporting multiple signature schemes. Taproot's batch verification capabilities can also be used.

## Comparison with Other Chains

Several Bitcoin-adjacent platforms already have CSFS-style functionality. These platforms already support comparable signature checks against arbitrary messages.

## Witness Size Overhead

Covenant enforcement typically uses a message verified via CSFS that contains a serialised representation of the spending transaction. Transaction data therefore appears in the witness twice: once as the transaction itself, and once as the message on the stack. That overhead increases transaction weight and cost, though it is bounded by tapscript's existing resource limits, while purpose-built opcodes like CTV avoid this duplication by hashing the transaction data internally.

## Script Complexity

Practical covenants built with CSFS require multiple opcodes and careful script engineering. CSFS-based scripts are more general but harder to get right than purpose-built constructions like OP_VAULT (BIP 345). Bugs in complex scripts could lead to funds being permanently locked or stolen.

## CSFS Alone Is Not Introspection

CSFS does not provide transaction introspection, despite a common misconception. It only verifies that a signature matches a message and key. Without a complementary opcode such as CTV, OP_CAT or a future introspection primitive, the script cannot verify that the message actually represents the spending transaction, so the signer must be trusted to construct the message honestly unless additional opcodes enforce correspondence between the message and the transaction.

## Activation Status

BIP 348 remains in draft status as of mid-2026. It has been implemented in Bitcoin Core for regtest (PR #32247) and activated on Bitcoin Inquisition's signet alongside CTV and OP_CAT, but no activation timeline has been set for mainnet. Developer consensus continues to build, with an open letter signed by over 40 Bitcoin developers and researchers calling for priority implementation of both CTV and CSFS, while the broader community debate about which covenant opcodes to prioritise remains ongoing.
Nuri provides this glossary entry for informational purposes only, not as financial or investment advice. You should always do your own research before using any protocol or technology.
Part of the [Nuri glossary](https://nuri.com/glossary), which defines 1876 Bitcoin, Lightning, wallet, stablecoin and payment terms.
