When you have someone else do the work, essentially you pay a service to generate the vanity address. Some examples of this are Vanitypool and BitcoinVanity. I have not used either of them, so I can't speak for how well they work or if they are even legitimate. In this case, 'legitimate' means they will not keep your private key and try to steal your coins later. Though I know at least VanityPool tries to avoid this scenario by using ECDSA so they never have access to your private key.
Or you can generate you own vanity address, which is what the blog post is really about. There is a plugin for the Satoshi client (Bitcoin-QT) that can be used or a separate program called Vanitygen. From what I've read, Vanitygen it faster and so my instructions will be about using this tool.
So lets get to it. These directions are for Ubuntu Linux. OS X users have to do the same steps for the most part (except where to the download pcre3 library). Windows users can download a pre-compiled exe from here and pickup at step 3.
- If you don't have the pcre3 library, which you probably don't since it doesn't come default, then you need to install it:
> sudo apt-get install libpcre3-dev
- Next you will need to install the tool. Change directory to where you keep code. If you don't have a normal place for this, first make a folder called workspace and now you can keep all future code in there.
> mkdir workspace
> cd workspace
> git clone https://github.com/samr7/vanitygen.git
> cd vanitygen
- Next up, generating the address you want (substituting 1janedoe with what you want your address to start with):
> ./vanitygen 1janedoe
When finished, you should be greeted with similar output (NB: these values have been faked)
Read 32 bytes from RNG seed file
The 'Address' portion is your new vanity address, congratualtions! The 'PrivKey' is your private key that you will need for importing into you Bitcoin client. Do not share this with anyone, it will allow him/her to access you coins.
There are many options available with the tool and you can see what they are by typing vanitygen --help. Parameters like changing the number of threads or the random number generator (defaults to /dev/urandom) might be important for your needs.
Depending on the length of the string, you might notice that the address you want could take years to find. The time duration is only a guess and you could get lucky. But now you see why services exist to do this for you. Or you could be less vain and choose a shorter string :) If you just want to see it work, try using '1a' as a pattern. The result was nearly instantaneous on my machine.
- Time to import your new address. Start up your bitcoin-qt client. Once loaded, click Help -> Debug window. Then choose the Console tab, and you will be greeted with a command prompt. Some commands are followed by the phrase '# encrypted wallet', these should only be typed if your wallet is encrypted. But of course it is, right...?
9999 # encrypted wallet
walletlock # encrypted wallet
Close the window. Your Bitcoin client might freeze for a little bit; that's fine, let it do its thing. Once responsive again, restart the application and you should see your new address under the Receive Coins tab.
And that's how you generate your own vanity address. It's a little bit of work but not too bad. The method described above uses your CPU to perform the calculations. The git repo also includes code (oclvanitygen) to perform the calculations on the GPU, but I ran into some issues and haven't got it working yet. If you know how to do this on a Linux box, drop me a line so that I can write another post and spread the word.
As you may have noticed, I don't have a coincue vanity address yet. I'm waiting to see if I can get the GPU tool oclvanitygen working, otherwise I will be trying one of those services. In which case, you can expect another blog entry from me.