If you're tired of the random, cryptic addresses generated by regular bitcoin clients, you can use vanitygen to create a more personalized address. Add unique flair when you tell people to send bitcoins to 1stDownqyMHHqnDPRSfiZ5GXJ8Gk9dbjL. Alternatively, vanitygen can be used to generate random addresses offline.
Vanitygen accepts as input a pattern, or list of patterns to search for, and produces a list of addresses and private keys. Vanitygen's search is probabilistic, and the amount of time required to find a given pattern depends on how complex the pattern is, the speed of your computer, and whether you get lucky.
The example below illustrates a session of vanitygen. It is typical, and took about 10 sec to finish, using my Core 2 Duo E6600 CPU on x86-64 Linux:
$ ./vanitygen 1BoatDifficulty: 4476342Pattern: 1Boat Address: 1BoatSLRHtKNngkdXEeobR76b53LETtpyTPrivkey: 5J4XJRyLVgzbXEgh8VNi4qovLzxRftzMd8a18KkdXv4EqAwX3tS
Vanitygen includes components to perform address searching on your CPU (vanitygen) and your OpenCL-compatible GPU (oclvanitygen). Both can be built from source, and both are included in the Windows binary package. Also included is oclvanityminer, the vanity address mining client. Oclvanityminer can be used to automatically claim bounties on sites such as ThePiachu's vanity pool.Current version: 0.22
Windows x86+x64 binaries here. PGP signature here
Get the source from GitHub. Includes Makefiles for Linux and Mac OS X.
FAQ
What types of patterns can vanitygen search for?
Vanitygen can search for simple prefixes or regular expression matches.
Prefixes are exact strings that must appear at the beginning of the address. When searching for prefixes, vanitygen will ensure that the prefix is possible, and will provide a difficulty estimate. Exact prefixes are case-sensitive by default, but may be searched case-insensitively using the -i option.
Prefixes are also very fast to search, and a list of thousands of prefixes may be specified with little or no reduction in key search rate.
Regular expressions are programmable pattern filters. They are very powerful, and can be used to match prefixes, suffixes, varying-length sequences, etc.. For a quick tutorial, see http://www.regular-expressions.info/quickstart.html. To enable regular expressions, use the -r command line option. Unfortunately, regular expressions are very slow, and will have a significant impact on key search rate. Because of this, regular expressions should only be used if their expressive power is needed.
Oclvanitygen is only effective at searching for prefixes. Regular expressions will not work effectively with oclvanitygen, as oclvanitygen is currently unable to execute the regular expression on the GPU.
How do I specify a list of patterns?
Vanitygen can accept a list of patterns to search for, either on the command line, or from a file or stdin using the -f option. File sources should have one pattern per line.
Upon finding a match for a given pattern, vanitygen will stop searching for additional matches for that pattern. To search for multiple matches for each pattern, use the -k option.
How do I import the private key into bitcoin?
If you wish to spend coins received on a vanity address created by vanitygen, you must import the private key into a bitcoin client. There are two popular methods of doing this with the standard Satoshi bitcoin client:
importprivkey 5J4XJRyLVgzbXEgh8VNi4qovLzxRftzMd8a18KkdXv4EqAwX3tS
You don't need to. The percentage displayed just shows how probable it is that a match would be found in the session so far. If it finds your address with 5% on the display, you are extremely lucky. If it finds your address with 92% on the display, you are unlucky. If you stop vanitygen with 90% on the display, restart it, and it finds your address with 2% on the display, your first session was unlucky, but your second session was lucky.
When I double-click on vanitygen, a black window appears for a split-second and disappears, what do I do?
Currently, vanitygen only runs on the command line, and does not have a graphical user interface. To use vanitygen, you need to open a command line window and change to the directory where you extracted the vanitygen program. An easy way to do this in Windows 7, hold down the shift key, right-click on the folder where you unzipped vanitygen, and select "Open command window here." Then, you can type the vanitygen command at the prompt.
Can I use vanitygen to find someone else's private key from their bitcoin address?
Yes. Vanitygen is a cryptographic brute-forcing application, and can be used to search for a complete address. However, you will be unhappy with the amount of time required for it to find a match.
How do I report a bug? What do I do if it crashes?
Post to this thread, send me a PM, or send me an email! Please run vanitygen with the -v flag for verbose output, and please include the console output in your report.
How do I build vanitygen from source?
Please refer to the file INSTALL in the source distribution.
What key search rate can I expect from hardware X?
Detailed list forthcoming. Some ballpark estimates are listed below.
Dual-core desktop CPUs, 32-bit mode: 100-250 Kkey/s.Dual-core desktop CPUs, 64-bit mode: 150-450 Kkey/s.Quad-core desktop CPUs, 32-bit mode: 200-400 Kkey/s.Quad-core desktop CPUs, 64-bit mode: 300-750 Kkey/s.
As vanitygen performs a lot of large integer arithmetic, running it in 64-bit mode makes a huge difference in key search rate, easily a 50% improvement over 32-bit mode. If you are using a 64-bit edition of Windows, and not using a GPU, be sure to use vanitygen64.exe.
In custom builds, CPU performance will be less than expected if the OpenSSL library is an older version (