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

Posted by simul

Dec 18, 2025/23:27 UTC

The email discusses a sophisticated method for securing Bitcoin transactions against quantum attacks and signature forgery using a combination of OP_CHECKTEMPLATEVERIFY (OP_CTV) and OP_TXHASH/OP_CHECKTXHASHVERIFY protocols, as outlined in BIP119 and a current draft proposal, respectively. This method involves creating a multi-phase envelope that ensures even if signatures are forgeable in the future, funds can only be moved into a protected Anchor envelope and from there, only along predefined paths. The construction disables Taproot key-path spending by utilizing Nothing-Up-My-Sleeve (NUMS) internal keys to force all Taproot outputs through the script path, enhancing security against quantum threats.

In the initial phase, Phase 0, the aim is to funnel all value into a predestined Anchor envelope without committing to final recipients or future templates. This phase employs OP_TXHASH to enforce conditions that prevent value leakage outside of the Anchor output and limit transaction fee extraction. Phase 1 follows by spending the Phase 0 UTXO to create the Anchor UTXO, effectively bringing the Anchor envelope on-chain without allowing an attacker to redirect the value.

The Anchor UTXO utilizes a Taproot script tree offering two spending paths: a reveal path and an escape hatch. The reveal path requires a one-time secret, adhering to a relative timelock and matching a specific template via OP_CTV. Conversely, the escape hatch does not disclose the secret and must match a different template, also enforced by OP_CTV. Phase 2 entails choosing between these paths to spend the Anchor UTXO, with security measures in place to ensure that value cannot be stolen, even if signatures are compromised.

This structured approach restricts attackers to merely delaying or forcing execution of transactions rather than stealing funds, thanks to the quantum-resistant design and reorg resistance provided by the relative timelock mechanism. Additionally, the protocol supports graceful degradation in the face of quantum advancements and does not require nodes to maintain historical transaction indices, making it prunable-friendly.

For further technical details and demonstration code, the original email includes a link to a Gist.

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