Post
Topic
Board Development & Technical Discussion
Merits 6 from 4 users
Segwit vanity addresses (Bech32 and nested P2SH)
by
nullius
on 24/12/2017, 11:02:54 UTC
⭐ Merited by dbshck (2) ,Chris! (2) ,LoyceV (1) ,jtipt (1)
In reply to these, and likely others earlier in the thread:

Is there anyone working on vanitygen fork to generate vanity bech32 addresses? Seems like it might be easier to get longer firstbits that make sense because it's more limited in characters.

Dear samr7, we really need SegWit feature

Smart thinking!  A day or two ago, I whipped up a quickie Segwit address generator with a simple regex search.  It can produce both P2WPKH-nested-in-P2SH and Bech32 addresses.  It’s quite trivial; it lacks vanitygen’s features, and probably also falls short in performance.  [Edit 2018-02-12:  segvan: Segwit vanity address & bulk address generator (Github).]

Some sample outputs from short patterns:

3NULL3ZCUXr7RDLxXeLPDMZDZYxuaYkCnG  (^3NULL[0-9])

bc1qcash96s5jqppzsp8hy8swkggf7f6agex98an7h (hahah; ^bc1qcash[0-9])

From earlier tests, WIF private key import was confirmed by me to work perfectly in Electrum:


Segwit addresses are sexy!
(Typo correction:  Of course, that should be “imported from WIF”.
I pray that the god of prepositions not smite me.)

The code is in C, Unix-only.  It’s fairly trivial; it essentially glues together Core’s secp256k1 library, luke-jr’s libbase58, and sipa’s reference Bech32 code.  It has almost no features; it won’t even try to tell you if the pattern you seek is impossible.  I’d intended to toss it out there somewhere for others to play with; but it devolved into a patchwork of #ifdefs with multiple different code paths, due to an build-time problem with dependencies.  It would require time and effort to clean up.

How great is the interest in this?