A quantum resistance script only using op_ctv/op_txhash and no new signatures

Dec 18 - Dec 30, 2025

  • The email delves into a cutting-edge technique designed to fortify Bitcoin transactions against the threats posed by quantum computing and the potential for signature forgery.

This method leverages both OP_CHECKTEMPLATEVERIFY (OP_CTV) as established in BIP119 and the proposed OP_TXHASH/OP_CHECKTXHASHVERIFY protocols. The core of this strategy involves the creation of a multi-tiered protective envelope that ensures, despite the possibility of future signature vulnerabilities, funds can only transition through a secure Anchor envelope and subsequently along pre-defined transaction paths. This approach effectively nullifies the risk of Taproot key-path spending by employing Nothing-Up-My-Sleeve (NUMS) internal keys, compelling all Taproot outputs to navigate through the script path, thus bolstering defenses against quantum computing threats.

At the heart of this protective mechanism is a phased process starting with Phase 0, which aims at channeling all value into a predetermined Anchor envelope without locking in final recipients or outlining future templates. OP_TXHASH plays a crucial role in this phase by enforcing conditions that barricade any potential value leakage outside of the Anchor output and simultaneously constrain transaction fee extraction. Following this, Phase 1 involves the expenditure of the Phase 0 UTXO to establish the Anchor UTXO on-chain, preventing possible redirection of value by attackers. The Anchor UTXO employs a Taproot script tree that bifurcates into two distinct spending pathways: a reveal path necessitating a one-time secret compliant with a relative timelock and matching a precise template via OP_CTV, and an escape hatch that bypasses the secret revelation but conforms to an alternate template, also governed by OP_CTV. Phase 2 then permits the selection between these paths for spending the Anchor UTXO, embedding safeguards to preclude fund theft even amidst compromised signatures. This meticulously structured process limits attackers to merely postponing or coercing transaction execution instead of enabling fund theft, attributing to its quantum-resistant design and reorganization resistance imparted by the relative timelock feature.

Moreover, the protocol is acknowledged for its graceful degradation capabilities in light of quantum technological progress and its independence from requiring nodes to maintain historical transaction indices, thereby supporting pruning-friendly operations. For enthusiasts seeking deeper insights or demonstration code, the original communication provides access to a Gist.

Identified pitfalls within this construction include the necessity for knowing the T (total) and E (escape) values at the outset (Phase 0), obligating Phase 0 outputs to be consolidatable to precisely match the T and E totals for CTV outputs. Another concern raised is the quantum safety of the structure, contingent upon the deactivation of secp256k1 (as NUMS points remain vulnerable to quantum adversaries), alongside the limitation preventing users from redirecting funds to a new, quantum-safe address upon withdrawal. A proposition for amending these issues suggests the substitution of TXHASH with Conditional Close Verifications (CCV), enhancing the enforcement of value flow and facilitating the embedding and extraction of the CTV reveal spend at the time of spending rather than at creation. Employing CCV could mirror a conventional vault construct, distinguished by the inclusion of an embedded hash and preimage for the reveal-spend, potentially addressing the identified deficiencies while maintaining value flexibility during the escape spend.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project.

Give Feedback