Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Feron
on 11/01/2023, 14:02:18 UTC


It is slow compared to ICE secp256k1. Twice the speed...However, I am currently creating a script that will be Full ICE - to search for lost parts of the private key. About 2 million per second per CPU thread.. Grin




I would love to see your 2 mil/sec as I am stuck on 500k/s with ice. Would be interested to see which route you went.

Edit: 2 mil+... CPU dependent. But that is on a public key hunt. So for those who want to try their luck.... It's set for 120 bit key...I guess if you link enough machines with enough CPU's you may hit in a few hundred years.

Code:
import secp256k1 as ice
from timeit import default_timer as timer
import random
import multiprocessing

cores = 1
perRound = 1000000
bitRange = 120
target_Key = '02ceb6cbbcdbdf5ef7150682150f4ce2c6f4807b349827dcdbdd1f2efa885a2630'
   
def new_Number():
    doneSet = set()
    rotate = True
    with open("120-Nums.txt", "r+") as textfile: 
        for checking in textfile: doneSet.add(str(checking.replace("\n","").replace(",", "")))
        while rotate != False:
            number = round(random.randint(2**(bitRange-1),2**bitRange)/perRound)
            if str(number) not in doneSet:
                rotate = False
                textfile.write(str(number) + "\n")
            if str(number) in doneSet:
                print('Collision')
    textfile.close()
    return number

def seek(r,cores):
    startStart = timer()
    dog = False
    while dog != True:
        number = new_Number()
        p = (ice.scalar_multiplication(number*perRound))
        start = timer()
        check = str((ice.point_sequential_increment(perRound, p)).hex())
        if target_Key[5:25] in check:
            print('Success: ' + str(number))
            print('Test Run Time Length: ' + str((timer()-startStart))[:6])
            with open("results.txt", "a") as completed:
                completed.write(str(p) + '   ' + str(number))
            completed.close()
            dog = True
        else:
            print('Core: ' + str(r) + '   Key/s: ' + str(perRound/(timer()-start))[:10]  + '   Time: ' + str(timer()-start)[:6] + '   RandInt: ' + str(number))

if __name__ == '__main__':
    jobs = []
    for r in range(cores):
        p = multiprocessing.Process(target=seek, args=(r,cores))
        jobs.append(p)
        p.start()
I tried your code with fastrand but the speed is similar
Code:
from timeit import default_timer as timer
import secp256k1 as ice
import fastrand
#import random
perRound = 1000000
target_Key = '031a864bae3922f351f1b57cfdd827c25b7e093cb9c88a72c1cd893d9f90f44ece'
#donset = set()
#number = round(fastrand.pcg32bounded(134217727)/perRound)
dog = False
while dog != True:
 number = round(fastrand.pcg32bounded(134217727)/perRound)
 #if str(dog) in str(dog):
  #ke = ice.privatekey_loop_h160(0,0,True,number).hex()
 public = (ice.scalar_multiplication(number*perRound))
 checkk = str((ice.point_sequential_increment(perRound,public)).hex())
 start = timer()
 if target_Key[2:66] in checkk:
 #if "0c7aaf6caa7e5424b63d317f0f8f1f9fa40d5560" in (ke):
  f=open("result.txt","a")
  f.write(str(target_Key[2:66])+"-start number for key "+str(number)+"\n")
  #f.write(str(ke)+"-"+str(number)+"\n")
  f.close()
  #dog = True
 else:
  print('Key/s: ' + str(perRound/(timer()-start))[:7]  + '   Time: ' + str(timer()-start)[:3] + '   start number for key: ' + str(number))