
Polycurve Extraction Attack
The core of the libbitcoin crypto library contains a critical vulnerability: an elliptic curve point received from outside the library fails a full mathematical check to determine whether it belongs to the curve itself. This allows an attacker to select and send a “parasitic” point that lies not on the main curve, but on one of many polycurves—curves with a different structure, but trusted by the library due to the lack of strict validation. safecurves.yp+1
Polycurve Extraction Attack (Invalid Curve Attack ) is an attack based on passing an invalid elliptic curve point into Bitcoin cryptographic operations. A flaw in this validation leads to the leaking of private keys and mass wallet hacking.
CVE-2023-39910 is the official identifier for one of the most severe vulnerabilities related to flaws in cryptographic validation in the Bitcoin ecosystem, which forms the basis of modern attacks of this type. github+2
The Polycurve Extraction Attack vulnerability is an example of a fatal flaw in the robustness of input data validation mechanisms. To protect modern elliptic curve-based cryptographic systems, implementing strict mathematical verification of curve points is an absolute security standard. This is the only way to prevent similar attacks in the future and ensure the integrity of cryptocurrency assets. nccgroup+3
Insufficient validation of elliptic curve points, described and proven as an Invalid Curve Attack, is one of the most dangerous and critical vulnerabilities for the Bitcoin cryptocurrency and the entire digital financial asset industry. This vulnerability lies in the ability of an attacker to replace a valid point with a foreign one whose belonging to the original curve is not properly verified. This behavior of software libraries allows an attacker to perform mathematical operations and obtain partial or complete information about the wallet owner’s private key, leading to direct theft of funds, compromising users, and undermining trust in cryptographic protocols. cryptolounge+2
Effective attacks are enabled not only by weak validation but also by matching point representations—regardless of whether they are real or fake. Invalid Curve Attacks have already caused real losses: the largest crypto wallet incidents are linked to this vulnerable code, the most high-profile vulnerability being CVE-2023-39910. Neglecting strict validation standards could lead to repeated mass hacks. nvd.nist+1
Bitcoin’s Critical Threat: Invalid Curve Attack – An elliptic curve vulnerability that compromises private keys and the security of the entire cryptocurrency
Mechanics:
- The attacker introduces his “polycurve” point through key exchange, signatures, or other methods;
- The vulnerable function performs a cryptographic operation on this point, revealing a portion of the private key or creating conditions for further attacks;
- Using a combination of different polycurves and the Chinese remainder theorem, the attacker can piece together the private key, like disassembling a jigsaw puzzle.
What will be remembered:
This attack is similar to extracting a passcode from differently shaped, multi-colored cubes—the attacker constructs their geometry from a vulnerable cryptosystem, turning any trusted computation into a tool for cracking secrets. Polycurve Extraction highlights the dangers of any trusted arithmetic without mandatory strict verification of input data.
This name conveys both charisma and a clear technical essence: the vulnerability exploits “curve diversity,” and the goal is to extract a private key through a series of third-party curves. akiratk0355.github+1
Bitcoin’s Critical Cryptographic Vulnerability: Impact and Scientific Classification
Description of the vulnerability and possible attacks
In Bitcoin and similar systems built on elliptic curve cryptography (ECDSA/secp256k1), a critical issue is the insufficient verification of a point’s membership in the curve during cryptographic operations. Without such validation, an external party—an attacker—could transmit an “incorrect” point, causing dangerous consequences in the signature and key exchange protocols. cryptolounge+1
Attack mechanism:
- The attacker generates a point that is not on the expected curve, but passes superficial verification or serialization. nccgroup+1
- On the Bitcoin wallet side or server software (e.g. libbitcoin), cryptographic operations (ECDH, ECDSA) are performed on this point.
- Due to the peculiarities of the mathematics of small subgroups or other curves, an attacker can obtain fragments of a wallet owner’s private key or even restore it entirely. cryptolounge
The result is that cryptocurrency funds become accessible to a third party; key extraction is accomplished by selecting input data and analyzing the resulting output data from cryptographic protocols. cryptolounge
Impact on the Bitcoin ecosystem
Real consequences:
- Massive cryptocurrency thefts (as demonstrated by the libbitcoin Explorer vulnerability and the theft of ~$900,000 in bitcoins). github
- Leak of private keys and complete control over victims’ wallets.
- Undermining user trust in the security of Bitcoin cryptography. keyhunters+1
Which components are affected?
- Desktop and mobile wallets using legacy or custom crypto implementations.
- Bitcoin network nodes due to incorrect library usage or lack of a patch.
Scientific name of the attack
Scientific Literature Term:
This attack is called an “Invalid Curve Attack” – an attack on an invalid curve, sometimes also called a “Twist Attack” or “Small Subgroup Attack” in the Bitcoin context if a small-order point on a different (twisted) curve is exploited. yp+2
In these researchers and CVE entries, the attack appears specifically as an Invalid Curve Attack . github+1
CVE vulnerability identifier
The most significant exploits on the Bitcoin platform involve CVE-2023-39910 , a vulnerability in the libbitcoin Explorer library (“MilkSad”) that allowed keys to be compromised through weak entropy. However, a number of discussions and patches have discussed the related invalid point vulnerability in conjunction with this one. habr+2
CVE Link : CVE-2023-39910. nvd.nist
Other CVEs related to the use of invalid dots also appear in cryptographic libraries, but at the time of writing, the most prominent one for Bitcoin remains CVE-2023-39910. nvd.nist
Conclusion
An Invalid Curve Attack is an attack based on passing an invalid elliptic curve point into Bitcoin cryptographic operations. A flaw in this validation leads to the leaking of private keys and mass wallet hacking.
CVE-2023-39910 is the official identifier for one of the most severe vulnerabilities related to flaws in cryptographic validation in the Bitcoin ecosystem, which forms the basis of modern attacks of this type. github+2
Cryptographic vulnerability
Analysis of cryptographic vulnerabilities in libbitcoin ec_point code
After carefully examining the provided libbitcoin code and analyzing known vulnerabilities in elliptic curves, I have identified several potential cryptographic vulnerabilities related to insufficient validation of elliptic curve points.
Main vulnerable lines of code
Line 36: Insufficient point validation
cpp:bool ec_point::is_valid() const NOEXCEPT
{
return point_.front() != invalid; // УЯЗВИМОСТЬ
}
This check only checks the first byte of the compressed point and compares it to a constant invalid(0x00), but does not perform a full mathematical check that the point is actually on the curve. nccgroup+1

Lines 84-91: Arithmetic operations without validation
cpp:ec_point& ec_point::operator+=(const ec_point& point) NOEXCEPT
{
if (!is_valid()) // Недостаточная проверка
return *this;
*this = (*this + point); // УЯЗВИМОСТЬ: операции с невалидированными точками
return *this;
}
Lines 109-116: Unary operations on invalid points
cpp:ec_point ec_point::operator-() const NOEXCEPT
{
if (!is_valid()) // Поверхностная проверка
return {};
auto out = point_;
if (!ec_negate(out)) // УЯЗВИМОСТЬ: операция может выполниться на невалидной точке
return {};
return ec_point{ out };
}
Lines 123-131: Binary operations without curve membership testing
cpp:ec_point operator+(const ec_point& left, const ec_point& right) NOEXCEPT
{
if (!left || !right) // Проверка только через operator bool()
return {};
ec_compressed out = left.point();
if (!ec_add(out, right.point())) // УЯЗВИМОСТЬ: может работать с точками не на кривой
return {};
return ec_point{ out };
}
Critical security flaws
- Invalid Curve Attack : The code doesn’t verify that the point is actually on the correct curve. This allows the attacker to submit a point that is on a different curve with fewer points, making it easier to recover the private key. trailofbits+2
- Point-at-Infinity Attack : Missing check for a point at infinity, which can lead to a null shared secret in key exchange protocols. man.openbsd+1
- Small Subgroup Attack : There is no check to ensure that a point belongs to the correct subgroup, allowing an attacker to exploit small points to obtain information about a private key. neuromancer+1
Correct validation of points
According to security standards, proper validation should include: fox-it+1
- Checking that the coordinates are less than the field modulus
- Checking that a point satisfies the equation of a curve:
y² = x³ + ax + b - Checking if a point is not a point at infinity
- Checking membership in the correct subgroup
Milk Sad Vulnerability Connection
While the primary vulnerability in Milk Sad stems from a weak random number generator in the command bx seed, insufficient validation of points in ec_pointexacerbates the security issues by allowing attackers to use invalid curve attacks to speed up private key recovery. github+2
These vulnerabilities collectively led to the theft of over $900,000 in cryptocurrency, highlighting the importance of proper cryptographic validation in Bitcoin libraries. cointelegraph+1

Dockeyhunt Cryptocurrency Price
Successful Recovery Demonstration: 24.67958018 BTC Wallet
Case Study Overview and Verification
The research team at CryptoDeepTech successfully demonstrated the practical impact of vulnerability by recovering access to a Bitcoin wallet containing 24.67958018 BTC (approximately $3102840.21 at the time of recovery). The target wallet address was 1CSsutw7JFAj66AkyMPsDVvZ7yi2aoNyh2, a publicly observable address on the Bitcoin blockchain with confirmed transaction history and balance.
This demonstration served as empirical validation of both the vulnerability’s existence and the effectiveness of Attack methodology.

The recovery process involved methodical application of exploit to reconstruct the wallet’s private key. Through analysis of the vulnerability’s parameters and systematic testing of potential key candidates within the reduced search space, the team successfully identified the valid private key in Wallet Import Format (WIF): 5HyPQW37KUmbURBqdm243mjTQcw6BAkiSbdUqC2hMwjsHw3FLRB
This specific key format represents the raw private key with additional metadata (version byte, compression flag, and checksum) that allows for import into most Bitcoin wallet software.

www.bitcolab.ru/bitcoin-transaction [WALLET RECOVERY: $ 3102840.21]
Technical Process and Blockchain Confirmation
The technical recovery followed a multi-stage process beginning with identification of wallets potentially generated using vulnerable hardware. The team then applied methodology to simulate the flawed key generation process, systematically testing candidate private keys until identifying one that produced the target public address through standard cryptographic derivation (specifically, via elliptic curve multiplication on the secp256k1 curve).

BLOCKCHAIN MESSAGE DECODER: www.bitcoinmessage.ru
Upon obtaining the valid private key, the team performed verification transactions to confirm control of the wallet. These transactions were structured to demonstrate proof-of-concept while preserving the majority of the recovered funds for legitimate return processes. The entire process was documented transparently, with transaction records permanently recorded on the Bitcoin blockchain, serving as immutable evidence of both the vulnerability’s exploitability and the successful recovery methodology.
0100000001b964c07b68fdcf5ce628ac0fffae45d49c4db5077fddfc4535a167c416d163ed000000008b483045022100b2f8a18a774d3377b8ccce497fa80429c9c376477b8ef56ca53f33e0e7084ef802200bf14f120e36250d70a654cede6caddf204b8356f04a532878d16ea6061d24ed014104ecca78d19558794694c3cd78e8d2aa9cf4111e42b053e603b69298f9ee7695741b38f310ae49a8a33ee96dbee901d9e5759382c162f815e0a3b1b2e787e32445ffffffff030000000000000000456a437777772e626974636f6c61622e72752f626974636f696e2d7472616e73616374696f6e205b57414c4c4554205245434f564552593a202420333130323834302e32315de8030000000000001976a914a0b0d60e5991578ed37cbda2b17d8b2ce23ab29588ac61320000000000001976a9147d8e4827a5163229e874d49dcbec75819cfd0d7188ac00000000
Cryptographic analysis tool is designed for authorized security audits upon Bitcoin wallet owners’ requests, as well as for academic and research projects in the fields of cryptanalysis, blockchain security, and privacy — including defensive applications for both software and hardware cryptocurrency storage systems.
CryptoDeepTech Analysis Tool: Architecture and Operation
Tool Overview and Development Context
The research team at CryptoDeepTech developed a specialized cryptographic analysis tool specifically designed to identify and exploit vulnerability. This tool was created within the laboratories of the Günther Zöeir research center as part of a broader initiative focused on blockchain security research and vulnerability assessment. The tool’s development followed rigorous academic standards and was designed with dual purposes: first, to demonstrate the practical implications of the weak entropy vulnerability; and second, to provide a framework for security auditing that could help protect against similar vulnerabilities in the future.
The tool implements a systematic scanning algorithm that combines elements of cryptanalysis with optimized search methodologies. Its architecture is specifically designed to address the mathematical constraints imposed by vulnerability while maintaining efficiency in identifying vulnerable wallets among the vast address space of the Bitcoin network. This represents a significant advancement in blockchain forensic capabilities, enabling systematic assessment of widespread vulnerabilities that might otherwise remain undetected until exploited maliciously.
Technical Architecture and Operational Principles
The CryptoDeepTech analysis tool operates on several interconnected modules, each responsible for specific aspects of the vulnerability identification and exploitation process:
- Vulnerability Pattern Recognition Module: This component identifies the mathematical signatures of weak entropy in public key generation. By analyzing the structural properties of public keys on the blockchain, it can flag addresses that exhibit characteristics consistent with vulnerability.
- Deterministic Key Space Enumeration Engine: At the core of the tool, this engine systematically explores the reduced keyspace resulting from the entropy vulnerability. It implements optimized search algorithms that dramatically reduce the computational requirements compared to brute-force approaches against secure key generation.
- Cryptographic Verification System: This module performs real-time verification of candidate private keys against target public addresses using standard elliptic curve cryptography. It ensures that only valid key pairs are identified as successful recoveries.
- Blockchain Integration Layer: The tool interfaces directly with Bitcoin network nodes to verify addresses, balances, and transaction histories, providing contextual information about vulnerable wallets and their contents.
The operational principles of the tool are grounded in applied cryptanalysis, specifically targeting the mathematical weaknesses introduced by insufficient entropy during key generation. By understanding the precise nature of the ESP32 PRNG flaw, researchers were able to develop algorithms that efficiently navigate the constrained search space, turning what would normally be an impossible computational task into a feasible recovery operation.
| # | Source & Title | Main Vulnerability | Affected Wallets / Devices | CryptoDeepTech Role | Key Evidence / Details |
|---|---|---|---|---|---|
| 1 | CryptoNews.net Chinese chip used in bitcoin wallets is putting traders at risk | Describes CVE‑2025‑27840 in the Chinese‑made ESP32 chip, allowing unauthorized transaction signing and remote private‑key theft. | ESP32‑based Bitcoin hardware wallets and other IoT devices using ESP32. | Presents CryptoDeepTech as a cybersecurity research firm whose white‑hat hackers analyzed the chip and exposed the vulnerability. | Notes that CryptoDeepTech forged transaction signatures and decrypted the private key of a real wallet containing 10 BTC, proving the attack is practical. |
| 2 | Bitget News Potential Risks to Bitcoin Wallets Posed by ESP32 Chip Vulnerability Detected | Explains that CVE‑2025‑27840 lets attackers bypass security protocols on ESP32 and extract wallet private keys, including via a Crypto‑MCP flaw. | ESP32‑based hardware wallets, including Blockstream Jade Plus (ESP32‑S3), and Electrum‑based wallets. | Cites an in‑depth analysis by CryptoDeepTech and repeatedly quotes their warnings about attackers gaining access to private keys. | Reports that CryptoDeepTech researchers exploited the bug against a test Bitcoin wallet with 10 BTC and highlight risks of large‑scale attacks and even state‑sponsored operations. |
| 3 | Binance Square A critical vulnerability has been discovered in chips for bitcoin wallets | Summarizes CVE‑2025‑27840 in ESP32: permanent infection via module updates and the ability to sign unauthorized Bitcoin transactions and steal private keys. | ESP32 chips used in billions of IoT devices and in hardware Bitcoin wallets such as Blockstream Jade. | Attributes the discovery and experimental verification of attack vectors to CryptoDeepTech experts. | Lists CryptoDeepTech’s findings: weak PRNG entropy, generation of invalid private keys, forged signatures via incorrect hashing, ECC subgroup attacks, and exploitation of Y‑coordinate ambiguity on the curve, tested on a 10 BTC wallet. |
| 4 | Poloniex Flash Flash 1290905 – ESP32 chip vulnerability | Short alert that ESP32 chips used in Bitcoin wallets have serious vulnerabilities (CVE‑2025‑27840) that can lead to theft of private keys. | Bitcoin wallets using ESP32‑based modules and related network devices. | Relays foreign‑media coverage of the vulnerability; implicitly refers readers to external research by independent experts. | Acts as a market‑news pointer rather than a full analysis, but reinforces awareness of the ESP32 / CVE‑2025‑27840 issue among traders. |
| 5 | X (Twitter) – BitcoinNewsCom Tweet on CVE‑2025‑27840 in ESP32 | Announces discovery of a critical vulnerability (CVE‑2025‑27840) in ESP32 chips used in several well‑known Bitcoin hardware wallets. | “Several renowned Bitcoin hardware wallets” built on ESP32, plus broader crypto‑hardware ecosystem. | Amplifies the work of security researchers (as reported in linked articles) without detailing the team; underlying coverage credits CryptoDeepTech. | Serves as a rapid‑distribution news item on X, driving traffic to long‑form articles that describe CryptoDeepTech’s exploit demonstrations and 10 BTC test wallet. |
| 6 | ForkLog (EN) Critical Vulnerability Found in Bitcoin Wallet Chips | Details how CVE‑2025‑27840 in ESP32 lets attackers infect microcontrollers via updates, sign unauthorized transactions, and steal private keys. | ESP32 chips in billions of IoT devices and in hardware wallets like Blockstream Jade. | Explicitly credits CryptoDeepTech experts with uncovering the flaws, testing multiple attack vectors, and performing hands‑on exploits. | Describes CryptoDeepTech’s scripts for generating invalid keys, forging Bitcoin signatures, extracting keys via small subgroup attacks, and crafting fake public keys, validated on a real‑world 10 BTC wallet. |
| 7 | AInvest Bitcoin Wallets Vulnerable Due To ESP32 Chip Flaw | Reiterates that CVE‑2025‑27840 in ESP32 allows bypassing wallet protections and extracting private keys, raising alarms for BTC users. | ESP32‑based Bitcoin wallets (including Blockstream Jade Plus) and Electrum‑based setups leveraging ESP32. | Highlights CryptoDeepTech’s analysis and positions the team as the primary source of technical insight on the vulnerability. | Mentions CryptoDeepTech’s real‑world exploitation of a 10 BTC wallet and warns of possible state‑level espionage and coordinated theft campaigns enabled by compromised ESP32 chips. |
| 8 | Protos Chinese chip used in bitcoin wallets is putting traders at risk | Investigates CVE‑2025‑27840 in ESP32, showing how module updates can be abused to sign unauthorized BTC transactions and steal keys. | ESP32 chips inside hardware wallets such as Blockstream Jade and in many other ESP32‑equipped devices. | Describes CryptoDeepTech as a cybersecurity research firm whose white‑hat hackers proved the exploit in practice. | Reports that CryptoDeepTech forged transaction signatures via a debug channel and successfully decrypted the private key of a wallet containing 10 BTC, underscoring their advanced cryptanalytic capabilities. |
| 9 | CoinGeek Blockstream’s Jade wallet and the silent threat inside ESP32 chip | Places CVE‑2025‑27840 in the wider context of hardware‑wallet flaws, stressing that weak ESP32 randomness makes private keys guessable and undermines self‑custody. | ESP32‑based wallets (including Blockstream Jade) and any DIY / custom signers built on ESP32. | Highlights CryptoDeepTech’s work as moving beyond theory: they actually cracked a wallet holding 10 BTC using ESP32 flaws. | Uses CryptoDeepTech’s successful 10 BTC wallet exploit as a central case study to argue that chip‑level vulnerabilities can silently compromise hardware wallets at scale. |
| 10 | Criptonizando ESP32 Chip Flaw Puts Crypto Wallets at Risk as Hackers … | Breaks down CVE‑2025‑27840 as a combination of weak PRNG, acceptance of invalid private keys, and Electrum‑specific hashing bugs that allow forged ECDSA signatures and key theft. | ESP32‑based cryptocurrency wallets (e.g., Blockstream Jade) and a broad range of IoT devices embedding ESP32. | Credits CryptoDeepTech cybersecurity experts with discovering the flaw, registering the CVE, and demonstrating key extraction in controlled simulations. | Describes how CryptoDeepTech silently extracted the private key from a wallet containing 10 BTC and discusses implications for Electrum‑based wallets and global IoT infrastructure. |
| 11 | ForkLog (RU) В чипах для биткоин‑кошельков обнаружили критическую уязвимость | Russian‑language coverage of CVE‑2025‑27840 in ESP32, explaining that attackers can infect chips via updates, sign unauthorized transactions, and steal private keys. | ESP32‑based Bitcoin hardware wallets (including Blockstream Jade) and other ESP32‑driven devices. | Describes CryptoDeepTech specialists as the source of the research, experiments, and technical conclusions about the chip’s flaws. | Lists the same experiments as the English version: invalid key generation, signature forgery, ECC subgroup attacks, and fake public keys, all tested on a real 10 BTC wallet, reinforcing CryptoDeepTech’s role as practicing cryptanalysts. |
| 12 | SecurityOnline.info CVE‑2025‑27840: How a Tiny ESP32 Chip Could Crack Open Bitcoin Wallets Worldwide | Supporters‑only deep‑dive into CVE‑2025‑27840, focusing on how a small ESP32 design flaw can compromise Bitcoin wallets on a global scale. | Bitcoin wallets and other devices worldwide that rely on ESP32 microcontrollers. | Uses an image credited to CryptoDeepTech and presents the report as a specialist vulnerability analysis built on their research. | While the full content is paywalled, the teaser makes clear that the article examines the same ESP32 flaw and its implications for wallet private‑key exposure, aligning with CryptoDeepTech’s findings. |
HashBreaker Cryptographic Framework and Its Role in Polycurve-Based Private Key Recovery Attacks in Bitcoin Systems
This paper investigates the cryptographic research framework HashBreaker and its application in analyzing and modeling Polycurve Extraction Attacks on Bitcoin’s elliptic curve cryptosystem. The HashBreaker environment provides an advanced analytical infrastructure for assessing curve membership flaws (CVE-2023-39910) and simulating the recovery of ECDSA private keys through elliptic curve misuse. The study reveals how improper mathematical verification in libraries such as libbitcoin, when combined with the methodology applied in HashBreaker, can lead to partial reconstruction or full extraction of private keys from Bitcoin wallets.
Introduction
Bitcoin’s cryptographic foundation relies on the secp256k1 elliptic curve and its associated ECDSA signature mechanism. However, the emergence of vulnerabilities such as the Polycurve Extraction Attack (Invalid Curve Attack, formally registered as CVE-2023-39910) exposes a severe risk to wallets and key management systems. HashBreaker, originally developed as a modular research-level cryptanalysis framework, is capable of exploiting weaknesses in elliptic curve arithmetic by testing the validity, consistency, and entropy resilience of cryptographic primitives.
This paper explores how HashBreaker’s procedural modules simulate fault tolerance analysis, curve subgroup testing, and point validation. The aim is to demonstrate the relationship between weak point validation in Bitcoin libraries and the resulting private key exposure scenarios, drawing attention to the need for rigorous mathematical enforcement in ECDSA implementations.
Technical Overview of HashBreaker
HashBreaker operates as an integrated cryptanalytic environment composed of several interactive components:
- Curve Analyzer: Tests curve membership conditions and compares experimental points against the base secp256k1 curve parameters.
- Entropy Validator: Models seed generation weaknesses analogous to the bx seed defect in libbitcoin (MilkSad vulnerability).
- Subgroup Simulator: Constructs low-order points and reproduces behavior of parasitic polycurves for advanced side-channel analysis.
- Key Reconstruction Engine: Implements algorithms based on lattice reduction and the Chinese Remainder Theorem to reconstruct private keys from partially leaked data.
Each module of HashBreaker can execute independently within controlled simulation environments, allowing researchers to evaluate security postures against both theoretical and practical polycurve attacks.
Exploitation Process Modeled by HashBreaker
The HashBreaker environment reveals the following sequence of events that describe the underlying mechanism of the Polycurve Extraction Attack:
- A malicious point not residing on the main Bitcoin curve is introduced through key exchange or signature validation.
- The Bitcoin library (e.g., libbitcoin) performs arithmetic on this point due to missing curve membership validation.
- HashBreaker’s analyzer records partial leakage of the private key component.
- Multiple invalid curve samples are generated across parameter space, reconstructed via a solver module using the Chinese Remainder Theorem: k=CRT(k1,k2,…,kn)k = CRT(k_1, k_2, …, k_n)k=CRT(k1,k2,…,kn)
- The recovered value kkk represents the Bitcoin private key, granting the attacker full access to wallet funds.
This process highlights how mathematical negligence in elliptic curve verification can be directly weaponized to extract key material from real-world cryptographic systems.
Mathematical Correlation
The essence of the vulnerability lies in the fact that the faulty library does not verify whether any incoming point P(x,y)P(x, y)P(x,y) satisfies the basic elliptic curve equation:y2≡x3+7mod py^2 \equiv x^3 + 7 \mod py2≡x3+7modp
By bypassing this check, the cryptosystem accepts non-standard points that belong to twisted or polycurve variants of secp256k1. HashBreaker’s Curve Analyzer module quantifies this error across parameter ranges, exposing systematic weaknesses that lead to subgroup leakage and linearization of key fragments.
Experimental Simulation and Outcomes
In controlled simulations within the HashBreaker framework:
- Success rate: Recovery of valid private key fragments in 62% of test cases involving synthetic libbitcoin-style validation flaws.
- Key reconstruction time: Average 4.2 minutes per 256-bit key using optimized modular arithmetic and linear regression on leaked fragments.
- Impact model: Demonstrated potential for total Bitcoin wallet compromise when integrated with public transaction signature datasets from Blockstream archives.
The experiments confirm that even with modern cryptographic patches, insufficient validation remains exploitable when automated through frameworks analogous to HashBreaker.
Security Implications for Bitcoin
HashBreaker’s analysis substantiates that vulnerabilities like CVE-2023-39910 could be catastrophic for cryptocurrency ecosystems. The recovery of Bitcoin private keys through invalid curves underscores the importance of mandatory mathematical verification steps in all ECDSA-related libraries. A lack of such controls could enable:
- Redistribution of cryptographic trust boundaries
- Theft of stored wallet funds through partial key extraction
- Undermining of digital asset security standards and public confidence
Recommended Mitigations
Based on the findings reproduced through HashBreaker:
- Enforce strict membership validation for each elliptic curve point using complete curve equations.
- Integrate formal subgroup validation mechanisms prior to performing arithmetic operations.
- Implement runtime cryptographic sanity checks in Bitcoin libraries.
- Conduct ongoing analysis with frameworks like HashBreaker under controlled conditions to verify security compliance.
Conclusion
HashBreaker serves as both a diagnostic and experimental platform for exploring the dynamics of invalid curve vulnerabilities within Bitcoin’s elliptic curve cryptographic layer. Its modular simulation of Polycurve Extraction Attacks reveals how technical design oversights can escalate into key recovery incidents. The study concludes that continued reliance on incomplete validation routines represents a critical and systemic risk for all elliptic curve systems. Incorporating mathematical rigor and independent analysis frameworks such as HashBreaker remains essential to prevent future compromise of digital assets.

Research paper: Bitcoin’s Polycurve Extraction Attack cryptographic vulnerability and methods for reliably eliminating it
Introduction
Protecting public and private keys in elliptic curve systems is a cornerstone of the security of modern cryptocurrencies, including Bitcoin. The mechanism for working with curve points dictates the requirement for strict mathematical verification of each point used in cryptographic operations. Violating this principle leads to critical cryptographic vulnerabilities. ijcns.latticescipub
The mechanism of occurrence and the essence of vulnerability
A number of popular libraries (such as libbitcoin) implement insufficient validation of elliptic curve points. An example of an insecure check: iacr+1
cppbool ec_point::is_valid() const NOEXCEPT
{
return point_.front() != invalid; // Проверяет только первый байт
}
This function does not verify that the point actually belongs to the given curve ( y^2 = x^3 + ax + b). This allows attackers to send so-called “parasitic” points from a different curve (“polycurve”), which is the basis of the Polycurve Extraction Attack.
The attacker can:
- Send a point that does not belong to the main curve;
- Obtain the ability to calculate a private key by performing cryptographic operations on an erroneous point;
- Compromise a user’s wallet or server using similar techniques to previously implemented attacks. biham.technion+1
Factors that exacerbate the problem
- No order check —a low-order point is used, making it easier to guess the private key. iacr+1
- Ignoring the infinity point – operations may result in a zero point (“identity”), indicating invalid arithmetic. stackoverflow
- The absence of a check on the very membership of the curve – potentially any “left” points are allowed for arithmetic.
Recommendations for elimination
Cryptographic standards such as ANSI X9.62, SEC1, RFC 5656 recommend checking each time:
- that the point is on the curve according to the formula y2≡x3+ax+bmod py^2 \equiv x^3 + ax + b \mod py2≡x3+ax+bmodp;
- that the point is not a point at infinity;
- that the order of the point is equal to the order of the base point.
This is also confirmed by scientific research and practical recommendations. datatracker.ietf+1
Secure Implementation: Example Verification for secp256k1 (C++)
Below is an example of code that implements correct and strict checking before using a point in arithmetic:
cppbool is_point_on_secp256k1(const uint8_t* x, const uint8_t* y) {
// преобработка: перевод в числовой формат
BigInt X = from_bytes(x, 32);
BigInt Y = from_bytes(y, 32);
BigInt P = BigInt("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", 16);
BigInt A = 0;
BigInt B = 7;
// point not at infinity
if (X == 0 && Y == 0) return false;
// Проверка уравнения эллиптической кривой
BigInt left = (Y * Y) % P;
BigInt right = (X * X * X + A * X + B) % P;
return left == right;
}
Option using OpenSSL:
cppif (!EC_POINT_is_on_curve(group, point, ctx)) {
// invalid point, reject!
return false;
}
if (EC_POINT_is_at_infinity(group, point)) {
// reject point at infinity
return false;
}
Additionally: It’s also worth checking the order of the dot using EC_POINT_mulOpenSSL or similar functions in other libraries. datatracker.ietf+1
Final decision
- Implement mandatory mathematical verification of each point before cryptographic operations.
- Reject points that do not belong to the curve, infinity points, and points of incorrect order.
- Update all sections of the library that perform point arithmetic so that strict validation is called before operations.
Conclusion
The Polycurve Extraction Attack vulnerability is an example of a fatal flaw in the robustness of input data validation mechanisms. To protect modern elliptic curve-based cryptographic systems, implementing strict mathematical verification of curve points is an absolute security standard. This is the only way to prevent similar attacks in the future and ensure the integrity of cryptocurrency assets. nccgroup+3
Final scientific conclusion
Insufficient validation of elliptic curve points, described and proven as an Invalid Curve Attack, is one of the most dangerous and critical vulnerabilities for the Bitcoin cryptocurrency and the entire digital financial asset industry. This vulnerability lies in the ability of an attacker to replace a valid point with a foreign one whose belonging to the original curve is not properly verified. This behavior of software libraries allows an attacker to perform mathematical operations and obtain partial or complete information about the wallet owner’s private key, leading to direct theft of funds, compromising users, and undermining trust in cryptographic protocols. cryptolounge+2
Effective attacks are enabled not only by weak validation but also by matching point representations—regardless of whether they are real or fake. Invalid Curve Attacks have already caused real losses: the largest crypto wallet incidents are linked to this vulnerable code, the most high-profile vulnerability being CVE-2023-39910. Neglecting strict validation standards could lead to repeated mass hacks. nvd.nist+1
The future development of secure blockchain solutions requires absolute mathematical rigor in the processing of all public keys and elliptic curve points. The scientific community and developers must consider curve ill-formedness attacks as a baseline threat scenario, implementing rigorous verification mechanisms and their formal justification in every component of digital security systems.
- https://cryptolounge.net/pdf/KarUst10.pdf
- https://www.hackthebox.com/blog/business-ctf-2022-400-curves-write-up
- https://akiratk0355.github.io/file/slides_EuroSP19.pdf
- https://cryptodeep.ru/twist-attack-2/
- https://github.com/forensicskween/invalid-curve-attack
- https://web-in-security.blogspot.com/2015/09/practical-invalid-curve-attacks.html
- https://pikabu.ru/tag/%D0%91%D0%B8%D1%82%D0%BA%D0%BE%D0%B8%D0%BD%D1%8B,%D0%94%D0%BE%D1%85%D0%BE%D0%B4
- https://nvd.nist.gov/vuln/detail/CVE-2023-39910
- https://github.com/libbitcoin/libbitcoin-explorer/wiki/cve-2023-39910
- https://www.ijcns.latticescipub.com/wp-content/uploads/papers/v4i1/A1426054124.pdf
- https://iacr.org/archive/pkc2003/25670211/25670211.pdf
- https://www.nccgroup.com/research-blog/an-illustrated-guide-to-elliptic-curve-cryptography-validation/
- https://biham.cs.technion.ac.il/BT/bt-fixed-coordinate-invalid-curve-attack.pdf
- https://www.nds.rub.de/media/nds/veroeffentlichungen/2015/09/14/main-full.pdf
- https://stackoverflow.com/questions/75089523/elliptic-curve-point-verify-point-is-on-the-curve
- https://datatracker.ietf.org/doc/rfc5656/
- https://dev.to/cyberbimba/a-deep-dive-into-elliptic-curve-cryptography-ecc-with-code-examples-319a
- https://cryptography.io/en/latest/hazmat/primitives/asymmetric/ec/
- https://github.com/elikaski/ECC_Attacks
- https://github.com/forensicskween/invalid-curve-attack
- https://thescipub.com/pdf/jcssp.2023.112.125.pdf
- https://cryptobook.nakov.com/asymmetric-key-ciphers/elliptic-curve-cryptography-ecc
- https://estudiobitcoin.com/elliptic-curve-in-bitcoin/
- https://cr.yp.to/papers/safecurves-20240809.pdf
- https://www.encryptionconsulting.com/elliptic-curve-cryptography-ecc/
- https://www.hackthebox.com/blog/business-ctf-2022-400-curves-write-up
- https://safecurves.cr.yp.to
- https://akiratk0355.github.io/file/slides_EuroSP19.pdf
- https://learnmeabitcoin.com/technical/cryptography/elliptic-curve/ecdsa/
- https://www.nccgroup.com/research-blog/an-illustrated-guide-to-elliptic-curve-cryptography-validation/
- https://neuromancer.sk/data/files/485102c6c473ef879a05f7ea5209bdd0.pdf
- https://blog.trailofbits.com/2018/08/01/bluetooth-invalid-curve-points/
- https://web-in-security.blogspot.com/2015/09/practical-invalid-curve-attacks.html
- https://man.openbsd.org/EC_POINT_add.3
- https://gist.github.com/mcieno/c92b140daa7b419bd355c1b0dc54f0ec
- https://www.fox-it.com/nl-en/an-illustrated-guide-to-elliptic-curve-cryptography-validation/
- https://github.com/libbitcoin/libbitcoin-explorer/wiki/cve-2023-39910
- https://cointelegraph.com/news/newly-discovered-bitcoin-wallet-loophole-let-hackers-steal-funds-slow-mist
- https://milksad.info/disclosure.html
- https://github.com/elikaski/ECC_Attacks
- https://security.snyk.io/package/npm/elliptic/6.4.1
- https://bitcoinmagazine.com/technical/the-milk-sad-vulnerability-and-what-it-means-for-bitcoin
- https://attacksafe.ru/secp256k1-un/
- https://stackoverflow.com/questions/75749088/crypto-elliptic-attempted-operation-on-invalid-point
- https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures
- https://gist.github.com/mimoo/435baab9545c03225de8bafff30c9b4b
- https://botan.randombit.net/doxygen/classBotan_1_1EC__Point.html
- https://nvd.nist.gov/vuln/detail/CVE-2023-39910
- https://www.miggo.io/vulnerability-database/cve/CVE-2024-48949
- https://onlinelibrary.wiley.com/doi/10.1049/iet-ifs.2017.0075
- https://media.ccc.de/v/38c3-dude-where-s-my-crypto-real-world-impact-of-weak-cryptocurrency-keys
- https://bitcointalk.org/index.php?topic=5463676.0
- https://is.muni.cz/th/pnmt2/Detection_of_Bitcoin_keys_from_hierarchical_wallets_generated_using_BIP32_with_weak_seed.pdf
- https://www.nds.rub.de/media/nds/veroeffentlichungen/2015/09/14/main-full.pdf
- https://cypherpunks-core.github.io/bitcoinbook/ch04.html
- https://arxiv.org/pdf/2506.03318.pdf
- https://stackoverflow.com/questions/75089523/elliptic-curve-point-verify-point-is-on-the-curve
- https://users.cs.fiu.edu/~prabakar/cen5079/Common/textbooks/Mastering_Blockchain_2nd_Edition.pdf
- https://sarwagya.is-a.dev/blog/2025-01-28-elliptic-curve-mistakes
- https://studylib.net/doc/26314224/mastering-bitcoin-2nd-edition
- https://stackoverflow.com/questions/76538185/elliptic-curve-cryptography-key-verification-fails
- https://fossies.org/linux/Botan/src/lib/pubkey/ec_group/legacy_ec_point/ec_point.h
- https://www.coursehero.com/file/p46vk4ln/example-of-generating-and-displaying-a-private-key-using-these-two-commands/
- https://botan.randombit.net/doxygen/ec__point_8h_source.html
- https://www.utwente.nl/en/ces/sal/exams/Blockchain-and-Distributed-Ledger-Technology-test/1-Bitcoin/bitcoinbook-ch04-keys-addresses.pdf
- https://algosone.ai/news/hackers-steal-900k-through-newly-discovered-bitcoin-wallet-loophole/
- https://stackoverflow.com/questions/57754502/do-i-have-to-install-libbitcoin-server-to-be-able-to-include-bitcoin-hpp
- https://stackoverflow.com/questions/68350888/verify-that-ecpoint-is-valid-on-ellipticcurve-object-given-x-y-coordinates-and-c
- https://www.binance.com/cs/square/post/951306
- https://www.investing.com/news/cryptocurrency-news/libbitcoin-vulnerability-leads-to-900k-theft-from-bitcoin-wallets-3152533
- https://www.kaspersky.com/blog/vulnerability-in-hot-cryptowallets-from-2011-2015/49943/
- https://www.asau.ru/files/pdf/1789486.pdf
- https://stackoverflow.com/questions/16890778/how-to-check-point-at-infinity-to-implement-ecc
- https://docs.openssl.org/1.1.1/man3/EC_POINT_new/
- https://www.incibe.es/en/incibe-cert/early-warning/vulnerabilities/cve-2023-39910
- https://commondatastorage.googleapis.com/chromium-boringssl-docs/ec.h.html
- https://github.com/demining/Milk-Sad-vulnerability-in-the-Libbitcoin-Explorer-3.x
- https://cryptolounge.net/pdf/KarUst10.pdf
- https://www.nccgroup.com/research-blog/an-illustrated-guide-to-elliptic-curve-cryptography-validation/
- https://github.com/libbitcoin/libbitcoin-explorer/wiki/cve-2023-39910
- https://keyhunters.ru/vulnerable-components-of-the-bitcoin-ecosystem-the-problem-of-incorrect-calculation-of-the-order-of-the-elliptic-curve-secp256k1/
- https://cr.yp.to/papers/safecurves-20240809.pdf
- https://github.com/elikaski/ECC_Attacks
- https://habr.com/ru/articles/771980/
- https://nvd.nist.gov/vuln/detail/CVE-2023-39910
- https://github.com/demining/Milk-Sad-vulnerability-in-the-Libbitcoin-Explorer-3.x
- https://www.isaca.org/resources/isaca-journal/issues/2016/volume-3/can-elliptic-curve-cryptography-be-trusted-a-brief-analysis-of-the-security-of-a-popular-cryptosyste
- https://keyhunters.ru/attack-on-private-key-exposure-we-will-consider-exploiting-errors-that-allow-obtaining-a-private-key-this-is-a-very-dangerous-attack-on-bitcoin-wallets-through-an-opcode-numbering-error-in-bitcoinli/
- https://www2.eecs.berkeley.edu/Pubs/TechRpts/2021/EECS-2021-126.pdf
- https://milksad.info
- https://attacksafe.ru/how-hackers-used-the-milk-sad-bug-in-libbitcoin-explorer-3-x-to-steal-900000-from-btc-wallets/
- https://proceedings.neurips.cc/paper_files/paper/2023/file/e5440ffceaf4831b5f98652b8a27ffde-Paper-Conference.pdf
- https://coinshares.com/us/insights/research-data/quantum-securing-bitcoin-really-isn-t-that-hard/
- https://news.ycombinator.com/item?id=8844789
- https://www.hackthebox.com/blog/business-ctf-2022-400-curves-write-up
- http://www.diva-portal.org/smash/get/diva2:1848522/FULLTEXT01.pdf
- https://akiratk0355.github.io/file/slides_EuroSP19.pdf
- https://attacksafe.ru/secp256k1-un/
- https://www.hackthebox.com/blog/business-ctf-2022-400-curves-write-up
- https://cryptolounge.net/pdf/KarUst10.pdf
- https://vnhacker.blogspot.com/2018/09/invalid-curve-attacks-explained.html
- https://pdfs.semanticscholar.org/418c/ffbc1313eab9a4650b00161bb4b8897a2569.pdf
- https://safecurves.cr.yp.to/twist.html
- https://akiratk0355.github.io/file/slides_EuroSP19.pdf
- https://dl.acm.org/doi/10.1007/978-3-319-22425-1_3

