Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
nomachine
on 21/05/2024, 06:12:51 UTC


i have a simple alghoritm with cpu in python , you can test it


Code:

import bitcoin
import ecdsa



def private_key_to_public_key(private_key):
    sk = ecdsa.SigningKey.from_string(bytes.fromhex(private_key), curve=ecdsa.SECP256k1)
    vk = sk.get_verifying_key()
    compressed_public_key = vk.to_string("compressed").hex()
    return compressed_public_key



        bitcoin_address = bitcoin.pubtoaddr(public_key)


Why do you use bitcoin and ecdsa imports ?
It's a waste of time how slow they are.

Use ice (import secp256k1 as ice) for this function and that bitcoin_address line


def private_key_to_public_key(private_key):
    priv_int = int(private_key, 16)
    pub = ice.scalar_multiplication(priv_int)
    return ice.point_to_cpub(pub)

and

bitcoin_address = ice.pubkey_to_address(0, True, public_key)

Some 10 times faster than ecdsa.

The more you know Python, the more you know that it is pointless to search for Puzzle 66 through it.

Or someone knowingly sells the fog by selling python scripts as a final solution. Grin