I am currently working on a method that allows you to find a key in bit30 in less than 10 seconds
Just 10 seconds?
Here's a script that does it in 2 seconds. In Python.
import time, random, sys, os, secp256k1 as ice
puzzle = 30
target = "1LHtnpd8nU5VHEMkG2TMYYNUjjLc992bps"
lower_range_limit = 2 ** (puzzle - 1);upper_range_limit = (2 ** puzzle) - 1
if os.name=='nt':os.system('cls')
else:os.system('clear')
t = time.ctime();sys.stdout.write(f"\033[?25l");sys.stdout.write(f"\033[01;33m[+] STARTED: {t}\n")
sys.stdout.write(f"[+] Puzzle: {puzzle}\n")
sys.stdout.write(f"[+] Lower range limit: {lower_range_limit}\n")
sys.stdout.write(f"[+] Upper range limit: {upper_range_limit}\n")
while True:
constant_prefix = b'yx\xcb\x08\xb70'
prefix_length = len(constant_prefix);length = 8
ending_length = length - prefix_length;ending_bytes = os.urandom(ending_length)
random_bytes = constant_prefix + ending_bytes
random.seed(random_bytes)
dec = random.randint(lower_range_limit, upper_range_limit)
caddr = ice.privatekey_to_address(0, True, dec)
message = "\r[+] {}".format(dec);messages = []
messages.append(message);output = "\033[01;33m" + ''.join(messages) + "\r"
sys.stdout.write(output);sys.stdout.flush()
if caddr == target:
HEX = "%064x" % dec;wifc = ice.btc_pvk_to_wif(HEX);t = time.ctime()
print(f'[+] SOLVED: {t}');print(f'[+] Bitcoin address Compressed: {caddr}')
print(f'[+] Private key (wif) Compressed: {wifc}');print(f'[+] Random Seed: {random_bytes}')
break
- STARTED: Sat Nov 25 05:07:51 2023
- Puzzle: 30
- Lower range limit: 536870912
- Upper range limit: 1073741823
- SOLVED: Sat Nov 25 05:07:52 2023
- Bitcoin address Compressed: 1LHtnpd8nU5VHEMkG2TMYYNUjjLc992bps
- Private key (wif) Compressed: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M8diLSC5MyERoW
- Random Seed: b'yx\xcb\x08\xb70l\xf1'
nice code, this version goes 3 times faster
import random, os, secp256k1 as ice
puzzle = 30
#target = "1LHtnpd8nU5VHEMkG2TMYYNUjjLc992bps"
target = "d39c4704664e1deb76c9331e637564c257d68a08"
lower_range_limit = 2 ** (puzzle - 1);upper_range_limit = (2 ** puzzle) - 1
for x in range(1000000):
constant_prefix = b'yx\xcb\x08\xb70'
prefix_length = len(constant_prefix);length = 8
ending_length = length - prefix_length;ending_bytes = os.urandom(ending_length)
random_bytes = constant_prefix + ending_bytes
random.seed(random_bytes)
dec = random.randint(lower_range_limit, upper_range_limit)
caddr = ice.privatekey_to_h160(0, True, dec).hex()
if caddr == target:
print(caddr,dec)
break
The problem is that there has to be a method to find out what a random seed is.
For each Puzzle i start from 0 - constant_prefix = b''
for x in range won't work above puzzle 40 - it needs at least 200 million seeds to go through the script.
For example here I am hunting random seed for Puzzle 65:
import time, random, sys, os, secp256k1 as ice
puzzle = 65
target = 30568377312064202855
lower_range_limit = 2 ** (puzzle - 1);upper_range_limit = (2 ** puzzle) - 1
while True:
constant_prefix = b'\xc9\xd9\x1d\xbc\x16\x9d'
prefix_length = len(constant_prefix);length = 8
ending_length = length - prefix_length;ending_bytes = os.urandom(ending_length)
random_bytes = constant_prefix + ending_bytes
random.seed(random_bytes)
dec = random.randint(lower_range_limit, upper_range_limit)
if str(dec).startswith("30568377"):
message = "\r[+] {} , {}".format(dec, random_bytes);messages = []
messages.append(message);output = "\033[01;33m" + ''.join(messages) + "\r"
sys.stdout.write(output);sys.stdout.flush()
if dec == target:
caddr = ice.privatekey_to_address(0, True, dec)
HEX = "%064x" % dec;wifc = ice.btc_pvk_to_wif(HEX);t = time.ctime()
print(f'[+] SOLVED: {t}');print(f'[+] Bitcoin address Compressed: {caddr}')
print(f'[+] Private key (wif) Compressed: {wifc}');print(f'[+] Random Seed: {random_bytes}')
break
First you search for the seed with - constant_prefix = b'' - for the first 8 numbers - if str(dec).startswith("30568377") - then you write the result in the script itself - constant_prefix = b'\xc9\xd9\x1d\xbc\x16\x9d'
Then you go to 10 (removing manually the last two bytes at the end) and so on until you hit full WIF.
The closest I've come up to 2 ** 65
30568377238562584866, b'\xc9\xd9\x1d\xbc\x16\x9d\xdb\x86'
But what if is not length = 8 ? can be 9, 10, 11 ....and so on
What if hypothetically there is a common seed for all puzzles, let's say on the seed length = 28 ?
I'll never know because I've never even attempted that length