Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
Jolly Jocker
on 26/10/2022, 23:30:32 UTC
I cannot get your @jolly_jocker code to run correctly.

However, I think what you are trying to achieve is using the known WIF key part and tumble searching the remaining characters to find the WIF private key. I am able to again, use the known key part and add a randomize search for the remaining part and output this in hexadecimal format. It is not any faster than a general hexadecimal search.

I am not sure if you can generate a WIF private key with a check sum and convert/compare ; and then print the WIF key again in the same script.
I do agree that this puzzle is about testing the strength and secure-ness of bitcoin with new, creative code.

This is a basic python script and variation of VanityGen:
Code:
import secrets
import base58
import binascii
from bitcoin import privtopub, pubtoaddr
import sys

vanity = "13zb1hQbWVsc2S7ZTZnP2G4undNNpdh5so"
btc_addr = ""

while btc_addr[:len(vanity)] != vanity:
    prefix = "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qa"
    alphabet = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
    postfix = ''.join(secrets.choice(alphabet) for i in range(18))
    first_encode = base58.b58decode(prefix + postfix)
    private_key_full = binascii.hexlify(first_encode)
    private_key = private_key_full[2:-8]
    btc_pubkey = privtopub(private_key.decode())
    btc_addr = pubtoaddr(btc_pubkey)
    
print(private_key.decode())
print(btc_pubkey)
print(btc_addr)

sys.exit()


I genuinely would like to know .. are any of these python scripts working any faster than known C programs like keyhunt or vanitygen etc? I mean the slowest I've ever seen to date was Brainflayer as it starts with pass->key->...... but to be honest i would be surprised if i see a fast python one getting the same speed as for example keyhunt .. plz post your speed results .. much appreciated

No, no WIF key is generated with a checksum, the correction (checksum) of the key only takes place after the 2nd conversion.. so the output is then correct.. 8 letters from the Wif-key are random, the last 10 letters from this key are range search.

Abstract:
Code:
L = []
while True:
    for i in range(0x22000000000000000, 0x3ffffffffffffffff, 0x34fde3761da26c):
        b = str(ice.btc_pvk_to_wif(i, True)[:-16])
        x = ''.join(random.choices('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz', k=6))
        key_WIF01 = b + x + '1111111111'
        key_hex = ice.btc_wif_to_pvk_hex(key_WIF01)
        L.append(key_hex)
        if len(L) == ..............