_Counselor
Member

Offline
Activity: 111
Merit: 61
|
 |
September 09, 2023, 12:19:38 PM |
|
Kangaroo can find a key in any range, regardless of its size. Even if you specify the wrong range, kangaroo will still find the key, but it will take much longer.
JLP's kangaroo implementation does have a problem with small ranges because by default there are too many kangaroos in a small range. You can adjust CPU/GPU group size to fix it, search with cpu only, or search with less threads/grid size.
Regarding searching for multiple keys, the kangaroo algorithm only works with one key at a time, so such a search is only possible sequentially. If it were possible to search for several keys simultaneously without loss of speed, then the puzzle's addresses with revealed public keys would have been solved long ago.
|
|
|
|
bestie1549
Jr. Member
Offline
Activity: 75
Merit: 5
|
 |
September 09, 2023, 12:51:24 PM |
|
Kangaroo can find a key in any range, regardless of its size. Even if you specify the wrong range, kangaroo will still find the key, but it will take much longer.
JLP's kangaroo implementation does have a problem with small ranges because by default there are too many kangaroos in a small range. You can adjust CPU/GPU group size to fix it, search with cpu only, or search with less threads/grid size.
Regarding searching for multiple keys, the kangaroo algorithm only works with one key at a time, so such a search is only possible sequentially. If it were possible to search for several keys simultaneously without loss of speed, then the puzzle's addresses with revealed public keys would have been solved long ago.
so the problem still lies in choice we have none to make but to keep trying we are all victims of causality let's give the solver of 120 and 125 some more time, they'll solve all the puzzles with the exposed public keys before anyone is able to solve puzzle 66 even the solo pool is only 3% gone from the search range despite the fact that we scan in bit ranges randomly the truth is the only way to go is the puzzles with the public keys and so much investment to go all in and if anyone could stack up 100,000 4090s in a single machine which I don't think is possible. then the search would take approximately 20.5 hrs using KeyHunt Cuda (36893488147419103232/100000/5000000000/86400) but if you do the maths towards how much renting 100,000 4090s would turn out to be $830,000 (20.5*0.4*100000) using a standard rate of $0.4/hr for a single 4090. let's just imagine that the key would definitely not be at the last part so we can say 50/50 chance of getting it sooner before the last part which still leaves us with an investment of $415,000 now the target is how much again? How much profit would you be making? It's practically impossible to invest any amount of capital in the search for puzzles without the exposed pubkeys while still expecting to make any profit and mind you "even if you have the private key for the rmd160 that has exactly 39 characters as that of the puzzle 66" for example "20d45a6a762535700ce9e0b216e31994335db8a4" and you thinking searching that range would get you closer to the range of puzzle 66 then you definitely don't understand how sha256 and ripemd160 works
|
|
|
|
mcdouglasx
|
 |
September 09, 2023, 12:53:49 PM Last edit: September 09, 2023, 01:04:38 PM by mcdouglasx |
|
So after some research, I have found a new and yet useless solution, is there a script which could divide a point by a set range?
Like dividing target public key by 1000, 999, 998, 997 etc, we select start and end range for division and it should divide the target as many times as we specify.
For educational purposes only.😉
I did it like this by only changing the divisor because a sequential division doesn't make sense because it would end in a long float. import bitcoin import secp256k1 as ice
print("Generating Div-Range...")
target= "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852"
print("Target:",target)
Start_Range= 1000
end_Range= 2000
for i in range(Start_Range, end_Range+1):
Div = bitcoin.divide(target, i) data = open("Div-Range.txt","a") data.write(str(Div) +"\n") data.close()
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 09, 2023, 04:56:07 PM Last edit: September 09, 2023, 05:09:56 PM by digaran |
|
So after some research, I have found a new and yet useless solution, is there a script which could divide a point by a set range?
Like dividing target public key by 1000, 999, 998, 997 etc, we select start and end range for division and it should divide the target as many times as we specify.
For educational purposes only.😉
I did it like this by only changing the divisor because a sequential division doesn't make sense because it would end in a long float. import bitcoin import secp256k1 as ice
print("Generating Div-Range...")
target= "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852"
print("Target:",target)
Start_Range= 1000
end_Range= 2000
for i in range(Start_Range, end_Range+1):
Div = bitcoin.divide(target, i) data = open("Div-Range.txt","a") data.write(str(Div) +"\n") data.close() I don't know what a long float is, but if I do the division the way I described, I might find new tricks. Anyways thanks for the code, I hope it works as intended, if it doesn't, there is an idiot AI which can help. 😉 Just to share something I found out, so if you for example divide a point by 35, and then add 1 G to your point and divide the +1 of your point by 35, what do you think will happen? Well the results of both divisions will have a distance equal of n/35, so if you after dividing p/35, start adding n/35 to your result, for each addition you'd get the result of +1p/35, add n/35 twice, you'd get +2p/35. Any point on the curve, no matter what the private key is acts like "1" in real numbers, for instance, if you add 9 to your p and then divide by 5, to get the correct result you'd need to add 9/5 to your result to have the correct key. ( of course if after adding 9 to p, your k ends with 5, then dividing by 5 adding 9/5 won't give you the right key, that's how you can determine what the last digit of your k is. Ps, about the division method, dividing a key by 1000 and then dividing it by 999, what do you think will happen? In EC, both results of both divisions will have a distance equal to "1". Just to show what I mean : 500/260 = 1.9>>>2<<<30769230769230769230769230769230769230769230769230769230769230769230769231 500/259 = 1.9>>>3<<<05019305019305019305019305019305019305019305019305019305019305019305019305 Note 2 and 3 pointed out with >>><<<, in EC that 2 turning to 3 will only add 1 to your result.
|
🖤😏
|
|
|
_Counselor
Member

Offline
Activity: 111
Merit: 61
|
 |
September 09, 2023, 05:23:08 PM |
|
Just to share something I found out, so if you for example divide a point by 35, and then add 1 G to your point and divide the +1 of your point by 35, what do you think will happen? Well the results of both divisions will have a distance equal of n/35, so if you after dividing p/35, start adding n/35 to your result, for each addition you'd get the result of +1p/35, add n/35 twice, you'd get +2p/35.
Do not fix on EC points, elliptic curve is just "graphical" interpretation of a numbers, all maths behind it works at finite field and obey all laws of "real" numbers math. If you divide any "real" number by 35, then divide number+1 by 35, then difference between results will be 1/35. This is also works in finite fields and for EC points. of course if after adding 9 to p, your k ends with 5, then dividing by 5 adding 9/5 won't give you the right key, that's how you can determine what the last digit of your k is.
This is not true, for example - 26/5 = 5,2; 35/5 = 7; 9/5 = 1,8. 26/5+9/5 = 5,2+1,8 = 7 = 35/5 you can also check this with EC points like: p95 = curve.fromPrivate(9).div(5) p265 = curve.fromPrivate(26).div(5) p355 = curve.fromPrivate(35).div(5) print(p265, p355) print(p265.add(p95))
output: 03F18D7188F16C93BB251A68DE95A057E02356BA0602854041BA4E170676E54169 025CBDF0646E5DB4EAA398F365F2EA7A0E3D419B7E0330E39CE92BDDEDCAC4F9BC 025CBDF0646E5DB4EAA398F365F2EA7A0E3D419B7E0330E39CE92BDDEDCAC4F9BC
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 09, 2023, 06:17:16 PM |
|
Just to share something I found out, so if you for example divide a point by 35, and then add 1 G to your point and divide the +1 of your point by 35, what do you think will happen? Well the results of both divisions will have a distance equal of n/35, so if you after dividing p/35, start adding n/35 to your result, for each addition you'd get the result of +1p/35, add n/35 twice, you'd get +2p/35.
Do not fix on EC points, elliptic curve is just "graphical" interpretation of a numbers, all maths behind it works at finite field and obey all laws of "real" numbers math. If you divide any "real" number by 35, then divide number+1 by 35, then difference between results will be 1/35. This is also works in finite fields and for EC points. of course if after adding 9 to p, your k ends with 5, then dividing by 5 adding 9/5 won't give you the right key, that's how you can determine what the last digit of your k is.
This is not true, for example - 26/5 = 5,2; 35/5 = 7; 9/5 = 1,8. 26/5+9/5 = 5,2+1,8 = 7 = 35/5 you can also check this with EC points like: p95 = curve.fromPrivate(9).div(5) p265 = curve.fromPrivate(26).div(5) p355 = curve.fromPrivate(35).div(5) print(p265, p355) print(p265.add(p95))
output: 03F18D7188F16C93BB251A68DE95A057E02356BA0602854041BA4E170676E54169 025CBDF0646E5DB4EAA398F365F2EA7A0E3D419B7E0330E39CE92BDDEDCAC4F9BC 025CBDF0646E5DB4EAA398F365F2EA7A0E3D419B7E0330E39CE92BDDEDCAC4F9BC
Ok, but did I say otherwise? If we add 9 to 26 we get 35, dividing 35/5 = 7 + 9/5 = 8.8, and 8.8 is the wrong answer. As I said if our k ends with 5, adding 9/5 to result returns wrong key. And of course that when we are working with secp256k1, we are dealing with a prime and mod n. Ps, I am really uneducated totally, I just share my experience, please nobody take my posts as if I am arrogant, I am 0.00000001 while everyone here is beyond 100.🙂
|
🖤😏
|
|
|
nomachine
Member

Offline
Activity: 511
Merit: 38
|
 |
September 09, 2023, 06:30:46 PM |
|
Ps, I am really uneducated totally, I just share my experience, please nobody take my posts as if I am arrogant, I am 0.00000001 while everyone here is beyond 100.🙂
Problem is people are so consumed by media these days that their dopamine receptors are completely fried.. therefore have no patience or joy. They need to go outside and touch some grass. Sleep on it. And then come back down to reality. 
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
mcdouglasx
|
 |
September 09, 2023, 08:27:25 PM |
|
So after some research, I have found a new and yet useless solution, is there a script which could divide a point by a set range?
Like dividing target public key by 1000, 999, 998, 997 etc, we select start and end range for division and it should divide the target as many times as we specify.
For educational purposes only.😉
I did it like this by only changing the divisor because a sequential division doesn't make sense because it would end in a long float. import bitcoin import secp256k1 as ice
print("Generating Div-Range...")
target= "03633cbe3ec02b9401c5effa144c5b4d22f87940259634858fc7e59b1c09937852"
print("Target:",target)
Start_Range= 1000
end_Range= 2000
for i in range(Start_Range, end_Range+1):
Div = bitcoin.divide(target, i) data = open("Div-Range.txt","a") data.write(str(Div) +"\n") data.close() I don't know what a long float is, but if I do the division the way I described, I might find new tricks. Anyways thanks for the code, I hope it works as intended, if it doesn't, there is an idiot AI which can help. 😉 Just to share something I found out, so if you for example divide a point by 35, and then add 1 G to your point and divide the +1 of your point by 35, what do you think will happen? Well the results of both divisions will have a distance equal of n/35, so if you after dividing p/35, start adding n/35 to your result, for each addition you'd get the result of +1p/35, add n/35 twice, you'd get +2p/35. Any point on the curve, no matter what the private key is acts like "1" in real numbers, for instance, if you add 9 to your p and then divide by 5, to get the correct result you'd need to add 9/5 to your result to have the correct key. ( of course if after adding 9 to p, your k ends with 5, then dividing by 5 adding 9/5 won't give you the right key, that's how you can determine what the last digit of your k is. Ps, about the division method, dividing a key by 1000 and then dividing it by 999, what do you think will happen? In EC, both results of both divisions will have a distance equal to "1". Just to show what I mean : 500/260 = 1.9>>>2<<<30769230769230769230769230769230769230769230769230769230769230769230769231 500/259 = 1.9>>>3<<<05019305019305019305019305019305019305019305019305019305019305019305019305 Note 2 and 3 pointed out with >>><<<, in EC that 2 turning to 3 will only add 1 to your result. take ecc as numbers, if in numbers 3/2 = 1.5 then on the curve it will be the same. Therefore I recommend doing your theory in numbers, and then you transfer that to ecc. For example: This script always gives you 3 results, one of which is always an integer. target= 100 N = 3
A = target / N B = (target + 1) / N
C = target - (A + B)
print("pk:",target) print("A:",A) print("B:",B) print("C:",str(C)+"\n") After you have the idea, you materialize it in ECC import bitcoin import secp256k1 as ice
print("creating div....")
# target pubkey Compressed target ="02ed3bace23c5e17652e174c835fb72bf53ee306b3406a26890221b4cef7500f88"
N = 3
A_r = bitcoin.divide(target, N)# target / N t_0 = ice.pub2upub(target) T_1 = ice.point_sequential_increment(1, t_0).hex() T_2 = ice.to_cpub(T_1)
B_r = bitcoin.divide(T_2, N)#(target + 1) / N
B_0 = ice.pub2upub(A_r) B_1 = ice.pub2upub(B_r) B_2 = ice.point_addition(B_0, B_1) B_3 = B_2.hex() C_0 = ice.point_subtraction(t_0 , B_2) #target - (A + B) C_1 = C_0.hex() C_r = ice.to_cpub(C_1)
A= str(A_r) B= str(B_r) C= str(C_r) print("target:", target+"\n") print("A:",A) print("B:",B) print("C:",C+"\n")
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 10, 2023, 12:00:20 AM |
|
import bitcoin import secp256k1 as ice
print("creating div....")
# target pubkey Compressed target ="02ed3bace23c5e17652e174c835fb72bf53ee306b3406a26890221b4cef7500f88"
N = 3
A_r = bitcoin.divide(target, N)# target / N t_0 = ice.pub2upub(target) T_1 = ice.point_sequential_increment(1, t_0).hex() T_2 = ice.to_cpub(T_1)
B_r = bitcoin.divide(T_2, N)#(target + 1) / N
B_0 = ice.pub2upub(A_r) B_1 = ice.pub2upub(B_r) B_2 = ice.point_addition(B_0, B_1) B_3 = B_2.hex() C_0 = ice.point_subtraction(t_0 , B_2) #target - (A + B) C_1 = C_0.hex() C_r = ice.to_cpub(C_1)
A= str(A_r) B= str(B_r) C= str(C_r) print("target:", target+"\n") print("A:",A) print("B:",B) print("C:",C+"\n") Alright, as I was in the middle of the night on the roof looking at orion and ursa major ( I think ), since I couldn't find any green grass to touch for no apparent reason, lol. I thought it's best to use my phone to run scripts, so I downloaded Py 3 installed secp256k1 lib and ran your script, but it says no attribute for pub2upub in secp256k1, but here is another thing, start exec(open(mainpyfile).read(), __main__.__dict__) File "<string>", line 17 ^ SyntaxError: invalid non-printable character U+00A0 [Program finished] I will find a fix, just wanted to thank you for the time you spend responding.
|
🖤😏
|
|
|
mcdouglasx
|
 |
September 10, 2023, 02:38:16 PM |
|
import bitcoin import secp256k1 as ice
print("creating div....")
# target pubkey Compressed target ="02ed3bace23c5e17652e174c835fb72bf53ee306b3406a26890221b4cef7500f88"
N = 3
A_r = bitcoin.divide(target, N)# target / N t_0 = ice.pub2upub(target) T_1 = ice.point_sequential_increment(1, t_0).hex() T_2 = ice.to_cpub(T_1)
B_r = bitcoin.divide(T_2, N)#(target + 1) / N
B_0 = ice.pub2upub(A_r) B_1 = ice.pub2upub(B_r) B_2 = ice.point_addition(B_0, B_1) B_3 = B_2.hex() C_0 = ice.point_subtraction(t_0 , B_2) #target - (A + B) C_1 = C_0.hex() C_r = ice.to_cpub(C_1)
A= str(A_r) B= str(B_r) C= str(C_r) print("target:", target+"\n") print("A:",A) print("B:",B) print("C:",C+"\n") Alright, as I was in the middle of the night on the roof looking at orion and ursa major ( I think ), since I couldn't find any green grass to touch for no apparent reason, lol. I thought it's best to use my phone to run scripts, so I downloaded Py 3 installed secp256k1 lib and ran your script, but it says no attribute for pub2upub in secp256k1, but here is another thing, start exec(open(mainpyfile).read(), __main__.__dict__) File "<string>", line 17 ^ SyntaxError: invalid non-printable character U+00A0 [Program finished] I will find a fix, just wanted to thank you for the time you spend responding. Maybe you have not installed the Bitcoin module “pip install bitcoin”, or you did not place secp256k1.py and .dll in the directory where the script is.
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 11, 2023, 07:34:36 AM |
|
Can someone tell me why there is nothing in my output file even though the target is in the file this script is searching, it even says saved in matches.txt Here is the script import re
# List of target public keys target_public_keys = '0370e7c3d922008d9ccea410d560cd440a834a811a1ea74c2967637ca015a788a3'
# Regular expression pattern for matching public keys pattern = r"\b(" + "|".join(target_public_keys) + r")\b"
# Output file to log matches output_file = "matches.txt"
# List of files to search through files_to_search =[ "Finish-him-Jack-wins.txt"]
# Open the output file for writing with open(output_file, "w") as output: for filename in files_to_search: with open(filename, "r") as file: content = file.read() matches = re.findall(pattern, content) if matches: output.write(f"Matches found in {filename}:\n") for match in matches: output.write(match + "\n") output.write("\n")
print("Search completed. Matching public keys saved in", output_file) Appreciate any help.
|
🖤😏
|
|
|
citb0in
|
 |
September 11, 2023, 09:19:47 AM Last edit: September 11, 2023, 02:11:19 PM by citb0in |
|
import re
# List of target public keys target_public_keys = ['0370e7c3d922008d9ccea410d560cd440a834a811a1ea74c2967637ca015a788a3'] # as a list
# Regular expression pattern for matching public keys pattern = r"\b(" + "|".join(target_public_keys) + r")\b"
# Output file to log matches output_file = "matches.txt"
# List of files to search through files_to_search = ["Finish-him-Jack-wins.txt"]
# Open the output file for writing with open(output_file, "a") as output:
for filename in files_to_search: with open(filename, "r") as file: content = file.read() matches = re.findall(pattern, content) if matches: output.write(f"Matches found in {filename}:\n") for match in matches: output.write(match + "\n") output.write("\n")
print("Search completed. Matching public keys saved in", output_file)
|
_ _ _ __ _ _ _ __ |_) | / \ / |/ (_ / \ | \ / |_ |_) (_ |_) |_ \_/ \_ |\ __) \_/ |_ \/ |_ | \ __) --> 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
|
|
|
Denis_Hitov
Newbie
Offline
Activity: 49
Merit: 0
|
 |
September 11, 2023, 12:57:43 PM Last edit: September 11, 2023, 02:56:24 PM by Denis_Hitov |
|
import re
# List of target public keys target_public_keys = ['0370e7c3d922008d9ccea410d560cd440a834a811a1ea74c2967637ca015a788a3'] # as a list
# Regular expression pattern for matching public keys pattern = r"\b(" + "|".join(target_public_keys) + r")\b"
# Output file to log matches output_file = "matches.txt"
# List of files to search through files_to_search = ["Finish-him-Jack-wins.tx"]
# Open the output file for writing with open(output_file, "[b]a[/b]") as output:
for filename in files_to_search: with open(filename, "r") as file: content = file.read() matches = re.findall(pattern, content) if matches: output.write(f"Matches found in {filename}:\n") for match in matches: output.write(match + "\n") output.write("\n")
print("Search completed. Matching public keys saved in", output_file)
Error!!!  with open(output_file, "[b]a[/b]") as output: ValueError: invalid mode: '[b]a[/b]'
|
|
|
|
citb0in
|
 |
September 11, 2023, 02:10:46 PM |
|
LoL  I emphasized (bold) the letter a but the code block did mess it up. But those are small ones, just think about it and correct it yourself.
|
_ _ _ __ _ _ _ __ |_) | / \ / |/ (_ / \ | \ / |_ |_) (_ |_) |_ \_/ \_ |\ __) \_/ |_ \/ |_ | \ __) --> 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
|
|
|
Denis_Hitov
Newbie
Offline
Activity: 49
Merit: 0
|
 |
September 11, 2023, 02:16:42 PM Last edit: September 11, 2023, 08:14:24 PM by Denis_Hitov |
|
Can someone tell me why there is nothing in my output file even though the target is in the file this script is searching, it even says saved in matches.txt Here is the script import re
# List of target public keys target_public_keys = '0370e7c3d922008d9ccea410d560cd440a834a811a1ea74c2967637ca015a788a3'
# Regular expression pattern for matching public keys pattern = r"\b(" + "|".join(target_public_keys) + r")\b"
# Output file to log matches output_file = "matches.txt"
# List of files to search through files_to_search =[ "Finish-him-Jack-wins.txt"]
# Open the output file for writing with open(output_file, "w") as output: for filename in files_to_search: with open(filename, "r") as file: content = file.read() matches = re.findall(pattern, content) if matches: output.write(f"Matches found in {filename}:\n") for match in matches: output.write(match + "\n") output.write("\n")
print("Search completed. Matching public keys saved in", output_file) Appreciate any help. with open(output_file, "w") as output: instead of " w" put " a" P.S.: Tell me why you need this script? The pub can be found by regular file search)
|
|
|
|
citb0in
|
 |
September 11, 2023, 06:32:42 PM |
|
the w flag opens the file for writing and truncating; use "a" as write mode. This means append
|
_ _ _ __ _ _ _ __ |_) | / \ / |/ (_ / \ | \ / |_ |_) (_ |_) |_ \_/ \_ |\ __) \_/ |_ \/ |_ | \ __) --> 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
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 11, 2023, 09:14:13 PM |
|
So, after citb0in's typo, I went down a dangerous path by talking to an idiot AI for hours, I was about to jump off the roof head on, lol anyways I couldn't get this new script working after trying at least 50 versions, but the most complete one with no error was this one import multiprocessing
# Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = a self.b = b self.p = p
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = x self.y = y self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * pow(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * pow(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = int(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = pow(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = int.from_bytes(x_bytes, byteorder="big") y = int.from_bytes(y_bytes, byteorder="big")
return Point(x, y, curve)
def to_hex(self, compressed=True): if compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(None, None, curve)
# Define the ec_operations function def ec_operations(i, target_1, target_2): P = EllipticCurve(0, 7, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) G = Point(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8, P)
div_1 = Point.from_hex(target_1, P) div_2 = Point.from_hex(target_2, P) scalar_1 = i scalar_2 = 2 * i result_1 = div_2 * scalar_1 result_2 = div_2 * scalar_2 sub_result = result_2 - div_1
# Write the results to separate files with open(f"target_1_result.txt", "a") as file_1, open(f"target_2_result.txt", "a") as file_2, open(f"sub_result.txt", "a") as file_3: if i > 1: file_1.write(f"{result_1.to_hex(compressed=True)}\n") file_2.write(f"{result_2.to_hex(compressed=True)}\n") file_3.write(f"{sub_result.to_hex(compressed=True)}\n")
print(f"Completed calculation {i}")
if __name__ == "__main__": # Set the targets and range for EC operations target_1 = "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" target_2 = "02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5" start_range = 20 end_range = 40
# Define the range of values to calculate on with multiprocessing with multiprocessing.Pool() as pool: pool.starmap(ec_operations, [(i, target_1, target_2) for i in range(start_range, end_range + 1)])
print("Calculation completed. Results saved in separate files.")
This idiot just adds the points, doesn't divide/subtract. Basically we want to in mass generate divisions of 2 target keys and subtract the results from each other, like this : We divide both targets by a range, start:end, then subtract t1/5 from t2/5 to have a new key, this is to learn new things about the behaviour of the curve under different circumstances. If anyone could fix this code and run it with success, please do share it. Thanks.
|
🖤😏
|
|
|
Kostelooscoin
Member

Offline
Activity: 206
Merit: 16
|
 |
September 12, 2023, 02:12:43 PM |
|
So, after citb0in's typo, I went down a dangerous path by talking to an idiot AI for hours, I was about to jump off the roof head on, lol anyways I couldn't get this new script working after trying at least 50 versions, but the most complete one with no error was this one import multiprocessing
# Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = a self.b = b self.p = p
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = x self.y = y self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * pow(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * pow(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = int(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = pow(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = int.from_bytes(x_bytes, byteorder="big") y = int.from_bytes(y_bytes, byteorder="big")
return Point(x, y, curve)
def to_hex(self, compressed=True): if compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(None, None, curve)
# Define the ec_operations function def ec_operations(i, target_1, target_2): P = EllipticCurve(0, 7, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) G = Point(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8, P)
div_1 = Point.from_hex(target_1, P) div_2 = Point.from_hex(target_2, P) scalar_1 = i scalar_2 = 2 * i result_1 = div_2 * scalar_1 result_2 = div_2 * scalar_2 sub_result = result_2 - div_1
# Write the results to separate files with open(f"target_1_result.txt", "a") as file_1, open(f"target_2_result.txt", "a") as file_2, open(f"sub_result.txt", "a") as file_3: if i > 1: file_1.write(f"{result_1.to_hex(compressed=True)}\n") file_2.write(f"{result_2.to_hex(compressed=True)}\n") file_3.write(f"{sub_result.to_hex(compressed=True)}\n")
print(f"Completed calculation {i}")
if __name__ == "__main__": # Set the targets and range for EC operations target_1 = "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" target_2 = "02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5" start_range = 20 end_range = 40
# Define the range of values to calculate on with multiprocessing with multiprocessing.Pool() as pool: pool.starmap(ec_operations, [(i, target_1, target_2) for i in range(start_range, end_range + 1)])
print("Calculation completed. Results saved in separate files.")
This idiot just adds the points, doesn't divide/subtract. Basically we want to in mass generate divisions of 2 target keys and subtract the results from each other, like this : We divide both targets by a range, start:end, then subtract t1/5 from t2/5 to have a new key, this is to learn new things about the behaviour of the curve under different circumstances. If anyone could fix this code and run it with success, please do share it. Thanks. import multiprocessing
# Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = a self.b = b self.p = p
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = x self.y = y self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * pow(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * pow(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = int(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = pow(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = int.from_bytes(x_bytes, byteorder="big") y = int.from_bytes(y_bytes, byteorder="big")
return Point(x, y, curve)
def to_hex(self, compressed=True): if compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(None, None, curve)
# Define the ec_operations function def ec_operations(i, target_1, target_2, start_range, end_range): P = EllipticCurve(0, 7, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) G = Point(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8, P)
div_1 = Point.from_hex(target_1, P) div_2 = Point.from_hex(target_2, P) scalar_1 = i scalar_2 = 2 * i result_1 = div_2 * scalar_1 result_2 = div_2 * scalar_2 sub_result = result_1 - (div_1 * (scalar_1 // 5)) - (result_2 - (div_2 * (scalar_2 // 5)))
# Write the results to separate files with open(f"sub_result_{i}.txt", "a") as file: file.write(f"{sub_result.to_hex(compressed=True)}\n")
print(f"Completed calculation {i}")
if __name__ == "__main__": # Set the targets and range for EC operations target_1 = "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" target_2 = "02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5" start_range = 20 end_range = 40
# Define the range of values to calculate on with multiprocessing with multiprocessing.Pool() as pool: pool.starmap(ec_operations, [(i, target_1, target_2, start_range, end_range) for i in range(start_range, end_range + 1)])
print("Calculation completed. Results saved in separate files.")
|
|
|
|
digaran
Copper Member
Hero Member
   
Offline
Activity: 1330
Merit: 900
🖤😏
|
 |
September 12, 2023, 05:07:05 PM |
|
import multiprocessing
# Define the EllipticCurve class class EllipticCurve: def __init__(self, a, b, p): self.a = a self.b = b self.p = p
def contains(self, point): x, y = point.x, point.y return (y * y) % self.p == (x * x * x + self.a * x + self.b) % self.p
def __str__(self): return f"y^2 = x^3 + {self.a}x + {self.b} mod {self.p}"
# Define the Point class class Point: def __init__(self, x, y, curve): self.x = x self.y = y self.curve = curve
def __eq__(self, other): return self.x == other.x and self.y == other.y and self.curve == other.curve
def __ne__(self, other): return not self == other
def __add__(self, other): if self.curve != other.curve: raise ValueError("Cannot add points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
if self.x == other.x and self.y != other.y: return Point.infinity(self.curve)
p = self.curve.p s = 0 if self == other: s = ((3 * self.x * self.x + self.curve.a) * pow(2 * self.y, -1, p)) % p else: s = ((other.y - self.y) * pow(other.x - self.x, -1, p)) % p
x = (s * s - self.x - other.x) % p y = (s * (self.x - x) - self.y) % p
return Point(x, y, self.curve)
def __sub__(self, other): if self.curve != other.curve: raise ValueError("Cannot subtract points on different curves")
# Case when one point is zero if self == Point.infinity(self.curve): return other if other == Point.infinity(self.curve): return self
return self + Point(other.x, (-other.y) % self.curve.p, self.curve)
def __mul__(self, n): if not isinstance(n, int): raise ValueError("Multiplication is defined for integers only")
n = n % (self.curve.p - 1) res = Point.infinity(self.curve) addend = self
while n: if n & 1: res += addend
addend += addend n >>= 1
return res
def __str__(self): return f"({self.x}, {self.y}) on {self.curve}"
@staticmethod def from_hex(s, curve): if len(s) == 66 and s.startswith("02") or s.startswith("03"): compressed = True elif len(s) == 130 and s.startswith("04"): compressed = False else: raise ValueError("Hex string is not a valid compressed or uncompressed point")
if compressed: is_odd = s.startswith("03") x = int(s[2:], 16)
# Calculate y-coordinate from x and parity bit y_square = (x * x * x + curve.a * x + curve.b) % curve.p y = pow(y_square, (curve.p + 1) // 4, curve.p) if is_odd != (y & 1): y = -y % curve.p
return Point(x, y, curve) else: s_bytes = bytes.fromhex(s) uncompressed = s_bytes[0] == 4 if not uncompressed: raise ValueError("Only uncompressed or compressed points are supported")
num_bytes = len(s_bytes) // 2 x_bytes = s_bytes[1 : num_bytes + 1] y_bytes = s_bytes[num_bytes + 1 :]
x = int.from_bytes(x_bytes, byteorder="big") y = int.from_bytes(y_bytes, byteorder="big")
return Point(x, y, curve)
def to_hex(self, compressed=True): if compressed: prefix = "03" if self.y & 1 else "02" return prefix + hex(self.x)[2:].zfill(64) else: x_hex = hex(self.x)[2:].zfill(64) y_hex = hex(self.y)[2:].zfill(64) return "04" + x_hex + y_hex
@staticmethod def infinity(curve): return Point(None, None, curve)
# Define the ec_operations function def ec_operations(i, target_1, target_2, start_range, end_range): P = EllipticCurve(0, 7, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) G = Point(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8, P)
div_1 = Point.from_hex(target_1, P) div_2 = Point.from_hex(target_2, P) scalar_1 = i scalar_2 = 2 * i result_1 = div_2 * scalar_1 result_2 = div_2 * scalar_2 sub_result = result_1 - (div_1 * (scalar_1 // 5)) - (result_2 - (div_2 * (scalar_2 // 5)))
# Write the results to separate files with open(f"sub_result_{i}.txt", "a") as file: file.write(f"{sub_result.to_hex(compressed=True)}\n")
print(f"Completed calculation {i}")
if __name__ == "__main__": # Set the targets and range for EC operations target_1 = "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798" target_2 = "02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5" start_range = 20 end_range = 40
# Define the range of values to calculate on with multiprocessing with multiprocessing.Pool() as pool: pool.starmap(ec_operations, [(i, target_1, target_2, start_range, end_range) for i in range(start_range, end_range + 1)])
print("Calculation completed. Results saved in separate files.")
My man, I think I explained incorrectly, what we want is this : Example : T1 = 20 T2 = 40 Start range = 2 End range = 8 Divide t1 by 2 = 10 Divide t2 by 2 = 20 Subtract 10 from 20 = 10.
T1 20/3 = 6.666666667 T2 40/3 = 13.33333333 Subtract 6.666666667 from 13.33333333 = 6.666666663
T1 20/4 = 5 T2 40/4 = 10 Subtract 5 from 10 = 5 And so on, in my example 20 is half of 40, but in reality we can set any target we want, do you think you can modify the code to do that please? Thank you for your time and effort.
|
🖤😏
|
|
|
Dexed
Newbie
Offline
Activity: 16
Merit: 0
|
 |
September 12, 2023, 08:21:56 PM |
|
By the way, and you know why their puzzle addresses were removed from the 161st? My thought is that this is the limit of public addresses. That is the further search in the theory goes on a circle.
Because all the funds from 161 through 255 were redundant (Bitcoin addresses only use 160 bits) the author of the puzzle moved all the funds from the 160-255 ranged down into the 1-160 range. It is explained up thread. Is it? I thought it uses almost 256 bits (the last possible private key is FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140)
|
|
|
|
|