7isce
Jr. Member
Offline
Activity: 61
Merit: 6
|
|
November 23, 2023, 03:52:14 PM |
|
[TARGET: 1] [SPEED: 1632701.66 MKey/s] [TOTAL: 48,937,041,920] [00:05:18] search 48,937,041,920 keys in 318 seconds
48,937,041,920 / 318 So the real speed is 153,890,068 ~= 153 MKey/s
|
|
|
|
hari1987
Newbie
Offline
Activity: 21
Merit: 0
|
|
November 24, 2023, 10:33:50 AM |
|
...
it would be awesome if there's a CUDA version for it. I can give you this same script that works in C++ but you have to do the GPU part yourself.CUDA programming can be complex, and proper error handling and synchronization are crucial. Also, not all parts of your program may benefit from GPU acceleration, so it's essential to profile and optimize as needed. import bit import hashlib, random import platform from time import time import os import sys import ctypes
nbits = 130 low = 2**(nbits-1) high = -1+2**nbits diff = high - low
filename ='tes.bin' with open(filename,'rb') as f: add = f.read()#.split() #add = set(add)
if platform.system().lower().startswith('win'): dllfile = 'ice_secp256k1.dll' if os.path.isfile(dllfile) == True: pathdll = os.path.realpath(dllfile) ice = ctypes.CDLL(pathdll) else: print('File {} not found'.format(dllfile))
elif platform.system().lower().startswith('lin'): dllfile = 'ice_secp256k1.so' if os.path.isfile(dllfile) == True: pathdll = os.path.realpath(dllfile) ice = ctypes.CDLL(pathdll) else: print('File {} not found'.format(dllfile)) else: print('[-] Unsupported Platform currently for ctypes dll method. Only [Windows and Linux] is working') sys.exit()
ice.scalar_multiplication.argtypes = [ctypes.c_char_p, ctypes.c_char_p] # pvk,ret ice.point_subtraction.argtypes = [ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_char_p] # x1,y1,x2,y2,ret ice.init_secp256_lib()
def scalar_multiplication(kk): res = (b'\x00') * 65 pass_int_value = hex(kk)[2:].encode('utf8') ice.scalar_multiplication(pass_int_value, res) return res
def point_subtraction(pubkey1_bytes, pubkey2_bytes): x1 = pubkey1_bytes[1:33] y1 = pubkey1_bytes[33:] x2 = pubkey2_bytes[1:33] y2 = pubkey2_bytes[33:] res = (b'\x00') * 65 ice.point_subtraction(x1, y1, x2, y2, res) return res
def new_pos(full_bytes): pos = hashlib.sha256(full_bytes).digest() return pos
def fixrange(full_bytes): t = low + int(full_bytes.hex(), 16) % diff return t
def pub2upub(pub_hex): x = int(pub_hex[2:66], 16) if len(pub_hex) < 70: y = bit.format.x_to_y(x, int(pub_hex[:2], 16) % 2) else: y = int(pub_hex[66:], 16) return bytes.fromhex('04' + hex(x)[2:].zfill(64) + hex(y)[2:].zfill(64))
def upub2cpub(upub_bytes): x1 = upub_bytes[1:33] prefix = str(2 + int(upub_bytes[33:].hex(), 16) % 2).zfill(2) return bytes.fromhex(prefix) + x1
st = time() key_seed = b'' m = 1 while True: pubkey = "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852" P = pub2upub(pubkey) key_seed = new_pos(key_seed) qfix = fixrange(key_seed) #qfix = m * 1000000 # Use an interval of 1000000 for qfix (stride) tpub = bytes(bytearray(scalar_multiplication(qfix))) subP = bytes(bytearray(point_subtraction(P, tpub))) cpub = bytes(upub2cpub(subP)) m += 1
msg = 'Test Cpub : {total}, {num}, {password} '.format(total=m, num=qfix, password=bytes(cpub).hex()) sys.stdout.write('\r' + msg) sys.stdout.flush()
if cpub in add: print("Winner Found!:{num}, {password} ".format(num=qfix, password=bytes(cpub).hex())) f = open (u"Winner.txt","a") f.write("num:" + str(qfix) +'\n' + "cpub:" + str(bytes(cpub).hex())+ '\n\n') f.close() break print('[-] Completed in {0:.2f} sec'.format(time() - st)) can you give me the same script that works in cpp? Thanks
|
|
|
|
mcdouglasx
Member
Offline
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
|
|
November 24, 2023, 06:50:37 PM |
|
import secp256k1 as ice import random
print("scaning pub 03...")
target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
start= 50000000000000000000 end= 70000000000000000000 while True: A0 = random.randint(start, end) A1 = ice.scalar_multiplication(A0) B0 = ice.to_cpub(A1.hex()) if B0.startswith("03"): A2 = ice.pubkey_to_address(0,1, A1) print(A2) if target in A2: print("venga rata") data = open("Win.txt","a") data.write(str(A0)+" = "+A2+"\n") data.close()
Same script, but with concurrent.futures. import concurrent.futures import sys import os import time import secp256k1 as ice import random import multiprocessing
os.system("clear");t = time.ctime();sys.stdout.write(f"\033[?25l") sys.stdout.write(f"\033[01;33m[+] {t}\n")
def generate_key(): start = 36893488147419103231 end = 73786976294838206463 A0 = random.randint(start, end) A1 = ice.scalar_multiplication(A0) B0 = ice.to_cpub(A1.hex()) if B0.startswith("03"): A2 = ice.pubkey_to_address(0, 1, A1) message = "[+] {}".format(A2);messages = [];messages.append(message);output = ''.join(messages) + "\r";sys.stdout.write(output);sys.stdout.flush() return A0, A2 else: return None, None
def main(): target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so" num_cores = multiprocessing.cpu_count() with concurrent.futures.ProcessPoolExecutor(max_workers=num_cores) as executor: while True: futures = [executor.submit(generate_key) for _ in range(num_cores)] for future in concurrent.futures.as_completed(futures): A0, A2 = future.result() if A2 and target in A2: print("venga rata") with open("Win.txt", "a") as data: data.write(f"{A0} = {A2}\n") break
if __name__ == "__main__": main() You can imagine how this works on a 128 Core machine I use Python for testing or when speed is not required, C is better when it comes to speed, I am currently working on a method that allows you to find a key in bit30 in less than 10 seconds, really this part is not the curious one, the curious thing My script has a speed of 2048keys/s, how does it manage to find a key in that range in such a short time with that speed? There is a mathematical trick involved in it, I'm starting to write it in C, to focus on the puzzle 130, once I finish it, if this does not pose a security risk for bitcoin I will make it free.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
AlanJohnson
Member
Offline
Activity: 93
Merit: 11
|
|
November 24, 2023, 08:54:44 PM |
|
I will make it free.
And if it does, what would you do then, sell it? Well you can't trade diamond with glass. If you found it, we will make a double team to take over the world. Lol I will bring coffee, make food, clean your office etc. Over my dead body if I let anyone pose a threat to Bitcoin.😉 I swear this thread gets weirder day by day...
|
|
|
|
mcdouglasx
Member
Offline
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
|
|
November 24, 2023, 10:18:46 PM |
|
I will make it free.
And if it does, what would you do then, sell it? Well you can't trade diamond with glass. If you found it, we will make a double team to take over the world. Lol I will bring coffee, make food, clean your office etc. Over my dead body if I let anyone pose a threat to Bitcoin.😉 I meant that if the script does not represent a threat, I will share it. because if with a python script at a speed of 2048 keys/s it finds publick key in the range of puzzle #30 in a few seconds, with C I have no idea where this can go at the moment, I have to do tests in C.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
mcdouglasx
Member
Offline
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
|
|
November 25, 2023, 12:39:54 AM |
|
Well this was supposed to be a community effort, now that you got something promising, it requires more tests? Just gimme it man, I promise not to share it with anyone else.
We go like this > you take 130, after 1/5 year I take 135, after 2 years after that you take 140, and when we empty 160, we come here and ask for more puzzles if by then we were still alive and kicking.😂
That's how it works, you discover a method, you claim everything you can, when you can't claim more, you share it. Why does it happen? Because the majority of those who benefit from this do not look back to thank them with a simple tip. The tycoons roam around here and don't even comment, they don't contribute anything, they just wait for something new to apply their great computing power, and they don't even bother to reveal the keys. It is not worth revealing something here and having none of those present take advantage of it because we lack computing power. Basically at this point it is giving more money to the rich.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
nomachine
Member
Offline
Activity: 274
Merit: 12
|
|
November 25, 2023, 04:10:22 AM |
|
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'
|
|
|
|
mcdouglasx
Member
Offline
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
|
|
November 25, 2023, 04:32:02 AM |
|
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'
I think you're missing the point, obviously there are tools that analyze millions of keys per second and will almost instantly find the key... but my script is not based on speed, 2048 keys/s is nothing, but nevertheless it successfully finds the keys in less than 10 seconds. That's why I say there is mathematics behind this, I think you don't understand the magnitude of this. If with 2048keys/s I find bit 30, what do you think will happen when I analyze 10mkeys/s, 100mkeys/s. I hope this time I explained it well.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
nomachine
Member
Offline
Activity: 274
Merit: 12
|
|
November 25, 2023, 04:38:40 AM |
|
I think you're missing the point, obviously there are tools that analyze millions of keys per second and will almost instantly find the key...
but my script is not based on speed, 2048 keys/s is nothing, but nevertheless it successfully finds the keys in less than 10 seconds.
That's why I say there is mathematics behind this, I think you don't understand the magnitude of this.
If with 2048keys/s I find bit 30, what do you think will happen when I analyze 10mkeys/s, 100mkeys/s.
I hope this time I explained it well.
You explained well. The point is that I still think that Random Seed is the solution to solve any Puzzle in a few seconds.
|
|
|
|
mcdouglasx
Member
Offline
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
|
|
November 25, 2023, 04:46:11 AM |
|
I think you're missing the point, obviously there are tools that analyze millions of keys per second and will almost instantly find the key...
but my script is not based on speed, 2048 keys/s is nothing, but nevertheless it successfully finds the keys in less than 10 seconds.
That's why I say there is mathematics behind this, I think you don't understand the magnitude of this.
If with 2048keys/s I find bit 30, what do you think will happen when I analyze 10mkeys/s, 100mkeys/s.
I hope this time I explained it well.
You explained well. The point is that I still think that Random Seed is the solution to solve any Puzzle in a few seconds. ok, delete the "while true:" and write " for i in range(1,20480):" Then tell me if your search is more effective.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
citb0in
|
|
November 25, 2023, 09:05:28 AM |
|
import secp256k1 as ice import random
print("scaning pub 03...")
target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
start= 50000000000000000000 end= 70000000000000000000 while True: A0 = random.randint(start, end) A1 = ice.scalar_multiplication(A0) B0 = ice.to_cpub(A1.hex()) if B0.startswith("03"): A2 = ice.pubkey_to_address(0,1, A1) print(A2) if target in A2: print("venga rata") data = open("Win.txt","a") data.write(str(A0)+" = "+A2+"\n") data.close()
Same script, but with concurrent.futures. import concurrent.futures import sys import os import time import secp256k1 as ice import random import multiprocessing
os.system("clear");t = time.ctime();sys.stdout.write(f"\033[?25l") sys.stdout.write(f"\033[01;33m[+] {t}\n")
def generate_key(): start = 36893488147419103231 end = 73786976294838206463 A0 = random.randint(start, end) A1 = ice.scalar_multiplication(A0) B0 = ice.to_cpub(A1.hex()) if B0.startswith("03"): A2 = ice.pubkey_to_address(0, 1, A1) message = "[+] {}".format(A2);messages = [];messages.append(message);output = ''.join(messages) + "\r";sys.stdout.write(output);sys.stdout.flush() return A0, A2 else: return None, None
def main(): target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so" num_cores = multiprocessing.cpu_count() with concurrent.futures.ProcessPoolExecutor(max_workers=num_cores) as executor: while True: futures = [executor.submit(generate_key) for _ in range(num_cores)] for future in concurrent.futures.as_completed(futures): A0, A2 = future.result() if A2 and target in A2: print("venga rata") with open("Win.txt", "a") as data: data.write(f"{A0} = {A2}\n") break
if __name__ == "__main__": main() You can imagine how this works on a 128 Core machine I use Python for testing or when speed is not required, C is better when it comes to speed, I am currently working on a method that allows you to find a key in bit30 in less than 10 seconds, really this part is not the curious one, the curious thing My script has a speed of 2048keys/s, how does it manage to find a key in that range in such a short time with that speed? There is a mathematical trick involved in it, I'm starting to write it in C, to focus on the puzzle 130, once I finish it, if this does not pose a security risk for bitcoin I will make it free. those scripts (both) don't work as expected on my side. I tested with puzzle 30, even with 15 which should be cracked in fractions of seconds. Puzzle 15address = 1QCbW9HWnwQWiQqVo5exhAnmfqKRrCRsvW start = 16384 end = 32768 Puzzle 30address = 1LHtnpd8nU5VHEMkG2TMYYNUjjLc992bps start = 536870912 end = 1073741824 no hit at all
|
_ _ _ __ _ _ _ __ |_) | / \ / |/ (_ / \ | \ / |_ |_) (_ |_) |_ \_/ \_ |\ __) \_/ |_ \/ |_ | \ __) --> citb0in Solo-Mining Group <--- low stake of only 0.001 BTC. We regularly rent about 5 PH/s hash power and direct it to SoloCK pool. Wanna know more? Read through the link and JOIN NOW
|
|
|
nomachine
Member
Offline
Activity: 274
Merit: 12
|
|
November 25, 2023, 09:13:44 AM Last edit: November 25, 2023, 10:27:32 PM by Mr. Big |
|
ok, delete the "while true:" and write "for i in range(1,20480):" Then tell me if your search is more effective.
This is not the way how random seed can be hacked. .
import secp256k1 as ice import random
print("scaning pub 03...")
target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
start= 50000000000000000000 end= 70000000000000000000 while True: A0 = random.randint(start, end) A1 = ice.scalar_multiplication(A0) B0 = ice.to_cpub(A1.hex()) if B0.startswith("03"): A2 = ice.pubkey_to_address(0,1, A1) print(A2) if target in A2: print("venga rata") data = open("Win.txt","a") data.write(str(A0)+" = "+A2+"\n") data.close()
Same script, but with concurrent.futures. import concurrent.futures import sys import os import time import secp256k1 as ice import random import multiprocessing
os.system("clear");t = time.ctime();sys.stdout.write(f"\033[?25l") sys.stdout.write(f"\033[01;33m[+] {t}\n")
def generate_key(): start = 36893488147419103231 end = 73786976294838206463 A0 = random.randint(start, end) A1 = ice.scalar_multiplication(A0) B0 = ice.to_cpub(A1.hex()) if B0.startswith("03"): A2 = ice.pubkey_to_address(0, 1, A1) message = "[+] {}".format(A2);messages = [];messages.append(message);output = ''.join(messages) + "\r";sys.stdout.write(output);sys.stdout.flush() return A0, A2 else: return None, None
def main(): target = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so" num_cores = multiprocessing.cpu_count() with concurrent.futures.ProcessPoolExecutor(max_workers=num_cores) as executor: while True: futures = [executor.submit(generate_key) for _ in range(num_cores)] for future in concurrent.futures.as_completed(futures): A0, A2 = future.result() if A2 and target in A2: print("venga rata") with open("Win.txt", "a") as data: data.write(f"{A0} = {A2}\n") break
if __name__ == "__main__": main() You can imagine how this works on a 128 Core machine I use Python for testing or when speed is not required, C is better when it comes to speed, I am currently working on a method that allows you to find a key in bit30 in less than 10 seconds, really this part is not the curious one, the curious thing My script has a speed of 2048keys/s, how does it manage to find a key in that range in such a short time with that speed? There is a mathematical trick involved in it, I'm starting to write it in C, to focus on the puzzle 130, once I finish it, if this does not pose a security risk for bitcoin I will make it free. those scripts (both) don't work as expected on my side. I tested with puzzle 30, even with 15 which should be cracked in fractions of seconds. Puzzle 15address = 1QCbW9HWnwQWiQqVo5exhAnmfqKRrCRsvW start = 16384 end = 32768 Puzzle 30address = 1LHtnpd8nU5VHEMkG2TMYYNUjjLc992bps start = 536870912 end = 1073741824 no hit at all You have to change if B0.startswith("03"): to if B0.startswith("02"): for Puzzle 15 It might get better
|
|
|
|
citb0in
|
|
November 25, 2023, 09:20:46 AM |
|
good catch
|
_ _ _ __ _ _ _ __ |_) | / \ / |/ (_ / \ | \ / |_ |_) (_ |_) |_ \_/ \_ |\ __) \_/ |_ \/ |_ | \ __) --> citb0in Solo-Mining Group <--- low stake of only 0.001 BTC. We regularly rent about 5 PH/s hash power and direct it to SoloCK pool. Wanna know more? Read through the link and JOIN NOW
|
|
|
Feron
Jr. Member
Offline
Activity: 42
Merit: 1
|
|
November 25, 2023, 09:51:37 AM Last edit: November 25, 2023, 10:05:25 AM by Feron |
|
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)
|
|
|
|
nomachine
Member
Offline
Activity: 274
Merit: 12
|
|
November 25, 2023, 10:08:36 AM Last edit: November 25, 2023, 12:51:11 PM by nomachine |
|
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
|
|
|
|
nomachine
Member
Offline
Activity: 274
Merit: 12
|
|
November 25, 2023, 12:53:49 PM Last edit: November 25, 2023, 01:19:15 PM by nomachine |
|
The only promising code I have seen in a long time is the one mc posted, searching for either 02, or 03 public keys, if it was 02, ignore and discard, if it was 03, generate rmd160 to compare. That's the half of key space.
You can combine that method together with seed search. Seed can be found even faster. There is NO limitation in terms of what can be added as an automation of this process. import time, random, sys, os, secp256k1 as ice puzzle = 65 target_h160 = "52e763a7ddc1aa4fa811578c491c1bc7fd570137" lower_range_limit = 2 ** (puzzle - 1);upper_range_limit = (2 ** puzzle) - 1 while True: constant_prefix = b'' prefix_length = len(constant_prefix);length = 9 #let's play with 9 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) A1 = ice.scalar_multiplication(dec) B0 = ice.to_cpub(A1.hex()) if B0.startswith("02"): #"02" for Puzzle 65 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() h160 = ice.privatekey_to_h160(0, True, dec).hex() if h160 == target_h160: HEX = "%064x" % dec;wifc = ice.btc_pvk_to_wif(HEX);t = time.ctime() print(f'[+] SOLVED: {t}') print(f'[+] Private key (wif) Compressed: {wifc}');print(f'[+] Random Seed: {random_bytes}') break
|
|
|
|
mcdouglasx
Member
Offline
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
|
|
November 25, 2023, 12:57:39 PM |
|
ok, delete the "while true:" and write "for i in range(1,20480):" Then tell me if your search is more effective.
This is not the way how random seed can be hacked. . is what I'm talking about, imagine finding publikeys in bit30 with less than 20480 keys scanned, conventional methods are no longer convenient due to the difficulty of the puzzle. It's time for new things.
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
nomachine
Member
Offline
Activity: 274
Merit: 12
|
|
November 25, 2023, 01:52:49 PM |
|
It's time for new things.
I'm here for it! Is this where I get my cape and superhero mask for the new adventure?
|
|
|
|
mcdouglasx
Member
Offline
Activity: 239
Merit: 53
New ideas will be criticized and then admired.
|
|
November 25, 2023, 02:05:30 PM |
|
The only promising code I have seen in a long time is the one mc posted, searching for either 02, or 03 public keys, if it was 02, ignore and discard, if it was 03, generate rmd160 to compare. That's the half of key space.
If we want to try our luck, we can add to this a function that only searches for even or odd numbers in the Pk + search for "02" or "03" and we would be dividing the area into 4. but it's lucky that you find the right combination
|
I'm not dead, long story... BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
nomachine
Member
Offline
Activity: 274
Merit: 12
|
|
November 25, 2023, 02:59:54 PM Last edit: November 25, 2023, 04:00:01 PM by nomachine |
|
The only promising code I have seen in a long time is the one mc posted, searching for either 02, or 03 public keys, if it was 02, ignore and discard, if it was 03, generate rmd160 to compare. That's the half of key space.
search for "02" or "03" and we would be dividing the area into 4. but it's lucky that you find the right combination I have that option in this script. You can change as you like: public_key_hex = ('02' and '03' if compressed else '04') + format(public_key[0], '064x') '02' and '03' together public_key_hex = ('02' or '03' if compressed else '04') + format(public_key[0], '064x') '02' or '03' / '03' or '02' public_key_hex = ('02' if compressed else '04') + format(public_key[0], '064x') only '02' public_key_hex = ('03' if compressed else '04') + format(public_key[0], '064x') only '03' No secp256k1 as ice, no ecdsa here.... Even encode base58 is custom with mpz. And it's not slower than iceland - it's the same... import hashlib, sys, os, time, random, gmpy2 from functools import lru_cache
# Constants as mpz Gx = gmpy2.mpz('0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798', 16) Gy = gmpy2.mpz('0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8', 16) p = gmpy2.mpz('0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F', 16) n = gmpy2.mpz('0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141', 16)
@lru_cache(maxsize=None) def private_key_to_public_key(private_key): Q = point_multiply(Gx, Gy, private_key, p) return Q
def point_multiply(x, y, k, p): result = (gmpy2.mpz(0), gmpy2.mpz(0)) addend = (x, y) while k > 0: if k & 1: result = point_add(result, addend, p) addend = point_double(addend, p) k >>= 1
return result
def point_double(point, p): x, y = point lmbda = (3 * x * x * gmpy2.powmod(2 * y, -1, p)) % p x3 = (lmbda * lmbda - 2 * x) % p y3 = (lmbda * (x - x3) - y) % p return x3, y3
def point_add(point1, point2, p): x1, y1 = point1 x2, y2 = point2
if point1 == (gmpy2.mpz(0), gmpy2.mpz(0)): return point2 if point2 == (gmpy2.mpz(0), gmpy2.mpz(0)): return point1
if point1 != point2: lmbda = ((y2 - y1) * gmpy2.powmod(x2 - x1, -1, p)) % p else: lmbda = ((3 * x1 * x1) * gmpy2.powmod(2 * y1, -1, p)) % p
x3 = (lmbda * lmbda - x1 - x2) % p y3 = (lmbda * (x1 - x3) - y1) % p return x3, y3
def encode_base58(byte_str): __b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' __b58base = len(__b58chars) long_value = gmpy2.mpz(int.from_bytes(byte_str, byteorder='big')) result = '' while long_value >= __b58base: div, mod = gmpy2.f_divmod(long_value, __b58base) result = __b58chars[int(mod)] + result long_value = div result = __b58chars[int(long_value)] + result
# Add leading '1's for zero bytes nPad = 0 for byte in byte_str: if byte == 0: nPad += 1 else: break
return __b58chars[0] * nPad + result
def public_key_to_hex(public_key, compressed=True): x_hex = format(public_key[0], '064x')[2:] # Remove '0x' prefix if compressed: return ('02' if public_key[1] % 2 == 0 else '03') + x_hex
def public_key_to_address(public_key, compressed=True): public_key_hex = ('02' and '03' if compressed else '04') + format(public_key[0], '064x') sha256_hash = hashlib.sha256(bytes.fromhex(public_key_hex)).digest() ripemd160_hash = hashlib.new('ripemd160', sha256_hash).digest() versioned_hash = (b'\x00' if compressed else b'\x04') + ripemd160_hash checksum = hashlib.sha256(hashlib.sha256(versioned_hash).digest()).digest()[:4] address_bytes = versioned_hash + checksum return encode_base58(address_bytes)
# Configuration for the puzzle puzzle = 30 add = '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) key = random.randint(lower_range_limit, upper_range_limit) public_key = private_key_to_public_key(key) bitcoin_address = public_key_to_address(public_key, compressed=True) public_key = public_key_to_hex(public_key) message = "[+] {}".format(key);messages = [];messages.append(message);output = ''.join(messages) + "\r";sys.stdout.write(output);sys.stdout.flush() if bitcoin_address == add: t = time.ctime() sys.stdout.write("\n") sys.stdout.write(f"\033[01;32m[+] SOLVED: {t}\n[+] Private Key (dec): {key}\n[+] Random Seed: {random_bytes}\033[0m\n") with open('KEYFOUNDKEYFOUND.txt', 'a') as file: file.write(f"Private Key (dec): {key}\nBitcoin Address (Compressed): {bitcoin_address}\nPublic Key: {public_key}\nRandom Seed: {random_bytes}\n\n") break - STARTED: Sat Nov 25 16:05:19 2023
- Puzzle: 30
- Lower range limit: 536870912
- Upper range limit: 1073741823
- 1033162084
- SOLVED: Sat Nov 25 16:05:21 2023
- Private Key (dec): 1033162084
|
|
|
|
|