{"id":19932,"date":"2024-12-26T17:56:20","date_gmt":"2024-12-26T15:56:20","guid":{"rendered":"https:\/\/forklog.com\/en\/q-day-jitters-how-bitcoins-developers-plan-to-thwart-quantum-computers\/"},"modified":"2024-12-26T17:56:20","modified_gmt":"2024-12-26T15:56:20","slug":"q-day-jitters-how-bitcoins-developers-plan-to-thwart-quantum-computers","status":"publish","type":"post","link":"https:\/\/forklog.com\/en\/q-day-jitters-how-bitcoins-developers-plan-to-thwart-quantum-computers\/","title":{"rendered":"\u2018Q Day\u2019 jitters: how bitcoin\u2019s developers plan to thwart quantum computers"},"content":{"rendered":"<p>On December 10, researchers at Google Quantum AI unveiled a new quantum chip, Willow. The news rekindled the crypto community\u2019s fears about a quantum threat to bitcoin\u2014a topic that has surfaced periodically.<\/p>\n<p><!--more--><\/p>\n<p>After Google\u2019s release, though, \u201cquantum <a class=\"tracking_link\" href=\"https:\/\/ru.wikipedia.org\/wiki\/FUD\" target=\"_blank\" rel=\"noopener\">FUD<\/a>\u201d seemed to be taken far more seriously. By December 18 the Bitcoin Improvement Proposal titled <span data-descr=\"The first part of the proposed soft fork dubbed QuBit\" class=\"old_tooltip\">Pay to Quantum Resistant Hash (P2QRH)<\/span> had been assigned a number (<a class=\"tracking_link\" href=\"https:\/\/github.com\/cryptoquick\/bips\/blob\/p2qrh\/bip-0360.mediawiki\" target=\"_blank\" rel=\"noopener\">BIP-360<\/a>).<\/p>\n<p>Together with the team at the bitcoin mixer <a class=\"tracking_link\" href=\"https:\/\/mixer.money\/ru\/\" target=\"_blank\" rel=\"noopener\">Mixer.Money<\/a>, we examine how developers are preparing for \u201cQ Day\u201d\u2014a possible moment in the future when the first cryptocurrency could become vulnerable to quantum attacks.<\/p>\n<h2 class=\"wp-block-heading\">What the quantum threat entails<\/h2>\n<p>Bitcoin\u2019s protocol uses public-key cryptography to make transactions. When a new wallet is created, it generates a mathematically linked pair of keys\u2014public and private. The private key must be kept secret; the public key is visible to all. This enables digital signatures created with the private key, which anyone can verify using the corresponding public key.<\/p>\n<p>The security of this pairing rests on a <a class=\"tracking_link\" href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9E%D0%B4%D0%BD%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%BE%D0%BD%D0%BD%D1%8F%D1%8F_%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F\" target=\"_blank\" rel=\"noopener\">one-way function<\/a>: a public key is easily derived from a private key, but not the other way round. In 1994, however, the mathematician Peter Shor published a <a class=\"tracking_link\" href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%90%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC_%D0%A8%D0%BE%D1%80%D0%B0\" target=\"_blank\" rel=\"noopener\">quantum algorithm<\/a> capable of breaking this assumption. Any organisation with a cryptoanalytically relevant quantum computer (CRQC) could use it to derive a private key from its public counterpart.<\/p>\n<p>Accordingly, the author of <a class=\"tracking_link\" href=\"https:\/\/github.com\/cryptoquick\/bips\/blob\/p2qrh\/bip-0360.mediawiki\" target=\"_blank\" rel=\"noopener\">BIP-360<\/a>, writing under the pseudonym Hunter Beast, stresses that preventing public keys from appearing on-chain is a crucial step toward quantum safety.<\/p>\n<p>Back in 2019 the bitcoin developer Pieter Wuille estimated that around <a class=\"tracking_link\" href=\"https:\/\/x.com\/pwuille\/status\/1108087724567781376\" target=\"_blank\" rel=\"noopener\">37%<\/a> of supply could be at risk because public keys are revealed on-chain\u2014either coins were received directly to public keys or addresses were reused.<\/p>\n<p>In early versions of the software, coins could be received in two ways:<\/p>\n<ol class=\"wp-block-list\">\n<li><strong>Pay-to-Public-Key (P2PK). <\/strong>The public key itself serves as the recipient\u2019s address. Coins mined by bitcoin\u2019s creator, Satoshi Nakamoto, sit on such outputs and could be compromised by a CRQC.<\/li>\n<li><strong>Pay-to-Public-Key-Hash (P2PKH).<\/strong> The recipient\u2019s address consists of a hash of the public key, so the latter <span data-descr=\"via the address\" class=\"old_tooltip\">is not revealed<\/span> directly on-chain.<\/li>\n<\/ol>\n<p>As long as no spend has been made from a P2PKH address, its public key does not appear on-chain. It becomes known only when the owner spends from it.<\/p>\n<p>After a spend, it is best practice not to reuse the address. Modern wallets are configured to generate a new address for every transaction\u2014primarily for privacy rather than quantum resistance.<\/p>\n<p>Even so, in 2024 ordinary users, exchanges and custodians still hold hundreds of thousands of bitcoins on reused addresses.<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"212\" src=\"https:\/\/forklog.com\/wp-content\/uploads\/image2-374-1024x212.png\" alt=\"image2-374\" class=\"wp-image-248699\" srcset=\"https:\/\/forklog.com\/wp-content\/uploads\/image2-374-1024x212.png 1024w, https:\/\/forklog.com\/wp-content\/uploads\/image2-374-300x62.png 300w, https:\/\/forklog.com\/wp-content\/uploads\/image2-374-768x159.png 768w, https:\/\/forklog.com\/wp-content\/uploads\/image2-374-1536x318.png 1536w, https:\/\/forklog.com\/wp-content\/uploads\/image2-374.png 1881w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Bitcoin Rich List. Source: <a class=\"tracking_link\" href=\"https:\/\/bitinfocharts.com\/top-100-richest-bitcoin-addresses.html\" target=\"_blank\" rel=\"noopener\">BitInfoCharts<\/a>.<\/figcaption><\/figure>\n<p>Hunter Beast distinguishes two types of quantum attack:<\/p>\n<ul class=\"wp-block-list\">\n<li><strong>Long-range. <\/strong>The public key is known, giving attackers unlimited time to crack it;<\/li>\n<li><strong>Short-range. <\/strong>The attack must be executed quickly while the transaction sits in the <span data-descr=\"before inclusion in a block\" class=\"old_tooltip\">mempool<\/span>.<\/li>\n<\/ul>\n<p>The latter becomes possible because the public key is revealed when coins are spent. Pulling this off would require powerful CRQCs because it must be done within a brief window. In the early stages of CRQC development, long-range attacks\u2014where the public key is known in advance\u2014are more plausible.<\/p>\n<p>Short-range attacks target any transaction in the mempool, whereas long-range attacks focus on:<\/p>\n<ul class=\"wp-block-list\">\n<li>P2PK (Satoshi\u2019s coins, CPU miners);<\/li>\n<li>reused addresses (of any type);<\/li>\n<li>wallet extended public keys (also known as xpubs);<\/li>\n<li>Taproot addresses (beginning with bc1p).<\/li>\n<\/ul>\n<p>The table below informs bitcoin users whether their coins are vulnerable to a long-range attack:<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"396\" src=\"https:\/\/forklog.com\/wp-content\/uploads\/image1-608-1024x396.png\" alt=\"image1-608\" class=\"wp-image-248703\" srcset=\"https:\/\/forklog.com\/wp-content\/uploads\/image1-608-1024x396.png 1024w, https:\/\/forklog.com\/wp-content\/uploads\/image1-608-300x116.png 300w, https:\/\/forklog.com\/wp-content\/uploads\/image1-608-768x297.png 768w, https:\/\/forklog.com\/wp-content\/uploads\/image1-608.png 1314w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">P2PKH, P2SH, P2WPKH and P2WSH remain protected if the addresses have not been used before. P2QRH is at the proposal stage under BIP-360. Source: <a class=\"tracking_link\" href=\"https:\/\/github.com\/cryptoquick\/bips\/blob\/p2qrh\/bip-0360.mediawiki\" target=\"_blank\" rel=\"noopener\">Github<\/a>.<\/figcaption><\/figure>\n<p>Notably, the last major bitcoin upgrade\u2014Taproot (P2TR)\u2014sparked a <a class=\"tracking_link\" href=\"https:\/\/bitcoinops.org\/en\/newsletters\/2021\/03\/24\/#discussion-of-quantum-computer-attacks-on-taproot\" target=\"_blank\" rel=\"noopener\">debate<\/a> in 2021 precisely because of quantum vulnerability concerns for this address type. At the time, Blockstream co-founder and bitcoin developer Mark Friedenbach published <a class=\"tracking_link\" href=\"https:\/\/freicoin.substack.com\/p\/why-im-against-taproot\" target=\"_blank\" rel=\"noopener\">\u201cWhy I\u2019m against Taproot\u201d<\/a>, expressing reservations about activating the upgrade amid progress in quantum computing.<\/p>\n<p>In an <a class=\"tracking_link\" href=\"https:\/\/youtu.be\/T44xpDulUlI?si=ZSRRAuHAdK57_iX3&#038;t=1030\" target=\"_blank\" rel=\"noopener\">interview<\/a> with Unchained, Hunter Beast explained the Taproot vulnerability:<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite><em>\u201cUnfortunately, Taproot contains an onchain short version of the public key\u2014the x-coordinate of the elliptic-curve point. That information is sufficient to recover the full public key.\u201d<\/em><\/cite><\/p><\/blockquote>\n<h2 class=\"wp-block-heading\">Satoshi\u2019s shield<\/h2>\n<p><span data-descr=\"block reward\" class=\"old_tooltip\">Coinbase<\/span> transactions paying to public keys (P2PK) continue up to block #200,000. Most of them hold <span data-descr=\"the per-block reward before the first halving\" class=\"old_tooltip\">50 BTC<\/span>.<\/p>\n<p>Hunter Beast calls these coins \u201cSatoshi\u2019s shield.\u201d In his view, any address with a balance below 50 BTC is uneconomic to attack.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite><em>\u201cFor this reason, those who want to be prepared for a quantum emergency are advised to store no more than 50 BTC on a single unused Native SegWit address (P2WPKH, bc1q). This assumes the attacker is financially motivated and not, say, a state actor intent on undermining confidence in bitcoin,\u201d he argues.<\/em><\/cite><\/p><\/blockquote>\n<h2 class=\"wp-block-heading\">QuBit<\/h2>\n<p>BIP-360 could become the first proposal under QuBit\u2014a soft fork to make bitcoin resilient to quantum attacks.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite><em>\u201cA qubit is the fundamental unit of quantum computation, and the capital letter B stands for bitcoin. The name QuBit also somewhat rhymes with <\/em><em>SegWit<\/em><em>,\u201d the BIP-360 text notes.<\/em><\/cite><\/p><\/blockquote>\n<p>The proposal introduces a new address type beginning with <span data-descr=\"quantum (r)esistant\" class=\"old_tooltip\">bc1r<\/span>. P2QRH would be implemented atop P2TR, combining classical Schnorr signatures with post-quantum cryptography.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite><em>\u201cSuch hybrid cryptography avoids lowering security should one of the signature algorithms prove vulnerable. The key difference between P2QRH and P2TR is that P2QRH encodes a hash of the public key. This is a significant departure from how Taproot works, but it is necessary to prevent public keys from being exposed on-chain,\u201d the author of BIP-360 argues.<\/em><\/cite><\/p><\/blockquote>\n<p>P2QRH uses the <span data-descr=\"double SHA-256\" class=\"old_tooltip\">HASH256<\/span> algorithm to hash the public key. This reduces the size of new outputs and boosts security by keeping public keys off-chain.<\/p>\n<p>BIP-360 proposes introducing <a class=\"tracking_link\" href=\"https:\/\/en.wikipedia.org\/wiki\/Falcon_(signature_scheme)\" target=\"_blank\" rel=\"noopener\">FALCON<\/a> signatures first. After that, SQIsign and other post-quantum algorithms\u2014<a class=\"tracking_link\" href=\"https:\/\/sphincs.org\/\" target=\"_blank\" rel=\"noopener\">SPHINCS+<\/a>, <a class=\"tracking_link\" href=\"https:\/\/ru.wikipedia.org\/wiki\/CRYSTALS-Dilithium\" target=\"_blank\" rel=\"noopener\">CRYSTALS-Dilithium<\/a>\u2014would be added. The <a class=\"tracking_link\" href=\"https:\/\/sqisign.org\/spec\/sqisign-20230601.pdf\" target=\"_blank\" rel=\"noopener\">specification<\/a> for SQIsign says it has the smallest total size among known post-quantum schemes.<\/p>\n<p>FALCON is roughly four times larger than SQIsign\u2014and about 20 times the size of Schnorr signatures.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite>\u201cFALCON is a more conservative approach than SQIsign. Its use was recently approved by <span data-descr=\"U.S. National Institute of Standards and Technology\" class=\"old_tooltip\">NIST<\/span>, which simplifies deployment thanks to the scientific community\u2019s consensus. Even so, SQIsign signatures are about five times larger than Schnorr signatures. This implies that, to maintain today\u2019s transaction throughput, the <span data-descr=\"the weight of digital-signature data\" class=\"old_tooltip\">witness discount<\/span> likely needs to be increased in the QuBit soft fork. This will be specified in a future QuBit BIP,\u201d the proposal states.<\/cite><\/p><\/blockquote>\n<p>Hash-based cryptosystems are more conservative and time-tested. <a class=\"tracking_link\" href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D1%80%D0%B8%D0%BF%D1%82%D0%BE%D0%B3%D1%80%D0%B0%D1%84%D0%B8%D1%8F_%D0%BD%D0%B0_%D1%80%D0%B5%D1%88%D1%91%D1%82%D0%BA%D0%B0%D1%85\" target=\"_blank\" rel=\"noopener\">Lattice-based cryptography<\/a> is comparatively new and introduces fresh security assumptions to bitcoin, but its signatures are smaller and may be seen by some as a reasonable alternative to hash-based schemes. SQIsign is far more compact, but it relies on <span data-descr=\"supersingular elliptic-curve quaternion isogeny\" class=\"old_tooltip\">a new form of cryptography<\/span> and, at the time of writing, had not been approved by NIST or the wider community.<\/p>\n<p>According to BIP-360, including four cryptosystems is motivated by the need to support hybrid cryptography, especially for large outputs such as exchange cold-storage wallets. A new library akin to <a class=\"tracking_link\" href=\"https:\/\/github.com\/bitcoin-core\/secp256k1\" target=\"_blank\" rel=\"noopener\">libsecp256k1<\/a> will be developed for adoption.<\/p>\n<p>Hunter Beast allows that, after P2QRH is deployed, there may be demand for Pay to Quantum Secure (P2QS) addresses:<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite><em>\u201cThere is a distinction between cryptography that is merely resistant to quantum attacks and cryptography that is secured using dedicated quantum hardware. P2QRH is quantum-resistant, whereas P2QS is quantum-secure. Signing would require specialised quantum hardware, but the public keys would remain verifiable by classical means. P2QS would require additional BIPs.\u201d<\/em><\/cite><\/p><\/blockquote>\n<p>For now, quantum-cryptography hardware is not widely available, so quantum-resistant addresses may serve as an acceptable interim solution.<\/p>\n<h2 class=\"wp-block-heading\">The quantum transition<\/h2>\n<p>In October 2024, researchers at the University of Kent published an <a class=\"tracking_link\" href=\"https:\/\/arxiv.org\/html\/2410.16965v1\" target=\"_blank\" rel=\"noopener\">analysis<\/a> estimating the time required to move bitcoins to quantum-resistant addresses.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite><em>\u201cWe calculated a lower bound on the cumulative time needed for the above transition. It is 1,827.96 hours (or 76.16 days). We also show that the transition must be completed before quantum devices that break <\/em><em>ECDSA<\/em><em> appear, to ensure bitcoin\u2019s security,\u201d the paper states.<\/em><\/cite><\/p><\/blockquote>\n<p>In his <a class=\"tracking_link\" href=\"https:\/\/www.youtube.com\/watch?v=MTUzpR_mxAg\" target=\"_blank\" rel=\"noopener\">presentation<\/a> at Future of Bitcoin 2024, Casa\u2019s CTO Jameson Lopp calculated that migrating all <span data-descr=\"unspent transaction output\" class=\"old_tooltip\">UTXO<\/span>s would take at least 20,500 blocks (about 142 days).<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite><em>\u201cBut it\u2019s far more likely to take longer, because that\u2019s the most optimistic scenario in which the bitcoin network is used exclusively for migration. Such expectations are, of course, unrealistic. The process could take years. We should be conservative and assume it may take many years,\u201d Lopp argues.<\/em><\/cite><\/p><\/blockquote>\n<p>He concludes that even if the quantum threat seems distant, it is better to discuss it \u201csooner rather than later.\u201d<\/p>\n<h2 class=\"wp-block-heading\">Conclusions<\/h2>\n<p>Over the years bitcoin has faced varied bouts of FUD: the spectre of a 51% attack, government bans, altcoin competition and, now, quantum computing. These concerns surface regularly, yet the first cryptocurrency has so far proved resilient.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite>\u201cAfter spot ETF approvals and BlackRock\u2019s educational videos on bitcoin, nobody is talking about bans anymore. Fears of a 51% attack were always overstated, and its impact on the network is extremely limited,\u201d note representatives of <a class=\"tracking_link\" href=\"https:\/\/mixer.money\/ru\/\" target=\"_blank\" rel=\"noopener\">Mixer.Money<\/a>.<\/cite><\/p><\/blockquote>\n<p>The quantum threat is deeper, but the proposed QuBit soft fork shows developers are well aware of it. Quantum resistance also features in Ethereum\u2019s <a class=\"tracking_link\" href=\"https:\/\/ethereum.org\/en\/roadmap\/future-proofing\/\" target=\"_blank\" rel=\"noopener\">roadmap<\/a>, from which the bitcoin community can glean useful lessons.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite>\u201cIt\u2019s worth noting, however, that Ethereum can execute a quantum transition with another hard fork. Bitcoin is more complex: there are no hard forks, and Satoshi\u2019s coins cannot simply be frozen\u2014doing so would undermine the first cryptocurrency\u2019s foundational principles,\u201d say the team at <a class=\"tracking_link\" href=\"Mixer.Money\" target=\"_blank\" rel=\"noopener\">Mixer.Money<\/a>.<\/cite><\/p><\/blockquote>\n<p>The fate of \u201cSatoshi\u2019s shield\u201d and other coins that do not move to quantum-resistant addresses remains unclear. The bitcoin developer Luke Dashjr suggests that, in future, they might be treated as akin to mining.<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\n<cite>\u201cIn the end, 37% of the supply mined by quantum computers is no different from 37% mined by ASIC miners,\u201d he <a class=\"tracking_link\" href=\"https:\/\/gnusha.org\/pi\/bitcoindev\/202103152148.15477.luke@dashjr.org\/\" target=\"_blank\" rel=\"noopener\">said<\/a>.<\/cite><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>On December 10, researchers at Google Quantum AI unveiled a new quantum chip, Willow. The news rekindled the crypto community\u2019s fears about a quantum threat to bitcoin\u2014a topic that has surfaced periodically.<\/p>\n","protected":false},"author":1,"featured_media":19931,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"select":"","news_style_id":"","cryptorium_level":"","_short_excerpt_text":"","creation_source":"","_metatest_mainpost_news_update":false,"footnotes":""},"categories":[1144],"tags":[18,575,459],"class_list":["post-19932","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-longreads","tag-bitcoin","tag-quantum-computers","tag-softfork"],"aioseo_notices":[],"amp_enabled":true,"views":"70","promo_type":"","layout_type":"","short_excerpt":"","is_update":"","_links":{"self":[{"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/posts\/19932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/comments?post=19932"}],"version-history":[{"count":0,"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/posts\/19932\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/media\/19931"}],"wp:attachment":[{"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/media?parent=19932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/categories?post=19932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/forklog.com\/en\/wp-json\/wp\/v2\/tags?post=19932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}