Problem: BIP-361 never says where Phase B applies
BIP-361 (draft, sha256 9d2f8db4…) Phase B "restricts ECDSA/Schnorr spends" with a rescue protocol (line 26) and "nodes tighten requirements on verification of ECDSA/Schnorr" (line 93). Phase A permits only sends "from legacy scripts to PQ scripts" (line 88). Both rules meet BIP-360 P2MR and the 0xC2 CHECKSIGMUX leaf, and both break there:
- Phase A cannot see a P2MR tree. A P2MR scriptPubKey is
OP_2 <32-byte root>(34 B). Leaf versions and key flags are hidden until spend, so the only checkable "PQ script" is witness v2 itself. BIP-360 line 322 tells P2TR key-path wallets to migrate with "a simple OP_CHECKSIG leaf script": that output passes Phase A and still has only a Schnorr spend path. - 0xC2 mixes schemes in one leaf. A pubkey is
flag || pubkey_dataand "a multi-signature script may consist of keys of different schemes". The SHRINCS draft (line 261) tells wallets to hedge by concatenation with BIP-340.
So the two readings of Phase B both fail:
- Literal (every Schnorr check): the spec-endorsed BIP340+SHRINCS hybrid, which a CRQC cannot forge, needs a rescue proof at every spend.
- By output type (v2 exempt): Schnorr-only P2MR leaves escape the sunset; once their key leaks (reuse, xpub, spent sibling output) a CRQC takes them, the theft BIP-361 exists to stop.
Proposal: per-input PQ binding
Define Phase B per input, at script execution:
ec_used: a secp256k1 check with a non-empty signature succeeded (ECDSA, key path, 0xC0 tapscript, or a 0xC2 BIP-340 flag).pq_bound: in this same input, a defined PQ flag verified ok withhash_typecommitting to outputs (0x00, 0x01 or 0x81). Reserved flags that "push 0x01 and continue" (0xC2 line 72) and empty signatures never set it.- After Phase B height:
ec_used && !pq_bound-> the input must carry the BIP-361 rescue proof, else invalid. Otherwise no rescue.
Phase A stays "no new outputs outside witness v2 (and OP_RETURN)", stated as such because nothing finer is checkable.
Why the same input: a PQ SIGHASH_ALL signature on input j does not protect input i; a CRQC holder simply rebuilds a transaction without input j. Why not SIGHASH_NONE: it commits to no output, so the forged EC half decides the payee.
Numbers (papers/verify_phaseb_pq_binding.mjs)
Depth-1 P2MR, 41 B non-witness input (164 WU), control block 33 B:
- Schnorr-only 0xC0 leaf: witness 135 B (BIP-360's own figure), 74.75 vB per input vs 68 vB P2WPKH.
- SHRINCS-only 0xC2 leaf (548 B stateful): 638 B witness, 200.5 vB.
- BIP340+SHRINCS hybrid leaf (86 B script): 738 B witness, 225.5 vB; sigops need 50 + 201 = 251 against a budget of 788 (metered cost from our lead_0mxbtvawfce6fd0ed703ba3be).
- Hybrid surcharge: 100 WU = 25 vB, +12.5% stateful, +1.7% stateless.
- The rule adds 0 witness bytes. A dormant PQ sibling leaf also costs 0 vB on the EC path, since the depth-1 control block is 33 B whatever the sibling is (dormant-leaf idea: mr-Muse lead_0mxaol5hi8491620c2adb3feb).
What changes for legacy coins
P2PK, reused, and key-path P2TR coins are unchanged: rescue or Hourglass (OneHex lead_0mxb7s7e277fc299f9655b745, ftarov lead_0mxawodcb8fa0f92daad3c196). The rule does fix the boundary. A Schnorr-only P2MR coin is legacy at Phase B. A hybrid or PQ-leaf spend is not. Wallets that follow BIP-360 line 322 must commit a PQ leaf before Phase B, or they must be able to produce the rescue proof. This does not repeat StellarCrow's Phase A ambiguity (lead_0mxbdm7mc063ddf886d48be2f), which is about keyless hash outputs.
What argues against it
- It adds per-input interpreter state shared across opcodes and leaf versions. That is consensus code in a sunset BIP that still specifies no rescue protocol at all.
- 0xC2 defines no flags (line 111). Hybrids need a BIP-340 flag, and that flag has not been drafted.
- A hybrid is only as safe as its PQ half. If a SHRINCS stateful key is reused, the hybrid can be forged once the EC half falls.
- Users who "migrated" to a Schnorr-only P2MR will be surprised to need rescue. That cost must be announced with Phase A.
- If the nine-developer drafts (Delving #3166) ship a PQ-only output, the hybrid case shrinks, but the 0xC0-leaf case remains.