Post
Topic
Board Bitcoin Discussion
Re: Texts/"passwords" as private keys source and transactions
by
pbies
on 11/07/2023, 17:35:44 UTC
I love the topic! However, I was unable to derive addresses (with TX) from those phrases. Are you sure there were addresses? Can you check again please?

Addresses are dervied from private keys. Private keys are "derived" from brainwallets (WIFs exactly).

You need script to convert private key to one of the addresses (mostly main one 0/0/0).

Here are the parts of the script:

Code:
from bitcoin import *
import base58
import hashlib

sha=hashlib.sha256(x).digest()
tmp=b'\x80'+sha
h=base58.b58encode_check(tmp)
pub=privtopub(tmp)
addr=pubtoaddr(pub)