what are the parameters to put in place and what codes or tools would be required to achieve that goal mentioned above?
I'm not a code/tool expert, and I'm pretty sure all the existing ones lack something, I don't know maybe BSGS can do what I said.
If I had a perfect idea I could have used it myself, I only type what comes to my mind, whether it's possible or doable currently, I don't know. Hints is what I can provide the best.😉
Here is the code doing exactly what digaran explained earlier... I used on puzzle 125, chant it when someone else found it. I am not optimistic of it! you can have it if you've huge ram... it works on more more of a simple phenomenon rather then complex... In the script checkpoint.txt file has only public key x coordinates in decimal format. Why only x because, if you have public keys of private keys from 1 to 1 billion, they are actually two billion public keys, first billion from 1 to 1 billion and the last billion,, both billion have same x coordinate,, so kind of really big help there
... The script first loads the file checkpoints.txt. so in this file I kept 80 million public keys from 2 - 80000000. The file size was 5.88 GB, been running on 8 GB RAM system. Here is how script works with a simple example you can modify relevant figures in script as per your needs...
Suppose our public key has the private key of 87 (which we don't know obviously) we have checkpoints from 1-5 (which is really big if we compare 80 million with 125 puzzle key distance),, so what the script does it, is subtracts a set jump from pubkey and checks the resulting point within checkpoints, you can set your own jump.. suppose you want to set jump size as 20, here is how script works:
87-20=67 (not in checkpoints)
67-20=47 (not in checkpoints)
47-20=27(not in checkpoints)
27-20=7(not in checkpoints)
7-20=-13(not in checkpoints)
As you know the range you can set the step size to suite the range, in our case, it is suitable to have 5 steps if we choose its size as 20...
After finishing 5 stepts, the script subtracts 5 from 87 and saves the progress in j_value.txt file, after every iteration it changes the value in j_value.txt file. So if you shutdown or power goes off, next time script restarts from where it left...
After first iteration script subtract 10 from 87-10=77
(10 because you have first 5 and last 5)
next iteration is like
77-20=57 (not in checkpoints)
57-20=37 (not in checkpoints)
37-20=17(not in checkpoints)
17-20=-3(matched)
-3 is matching because its inverse point is 3 and both have same x coordinate...
If a match is found, the script save that point in results.txt file.
I forget to mention xy.txt file has the decimal x and y coordinate of puzzle pub key.
Here is whole script: Chill
Pcurve = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 -1 # The proven prime
N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 # Number of points in the field
Acurve = 0; Bcurve = 7 # These two defines the elliptic curve. y^2 = x^3 + Acurve * x + Bcurve
Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240
Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424
GPoint = (Gx,Gy) # This is our generator point. Trillions of dif ones possible
def modinv(a, n=Pcurve):
lm, hm = 1, 0
low, high = a % n, n
while low > 1:
ratio = high // low
nm, new = hm - lm * ratio, high - low * ratio
lm, low, hm, high = nm, new, lm, low
return lm % n
def ECadd(a, b):
if a == 'O':
return b
if b == 'O':
return a
if a == b:
LamAdd = ((3 * a[0] * a[0] + Acurve) * modinv(2 * a[1], Pcurve)) % Pcurve
else:
LamAdd = ((b[1] - a[1]) * modinv(b[0] - a[0], Pcurve)) % Pcurve
x = (LamAdd * LamAdd - a[0] - b[0]) % Pcurve
y = (LamAdd * (a[0] - x) - a[1]) % Pcurve
return (x, y)
def ECsub(a, b):
if b == 'O':
return a
if isinstance(a, str):
a = tuple(map(int, a.split()))
if isinstance(b, str):
b = tuple(map(int, b.split()))
neg_b = (b[0], -b[1] % Pcurve)
return ECadd(a, neg_b)
def ECmul(a, b):
result = 'O'
while b > 0:
if b % 2 == 1:
result = ECadd(result, a)
a = ECadd(a, a)
b = b // 2
return result
# Read the x, y coordinates from xy.txt
with open("xy.txt", "r") as f:
x, y = map(int, f.read().strip().split())
point = (x, y)
# Read the checkpoint x-coordinates from checkpoints.txt
with open("checkpoints.txt", "r") as f:
checkpoints = set(map(int, f.read().strip().split()))
filename_out = "results.txt"
sub_count = 0
# read the last value of j from file
try:
with open("j_value.txt", "r") as f:
last_j_value = int(f.readline())
except:
last_j_value = 0
# loop for multiplication factor 0, 2, 4, 6, 8, 10, 12, 14, .......
found_match = False
for j in range(last_j_value, 10000001):
if found_match:
break
sub_count = 160000000 * j
for k in range(100001): # loop for 1lac subtract iterations
if k == 0: # first iteration
pass
else:
sub_count += 212676479325586539664609129644855
result = ECmul(GPoint, sub_count)
result = ECsub(point, result)
print(sub_count)
if result[0] in checkpoints:
with open(filename_out, "w") as f_out:
subtractions = sub_count // 212676479325586539664609129644855
f_out.write("{} {} {}".format(result[0], result[1], subtractions))
found_match = True
break
# save the value of j to file after each iteration
with open("j_value.txt", "w") as f:
f.write(str(j))
7-20=-13(not in checkpoints)