import ecdsa
from ecdsa import SECP256k1
from ecdsa.ellipticcurve import Point
import bitcoin
def point_halving(point):
""" Halving the provided point """
return point * 57896044618658097711785492504343953926418782139537452191302581570759080747169
def point_subtract(point, other, curve):
"""Subtract one point from another on the given elliptic curve."""
# Inverting the y-coordinate of 'other' point
inverse_y = (-other.y() % curve.p())
inverse_point = Point(curve, other.x(), inverse_y)
# Adding point to the inverse of the other point
return point + inverse_point
def get_first_point():
pubkey = bitcoi[Suspicious link removed]ivkey_to_pubkey(1)
return Point(SECP256k1.curve,
pubkey[0],
pubkey[1])
def get_infinity_point():
return Point(SECP256k1.curve,
None,
None)
def slope_at_point(point, a):
"""Calculate the slope at a given point on the elliptic curve."""
try:
slope = (3 * point.x()**2 + a) / (2 * point.y())
except ZeroDivisionError:
raise ValueError("Slope is undefined for y=0.")
return slope
def is_point_odd(P):
slope = (slope_at_point(P, SECP256k1.curve.a()))
if slope % 3 >= 1:
return "odd"
else:
return "even"
def get_private_key_from_public_point(point):
""" Extracts private key from a public key point, this method reverses Double and Add method by Subtract and Halve """
G = ecdsa.SECP256k1.generator
NEXT = point
BINARY_ORDER = ""
for i in range(0, 256):
if NEXT == get_first_point():
break
PSUB = point_subtract(NEXT, G, SECP256k1.curve)
SUBTRACT_AND_HALVE = point_halving(PSUB)
JUST_HALVE = point_halving(NEXT)
IPO = is_point_odd(NEXT)
if IPO == "odd":
BINARY_ORDER = BINARY_ORDER + "1"
NEXT = SUBTRACT_AND_HALVE
else:
BINARY_ORDER = BINARY_ORDER + "0"
NEXT = JUST_HALVE
return int(BINARY_ORDER, 2)
G = ecdsa.SECP256k1.generator
PK = 880564733841876926926749214863536422911
pubkey = bitcoi[Suspicious link removed]ivkey_to_pubkey(
PK)
Q = Point(SECP256k1.curve,
pubkey[0],
pubkey[1])
PKV = get_private_key_from_public_point(Q)
print(PKV)
assert PK == PKV
Find the real implementation of "is_point_odd" method, or check JUST_HALVE, when you halve the point, if JUST_HALVE is on the left side of the curve, this means NEXT is even. Find the way, and break the curve.
I'm done. I lost all my money, my job, my wife left me, and I lost all my years by being a slave to others for a living.
I'm planning to end my life.
My followers will continue work on this, but I want to make this code public.
This is the donation address, if one day anyone wants to support my scholars:
1XXXSTL5DrcyvBfF64riYvdchZjCF6Nt9