This topic of PQC transaction output types in Bitcoin has been discussed in many different places, but often in somewhat unrelated threads. So I’m creating this thread in the hope to have those discussions in one place.
Before starting, I want to give an overview of what output types I have seen discussed so far, their variations, and their properties. I hope to keep this objective, and will go into my own opinion below. Feel free to suggest corrections or omissions, as I haven’t followed this debate very actively until recently, and the list below is mostly informed by my own interests and the discussions I participated in.
Output types
- P2MR “Pay to Merkle Root” (BIP-360): The txout stores the Merkle root of a tree of leaf scripts. Spending reveals the Merkle path, the leaf script, and the inputs to satisfy it. I assume the addition of opcodes or leaf script versions that introduce PQC functionality (not included in BIP-360). This loses some spending efficiency compared to P2TR (see below), but does not reveal EC points on chain before spending.
- P2TRv2 “Pay to Taproot v2” (unclear origin): The exact same semantics as BIP-341 P2TR, but with PQC opcodes/leaf types added, and with an expectation that a future consensus change will disable ECC keypath/opcodes just within the output type itself. Leaves an EC point exposed on chain for every output, but is most similar to today’s usage.
- P2TRH “Pay to Taproot Hash” (proposed here): Like P2TRv2, but the scriptPubKey contains a hash of the tweaked point Q. Key path spending uses public key recovery (see below), giving it the same weight profile as P2TRv2, without EC point on chain. Needs a new BIP-340 variant, and breaks batch validation.
- P2QR “Pay to Quantum Resistant” (unclear origin): Identical to P2MR, but all ECC opcodes are disabled from the start. This makes it unconditionally quantum-resistant, but loses the efficiency of ECC even before Q-day.
Variations
- Public Key Recovery (PKR) (proposed here): a special leaf version is added whose “script” is just an EC public key hash. Spending needs just a signature, and verification is done through EC public key recovery to match against the hash. This reduces the spending size by ~32 bytes by not publishing the public key explicitly at spend time, at the cost of needing a BIP-340 variant, and breaking batch validation. This could also be done through a separate opcode instead.
- New witness style (proposed here, discussed more here): this allows a new output type (or a new opcode) to access an additional witness extension to the transaction format, which can have arbitrary discount/costing rules for new witness data. This comes at the cost of needing to deploy a transaction serialization change and P2P protocol extension.
- Tripwire (proposed on ML): a proof for ECDLP breaking can be published on-chain, and this automatically disables ECC opcodes/keyspaths just within the output type itself. This makes it unambiguously clear that EC disabling is expected.
- Miner lockdown (proposed on ML): a softfork signalling mechanism (e.g. BIP-9) is used, not for a separate softfork, but to let a hashrate majority trigger disabling of ECC opcodes/keypaths just within the output type itself. This avoids the need for ecosystem action for EC disabling, at the cost of giving miners more power.
- Hybrid PQC opcodes (one scheme discussed here): instead of offering pure PQC opcodes/paths, have them accept hybrid ECC+PQC signatures. This provides security if a PQC scheme were broken (possibility classically) or used incorrectly (especially with efficient hash-based schemes being stateful), as long as ECC is not broken. The downside is (even) larger signatures and higher verification costs.
- Separate PQC leaf version (proposed on ML): restrict PQC opcodes to a separate leaf version which has no ECC opcodes. Depending on tripwire/lockdown/disabling semantics, this may avoid surprises when mixing both, at the cost of preventing the usage of (user-defined) hybrid schemes in script.
Properties
(based on this post and this post)
| Property | P2TRv2 | P2TRH | P2MR | P2MR+PKR | P2QR |
|---|---|---|---|---|---|
| Security1 | |||||
| After deposit | |||||
| + PQC spend | |||||
| + ECC spend | |||||
| Efficiency2 (1 ECC + 1 PQC) | |||||
| ECC sig spend bytes | 64 | 64 | 128 | 96 | ∞ |
| PQC overhead bytes | 32 | 32 | 32 | 32 | 0 |
| Miscellaneous | |||||
| Unmodified BIP-340 |
Where:
: only secure if ECC was disabled, or no CRQC exists.
: also secure under the combination of (a) there is no address reuse, (b) there is no pubkey sharing3, (c) no short-range CRQC exists, and (d) there is no collusion between long-range CRQCs and a hashrate majority
: also secure under the combinaton of (a) no reuse and (b) no pubkey sharing, without the need for (c) or (d).
: CRQC is no threat
: not applicable
- 1: P2MR can be used in a PQC-only mode, which has equivalent security to P2QR.
- 2: The bytes under “Efficiency” correspond to WU when used with the existing segwit witness. With new witness styles, they can be given arbitrary WU.
- 3: P2MR can be used in a way that remains secure under a limited form of descriptor sharing before ECC spend, if all ECC opcodes are inside PKH constructions, and no actual EC points are shared. It is not compatible with xpub sharing, MuSig, adapter signatures, or FROST.