Understanding the Distribution of Address Characters

4 replies 327 views
diamond2020Hero Member
Posts: 4 · Reputation: 2268
#1Sep 22, 2022, 02:27 AM
I was messing around with a python script and bitcoinlib to create a vanity address. Trying to get one like 1(name) where (name) is just 4 characters. Thought it'd be quick but it's taking longer than expected. Anyone else tried this?
4 Reply Quote Share
cobra51Newbie
Posts: 52 · Reputation: 31
#2Sep 22, 2022, 03:44 AM
So, Bitcoin's legacy addresses use base58 encoding, right? It explains the character distribution. For example, if you look at the hex value and how it converts, the leading zeros become the '1' in addresses. It’s not easy to find that many leading zeros in SHA256.
3 Reply Quote Share
mr_apeNewbie
Posts: 170 · Reputation: 35
#3Sep 22, 2022, 06:49 AM
You're saying 'pubkey' but it’s all about the address, which is basically a hashed version of the public key. For P2PKH addresses, that’s HASH160 or RIPEMD160 of the SHA256 hash. Important to get that straight.
4 Reply Quote Share
wizard_2016Full Member
Posts: 46 · Reputation: 575
#4Sep 22, 2022, 10:04 AM
Totally! A Bitcoin address is like a base-58 encoding of a 200-bit number. But the leading groups of 8 bits that are zeros get turned into '1'. So, usually, it starts with a '1' followed by some base-58 stuff. The first digit after '1' is pretty much in a specific range.
3 Reply Quote Share
diamond2020Hero Member
Posts: 4 · Reputation: 2268
#5Sep 22, 2022, 03:19 PM
Thanks for clarifying! I appreciate the breakdown (and ignoring my mistakes with terms). Don't think I need to run a Grubb's test since we get why this happens. Seems like there's a clear distinction in the character populations.
3 Reply Quote Share

Related topics