Bitcoin Forum
May 08, 2024, 05:16:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 [174] 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 ... 251 »
  Print  
Author Topic: Bitcoin puzzle transaction ~32 BTC prize to who solves it  (Read 186404 times)
citb0in
Hero Member
*****
Offline Offline

Activity: 672
Merit: 656


Bitcoin g33k


View Profile
September 11, 2023, 09:19:47 AM
Last edit: September 11, 2023, 02:11:19 PM by citb0in
 #3461

Code:
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)

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
1715145404
Hero Member
*
Offline Offline

Posts: 1715145404

View Profile Personal Message (Offline)

Ignore
1715145404
Reply with quote  #2

1715145404
Report to moderator
1715145404
Hero Member
*
Offline Offline

Posts: 1715145404

View Profile Personal Message (Offline)

Ignore
1715145404
Reply with quote  #2

1715145404
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715145404
Hero Member
*
Offline Offline

Posts: 1715145404

View Profile Personal Message (Offline)

Ignore
1715145404
Reply with quote  #2

1715145404
Report to moderator
Denis_Hitov
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
September 11, 2023, 12:57:43 PM
Last edit: September 11, 2023, 02:56:24 PM by Denis_Hitov
 #3462

Code:
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!!! Grin

Code:
 with open(output_file, "[b]a[/b]") as output:
ValueError: invalid mode: '[b]a[/b]'
citb0in
Hero Member
*****
Offline Offline

Activity: 672
Merit: 656


Bitcoin g33k


View Profile
September 11, 2023, 02:10:46 PM
 #3463

LoL  Grin 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.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Denis_Hitov
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
September 11, 2023, 02:16:42 PM
Last edit: September 11, 2023, 08:14:24 PM by Denis_Hitov
 #3464

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

Code:
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
Hero Member
*****
Offline Offline

Activity: 672
Merit: 656


Bitcoin g33k


View Profile
September 11, 2023, 06:32:42 PM
 #3465

the w flag opens the file for writing and truncating; use "a" as write mode. This means append

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
September 11, 2023, 09:14:13 PM
 #3466

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

Code:
  
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 Offline

Activity: 202
Merit: 16


View Profile
September 12, 2023, 02:12:43 PM
 #3467

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

Code:
  
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.

Code:
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 Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
September 12, 2023, 05:07:05 PM
 #3468


Code:
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 Offline

Activity: 16
Merit: 0


View Profile
September 12, 2023, 08:21:56 PM
 #3469

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
Hero Member
*****
Offline Offline

Activity: 856
Merit: 662



View Profile WWW
September 12, 2023, 09:45:45 PM
 #3470

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

digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
September 12, 2023, 10:20:10 PM
Last edit: September 12, 2023, 11:12:17 PM by digaran
 #3471

Code:
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 :

Code:
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 Offline

Activity: 50
Merit: 1


View Profile
September 13, 2023, 09:53:17 PM
 #3472

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

Code:
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 :

Code:
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, Smiley thank you
albert0bsd
Hero Member
*****
Offline Offline

Activity: 856
Merit: 662



View Profile WWW
September 13, 2023, 11:24:16 PM
Last edit: September 14, 2023, 05:04:05 AM by albert0bsd
Merited by citb0in (1)
 #3473

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 Huh

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.

GR Sasa
Member
**
Offline Offline

Activity: 177
Merit: 14


View Profile
September 14, 2023, 08:37:21 AM
Last edit: September 14, 2023, 09:32:52 AM by GR Sasa
 #3474

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
Newbie
*
Offline Offline

Activity: 29
Merit: 9


View Profile
September 14, 2023, 10:41:22 AM
 #3475

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.
Dexed
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
September 14, 2023, 12:33:50 PM
 #3476


- 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 Offline

Activity: 107
Merit: 61


View Profile
September 14, 2023, 12:41:58 PM
Merited by albert0bsd (1)
 #3477


- 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 Offline

Activity: 2
Merit: 1


View Profile
September 14, 2023, 07:55:38 PM
 #3478

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

Code:
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 :

Code:
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 Offline

Activity: 251
Merit: 12


View Profile
September 15, 2023, 07:01:29 AM
 #3479

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. Wink
Kostelooscoin
Member
**
Offline Offline

Activity: 202
Merit: 16


View Profile
September 15, 2023, 11:17:57 AM
 #3480

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?
Pages: « 1 ... 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 [174] 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 ... 251 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!