Post
Topic
Board Reputation
Merits 17 from 8 users
Re: Goodbye, world!
by
mcdouglasx
on 21/02/2025, 02:43:09 UTC
⭐ Merited by nutildah (4) ,LoyceV (4) ,The Sceptical Chymist (4) ,davis196 (1) ,examplens (1) ,DireWolfM14 (1) ,ibminer (1) ,vapourminer (1)
anyone can make a vanity address.

yes, "but given that

All of the information required to reconstruct the private key is published on the blockchain.

It is logical to think that it could be a steganography puzzle, so all the small details should be considered.

Anyway, this could be some text in the hashed puzzle, I assume in a loop of nine hashes (because of the nine zeros in the transaction ID and the nine lives of the cat that Lauda and nullius mentioned).

It has been a wild forum life, - or perhaps, nine forum lives involving everything from the dark arts of moderation, to being burnt at the stake several times. (I got better.) Thanks to my forum friends, fans, and cult votaries.

Thank you everyone in advance, quite the 9 lives that some Kitty had here. Cool

Kitty forever! 😺😺😺😺😺😺😺😺😺

If anyone wants to try with whatever comes to mind, I leave you a script that follows my logic.

Code:
import hashlib
import ecdsa
from ecdsa import SECP256k1, SigningKey


#################################################################################


target = '😼 Sacrifice to Lauda! (topic=5282911)'.encode()


#################################################################################


def sha256(data):
    return hashlib.sha256(data).digest()

def ripemd160(data):
    h = hashlib.new('ripemd160')
    h.update(data)
    return h.digest()

BECH32_CHARS = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'

def bech32_polymod(values):
    generator = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]
    chk = 1
    for v in values:
        b = (chk >> 25)
        chk = (chk & 0x1ffffff) << 5 ^ v
        for i in range(5):
            chk ^= generator[i] if ((b >> i) & 1) else 0
    return chk

def bech32_hrp_expand(hrp):
    return [ord(x) >> 5 for x in hrp] + [0] + [ord(x) & 31 for x in hrp]

def bech32_create_checksum(hrp, data):
    values = bech32_hrp_expand(hrp) + data
    polymod = bech32_polymod(values + [0, 0, 0, 0, 0, 0]) ^ 1
    return [(polymod >> 5 * (5 - i)) & 31 for i in range(6)]

def bech32_encode(hrp, data):
    combined = data + bech32_create_checksum(hrp, data)
    return hrp + '1' + ''.join([BECH32_CHARS[d] for d in combined])

def convertbits(data, frombits, tobits, pad=True):
    acc = 0
    bits = 0
    ret = []
    maxv = (1 << tobits) - 1
    for value in data:
        if value < 0 or (value >> frombits):
            raise ValueError("Invalid value")
        acc = (acc << frombits) | value
        bits += frombits
        while bits >= tobits:
            bits -= tobits
            ret.append((acc >> bits) & maxv)
    if pad:
        if bits:
            ret.append((acc << (tobits - bits)) & maxv)
    elif bits >= frombits or ((acc << (tobits - bits)) & maxv):
        raise ValueError("Invalid bits")
    return ret

def create_bech32_address(pubkey):
    sha256_result = sha256(pubkey)
    ripemd160_result = ripemd160(sha256_result)
    data = convertbits(ripemd160_result, 8, 5)
    data = [0] + data
    hrp = 'bc'
    return bech32_encode(hrp, data)

def run_test(algo, name, test_num, use_hex):
    data = target
    for _ in range(9):
        hash_obj = hashlib.new(algo, data)
        data = hash_obj.digest()
        if use_hex:
            pk_hex = data.hex()
            data = pk_hex.encode()
    private_key = data.hex() if not use_hex else pk_hex

    if len(private_key) < 64:
        private_key = private_key.zfill(64)
    elif len(private_key) > 64:
        private_key = private_key[:64]

    sk = SigningKey.from_string(bytes.fromhex(private_key), curve=SECP256k1)
    vk = sk.verifying_key
    public_key = vk.to_string("compressed").hex()

    address = create_bech32_address(bytes.fromhex(public_key))
    print(f"\n--- {name} Test {test_num} ---")
    print("Private Key:", private_key)
    print("Public Key: ", public_key)
    print("Bech32 Address: ", address)


algos = [
    ('sha256', 'SHA-256'),
    ('sha1', 'SHA-1'),
    ('md5', 'MD5')
]

for algo, name in algos:
    run_test(algo, name, 1, use_hex=True)
    run_test(algo, name, 2, use_hex=False)