in the face of quantum adversary, a commonly discussed emergency soft fork for Bitcoin would be to disable the Taproot keyspend path (
eprint.iacr.org/2025/1307), effectively turning it into something that resembling BIP-360
assuming an existing precautionary soft-fork to add a pq signature scheme, this would safely allow holders to maintain unilaterally custody of their funds
a downside to this proposal is that any keyspend-only (normal schnorr sig) would be locked indefinitely
inspired by
eprint.iacr.org/2023/362, I set out to address the option problem in section 6, to create a variant of seed-lifting that doesn't reveal the wallet's master secret! 🤓
the end result is a zk-STARK proof that proves: "public key P was generated using a private key k, which itself was derived via BIP-32/BIP-86 with a master wallet secret S"
this generalizes beyond Taproot, and would allow the rightful owners of any BIP-32 derived wallets to move their funds in het case of a spend disabeling emergency softfork 🛡️
the final proof takes 50 seconds to run on my MacBook with Metal GPU acceleration, uses 12 GB of RAM during proving, with a final proof size of 1.7 MB
the proving code/statement is largely unoptimized, and it's possible to aggregate several proofs into a single smaller proof ⨻
an actual production deployment would likely use a smaller optimize circuit for this specific statement, this demo serves to demonstrate that such a proof is well within reach w/ today's hardware software
to generate the proof I forked TinyGo to add a risc0 RISC-V ELF compilation target for TinyGo:
github.com/Roasbeef/tinygo-z…
then I used some helper utilities and a C FFI wrapped risc0 library to create a generalized toolkit for TinyGo zk-STARK proofs:
github.com/Roasbeef/go-zkvm
the final guest host lives in the bip32-pq-zkp repo:
github.com/Roasbeef/bip32-pq…
such a proof scheme is yet another tool in the post quantum toolkit for Bitcoin developers to prepare for an eventual PQ world 🤠
full details in my post to the Bitcoin dev mailing list:
groups.google.com/g/bitcoind…