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.
|
_______. ______ __ ______ ______ __ ___ .______ ______ ______ __ ______ .______ _______ / | / __ \ | | / __ \ / || |/ / | _ \ / __ \ / __ \ | | / __ \ | _ \ / _____| | (----`| | | | | | | | | | | ,----'| ' / | |_) | | | | | | | | | | | | | | | | |_) | | | __ \ \ | | | | | | | | | | | | | < | ___/ | | | | | | | | | | | | | | | / | | |_ | .----) | | `--' | | `----.| `--' | __| `----.| . \ | | | `--' | | `--' | | `----.__| `--' | | |\ \----.| |__| | |_______/ \______/ |_______| \______/ (__)\______||__|\__\ | _| \______/ \______/ |_______(__)\______/ | _| `._____| \______| | 2% fee anonymous solo bitcoin mining for all at https://solo.CKpool.org | No registration required, no payment schemes, no pool op wallets, no frills, no fuss. |
|
|
|
|
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
|
_______. ______ __ ______ ______ __ ___ .______ ______ ______ __ ______ .______ _______ / | / __ \ | | / __ \ / || |/ / | _ \ / __ \ / __ \ | | / __ \ | _ \ / _____| | (----`| | | | | | | | | | | ,----'| ' / | |_) | | | | | | | | | | | | | | | | |_) | | | __ \ \ | | | | | | | | | | | | | < | ___/ | | | | | | | | | | | | | | | / | | |_ | .----) | | `--' | | `----.| `--' | __| `----.| . \ | | | `--' | | `--' | | `----.__| `--' | | |\ \----.| |__| | |_______/ \______/ |_______| \______/ (__)\______||__|\__\ | _| \______/ \______/ |_______(__)\______/ | _| `._____| \______| | 2% fee anonymous solo bitcoin mining for all at https://solo.CKpool.org | No registration required, no payment schemes, no pool op wallets, no frills, no fuss. |
|
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
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: 899
🖤😏
|
|
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)
|
|
|
|
albert0bsd
|
|
September 12, 2023, 09:45:45 PM |
|
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) The maximum value of a Privatekey is the value that you pointed, what they actually want to said is that address is a reduction of the public key, it is a 160 bit hash, so if you are capable to fin a collision on a 160 bits hash, that mean that you are capable to find any collision, regarless that those private keys are up to 256 bits
|
I am available for hiring. Avatar and Signature available for rent. Donations: bc1qjyhcjacmpc9pg8wes82lktyrjcwk4sdvqtm7ky
|
|
|
digaran
Copper Member
Hero Member
Offline
Activity: 1330
Merit: 899
🖤😏
|
|
September 12, 2023, 10:20:10 PM Last edit: September 12, 2023, 11:12:17 PM by digaran |
|
from sympy import mod_inverse import secp256k1 as ice pub=ice.pub2upub('Here Compressed Public Key') N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
k=mod_inverse(2,N) neg1=ice.point_negation(ice.scalar_multiplication(1))
def ters(Qx,Scalar): ScalarBin = str(bin(Scalar))[2:] le=len(ScalarBin) for i in range (1,le+1): if ScalarBin[le-i] == "0": Qx=ice.point_multiplication(k,Qx) else: Qx=ice.point_addition(Qx,neg1) Qx=ice.point_multiplication(k,Qx) return ice.point_to_cpub(Qx)
for x in range(1,65536): f= (ters(pub,x)) data= open(“halfpub.txt”,”a”) data.write(f+”\n”) data.close() Note this is where you decide how many bits should be reduced for x in range(1,65536): For example reducing 26 bits requires 67108864 to be generated, 1 of them is the correct 26 bit reduced key. Will you release for public to use? Yes this is my code, I can write bit reduction code in another way if you want. If you want, you can reduce bits by subtraction. I'm developing a new algorithm for downgrading from a known bit range to the bit range I want. When I complete it by giving only 1 correct pubkey, I will share it here. @lordfrs, I was thinking, why do we need to keep all the 65556 keys if we are reducing 16 bits? One other thing, if we multiply one of the keys from the end of the output file by 65556 we should see our target, correct? I haven't thought about on how to calculate, since we are subtracting one dividing by 2, one result if multiplied by 2^16 should reach the target or close to target, so why not discarding 90% of the generated keys and start multiplying the remaining 10% by 2^16? Could you add such operation to your script? I guess if we could operate on private keys instead of public keys using your script, we could reach some results, ( as a test of course ) To test with scalar only, I use this script : from sympy import mod_inverse N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
def ters(scalar): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:] result = 2 for i in range(len(scalar_bin)): if scalar_bin[i] == '0': result = (result * k) % N else: result = ((result * k) % N + N - 1) % N return hex(result)[2:].zfill(64)
for x in range(1, 20): f = ters(x) print(f) It was a lucky shot at AI generated code and it worked.😅 Btw, the first "result" in the script above, represents your target, I couldn't risk the AI to mess one thing she has done right. So result = 2, replace 2 with your own scalar in decimal.
|
🖤😏
|
|
|
kalos15btc
Jr. Member
Offline
Activity: 50
Merit: 1
|
|
September 13, 2023, 09:53:17 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) OH, HIII, Good morning from sympy import mod_inverse import secp256k1 as ice pub=ice.pub2upub('Here Compressed Public Key') N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
k=mod_inverse(2,N) neg1=ice.point_negation(ice.scalar_multiplication(1))
def ters(Qx,Scalar): ScalarBin = str(bin(Scalar))[2:] le=len(ScalarBin) for i in range (1,le+1): if ScalarBin[le-i] == "0": Qx=ice.point_multiplication(k,Qx) else: Qx=ice.point_addition(Qx,neg1) Qx=ice.point_multiplication(k,Qx) return ice.point_to_cpub(Qx)
for x in range(1,65536): f= (ters(pub,x)) data= open(“halfpub.txt”,”a”) data.write(f+”\n”) data.close() Note this is where you decide how many bits should be reduced for x in range(1,65536): For example reducing 26 bits requires 67108864 to be generated, 1 of them is the correct 26 bit reduced key. Will you release for public to use? Yes this is my code, I can write bit reduction code in another way if you want. If you want, you can reduce bits by subtraction. I'm developing a new algorithm for downgrading from a known bit range to the bit range I want. When I complete it by giving only 1 correct pubkey, I will share it here. @lordfrs, I was thinking, why do we need to keep all the 65556 keys if we are reducing 16 bits? One other thing, if we multiply one of the keys from the end of the output file by 65556 we should see our target, correct? I haven't thought about on how to calculate, since we are subtracting one dividing by 2, one result if multiplied by 2^16 should reach the target or close to target, so why not discarding 90% of the generated keys and start multiplying the remaining 10% by 2^16? Could you add such operation to your script? I guess if we could operate on private keys instead of public keys using your script, we could reach some results, ( as a test of course ) To test with scalar only, I use this script : from sympy import mod_inverse N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
def ters(scalar): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:] result = 2 for i in range(len(scalar_bin)): if scalar_bin[i] == '0': result = (result * k) % N else: result = ((result * k) % N + N - 1) % N return hex(result)[2:].zfill(64)
for x in range(1, 20): f = ters(x) print(f) It was a lucky shot at AI generated code and it worked.😅 Btw, the first "result" in the script above, represents your target, I couldn't risk the AI to mess one thing she has done right. So result = 2, replace 2 with your own scalar in decimal. bro please stop replying with those comments copy past from chatgpt you are doing nothing except replying and talk too much, you are doing nothing for real men, stop it bro, thank you
|
|
|
|
albert0bsd
|
|
September 13, 2023, 11:24:16 PM Last edit: September 14, 2023, 05:04:05 AM by albert0bsd |
|
Personally i believe that this post just lost its purpose there is a lot of non-sense post or just some offtopic (Some moderator should close it) A lot of discutions if some slowly python code do this or that, if you have something substantial to contribute to that discussion, it would be best to start a new thread. In the field of the search of the solucion of this challenge there is no new algorithms or programs. We can resume the progress of the last year in the next. - Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4 - Puzzle/challenge 120 solve by unknown on 2023-02-27 and the private key remains unknown. - Puzzle/challenge 125 solve by unknown on 2023-07-09 and the private key remains unknown. And there is not clue of who solve those and what hardware they use, the wallet 3Emiwzxme7Mrj4d89uqohXNncnRM15YESs is still untouch Next challenges to be solve are 66 bits with just brute force/pool and puzzle 130 with kangaroo/pool Best idea to solve puzzle 66 proposed on this thread is giving less priotiry to some repeated patterns. (But the expected time that the user give was ridiculus) And thats all.
|
I am available for hiring. Avatar and Signature available for rent. Donations: bc1qjyhcjacmpc9pg8wes82lktyrjcwk4sdvqtm7ky
|
|
|
GR Sasa
Member
Offline
Activity: 194
Merit: 14
|
|
September 14, 2023, 08:37:21 AM Last edit: September 14, 2023, 09:32:52 AM by GR Sasa |
|
Just for more info:
The owner of "3Emiwzxme7Mrj4d89uqohXNncnRM15YESs" will cashout his coins when he finishes targeting other puzzles.
In the meantime, he's aiming for #130 right now, and probably after he solves it in the next months, he will cashout all his coins at once. (Unless he deceides again to go on for #135).
EDIT: Hello Satoshi, maybe you could motivate us by increasing the prize by 10x times again? We would be greatful. We know that you have the ability to do it, but we need your Motivation so programmers can wake up and continute their work.
Thank you, your friend GR Sasa
|
|
|
|
Kamoheapohea
Jr. Member
Offline
Activity: 46
Merit: 12
gmaxwell creator of 1000 BTC puzzl + Pinapple fund
|
|
September 14, 2023, 10:41:22 AM |
|
Just for more info:
The owner of "3Emiwzxme7Mrj4d89uqohXNncnRM15YESs" will cashout his coins when he finishes targeting other puzzles.
In the meantime, he's aiming for #130 right now, and probably after he solves it in the next months, he will cashout all his coins at once. (Unless he deceides again to go on for #135).
EDIT: Hello Satoshi, maybe you could motivate us by increasing the prize by 10x times again? We would be greatful. We know that you have the ability to do it, but we need your Motivation so programmers can wake up and continute their work.
Thank you, your friend GR Sasa
There is already more than enough motivation. I think he should withdraw all the remaining funds. He knows the practical limits now. There will be no suprises.
|
gmaxwell is the creator of the 1000 BTC puzzle gmaxwell is the creator of the Pineapple Fund
|
|
|
Dexed
Newbie
Offline
Activity: 16
Merit: 0
|
|
September 14, 2023, 12:33:50 PM |
|
- Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4
If the solver is unknown, where is this private key came from?
|
|
|
|
_Counselor
Member
Offline
Activity: 109
Merit: 61
|
|
September 14, 2023, 12:41:58 PM Merited by albert0bsd (1) |
|
- Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4
If the solver is unknown, where is this private key came from? When the solver move reward from 64 puzzle, it public key has been revealed; after that, finding a key in such a small range is trivial.
|
|
|
|
MisterZz
Newbie
Offline
Activity: 11
Merit: 1
|
|
September 14, 2023, 07:55:38 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) OH, HIII, Good morning from sympy import mod_inverse import secp256k1 as ice pub=ice.pub2upub('Here Compressed Public Key') N=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
k=mod_inverse(2,N) neg1=ice.point_negation(ice.scalar_multiplication(1))
def ters(Qx,Scalar): ScalarBin = str(bin(Scalar))[2:] le=len(ScalarBin) for i in range (1,le+1): if ScalarBin[le-i] == "0": Qx=ice.point_multiplication(k,Qx) else: Qx=ice.point_addition(Qx,neg1) Qx=ice.point_multiplication(k,Qx) return ice.point_to_cpub(Qx)
for x in range(1,65536): f= (ters(pub,x)) data= open(“halfpub.txt”,”a”) data.write(f+”\n”) data.close() Note this is where you decide how many bits should be reduced for x in range(1,65536): For example reducing 26 bits requires 67108864 to be generated, 1 of them is the correct 26 bit reduced key. Will you release for public to use? Yes this is my code, I can write bit reduction code in another way if you want. If you want, you can reduce bits by subtraction. I'm developing a new algorithm for downgrading from a known bit range to the bit range I want. When I complete it by giving only 1 correct pubkey, I will share it here. @lordfrs, I was thinking, why do we need to keep all the 65556 keys if we are reducing 16 bits? One other thing, if we multiply one of the keys from the end of the output file by 65556 we should see our target, correct? I haven't thought about on how to calculate, since we are subtracting one dividing by 2, one result if multiplied by 2^16 should reach the target or close to target, so why not discarding 90% of the generated keys and start multiplying the remaining 10% by 2^16? Could you add such operation to your script? I guess if we could operate on private keys instead of public keys using your script, we could reach some results, ( as a test of course ) To test with scalar only, I use this script : from sympy import mod_inverse N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141
def ters(scalar): k = mod_inverse(2, N) scalar_bin = bin(scalar)[2:
bro please stop replying with those comments copy past from chatgpt you are doing nothing except replying and talk too much, you are doing nothing for real men, stop it bro, :) thank you [/quote]
He is learning maths and programming, so I think is not a waste of time.. Hello to everyone
|
|
|
|
nomachine
Member
Offline
Activity: 476
Merit: 35
|
|
September 15, 2023, 07:01:29 AM |
|
Personally i believe that this post just lost its purpose there is a lot of non-sense post or just some offtopic (Some moderator should close it)
A lot of discutions if some slowly python code do this or that, if you have something substantial to contribute to that discussion, it would be best to start a new thread.
I think that you're right. That the further story is pointless. Regarding the speed of python programs. All are fast enough if someone knows the approximate range and public key.
|
bc1qdwnxr7s08xwelpjy3cc52rrxg63xsmagv50fa8
|
|
|
Kostelooscoin
Member
Offline
Activity: 206
Merit: 16
|
|
September 15, 2023, 11:17:57 AM |
|
Hello, I would like to know if it is possible to divide 2 public keys between them. ex: 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 / 02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5 with "secp256k1 as ice" or even something else?
|
|
|
|
mcdouglasx
Member
Offline
Activity: 348
Merit: 89
New ideas will be criticized and then admired.
|
|
September 15, 2023, 12:52:57 PM |
|
Personally i believe that this post just lost its purpose there is a lot of non-sense post or just some offtopic (Some moderator should close it) A lot of discutions if some slowly python code do this or that, if you have something substantial to contribute to that discussion, it would be best to start a new thread. In the field of the search of the solucion of this challenge there is no new algorithms or programs. We can resume the progress of the last year in the next. - Puzzle/challenge 64 solve by Unknown a year ago 2022-09-09 privatekey f7051f27b09112d4 - Puzzle/challenge 120 solve by unknown on 2023-02-27 and the private key remains unknown. - Puzzle/challenge 125 solve by unknown on 2023-07-09 and the private key remains unknown. And there is not clue of who solve those and what hardware they use, the wallet 3Emiwzxme7Mrj4d89uqohXNncnRM15YESs is still untouch Next challenges to be solve are 66 bits with just brute force/pool and puzzle 130 with kangaroo/pool Best idea to solve puzzle 66 proposed on this thread is giving less priotiry to some repeated patterns. (But the expected time that the user give was ridiculus) And thats all. I really don't share anything you say, if this post is deleted then there would only be more information scattered everywhere, according to what you say about python, you are right, it is slower than C, but it is excellent, even better than C for testing. of new ideas, the fact that you think that there are no new things is simply the result of your own mental fatigue, innovative ideas will always continue to exist, and yes, there is spam, I can't deny it, but on what website? there is no spam?
|
BTC bc1qxs47ttydl8tmdv8vtygp7dy76lvayz3r6rdahu
|
|
|
|