-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BIP-360: QuBit - Pay to Quantum Resistant Hash #1670
base: master
Are you sure you want to change the base?
Changes from 1 commit
1fa2485
6f67a3d
d83c29d
ae0936a
d89b7c5
b4c329b
53d497e
0a2ed4a
c92a9b0
e1b7007
60d7294
2d098d9
ed4e862
f2426c6
2e4ad81
9935005
cc47f9e
ff4d2c2
f206b97
70649ea
feff847
e186b52
d500124
85a347b
85348c0
a4f3dc6
2b641b8
4b8b647
990d8a8
0fdd8c3
208a987
8eb35c8
d9bb0ff
0ae69db
81e1838
c1b9047
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,11 +40,11 @@ relies on post-quantum cryptographic (PQC) signature algorithms. By adopting PQC | |
resistance without requiring a hard fork or block size increase. | ||
|
||
The vulnerability of existing Bitcoin addresses is investigated in | ||
[https://web.archive.org/web/20240715101040/https://www2.deloitte.com/nl/nl/pages/innovatie/artikelen/quantum-computers- | ||
and-the-bitcoin-blockchain.html this Deloitte report]. The report estimates that in 2020 approximately 25% of the | ||
Bitcoin supply is held within addresses vulnerable to quantum attack. As of the time of writing, that number is now | ||
closer to 20%. Independently, Bitcoin developer Pieter Wuille [https://x.com/pwuille/status/1108085284862713856 reasons] | ||
even more addresses might be vulnerable, representing 5M to 10M bitcoin. | ||
[https://web.archive.org/web/20240715101040/https://www2.deloitte.com/nl/nl/pages/innovatie/artikelen/quantum-computers-and-the-bitcoin-blockchain.html this Deloitte report]. | ||
The report estimates that in 2020 approximately 25% of the Bitcoin supply is held within addresses vulnerable to | ||
quantum attack. As of the time of writing, that number is now closer to 20%. Independently, Bitcoin developer Pieter | ||
Wuille [https://x.com/pwuille/status/1108085284862713856 reasons] even more addresses might be vulnerable, representing | ||
5M to 10M bitcoin. | ||
|
||
Ordinarily, when a transaction is signed, the public key is explicitly stated in the input script. This means that the | ||
public key is exposed on the blockchain when the transaction is spent, making it vulnerable to quantum attack until | ||
|
@@ -79,7 +79,7 @@ The following table is intended to inform the average Bitcoin user whether their | |
quantum attack: | ||
|
||
{| class="wikitable" | ||
|+ Vulnerable output types | ||
|+ Output types vulnerable to long-range attacks on unspent addresses | ||
|- | ||
! Type !! Vulnerable !! Prefix !! Example | ||
|- | ||
|
@@ -129,13 +129,11 @@ before a transaction is mined. Long-range attacks can be executed over a longer | |
exposed on the blockchain indefinitely. | ||
|
||
Coinbase outputs to P2PK keys go as far as block 200,000, so there are, at the time of writing, 1,723,848 coins that | ||
are vulnerable from the first epoch at the time of writing in P2PK outputs alone. The majority of these have a | ||
block reward of 50 coins each, and there are roughly 34,000 distinct P2PK scripts that are vulnerable. These coins | ||
can be | ||
considered "Satoshi's Shield." Any addresses with a balance of less than the original block subsidy of 50 coins can be | ||
considered cryptoeconomically incentive incompatible to capture until all of these are mined, and these addresses serve | ||
to provide time to | ||
transition Bitcoin to implement post-quantum security. | ||
are vulnerable from the first epoch in P2PK outputs alone. The majority of these have a block reward of 50 coins each, | ||
and there are roughly 34,000 distinct P2PK scripts that are vulnerable. These coins can be considered | ||
"Satoshi's Shield." Any addresses with a balance of less than the original block subsidy of 50 coins can be considered | ||
cryptoeconomically incentive incompatible to capture until all of these are mined, and these addresses serve to provide | ||
time to transition Bitcoin to implement post-quantum security. | ||
Comment on lines
+133
to
+136
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once someone just starts stealing ~5% of the supply, it seems that it would be too late? |
||
|
||
It's for the above reason that, for those who wish to be prepared for quantum emergency, it is recommended that no more | ||
than 50 bitcoin are kept under a single, distinct, unused Native SegWit (P2WPKH, "bc1q") address at a time. This is | ||
|
@@ -148,12 +146,12 @@ upgraded by 2030, with browsers and operating systems fully upgraded by 2033. Ac | |
Cryptography is planned to be disallowed within the US federal government after 2035. An exception is made for hybrid | ||
cryptography, which is the use of ECC and post-quantum algorithms together. | ||
|
||
Although the main threat posed by CRQCs is to the signatures used in Bitcoin, a smaller threat is to Bitcoin's hash algorithms. | ||
In particular, while a CRQC could use [https://en.wikipedia.org/wiki/Grover's_algorithm Grover's algorithm] to gain a | ||
quadratic speedup on brute-force attacks on the hash functions used in Bitcoin, a significantly more powerful CRQC is | ||
needed for these attacks to meaningfully impact Bitcoin. For instance, a preimage attack on HASH160 <ref name="hash160"> | ||
Used by P2PKH, P2SH, and P2WPKH addresses, though not P2WSH because it uses 256-bit hashes.</ref> using Grover's | ||
algorithm would require at least 10^24 quantum operations. As for Grover's application to mining, see | ||
Although the main threat posed by CRQCs is to the signatures used in Bitcoin, a smaller threat is to Bitcoin's hash | ||
algorithms. In particular, while a CRQC could use [https://en.wikipedia.org/wiki/Grover's_algorithm Grover's algorithm] | ||
to gain a quadratic speedup on brute-force attacks on the hash functions used in Bitcoin, a significantly more powerful | ||
CRQC is needed for these attacks to meaningfully impact Bitcoin. For instance, a preimage attack on | ||
HASH160 <ref name="hash160">Used by P2PKH, P2SH, and P2WPKH addresses, though not P2WSH because it uses 256-bit hashes.</ref> | ||
using Grover's algorithm would require at least 10^24 quantum operations. As for Grover's application to mining, see | ||
[https://quantumcomputing.stackexchange.com/a/12847 Sam Jaques’ post on this]. | ||
|
||
=== Rationale === | ||
|
@@ -315,8 +313,9 @@ keys from the transaction while still proving they were part of the original com | |
This merkle tree construction creates an efficient cryptographic commitment to multiple public keys while enabling | ||
selective disclosure. | ||
|
||
This allows for inclusion of a Taproot MAST merkle root in the attestation, which makes P2QRH a quantum-resistant | ||
version of Taproot. | ||
This allows for inclusion of a [https://github.com/bitcoin/bips/blob/master/bip-0114.mediawiki BIP-114] Taproot | ||
Merkelized Abstract Syntax Tree (MAST) merkle root in the attestation, which makes P2QRH a quantum-resistant | ||
version of Taproot transactions. | ||
Comment on lines
+316
to
+318
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Taproot does not use an Abstract Syntax Tree. It uses an Alternative Script Tree. Also the term "MAST" is not used in the Taproot BIPs in this context, they refer to the concept as "script tree". |
||
|
||
=== Transaction Serialization === | ||
|
||
|
@@ -513,7 +512,9 @@ Hash-based cryptography | |
|- | ||
| [https://eprint.iacr.org/2011/191.pdf Winternitz signature] || 1982 || 2,368 bytes<ref name="winternitz">Winternitz | ||
signatures are much smaller than Lamport signatures due to efficient chunking, but computation is much higher, | ||
especially with high values for w. Winternitz values are for w of 4.</ref> || 2,368 bytes || Hash-based cryptography | ||
especially with high values for w. Winternitz values are for w of 4. It's worth noting that Winternitz signatures can | ||
only safely be used one time per public key. If addresses are reused, private key information might be leaked, allowing | ||
attackers to spend future outputs assigned to the same address.</ref> || 2,368 bytes || Hash-based cryptography | ||
|- | ||
| [https://sphincs.org/data/sphincs+-r3.1-specification.pdf SPHINCS+ Rd. 3.1 (FIPS 205 - SLH-DSA)] || 2015 || 29,792 | ||
bytes || 64 bytes || Hash-based cryptography | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As described above, please don’t reformat the entire paragraph when you change a single line. Moving all the line breaks makes it needlessly difficult to see what actually changed about the text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I just noticed that it was over 120 characters in length, which was something you requested earlier.