Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
digaran
on 30/08/2023, 04:40:53 UTC

for compressed public keys
Code:
import secp256k1 as ice


target_public_key = "032f3342152eff6aca5e7314db6d3301a28d6a90ddcfd189f96babadc2a053d392"
target = ice.pub2upub(target_public_key)
num = 100 # number of times.
sustract= 1 #amount to subtract each time.
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(num, target, sustract_pub)
for t in range (num+1):
    h= (res[t*65:t*65+65]).hex()
    hc= ice.to_cpub(h)
    data = open("data-base.txt","a")
    data.write(str(hc)+"\n")
    data.close()


One last thing, how do I change the generator point in the script above? I even went to ice.secp256k1.py but didn't see x and y for G to change it, is there a way to include a new G in your script?
Thank you so much for teaching us new things.👍

Ps, I have learned that we could use inverse keys to do multiplication on a script which only divides, lol.