A research paper on how systematically enumerating structured subsets of private keys reveals bugs in wallet implementations—and why this matters in the post-quantum migration era.
Object of study: the address space of blockchains on the secp256k1 curve (Bitcoin, Ethereum, Dogecoin, Litecoin, Dash, Zcash, Bitcoin Cash) and its small algebraic subsets.
Method: a critical analysis of the work by Di Scala, Gangemi, Romeo, Vernetti (2022), extending the Sala–Sogiorno–Taufer attack (2020), with a comparison of resource models of classical and quantum cryptanalysis.
Purpose: a research article in Russian; the structure follows the methodological framework “75 questions for studying quantum technologies.”
Content
- Paradox: How private keys are found in 256-bit cryptography
- Statement of the problem and testable hypotheses
- Mathematical mechanism: secp256k1 and small subgroup cosets
- Methodology: Eight cosets, seven blockchains, 1.8 billion addresses
- Results and three non-trivial addresses
- Interpretation: An implementation error, not an accident
- Quantum Threat: Shor, Resource Assessments, and Post-Quantum Standards
- Threat Comparison: Small Subgroup vs. Quantum Cryptanalysis
- Other curves: Curve25519 and NIST P-256
- Practical value, migration and open questions
- Conclusion: What does the “weak link” teach us?
- Sources
1. Paradox: How private keys are found in 256-bit cryptography
Blockchain security is often described with a single phrase: “it is impossible to brute-force a private key to an address.” Formally, this is true—the elliptic curve discrete logarithm problem (ECDLP) for secp256k1 has no known classical polynomial solution. However, in 2020, Sala, Sogiorno, and Taufer showed that several real-world Bitcoin addresses had private keys lying in a tiny subset of ≈18 million elements, and these keys could be completely brute-forced [1].
The work by Di Scala et al. (2022) [2] raises a natural question: was Sala et al.’s result a statistical fluctuation or a systemic feature? The authors extend the attack to eight cosets of the same subgroup, testing ≈144 million private keys against ≈1.8 billion real-world addresses across seven blockchains, and obtain an answer that is both reassuring and alarming.
2²⁵⁶ private key space size secp256k1
≈1.8 billion of all addresses ever to appear on 7 blockchains
144 million verified keys in 8 cosets
3 non-trivial addresses (all Bitcoin)
≈2⁻²⁰¹ expectation of a random match over the entire corpus
The main intrigue of the article
The probability that a randomly selected user generates a key within a subgroup of order h = 18,051,648 is ≈2⁻²³². Multiplying by 1.8 billion addresses yields an expectation of ≈2⁻²⁰¹—60 orders of magnitude less than one. Nevertheless, three nontrivial addresses exist . This means that private keys were not generated uniformly , and the source of this non-uniformity was the wallet code.
2. Statement of the problem and testable hypotheses
Following the “75 Questions” methodological framework, we formulate testable assertions. Each is accompanied by a refutation criterion.
| Hypothesis | Formulation | What would refute |
|---|---|---|
| H1. Structural vulnerability | Among the addresses ever used in secp256k1 blockchains, there are addresses with private keys from a small subgroup H ⊂ 𝔽_q\* of order h. | A complete search of H across all 7 blockchains does not find a single non-trivial address. |
| H2. Non-randomness | The addresses found cannot be explained by uniform key generation; they reflect an implementation error in the wallet. | The probability estimate for a random hit is ≥ 10⁻⁶ (that is, 10⁶ independent corpora would yield ≥1 match). |
| H3. Localization in Bitcoin | The phenomenon is specific to Bitcoin (and its forks), and not to all secp256k1 blockchains. | Non-trivial addresses are found in Ethereum, Litecoin, Dogecoin, Dash or Zcash. |
| H4. Intolerance to cosmetics | The extension to cosets gᵢH (i=1..7) does not give new non-trivial addresses. | At least one non-trivial address was found in a coset other than H. |
| H5. Comparability with the quantum threat | The classical small subgroup attack and Shor’s quantum attack differ in resources by many orders of magnitude, but both require migration as a response. | The resource estimates for Shor on secp256k1 are lower than for a complete search of 2²⁵⁶. |
| H6. Tolerability of the technique | The method is applicable to NIST P-256 (several small subgroups) and not applicable to Curve25519 (small subgroup – 132 points). | For P-256 there are no small subgroups, or for Curve25519 there is a meaningful subgroup > 10⁶ points. |
The article tests H1–H4 directly using the data [2], H5 through a comparison of resource models, and H6 through factorization of group orders.
3. Mathematical mechanism: secp256k1 and small subgroup cosets
The curve secp256k1 is defined over the prime field 𝔽_p:
E(𝔽 p ): Y² = X³ + 7, p = 2²⁵⁶ − 2³² − 2⁹ − 2⁸ − 2⁷ − 2⁶ − 2⁴ − 1
The number of rational points is prime q, so the additive group of points E(𝔽_p) is isomorphic to 𝔽_q(+). The private key is a nonzero element of 𝔽_q, and the key space is bijective to the multiplicative group 𝔽_q\* of order q − 1. By the lemma on the uniqueness of a subgroup of a given order in a cyclic group, for every divisor d | (q − 1) there is exactly one subgroup of order d. Factorization:
q − 1 = h p₁ p₂ p₃,
h = 18 051 648 = 2⁶ 3 149 631,
p₁ = 107 361 793 816 595 537,
p₂ = 174 723 607 534 414 371 449,
p₃ = 341,948,486,974,166,000 522,343,609,283,189.
By choosing the generator g = 7 of the group 𝔽_q\*, we obtain eight elements:
g₀ = 7^(p₁p₂p₃), g₁ = 7^(h p₂ p₃), g₂ = 7^(h p₁ p₃), g₃ = 7^(h p₁ p₂),
g₄ = 7^(h p₁), g₅ = 7^(h p₂), g₆ = 7^(h p₃), g₇ = 7^h.
The subgroup ⟨g₀⟩ has order h, and the subgroups ⟨g₁⟩…⟨g₇⟩ have large orders p₁, p₂, p₃, p₂p₃, p₁p₃, p₁p₂p₃, p₁p₂p₃, respectively. In [2], the cosets gᵢH = {gᵢ h : h ∈ H}, i = 0..7, are studied. The coset g₀H = H is exactly the subgroup studied by Sala et al.; the other seven are new.
A subtlety that is often missed
The private key space is an additive group 𝔽_q(+), while the research is conducted in the multiplicative group 𝔽_q\*(·). These are not the same thing: the result by Sala et al. is all the more surprising because they found keys lying in a subgroup “far” from the natural additive structure. As the authors of [2] note, this further indicates an implementation error.
4. Methodology: Eight cosets, seven blockchains, 1.8 billion addresses
The authors [2] set themselves an ambitious task: to verify all addresses that ever appeared in seven blockchains on secp256k1. The methodology consisted of three stages.
4.1. Extracting Addresses
For Bitcoin and Ethereum, public APIs (Tatum, Ankr) and ready-made dumps were used; for Dogecoin, Litecoin, and Bitcoin Cash, Python scripts were used via Tatum/Ankr; for Dash and Zcash, custom full nodes were used (public APIs were unavailable). Final volumes:
| Blockchain | Addresses verified | Addressing type |
|---|---|---|
| Bitcoin | 923 414 052 | Base58 (uncompressed, compressed), Bech32 (segwit) |
| Ethereum | 144 596 346 | KECCAK-256 + EIP-55 |
| Dogecoin | 69 817 509 | Base58, version 0x1E, without segwit |
| Litecoin | 134 530 241 | Base58 (0x30), Bech32 (ltc1) |
| Dash | 92 456 113 | Base58 (0x4c), without segwit |
| Zcash | 6,813,058 | Base58 (0x1cb8), transparent + shields |
| Bitcoin Cash | 334 965 092 | Double encoding: Base58 → CashAddr |
| Total | ≈1,706,592,411 | — |
4.2. Generating addresses from coset keys
For each key k ∈ gᵢH, the point K = kP was calculated (P is the standard generator secp256k1), then the address in the required format: for Bitcoin – three options (uncompressed, compressed, segwit), for Ethereum – KECCAK-256(PK)[1..20] and EIP-55, for the rest – Base58 with the corresponding version byte, for Bitcoin Cash – additional recoding in CashAddr.
4.3. Verification
For each generated address, a search was performed against the corresponding blockchain database. The code is publicly available [3], making the results reproducible.
Reproducibility and open data
This is an important methodological shift: while Sala et al. (2020) reported only the summary, Di Scala et al. (2022) present the entire pipeline—from address extraction to key generation. The reader can independently repeat the comparison, greatly increasing the credibility of the result.
5. Results and three non-trivial addresses
The central result is a summary table of hits. On the left is the subgroup H (as in Sala et al.), on the right is the union of seven cosets gᵢH, i = 1..7.
| Address type | Subgroup H | Cosets gᵢH, i = 1..7 |
|---|---|---|
| Bitcoin, uncompressed | 4 (of which 2 are non-trivial) | 0 |
| Bitcoin, compressed | 3 (1 non-trivial) | 0 |
| Bitcoin, Segwit | 1 (trivial) | 0 |
| Ethereum | 1 (trivial) | 0 |
| Dogecoin | 3 (trivial) | 0 |
| Litecoin | 2 (trivial) | 0 |
| Dash | 2 (trivial) | 0 |
| Zcash | 0 | 0 |
| Bitcoin Cash | 6 (trivial + 2 from Bitcoin) | 0 |
In other words, all non-trivial addresses—exactly three—are in Bitcoin and only in subgroup H . Cosets don’t yield a single new hit. Trivial addresses (keys 1 and -1) are expected: they are used for testing and “demo” transactions, and they appear in every blockchain.
5.1. Three non-trivial addresses
Address #1 (from Sala et al., 2020)
1PSRcasBNEwPC2TWUB68wvQZHwXy4yqPQ3
Created March 15, 2014. Funds were moved in June 2018 after the authors contacted the owner . Present in Bitcoin Cash as qrmzrdndlfxpnnkk3w5d5l7etnysnqfgk5yxsf6k0qq. Also present in Bitcoin SV, where funds were withdrawn on May 1, 2019—two minutes earlier than in BCH, indicating the same owner.
Address #2 (from Sala et al., 2020)
The second non-trivial address from [1]; created in 2013–2014, also present in BCH. The exact string is not given in the source [2], but it is stated that the address is uncompressed Bitcoin and that it is “older” than the BCH fork (August 1, 2017).
Address No. 3 (new, 2022)
1H1jFxahFUNT9TrLzeJVhXPyisLq6UecUy
Created on October 15, 2019, after the BCH fork, it is not present in Bitcoin Cash. This is the first non-trivial address generated from a compressed public key. At the time of publication, the address contains no funds.
Why This Isn’t a “Bitcoin Hack”
Three addresses are not a breakthrough in ECDLP. They are the result of a brute-force search of approximately 18 million keys out of 2²⁵⁶ possible. The authors [2] explicitly state: “the security of blockchains is not at risk, since mining is much more profitable than trying to find random private keys.” The discovered addresses indicate an error in the generation , not a weakness in the curve.
6. Interpretation: An implementation error, not an accident
The key argument is quantitative. Let’s estimate the probability of a random coincidence:
P(key ∈ H) = h / (q−1) = 18 051 648 / (q−1) ≈ 2 24.1 / 2 256 = 2 −231.9 .
Expectation for the case N ≈ 1.8 10⁹ ≈ 2 30.7 addresses: μ = N P ≈ 2 −201.2 .
Even taking into account eight cosets (an 8x increase, or +3 bits), the expectation remains ≈2⁻¹⁹⁸. The observed number of non-trivial addresses is 3. This is a discrepancy of ~200 bits, or 60 decimal orders . This cannot be explained by chance.
6.1 What kind of error?
The authors [2] do not name a specific wallet, but formulate a hypothesis: the code that generated the keys used a non-uniform distribution —for example, it took k from a small range, applied downward modular reduction, or used a weak random number generator with a short period. All three scenarios bias the distribution toward “small” keys, and subgroup H consists of elements obtained by raising 7 to the power of multiples of p₁p₂p₃—that is, it has a pronounced algebraic structure.
“This is a very curious fact, which makes us think that the cause is an implementation error that arose in the practical design of wallets.” — Di Scala et al., 2022 [2]
A lesson for designers
The cryptographic strength of a curve doesn’t compensate for errors in key generation. This is exactly the same logic as in post-quantum migration: even a strong algorithm is useless if the implementation or protocol for its use is flawed.
7. Quantum Threat: Shor, Resource Assessments, and Post-Quantum Standards
Now let’s combine the classical result [2] with the quantum agenda. ECDLP on secp256k1 can be solved using Shor’s algorithm in polynomial time on a quantum computer. The issue is resources.
7.1 Resource estimates for secp256k1
| Parameter | Order of magnitude | Comment |
|---|---|---|
| Logical qubits | ≈ 2,000 – 3,000 | Benchmarks for 256-bit ECDLP with quantum dot addition scheme |
| Toffoli gates (or T-gates) | ≈ 10¹¹ | Modern optimizations reduce the score, but the order is preserved |
| Physical qubits (with correction) | 10⁶ – 10⁷ | For a surface code with a distance d ≈ 20–30 and a physical error of ~10⁻³ |
| lead time | hours–days | At a clock frequency of ~1 MHz and parallelism |
| Horizon | indeterminate, probably ≥ 10 years | Depends on progress in error correction |
Compare this to a classical brute-force attack on 2²⁵⁶: even at 10¹⁸ operations per second, it would take ~10⁵⁹ years—tens of orders of magnitude longer than the age of the universe. A quantum attack, therefore, is fundamentally different in nature : it doesn’t brute-force, but exploits the algebraic structure of the problem. This is precisely what makes it similar to a small subgroup attack—both exploit structure rather than brute force.
7.2 Why it is no longer an abstraction
On August 13, 2024, NIST approved the first post-quantum standards: FIPS 203 (ML-KEM, key establishment), FIPS 204 (ML-DSA, digital signatures), and FIPS 205 (SLH-DSA, hash function signatures) [4]. The NCCoE migration project [5] describes the practical transition. This is a historical fact: regulators and standardizers already consider the risk real enough to begin migration now, without waiting for the emergence of a cryptographically significant quantum computer.
“Harvest now, decrypt later”
An attacker can record encrypted traffic and public keys today, only to decrypt them after the advent of a quantum computer. For blockchains, this means that transactions in which the public key is revealed (for example, when spending UTXOs) become potentially vulnerable retroactively. This adds a second, independent line of risk to the classic attack [2].
8. Threat Comparison: Small Subgroup vs. Quantum Cryptanalysis
| Criterion | Small Subgroup Attack [2] | Shor’s Quantum Attack |
|---|---|---|
| Nature | Classical exhaustive search of a structured subset | Quantum polynomial algorithm |
| Resources | ≈144 million operations, CPU hours | ≈10¹¹ T-gates, 10⁶–10⁷ physical qubits |
| Availability today | Fully accessible | Unavailable; horizon – decade+ |
| What is exploited? | Wallet implementation error (key inconsistency) | Algebraic structure of ECDLP |
| Who is affected? | Only addresses with “bad” keys (3 out of 1.8 billion) | Potentially all addresses whose public keys are exposed |
| Answer | Audit of RNG and wallet code | Migration to PQC (FIPS 203–205) |
| Connection | Both threats emphasize: security = algorithm + implementation + protocol . The weak link can be in any of the three. | |
Conclusion for H5: the threats are incomparable in terms of resources (a gap of ~30 orders of magnitude), but are comparable in terms of the type of response —both require not “patching holes,” but systems engineering and migration.
9. Other curves: Curve25519 and NIST P-256
The authors [2] clearly leave two directions for future work. Let us check H6.
9.1. Curve25519 (Monero, Cardano, Solana, Algorand)
E(𝔽 p ): Y² = X³ + 486662X² + X, p = 2²⁵⁵ − 19, n = 8l,
l = 2²⁵² + 277423177773253535851937790883648493,
l − 1 = 2² 3 11 · q₁ · q₂.
The small subgroup here has order 132 = 2² 3 11—a total of 132 points. Enumeration is trivial, but the probability of accidentally hitting it during address generation is extremely low: even with a complete enumeration of all 132 keys, we check a negligible fraction of the space. The method [2] is not applicable to Curve25519 —there is no meaningful “average” subgroup that could be enumerated in a reasonable time.
9.2. NIST P-256 (NEO, Tezos, Ontology)
q − 1 = 2⁴ · 3 · 71 · 131 · 373 · 3407 · 17449 · 38189 · 187019741 · 622491383 · q₁ · q₂,
q₁ = 2 624 747 550 333 869 278 416,773,953,
q₂ = 1,002,328,039,319.
There are many more factors here, and among them are “medium” subgroups of the order of 10⁶–10⁹—their enumeration is entirely feasible with modern equipment. P-256 is the most promising target for repeating the technique [2] . This is an open question, directly formulated by the authors.
H6 Check
✅ There is no meaningful small subgroup for Curve25519. ✅ For NIST P-256, such subgroups exist, and the methodology is transferable. The hypothesis is confirmed.
10. Practical value, migration and open questions
10.1 Who needs this?
- For wallet developers : RNG audit and key generation uniformity check.
- For blockchain project auditors : a methodology for checking for “structural” vulnerabilities in the address space.
- For regulators and standardizers – an argument in favor of mandatory RNG certification.
- For post-quantum cryptography researchers , a model of how classical and quantum risks combine.
- For a general audience , this is a clear example of how “256-bit cryptography” does not guarantee security if poorly implemented.
10.2. Minimal demonstration that convinces the user
A reproducible script [3] that, in just a few hours, iterates through 8h keys and checks their addresses against a public database. The result is specific addresses (like 1H1jFxahFUNT9TrLzeJVhXPyisLq6UecUy), not an abstract “vulnerability.” It’s the specificity that makes the results convincing.
10.3. Obstacles and limitations
- Complete data on the wallets that generated the keys is not available—the “implementation error” hypothesis remains the most likely, but unproven, one.
- Public APIs for most blockchains are poorly documented; Dash and Zcash require their own nodes, which limits independent reproducibility.
- The cosets did not yield any results, which is informative in itself: the vulnerability is localized in H, and not “smeared” across the group.
- For the quantum part of the paper: Shor’s resource estimates for secp256k1 are highly dependent on the error model and architecture—the spread across publications reaches orders of magnitude.
10.4. Open questions
- Which specific wallets (versions, manufacturers) generated the keys in H? This would answer the question about the error mechanism.
- Is the methodology repeatable on NIST P-256 and does it yield non-trivial addresses in NEO, Tezos, Ontology?
- Is it possible to formally link “key unevenness” to specific RNG defects (e.g. weak seed or down-reduction)?
- How to combine classical vulnerability audit (as in [2]) with post-quantum migration (FIPS 203–205) in a single blockchain project audit protocol?
- What is a realistic timeframe for a quantum computer capable of attacking secp256k1, and how does this relate to migration timelines?
11. Conclusion: What does the “weak link” teach us?
The work of Di Scala et al. [2] is a rare example of a study in which a negative result (the cosets did not produce new addresses) is no less valuable than a positive one. It demonstrates that the vulnerability is not “smeared” across the key space, but rather localized—and, therefore, has a specific engineering cause. Three nontrivial Bitcoin addresses are not a cryptographic breach, but a diagnostic marker for a flaw in key generation.
A quantum perspective doesn’t negate this lesson, but rather reinforces it. Shor’s algorithm radically changes the nature of the threat (a structural attack instead of a brute-force attack), but the conclusion remains the same: a system is only as secure as its weakest link—be it a RNG, a protocol, or a curve. The approval of NIST FIPS 203–205 in August 2024 [4] and the NCCoE migration project [5] are a practical answer to the quantum part of this equation; key generation auditing, similar to [2], is an answer to the classical part.
The main conclusion for the reader
There is no “quantum button” that will reset the blockchain, and no “single address” that will crash Bitcoin. But there are systemic practices —uniform key generation, code auditing, and a gradual migration to PQC—that mitigate the risk of both classical and quantum attacks. The paper [2] provides a measurable, replicable, and instructive example of how such practices work.
What’s next?
The next step is to migrate the methodology to NIST P-256 and formalize the relationship between “key skewness ↔ specific RNG flaws.” This will transform point-based observation [2] into a general tool for auditing blockchain address spaces—and give the community a reproducible way to verify security even before a quantum computer becomes a reality.
Sources
- M. Sala, D. Sogiorno, D. Taufer. A Small Subgroup Attack on Bitcoin Address Generation // Mathematics, 8:10, pp. 1645–1658, 2020.
- A. J. Di Scala, A. Gangemi, G. Romeo, G. Vernetti. Special Subsets of Addresses for Blockchains Using the secp256k1 Curve // arXiv:2206.14107v1, 2022. (The main source analyzed.)
- Public code and data repository: github.com/GitGab19/blockchain-addresses-list .
- NIST. FIPS 203, 204, 205: Post-Quantum Cryptography Standards , August 13, 2024. csrc.nist.gov .
- NIST NCCoE. Migration to Post-Quantum Cryptography . nccoe.nist.gov .
- S. Nakamoto. Bitcoin: A Peer-to-Peer Electronic Cash System , 2008.
- V. Buterin. Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform , 2014.
- G. Wood. Ethereum: A Secure Decentralized Generalized Transaction Ledger (Yellow Paper) , 2014.
- L.C. Washington. Elliptic Curves: Number Theory and Cryptography , 2nd ed., Chapman & Hall/CRC, 2008.
- A. Brighente, M. Camaioni, M. Conti, E. Olivastri. Should I Mine or Should I Break: On the Worthiness of Brute-Forcing Cryptocurrency Addresses // IEEE PerCom Workshops, 2022.
- L. Chen, D. Moody, A. Regenscheid, K. Randall. Recommendations for Discrete Logarithm-Based Cryptography: Elliptic Curve Domain Parameters // Draft NIST SP 800-186, 2019.
The methodological framework of the article (section structure, types of questions tested, work comparison matrix) follows the author’s document “Quantum Technologies”.
