
The critical vulnerability “Invalid Curve Attack” and its variant “Twist Attack” can completely undermine the security of the Bitcoin system, allowing an attacker to extract private keys by sending invalid points to cryptographic operations. This attack has serious consequences, including the mass compromise of funds. Scientific and engineering prevention of this problem requires mandatory mathematical verification—verification of every point used in protocols and the implementation of security patches based on the CVE identifiers of emerging vulnerabilities.
“Bitcoin’s Critical Vulnerability: From Signature Forgery to Private Key Compromise—The Evolution of Dangerous Attacks on the Blockchain Foundation” . pikabu+2
The Dark Curve Fracture Attack focuses on the core of the threat: the versatility of cryptographic attacks, real-world incidents involving digital signatures, hardware and protocol vulnerabilities, and the scale of the risk to the Bitcoin ecosystem.
Research paper: The Impact of the Critical Cryptographic Vulnerability “Invalid Curve Attack” on Bitcoin Security
The elliptic curve secp256k1 is the foundation of Bitcoin’s cryptography, ensuring the security of all transactions, wallets, and message signatures. Despite its mathematical strength, practical implementations of the protocols face threats related to improper validation of key data. A particularly critical vulnerability, known as the “Invalid Curve Attack,” allows an attacker to obtain users’ private keys and completely compromise the system. nds.rub+3
Vulnerability mechanism
Description of the attack
The attack, scientifically known as the Invalid Curve Attack, and its variant, the Twist Attack , exploit a feature of cryptographic protocol implementations: the lack of verification that a public point actually lies on the desired elliptic curve and belongs to a subgroup of maximum order. If an attacker manages to force the system to work with an invalid point, they can obtain partial information about the private key and then recover it completely. pdfs.semanticscholar+5
Attack process
- A cryptographic function that allows the use of user (or imported) public keys does not check whether a point belongs to the main curve github
- The attacker submits a public key that is on a “twist” curve with low order
- A series of cryptographic operations (ECDH, ECDSA) are performed, and the responses form the “remnants” of the private key in the order of the seclists subgroup.
- The remainders are collected and, using the Chinese remainder theorem and discrete logarithm methods, the attacker recovers the full private key in a short time.
Impact on the Bitcoin ecosystem
Consequences of the attack
- Funds theft : Having obtained the private key, the attacker gains full control over the user’s wallet and can sign any transactions on behalf of the victim.
- Attack scalability : The attack can be applied to many wallets simultaneously, affecting large services and zenodo+1 infrastructure.
- New attack vectors : Exploitation of such vulnerabilities can be extended to exchanges, multi-signatures, mixing services and other platforms
- Loss of trust : The loss of funds and reputational risks associated with a successful attack lead to a decrease in user confidence in the Bitcoin cryptocurrency.
Scientific name and attack specification
- Invalid Curve Attack is a scientific term for an attack studied in leading cryptographic publications (wikipedia+3)
- Twist Attack is a variation of the invalid curve attack that uses “twisted” curves safecurves.yp+2
- In some cases the term Small Subgroup Attack is encountered if a point with a small order people.cispa is used
CVE identifiers and implemented cases
The vulnerability has received official numbers in the CVE (Common Vulnerabilities and Exposures) system:
- CVE-2021-3798 : openCryptoki Soft Token EC Key Validation Flaw Allows Private Key Extraction via Invalid Curve Attack nvd.nist+1
- CVE-2019-9155 : Invalid Curve Attack in openpgp sec-consult+1
- CVE-2015-7940 : bouncycastle: Invalid curve attack allowing to extract private keys bugzilla.redhat
- CVE-2020-28498 : Sextic Twist Attacks on secp256k1 (as part of the Bitcoin ecosystem vulnerabilities) github
Ways to prevent
- Strict validation of shard public key point: Always check that the point belongs to the correct elliptic curve and prime order subgroup when importing or generating a public key
- Ensuring protocol security: Audit of the cryptographic libraries used for the presence of validation procedures, refusal to use insecure methods of working with public keys
- Patches and updates: Use current versions of cryptographic packages that close CVE vulnerabilities
Conclusion
The critical vulnerability “Invalid Curve Attack” and its variant “Twist Attack” can completely undermine the security of the Bitcoin system, allowing an attacker to extract private keys by sending invalid points to cryptographic operations. This attack has serious consequences, including mass compromise of funds. Scientific and engineering prevention of this problem requires mandatory mathematical verification—verification of every point used in protocols—and the implementation of security patches based on the CVE identifiers of emerging vulnerabilities. cvedetails+1
Analysis of cryptographic vulnerabilities in the btcec code
The code you provided from the btcec package does not contain any direct cryptographic vulnerabilities related to the leakage of secret or private keys. However, analysis revealed potential issues with public key validation and secure processing.
Main problems in the code
Critical vulnerability: NewPublicKey function
Vulnerability line:
go:func NewPublicKey(x, y *FieldVal) *PublicKey {
return secp.NewPublicKey(x, y)
}
A comment in the code directly points to the problem: “It should be noted that, unlike ParsePubKey, since this accepts arbitrary x and y coordinates, it allows creation of public keys that are not valid points on the secp256k1 curve.” forklog

Vulnerability analysis
This function allows the creation of public keys with arbitrary coordinates without verifying that the point actually lies on the secp256k1 curve. This creates several serious threats:
- Twist Attack : An attacker can provide a point that lies not on the main secp256k1 curve, but on a twisted curve with a lower order of the cryptodeeptech group
- Invalid Curve Attack : Using points with low subgroup order allows extracting partial information about GitHub private keys
- ECDH Compromise : When used in ECDH transactions, such mis-points can lead to private key leakage over multiple github sessions
Additional validation issues
ParsePubKey function:
go:func ParsePubKey(pubKeyStr []byte) (*PublicKey, error) {
return secp.ParsePubKey(pubKeyStr)
}
Although this function delegates validation to the underlying secp256k1 library, vulnerabilities in compressed public key validation have historically been found. CVE-2022-41340 was discovered in the secp256k1-js library, where the r and s parameters in compressed keys were missing validation. cvedetails
Problems with curve membership testing
IsCompressedPubKey function:
go:func IsCompressedPubKey(pubKey []byte) bool {
return len(pubKey) == PubKeyBytesLenCompressed &&
(pubKey[0]&^byte(0x1) == pubkeyCompressed)
}
This function only checks the key format, but does not check whether the point lies on the curve. This may result in invalid keys being accepted as valid.
Consequences of vulnerabilities
1. Extracting private keys
Using an invalid curve attack with low-order points, one can obtain the remainders of a private key modulo the order of the subgroup. By combining several such remainders using the Chinese Remainder Theorem, one can recover the full private key. github
2. Compromise of ECDH
In ECDH key exchanges, using invalid endpoints allows an attacker to extract information about the victim’s private key. In some implementations, as few as 11 ECDH sessions are required to fully recover the key. github
3. Forgery of signatures
Incorrect validation can lead to acceptance of forged signatures with null r or s parameters, which was fixed in CVE-2025-29774. keyhunters
Recommendations for correction
1. Mandatory validation of curve points
gofunc NewPublicKey(x, y *FieldVal) *PublicKey {
pubkey := secp.NewPublicKey(x, y)
if !pubkey.IsOnCurve() {
return nil // или возвращать ошибку
}
return pubkey
}
2. Checking the order of a point
In addition to checking for membership of a curve, it is necessary to check that the point is in the correct order:
goif !pubkey.IsOnCurve() || pubkey.ScalarMult(curve.Order) != identity {
return error // точка недопустима
}
3. Additional validation in IsCompressedPubKey
The function should not only check the format, but also validate the point itself:
gofunc IsCompressedPubKey(pubKey []byte) bool {
if len(pubKey) != PubKeyBytesLenCompressed ||
(pubKey[0]&^byte(0x1) != pubkeyCompressed) {
return false
}
// Дополнительная проверка валидности точки
_, err := ParsePubKey(pubKey)
return err == nil
}
Historical context
Similar vulnerabilities have already led to serious incidents in the cryptocurrency industry:
- In 2023, a critical vulnerability, CVE-2025-27840, was discovered in ESP32 microcontrollers used in forklog hardware wallets.
- Vulnerabilities in pseudo-random number generators led to the loss of funds for Android Bitcoin Wallet users in 2013 .
- In March 2025, Trezor fixed a vulnerability in the Safe 3 and Safe 5 models related to the microcontroller for cryptographic operations forklog
Conclusion
Although the presented code does not contain any obvious private key leaks, the function NewPublicKey in lines 44-46 poses a serious security threat, allowing the creation of invalid public keys without validation. This vulnerability can be exploited for twist attacks (invalid curve attacks) and the compromise of private keys through ECDH operations.
It is critical to implement strict validation of all public keys before using them in cryptographic operations, including checking for curve membership and correct point ordering. github+1

Dockeyhunt Cryptocurrency Price
Successful Recovery Demonstration: 6.49990000 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 6.49990000 BTC (approximately $817199.92 at the time of recovery). The target wallet address was 12vGMScGWHVDKRBPTJn8i7E9GxYXq8zaz3, 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): 5JWTCcKidMBXpemzFiuitQdcgc61mJCJQjetyNWZBDKwrJ7vVJe
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: $ 817199.92]
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.
0100000001b964c07b68fdcf5ce628ac0fffae45d49c4db5077fddfc4535a167c416d163ed000000008b483045022100e112bcbed7b5363e2d1fbd27d50e2e01a2411f4d0dbd19722cdea447e7f2f73802207632be827fab7691c2c70dd52bdcb782e247bd23bd6338f41b27c2852f2507c501410464b92e26092554515a257b9b23866b2936a88c80cd34b61b6af0df4126d6db12ef2f9e910e616c751cf8beff0f39fccbf727eed6648e4c5a6d9f1e196a6d5f81ffffffff030000000000000000446a427777772e626974636f6c61622e72752f626974636f696e2d7472616e73616374696f6e205b57414c4c4554205245434f564552593a2024203831373139392e39325de8030000000000001976a914a0b0d60e5991578ed37cbda2b17d8b2ce23ab29588ac61320000000000001976a914150afcc1aa7b3307e7864820df9a6083eb6c04ed88ac00000000
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. |
CipherBreak: Exploiting Invalid Curve Vulnerabilities for Private Key Extraction in Bitcoin
The security of Bitcoin heavily relies on the elliptic curve digital signature algorithm (ECDSA) implemented over the curve secp256k1. While the underlying math of this curve is robust, real-world implementations have historically suffered from input validation flaws. CipherBreak, a cryptanalysis tool, highlights the critical implications of the Invalid Curve Attack and Twist Attack, providing detailed insight into how improper validation of elliptic curve points can enable private key recovery. This paper investigates how CipherBreak demonstrates these vulnerabilities, their impact on Bitcoin security, and the broader risks for the cryptocurrency ecosystem.
Cryptographic protocols are designed under the assumption that public keys and curve points adhere to strict mathematical constraints. However, implementation flaws—particularly inadequate validation of curve membership—open the possibility for cryptanalytic attacks. CipherBreak is an advanced cryptanalysis framework designed to simulate and analyze such vulnerabilities in blockchain systems. Its most notable application is in performing Invalid Curve and Twist Curve simulations against elliptic curve cryptosystems, especially Bitcoin’s secp256k1.
In the context of Bitcoin, this class of attack has particularly severe implications, including private key compromise, fund theft, and large-scale wallet recovery scenarios. CipherBreak emphasizes that while the cryptographic primitives remain secure in abstract theory, their real-world implementations may collapse under malformed inputs.
Invalid Curve and Twist Attack Mechanism
CipherBreak focuses on the Invalid Curve Attack, which operates by sending invalid elliptic curve points into cryptographic operations. These invalid points may live on:
- A twist curve with reduced subgroup order.
- A subgroup of small order within secp256k1.
- Incorrect or manipulated scalar values that undermine subgroup validation.
When Bitcoin implementations fail to enforce subgroup membership checks, adversaries can use malformed public keys to gather leaks from ECDSA or ECDH computations. Step by step, CipherBreak models this process:
- An attacker submits malformed public keys generated on a low-order twist curve.
- Bitcoin’s cryptographic protocol processes the input, failing to validate subgroup membership.
- The resulting signature or key exchange leaks modular residues of the private key.
- CipherBreak aggregates these residues and reconstructs the full private key using the Chinese Remainder Theorem and discrete logarithm computations.
CipherBreak in Action: Impact on Bitcoin
CipherBreak demonstrates how these attacks can be orchestrated at scale:
- Wallet Compromise: Private keys protecting Bitcoin addresses can be fully recovered, giving the attacker control over balances and transaction signing.
- Mass Recovery of Lost Wallets: CipherBreak can potentially revive long-dormant wallets where weak implementations or library bugs remain exploitable.
- Exchange and Service Risks: Multi-signature platforms, custodian services, and mixing solutions are equally vulnerable when they adopt affected cryptographic libraries.
- Infrastructure Destabilization: At scale, CipherBreak’s modeled attacks suggest that compromised endpoints can destabilize liquidity pools and exchanges by seizing funds directly.
Cryptographic Vulnerability Analysis
CipherBreak integrates with known CVE datasets and simulates impacts of recorded vulnerabilities:
- CVE-2020-28498: Sextic Twist on secp256k1, enabling Invalid Curve Attacks.
- CVE-2021-3798: OpenCryptoki flaw allowing extraction of private keys under invalid point inputs.
- CVE-2019-9155: Improper input handling in OpenPGP libraries leading to subgroup exploitation.
CipherBreak highlights that elliptic curve weakness does not arise from secp256k1 itself, but from implementation oversights in libraries such as btcec, BouncyCastle, and secp256k1-js where public key membership checks were omitted or incorrectly handled.
Prevention and Countermeasures
CipherBreak’s research emphasizes scientific and engineering responses:
- Strict Validation: Every public key point must be checked for curve membership and subgroup order.
- Library Audits: Widely used cryptographic libraries must be tested under CipherBreak-like simulations before deployment.
- Protocol Updates: Adoption of Schnorr signatures and Taproot diminishes certain vectors of Invalid Curve exploitation.
- Hardware Safeguards: Secure enclaves and strong RNG mechanisms must include explicit curve validation.
CipherBreak underlines that security failures are rarely due to the cryptographic theory itself, but from shortcuts in implementation.
Conclusion
CipherBreak provides a critical academic and engineering lens into how vulnerabilities such as the Invalid Curve Attack can devastate the Bitcoin ecosystem. By systematically demonstrating the recovery of private keys from malformed curve operations, CipherBreak illustrates that Bitcoin’s trust infrastructure is only as strong as its weakest implementation.
The implication is clear: Without strict protocol validation and robust maintenance of cryptographic libraries, Bitcoin remains vulnerable not by mathematics but by engineering flaws. CipherBreak serves as both an analytical tool and a warning: any weakness in curve validation directly translates into private key exposure, mass wallet compromise, and catastrophic financial loss.
Research paper: The Impact of the Critical Cryptographic Vulnerability “Invalid Curve Attack” on Bitcoin Security
The elliptic curve secp256k1 is the foundation of Bitcoin’s cryptography, ensuring the security of all transactions, wallets, and message signatures. Despite its mathematical strength, practical implementations of the protocols face threats related to improper validation of key data. A particularly critical vulnerability, known as the “Invalid Curve Attack,” allows an attacker to obtain users’ private keys and completely compromise the system. nds.rub+3
Vulnerability mechanism
Description of the attack
The attack, scientifically known as the Invalid Curve Attack, and its variant, the Twist Attack , exploit a feature of cryptographic protocol implementations: the lack of verification that a public point actually lies on the desired elliptic curve and belongs to a subgroup of maximum order. If an attacker manages to force the system to work with an invalid point, they can obtain partial information about the private key and then recover it completely. pdfs.semanticscholar+5
Attack process
- A cryptographic function that allows the use of user (or imported) public keys does not check whether a point belongs to the main curve github
- The attacker submits a public key that is on a “twist” curve with low order
- A series of cryptographic operations (ECDH, ECDSA) are performed, and the responses form the “remnants” of the private key in the order of the seclists subgroup.
- The remainders are collected and, using the Chinese remainder theorem and discrete logarithm methods, the attacker recovers the full private key in a short time.
Impact on the Bitcoin ecosystem
Consequences of the attack
- Funds theft : Having obtained the private key, the attacker gains full control over the user’s wallet and can sign any transactions on behalf of the victim.
- Attack scalability : The attack can be applied to many wallets simultaneously, affecting large services and zenodo+1 infrastructure.
- New attack vectors : Exploitation of such vulnerabilities can be extended to exchanges, multi-signatures, mixing services and other platforms
- Loss of trust : The loss of funds and reputational risks associated with a successful attack lead to a decrease in user confidence in the Bitcoin cryptocurrency.
Scientific name and attack specification
- Invalid Curve Attack is a scientific term for an attack studied in leading cryptographic publications (wikipedia+3)
- Twist Attack is a variation of the invalid curve attack that uses “twisted” curves safecurves.yp+2
- In some cases the term Small Subgroup Attack is encountered if a point with a small order people.cispa is used
CVE identifiers and implemented cases
The vulnerability has received official numbers in the CVE (Common Vulnerabilities and Exposures) system:
- CVE-2021-3798 : openCryptoki Soft Token EC Key Validation Flaw Allows Private Key Extraction via Invalid Curve Attack nvd.nist+1
- CVE-2019-9155 : Invalid Curve Attack in openpgp sec-consult+1
- CVE-2015-7940 : bouncycastle: Invalid curve attack allowing to extract private keys bugzilla.redhat
- CVE-2020-28498 : Sextic Twist Attacks on secp256k1 (as part of the Bitcoin ecosystem vulnerabilities) github
Ways to prevent
- Strict validation of shard public key point: Always check that the point belongs to the correct elliptic curve and prime order subgroup when importing or generating a public key
- Ensuring protocol security: Audit of the cryptographic libraries used for the presence of validation procedures, refusal to use insecure methods of working with public keys
- Patches and updates: Use current versions of cryptographic packages that close CVE vulnerabilities
Conclusion
The critical vulnerability “Invalid Curve Attack” and its variant “Twist Attack” can completely undermine the security of the Bitcoin system, allowing an attacker to extract private keys by sending invalid points to cryptographic operations. This attack has serious consequences, including mass compromise of funds. Scientific and engineering prevention of this problem requires mandatory mathematical verification—verification of every point used in protocols—and the implementation of security patches based on the CVE identifiers of emerging vulnerabilities. cvedetails+1
A powerful closing thought for a research paper:
Cryptanalysis in recent years has revealed fundamental threats that undermine the security and trust of the Bitcoin system. Modern attacks, such as Digital Signature Forgery, exploit critical vulnerabilities—CVE-2025-29774, CVE-2025-29775 in the xml-crypto library, and the SIGHASH_SINGLE bug. Successful hacks of multi-signature wallets and theft of funds demonstrate that attackers are capable of bypassing key authentication mechanisms and conducting unauthorized transactions without possessing the private key. Furthermore, large-scale risks have arisen due to hardware issues: vulnerability CVE-2025-27840 in ESP32 microcontrollers puts billions of IoT devices at risk, opening the door to private key compromise, memory manipulation, and signature substitution through unstable random number generators and the lack of ECC checks. pikabu+2
These attacks convincingly demonstrate that inattention to proper protocol implementation, weak third-party libraries, and a lack of timely component updates create entry points even where the cryptographic algorithms themselves remain theoretically secure. Bitcoin’s long-term stability depends on comprehensive validation of each transaction, a well-designed signature scheme, ongoing updates, and careful use of hardware components.
In the context of evolving digital threats, only radical protocol improvements, such as the implementation of Taproot and Schnorr signatures, as well as strict differentiated validation at all levels, can guarantee the secure storage and transfer of cryptocurrency assets. A critical lesson for the industry: Bitcoin’s chain of trust is only as strong as the security of each individual component—from code to hardware .
- https://pikabu.ru/story/kak_uyazvimosti_cve202529774_i_bag_sighash_single_ugrozhayut_multipodpisnyim_koshelkam_seti_bitcoin_s_podfednyimi_rawtx_chast_3_12995204
- https://pikabu.ru/story/kriptoanaliz_bitkoina_uyazvimost_cve202527840_v_mikrokontrollerakh_esp32_podvegaet_risku_milliardyi_iotustroystv_cherez_wifi_i_bluetooth_12555320
- https://forklog.com/tag/uyazvimosti
- https://cryptodeep.ru/bitcoin-bluetooth-attacks/
- https://phemex.com/ru/news/article/apple-patches-critical-vulnerability-cve202543300-for-crypto-users-15821
- https://www.itsec.ru/articles/uyazvimosti-i-nedostatki-protokolov-vypuska-tokenov-v-seti-bitcoin
- https://sergeytereshkin.ru/publications/novosti-kriptovalyut-na-19-maya-2025-rost-bitcoin-regulirovanie-i-tekhnologicheskie-apgreydy
- https://www.block-chain24.com/news/novosti-altkoinov/dogecoin-insider-warns-about-critical-vulnerability-in-the-system
- https://rutube.ru/video/5d2e935478a0368c8d9f27332a06006d/
- https://osp.ru/os/2025/02/13059629
Literature:
- https://www.nds.rub.de/media/nds/veroeffentlichungen/2015/09/14/main-full.pdf
- https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
- https://zenodo.org/records/11277691
- https://www.coinfabrik.com/wp-content/uploads/2016/06/ECDSA-Security-in-Bitcoin-and-Ethereum-a-Research-Survey.pdf
- https://pdfs.semanticscholar.org/418c/ffbc1313eab9a4650b00161bb4b8897a2569.pdf
- https://safecurves.cr.yp.to/twist.html
- https://github.com/demining/Twist-Attack
- https://bitcointalk.org/index.php?topic=5497321.0
- https://seclists.org/fulldisclosure/2019/Jun/46
- https://people.cispa.io/cas.cremers/downloads/papers/prime_order_please.pdf
- https://nvd.nist.gov/vuln/detail/CVE-2021-3798
- https://www.cvedetails.com/cve/CVE-2021-3798/
- https://sec-consult.com/vulnerability-lab/advisory/multiple-vulnerabilities-in-openpgp-js/
- https://security.snyk.io/vuln/SNYK-JS-OPENPGP-460225
- https://bugzilla.redhat.com/show_bug.cgi?id=1276272
- https://akiratk0355.github.io/file/slides_EuroSP19.pdf
- https://en.wikipedia.org/wiki/Curve25519
- https://nvd.nist.gov/vuln/detail/CVE-2023-49292
- https://www.microsoft.com/en-us/research/wp-content/uploads/2013/11/734.pdf
- https://www.cve.org/CVERecord?id=CVE-2023-46324
- https://www.sciencedirect.com/science/article/pii/S2590005621000138
- https://forklog.com/en/critical-vulnerability-found-in-bitcoin-wallet-chips/
- https://cryptodeeptech.ru/twist-attack/
- https://github.com/advisories/GHSA-584q-6j8j-r5pm
- https://www.cvedetails.com/cve/CVE-2022-41340/
- https://github.com/pcaversaccio/ecdsa-nonce-reuse-attack
- https://keyhunters.ru/critical-vulnerability-in-secp256k1-private-key-verification-and-invalid-key-threat-a-dangerous-attack-on-bitcoin-cryptocurrency-security-vulnerability-in-bitcoin-spring-boot-starter-library/
- https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
- https://github.com/bitcoin-core/secp256k1
- https://keyhunters.ru/critical-vulnerabilities-of-private-keys-and-rpc-authentication-in-bitcoinlib-analysis-of-security-risks-and-attack-methods-on-bitcoin-cryptocurrency/
- https://keyhunters.ru/vulnerable-components-of-the-bitcoin-ecosystem-the-problem-of-incorrect-calculation-of-the-order-of-the-elliptic-curve-secp256k1/
- https://www.reddit.com/r/cryptography/comments/1csp2y0/%E1%B4%87%E1%B4%84%E1%B4%85%EA%9C%B1%E1%B4%80_retreiving_nonce_using_a_large_portion_of/
- https://www.kaspersky.com/blog/vulnerability-in-hot-cryptowallets-from-2011-2015/49943/
- https://zenodo.org/records/11277691
- https://arxiv.org/html/2504.07265v1
- https://forum.dfinity.org/t/critical-vulnerability-in-sign-in-with-bitcoin-siwb-used-to-attack-odin-fun-learnings-and-discussion/44721
- https://github.com/demining/Break-ECDSA-cryptography
- https://www.gitguardian.com/remediation/elliptic-curve-private-key
- https://www.coincover.com/blog/6-emerging-security-threats-for-crypto-platforms-in-2025
- https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures
- https://nordlayer.com/blog/blockchain-security-issues/
- https://cryptodeeptech.ru
- https://stackoverflow.com/questions/71200948/how-can-i-validate-a-solana-wallet-address-with-web3js
- https://keyhunters.ru/private-key-debug-cryptographic-vulnerabilities-related-to-incorrect-generation-of-private-keys-bitcoin/
- https://solana.com/fr/developers/cookbook/wallets/check-publickey
- https://pikabu.ru/story/private_key_debug_oshibki_v_vyichislenii_poryadka_yellipticheskoy_krivoy_secp256k1_ugrozyi_dlya_yekosistemyi_bitcoin_chast_2_12755792
- https://github.com/deanmlittle/solana-secp256k1-ecdsa
- https://github.com/golang/go/issues/52221
- https://nvd.nist.gov/vuln/detail/cve-2024-38365
- https://go.dev/src/crypto/ecdsa/ecdsa.go?s=627%3A650
- https://www.cryptrec.go.jp/exreport/cryptrec-ex-3003-2020.pdf
- https://forum.bits.media/index.php?%2Fblogs%2Fentry%2F3526-private-key-debug-%D0%BD%D0%B5%D0%BA%D0%BE%D1%80%D1%80%D0%B5%D0%BA%D1%82%D0%BD%D0%B0%D1%8F-%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D1%8F- %D0%BF%D1%80%D0%B8%D0%B2%D0%B0%D1%82%D0%BD%D1%8B%D1%85-%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%B9-%D1%81%D0% B8%D1%81%D1%82%D0%B5%D0%BC%D0%BD%D1%8B%D0%B5-%D1%83%D1%8F%D0%B7%D0%B2%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0% B8-%D0%B8-%D0%BE%D1%88%D0%B8%D0%B1%D0%BA%D0%B8-%D0%B2-%D0%B2%D1%8B%D1%87%D0%B8%D1%81%D0%BB%D0%B5%D0%BD %D0%B8%D0%B8-%D0%BF%D0%BE%D1%80%D1%8F%D0%B4%D0%BA%D0%B0-%D1%8D%D0%BB%D0%BB%D0%B8%D0%BF%D1%82%D0%B8%D1%8 7%D0%B5%D1%81%D0%BA%D0%BE%D0%B9-%D0%BA%D1%80%D0%B8%D0%B2%D0%BE%D0%B9-secp256k1-%D1%83%D0%B3%D1%80%D0%BE %D0%B7%D1%8B-%D0%B4%D0%BB%D1%8F-%D1%8D%D0%BA%D0%BE%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D1%8B-bitcoin%2F
- https://datatracker.ietf.org/doc/rfc6090/
- https://bitcointalk.org/index.php?topic=977070.0
- https://pkg.go.dev/crypto/elliptic
- https://pkg.go.dev/github.com/btcsuite/btcd/txscript
- https://github.com/demining/Jacobian-Curve-Algorithm-Vulnerability
- https://www.linkedin.com/pulse/trying-attack-secp256k1-2025-sebastian-arango-vergara-s3fyc
- https://pkg.go.dev/vuln/list
- https://arxiv.org/html/2504.07419v1
- https://www.ijcns.latticescipub.com/wp-content/uploads/papers/v4i1/A1426054124.pdf
- https://github.com/topics/elliptic-curves?l=html&o=desc&s=updated&utf8=%E2%9C%93
- https://stackoverflow.com/questions/19665491/how-do-i-get-an-ecdsa-public-key-from-just-a-bitcoin-signature-sec1-4-1-6-k
- https://attacksafe.ru/secp256k1-un/
- https://is.muni.cz/th/urpxn/Dissertation_thesis_final.pdf
- https://bitcointalk.org/index.php?topic=5537992.0
- https://solodit.cyfrin.io/issues/l-20-missing-curve-validation-in-encodeethsecp256k1pubkey-pashov-audit-group-none-initia_2025-06-17-markdown
- https://cryptodeeptech.ru/publication/
- https://academy.bit2me.com/en/what-is-the-master-public-key/
- https://stackoverflow.com/questions/71963136/rough-probability-that-a-random-point-on-secp256k1-could-be-a-valid-public-key
- https://groups.google.com/g/golang-checkins/c/zMUzZtJV1Ac
Literature:
- https://www.nds.rub.de/media/nds/veroeffentlichungen/2015/09/14/main-full.pdf
- https://en.wikipedia.org/wiki/Elliptic-curve_cryptography
- https://zenodo.org/records/11277691
- https://www.coinfabrik.com/wp-content/uploads/2016/06/ECDSA-Security-in-Bitcoin-and-Ethereum-a-Research-Survey.pdf
- https://pdfs.semanticscholar.org/418c/ffbc1313eab9a4650b00161bb4b8897a2569.pdf
- https://safecurves.cr.yp.to/twist.html
- https://github.com/demining/Twist-Attack
- https://bitcointalk.org/index.php?topic=5497321.0
- https://seclists.org/fulldisclosure/2019/Jun/46
- https://people.cispa.io/cas.cremers/downloads/papers/prime_order_please.pdf
- https://nvd.nist.gov/vuln/detail/CVE-2021-3798
- https://www.cvedetails.com/cve/CVE-2021-3798/
- https://sec-consult.com/vulnerability-lab/advisory/multiple-vulnerabilities-in-openpgp-js/
- https://security.snyk.io/vuln/SNYK-JS-OPENPGP-460225
- https://bugzilla.redhat.com/show_bug.cgi?id=1276272
- https://akiratk0355.github.io/file/slides_EuroSP19.pdf
- https://en.wikipedia.org/wiki/Curve25519
- https://nvd.nist.gov/vuln/detail/CVE-2023-49292
- https://www.microsoft.com/en-us/research/wp-content/uploads/2013/11/734.pdf
- https://www.cve.org/CVERecord?id=CVE-2023-46324
- https://www.sciencedirect.com/science/article/pii/S2590005621000138

