Hello — first post here. I’ve been building an open-source research implementation of a pre-migration layer for the post-quantum problem, and I’d like protocol-level feedback before taking it any further toward a BIP-style draft.
The problem it targets is narrow: if a cryptographically relevant quantum computer arrives, coins behind exposed public keys (early P2PK outputs, reused addresses) are at risk, and any future migration to post-quantum outputs will face a continuity question — how does a holder demonstrate, in a way others can independently verify, that a post-quantum key was committed to by the same spending authority that controlled the legacy output, before any deadline or freeze debate begins?
What the prototype does (no consensus changes, everything off-chain except a 32-byte anchor):
- The holder generates a hash-based PQ key (WOTS+/XMSS, RFC 8391; security reduces to SHA-256 preimage resistance, ~128-bit post-Grover).
- They create an attestation: a canonical, domain-separated record binding the legacy scriptPubKey, a salted hiding commitment to the PQ public key, and a pre-committed hash of the next PQ key (key succession — a burned or lost one-time key rotates to a pre-committed successor instead of forcing reuse).
- The attestation is authorised two ways: an ECDSA signature by the legacy Bitcoin key (signed-message format, verified against the script’s HASH160) and a proof of possession by the PQ key. It is valid only if both verify. It proves historical control of both keys at attestation time — not legal ownership, and not spending rights.
- Only SHA256(domain || attestation) goes on-chain, in an OP_RETURN. The full record stays off-chain; a standalone verifier checks any bundle against the on-chain anchor.
- A claims registry applies deterministic conflict rules: takeover is possible only through the pre-committed succession chain or a same-identity refresh; anything else is marked contested and never replaces the standing claim. Claims activate only at a configurable confirmation depth and suspend if depth drops (reorg).
- State for the stateful XMSS keys lives in an append-only hash-chained journal: a restored old backup is detected and fails closed rather than risking one-time-key reuse.
Explicit non-claims: this does not make any coin post-quantum spendable — Bitcoin consensus recognises no PQ output today, and the tooling labels everything PQ-COMMITTED with pq_spendable: false. It is not a competitor to BIP-360/P2QRH; if a PQ output type is adopted, a continuity record like this is meant to feed into migration to it. It cannot help coins whose keys are already exposed if a CRQC arrives before holders act.
Code, tests (151, including adversarial state/crash/conflict cases) and a design doc are public: GitHub - yourmememachine/quantum-shield: Post-quantum protection layer for Bitcoin: hash-based ownership attestations, exposure scanning, and migration readiness (research implementation) · GitHub — it is a research implementation (v0.2), not production software, and the docs say so.
Questions I’d genuinely value this forum’s view on:
- Is a continuity attestation of this form useful at all in a migration to a PQ output type, or does it create more problems (griefing, false confidence, privacy) than it solves?
- Are the conflict rules sound? In particular: succession-chain-only takeover, and same-identity refresh requiring both the same legacy key and the same PQ identity.
- Is the two-signature attestation (legacy ECDSA + PQ proof of possession) the right authorisation shape, or is there a cleaner primitive already in the literature I should be using instead?
Thanks for any critique — harsh is fine, I’d rather find the holes here.