Bitcoin Forum
December 05, 2026, 08:55:32 PM *
News: Latest Bitcoin Core release: 32.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Priority for zero-knowledge proof escape hatch from the Quantum Cryptopocalypse  (Read 24 times)
death_wish (OP)
Member
**
Offline

Activity: 98
Merit: 320

Without fungibility, 1 BTC ≠ 1 BTC.


View Profile
Today at 01:18:00 PM
 #1

Theoretically, the primary purpose hereof is to establish invention priority.  I think it’s very likely that others have thought of the same idea independently; I encourage competent evidence of such multiple independent inventions to be posted in this thread.

This general type of discussion about who gets what credit is entirely normal for academics.  It is of long-term interest to historians, and even to Wikipedia editors.  Mathematicians sometimes even conduct extended discussions about whose initial should be listed first in an initialism.  The discussion is not always adversarial; for a friendly example, Yuri Matiyasevich, the M in the MRDP theorem, insisted on calling it the RMDP theorem, because he honestly believed that Julia Robinson should have highest-priority credit.  Hereby, I hope that all such discussion will be so honest and friendly.

As a practical matter, the secondary purpose hereof is potentially more important at this grand world-historical moment:  In the face of an accelerated Quantum Cryptopocalypse, I want to drive interest in research and development of a zero-knowledge proof escape hatch for Bitcoin.  I thought of this over four years ago; perhaps others thought of it before me.  Nobody built it.  We need concrete results ASAP.

Having studied the issue, I contend that this is the only known safe means without unacceptable tradeoffs to move eligible coins when secp256k1 is broken—which it may already be.

Eligible coins are those for which spending is authorized by one or more ECC public key(s), and none of the authorized key(s) has ever been revealed on the blockchain.  This includes, but is not limited to non-reused P2PKH and P2WPKH.  In practice, I suggest that P2PKH and P2WPKH are by far the highest priorities for concrete implementations.

Furthermore, in practice, I note that although reused addresses should be ineligible, and this restriction could be enforced (by consensus rules, or theoretically even by a txindexed full blockchain validator inside an arithmetic circuit), in practice, enforcing it may have too high a cost for too low a gain; at least, I think it would require tx indexing on all consensus-validating P2P nodes.  On the other hand, my idea for an escape hatch is to provide some significant level of global consensus assurance that the “true” owner of an address, and not a QC attacker, has moved the coins to a post-quantum address.  I leave the question for further work.



My idea

All of the following quotes are verbatim; all emphasis, bold, and highlighting are in the original.  However, not all are full-quotes; some are, but some are excerpts.  Quotes are shown chronologically here.

Earliest public mention.  Well, I think so.  I have not exhaustively researched my own post history about this, and I may have forgotten a post that I also didn’t find when searching.

⇾ Re: Thoughts on zero-knowledge salvation in the post-quantum apocalypse
Just tossing this out here:

The only option is to introduce a new quantum resistant address type and  give everybody plenty of time to move across to it (in the order of several years). What happens with coins that don't move becomes the real issue here - do we either decide as a community to permanently lock them* so they can never be moved again, or do we just ignore them and let them be stolen by whoever manages to first and then re-enter the general circulation. I am in favor of the latter option.

*Perhaps the best option, but one which would need a lot more work to be viable, would be to lock all these coins but provide a mechanism to unlock them if the real owner can provide some quantum-resistant proof that they are indeed the real owner. An example would be if I could prove that I owned the seed phrase which generated a given wallet or address. Such a mechanism (if developed) would only solve this issue for seed phrase generated addresses though, and there are a lot of vulnerable coins in P2PK address and other non HD wallets that this does not address.

In theory, this could be done without revealing the seed, using a zero-knowledge proof:  In theory, any operation that can be performed by a computer can have its correct performance proved in zero knowledge.  In practice, I think that running BIP39 (replete with 2048 iterations of PBKDF2-HMAC-SHA512!) and BIP32 inside an arithmetic circuit would be obscenely expensive.  Zero-knowledge proof coins go to great lengths to design protocols that are efficient inside a ZK arithmetic circuit—sometimes even inventing their own cryptographic primitives.  SHA2 functions are bad mojo here.  

In an emergency, for a one-time movement of vulnerable coins, perhaps it may be feasible even to do some expensive operations.

Furthermore, zero-knowledge proofs would allow secure spending of coins from some keypool keys, etc.  It seems impossible to provide any help there:  If the public key has been exposed, then the only secret information can be deduced by an attacker with a large quantum computer.  But if the public key has never been revealed, then you can reduce this to the security of the hash.  Anything that can be reduced to the security of a hash smells good!

Perhaps Greg Maxwell’s later-regretted meme about the safety of not revealing public keys may have some merit, after all.  Racing a quantum attacker to spend your coins is a bad idea, when you need to reveal the public key to spend your coins.  But a ZK proof could let you never reveal the public key!  Prove in zero knowledge that you know a private key, which produces an undisclosed public key, which has the publicly known hash.  [Edit:  Or, keep it simple.  Prove in zero knowledge that you know the preimage to the hash, and “somehow” use that to spend the coins.  A proper approach here would need to be designed carefully, and subjected to a rigorous security analysis.  —End of edit.]

The most important of these quotes follows.  I would only now revise it to elaborate explicitly that the prover’s arithmetic-circuit program should also verify a signature on the transaction, and match the public key to the keyhash as said below.  (The order of operations in the && is not significant to security; it should be determined by efficiency.  I assume, but no more than assume that a double-hash and a string comparison are altogether far less costly than secp256k1 point operations.)  I think that’s implied, but it needs to be said explicitly.  Although it’s also possible to sign the tx inside an arithmetic circuit, I handwavily think that the following would be more efficient/less inefficient:

Code: (Revised pseudocode)
bool self_validation(
public_input H, /* authorized keyhash */
public_input TX, /* unsigned tx */
secret_input secp256k1_pubkey,
secret_input signature)
{
return (RIPEMD160(SHA256(secp256k1_pubkey)) == H &&
is_valid_sig(TX, secp256k1_pubkey, signature));
}

⇾ A thread far derailed from Re: Thoughts on burner addresses
In theory, any operation that can be performed by a computer can have its correct performance proved in zero knowledge.

To illustrate:  For publicly known Hash160 image H of secret preimage secp256k1_pubkey, you can prove in zero knowledge that you ran a program that outputs true for the following:

Code: (Pseudocode)
RIPEMD160(SHA256(secp256k1_pubkey)) == H

Verifying the proof does not require any knowledge of secp256k1_pubkey.

Neat trick, eh?  That’s the toy version; it simply proves that you know the unrevealed public key.  Building this into a system that permits secure spending of funds would necessarily be more complicated; and since the objective here is post-quantum emergency salvaging of coins, it may need to use something other than current-generation zk-SNARKs.*

[...]


* zk-STARKs are PQ crypto; they rely only on the security of a hash function, but I am not sure if they are the best option here.  There is some debate about zk-SNARKs and quantum computing attacks; I would need to learn more before opining.  Edit 2022-06-11 (original):  Duh, I conflated soundness with zero-knowledge.  AFAIK, there is no debate about whether a quantum computer that could break typical ECC could annihilate the soundness of zk-SNARKs—that is, whether it would be able to forge fake proofs.  The question, rather, is of how much privacy Zcash users would retain against retrospective decryption in a post-quantum world.  That depends on the intricacies of the Zcash protocol, not only on the properties of zk-SNARKs.  AFAIK, Zcash users will retain privacy for, and only for, funds received by addresses that have never been revealed anywhere that a quantum attacker could find it.  AFAIK (and I am not sure about this), the SNARKs themselves lack information that could be recovered by a quantum attacker; but the Zcash protocol encrypts transaction details on-chain with ordinary use of EC public-key cryptography, using a public key derived from the receiving address.  Of course, the quantum attacker could break the latter.  Anyway, STARKs it is—those are PQ crypto.

⇾ Re: Lost coins vulnerable to theft in the future?
As I mentioned in another thread, I would only support locking coins if there was some way for the real owner to prove ownership and unlock them again, such as by providing a zero knowledge proof that they own the seed phrase which generated the relevant private keys. But this does not solve the problem of truly lost coins or early coins in P2PK addresses.

I see that you like my idea. Smiley

The only option is to introduce a new quantum resistant address type and  give everybody plenty of time to move across to it (in the order of several years). What happens with coins that don't move becomes the real issue here - do we either decide as a community to permanently lock them* so they can never be moved again, or do we just ignore them and let them be stolen by whoever manages to first and then re-enter the general circulation. I am in favor of the latter option.

*Perhaps the best option, but one which would need a lot more work to be viable, would be to lock all these coins but provide a mechanism to unlock them if the real owner can provide some quantum-resistant proof that they are indeed the real owner. An example would be if I could prove that I owned the seed phrase which generated a given wallet or address. Such a mechanism (if developed) would only solve this issue for seed phrase generated addresses though, and there are a lot of vulnerable coins in P2PK address and other non HD wallets that this does not address.

In theory, this could be done without revealing the seed, using a zero-knowledge proof:  In theory, any operation that can be performed by a computer can have its correct performance proved in zero knowledge. [...]
To illustrate:  For publicly known Hash160 image H of secret preimage secp256k1_pubkey, you can prove in zero knowledge that you ran a program that outputs true for the following:

Code: (Pseudocode)
RIPEMD160(SHA256(secp256k1_pubkey)) == H

Verifying the proof does not require any knowledge of secp256k1_pubkey.

Neat trick, eh?  That’s the toy version; it simply proves that you know the unrevealed public key.  Building this into a system that permits secure spending of funds would necessarily be more complicated; [...]

Mulling this, I am quite confident that a practical post-quantum ZK proof emergency salvage system could be designed not based on seed derivations, but for all UTXOs that require unrevealed public keys.  This includes P2SH/P2WSH.  The only coins that could not be safely salvaged are those in addresses with known public keys:  Reused P2PKH/P2WPKH, all P2TR, reused P2SH/P2WSH multisig, etc.  (About those, I absolutely agree with you that coins vulnerable to theft cannot be locked or seized; the idea flies in the face of all that Bitcoin means!)

Following the above-quoted posts, I was working on refining this idea, thinking towards writing this up—for the forum and/or bitcoin-dev, and also for proper documentation of prior art.  (I am afraid that my idea, or some aspects of it may potentially constitute patentable methods; as a precaution, I want to create solid public documentation of prior art, with strong evidence of invention date.)  I have been interrupted and distracted for the past week or so, but I should get back to this soon.

Meanwhile, I wish to reassure Adam_xx and any others worried about quantum computers.  With a nod to Clarke:  Any sufficiently advanced cryptography is indistinguishable from magic.  My zero-knowledge proof coin-salvaging system can be done.  The question is if it will be done in Bitcoin; and given that this is open-source software, I really oughtn’t just sit around idly dreaming about it.



A few little scratch-notes:

AFAIK, zk-STARKS (not SNARKs) are post-quantum for soundness.  (zk-SNARKs may arguably (?) be sound for zero-knowledgeness in a post-quantum world; but IIUC, they will lack soundness against forgery by a quantum computer.)

zk-STARKs are rarely used in practice, because their proof sizes are three orders of magnitude larger than zk-SNARK proofs—far too big for ordinary “send some money” types of blockchain transactions!  Ethereum already tolerates that cost for one of their major L2 systems, which amortizes the cost of an on-chain zk-STARK verification across large numbers of L2 transactions.  For onetime emergency salvage in Bitcoin, the transaction size cost would be worthwhile—perhaps even with a fee rebate supported by miners, who have the long-term incentive to mine emergency transactions for free or cheap to help keep Bitcoin alive through a hypothetical Quantum Apocalypse.

I have significant concerns about how computationally expensive this would be.  Although anything that can be computed theoretically can have its computation proved in zero knowledge, in practice, protocols based on zero-knowledge proofs need to choose carefully what they will run inside the ZK proving arithmetic circuit.  Some even design their own cryptographic primitives such as hashes, etc.; designing primitives that run efficiently inside a ZK arithmetic circuit seems to be a very narrow subspeciality in the field of cryptography.  Some of the primitives that Bitcoin uses are notoriously bad for this.  Again, however, I anticipate that a onetime emergency salvage system could probably consider that cost less painful than letting Bitcoin be destroyed by a hypothetical Quantum Apocalypse.

I also remind any readers that quantum computers capable of cracking Bitcoin do not currently exist, and there is no proof that they are possible in practice.  It is good to think about these things now, but I do not want to feed FUD.  IMO, the threat of a potential Quantum Apocalypse is much, much worse for PGP, Tor, the HTTPS in your browser, and anything else that could be retrospectively decrypted.  That could be catastrophic—and there is no way to fix it with some sort of a salvage system!



What Leo said

Having reviewed carefully, with fresh eyes, a 2020 post that I barely glanced at once in 2022, I now respectfully disagree in part with Leo’s statement here.  It’s true that he’d discussed “such a thing” in the past, but (a) only as a one-liner general observation with no details at all, and (b) not in the context of post-quantum coin salvage—insofar as I am aware.

⇾ Re: Lost coins vulnerable to theft in the future?
I see that you like my idea. Smiley
Well, it's a good idea if implemented safely, but I won't let you take all the credit, since I've discussed such a thing in the past:

I could provide a zero knowledge proof that I am in possession of the extended private key or the seed phrase which was used to derive that private key.

The 2020 post, in pertinent part:

⇾ Re: Is it possible to create same private key by luck ?
If you give me your private key, how exactly are you going to prove that you were the first owner of the keys? (so it would be considered that I stole them from you)
I could provide a zero knowledge proof that I am in possession of the extended private key or the seed phrase which was used to derive that private key.

This is true, of course, and meritorious in the context of the 2020 discussion.  However, in substance and in context, it bears negligible resemblance to what I said in 2022.

I have a profound respect for Leo, and I wish that I could discuss this with him now.  Maybe he’d also had something else in mind.  Unfortunately...  I wish that I’d discussed it more with him then.

If anyone knows a Leo post before June 08, 2022, 05:46:55 PM that gave (a) any significant details about (b) how zero-knowledge proofs could be used to transfer P2PKH/P2WPKH coins without exposing the public keys to (c) a QC attacker, please cite and quote it here.

Needless to say, I will gracefully cede claims of priority to anyone who is shown to have publicly stated (a) any significant details about (b) how zero-knowledge proofs could be used to transfer P2PKH/P2WPKH coins without exposing the public keys to (c) a QC attacker.


This thread is technically abandonware, a hit-and-run.  I encourage discussion to continue.

  • November 22, 2026, 12:00:00 AM - death_wish - woke up
Code: (/bin/sh)
death@suicide:~# /usr/sbin/zzz

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!