Bitcoin Forum

Other => Beginners & Help => Topic started by: brunokim on September 17, 2013, 05:32:23 PM



Title: Generate short address with vanitygen
Post by: brunokim on September 17, 2013, 05:32:23 PM
I guess this is more a regex question than a Bitcoin question. I'm trying to generate short addresses (https://en.bitcoin.it/wiki/Address#What.27s_in_an_address (https://en.bitcoin.it/wiki/Address#What.27s_in_an_address)) using vanitygen, calling the following regex from bash:

Code:
./vanitygen -r "^1[1-9A-HJ-Za-km-z]{27,32}\$"

Generating a 33- or 32-char address is fast, but it tries indefinitely if I try with fewer chars. According to the wiki, shorter addresses are those that happen to have zeroes at the start, so shouldn't I expect that a 30-char address be equivalent to find a 4-char prefix?


Title: Re: Generate short address with vanitygen
Post by: wtfvanity on September 17, 2013, 05:45:48 PM
I guess this is more a regex question than a Bitcoin question. I'm trying to generate short addresses (https://en.bitcoin.it/wiki/Address#What.27s_in_an_address) using vanitygen, calling the following regex from bash:

Code:
./vanitygen -r "^1[1-9A-HJ-Za-km-z]{27,32}\$"

Generating a 33- or 32-char address is fast, but it tries indefinitely if I try with fewer chars. According to the wiki, shorter addresses are those that happen to have zeroes at the start, so shouldn't I expect that a 30-char address be equivalent to find a 4-char prefix?

The actual address itself will not start with zeros. It's the address that is encoded that starts with the zeros. I know of no way unfortunately to improve your query to find the shorter addresses inside of vanity gen.