Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
digaran
on 12/09/2023, 22:20:10 UTC
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 65553 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 65553 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?