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 1stDownqyMHHqnDPRSfiZ5GXJ8Gk9dbjO. 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 takes about 10 sec to finish, using a Core 2 Duo E6600 CPU on x86-64 Linux:

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[1].

Get the source from GitHub. Includes Makefiles for Linux and Mac OS X.

The latest source doesn't work properly for high-end AMD cards (7XXX and greater). Solution is to change line 459 in oclengine.c from: return quirks; to: return quirks & ~VG_OCL_AMD_BFI_INT;
Windows x86+x64 binaries that solve this problem plus provide support for compressed keys here. PGP signature here. If you have any problems with the binaries, join the relevant BitcoinTalk discussion.

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.

Radeon 58XX outperforms Radeon 69XX by a very comfortable margin. Oclvanitygen is sensitive to integer multiply throughput, and Radeon 58XX can multiply concurrently with other operations. At similar clocks, a hobbled Radeon 5830 will outperform a Radeon 6970[2].

In custom builds, CPU performance will be less than expected if the OpenSSL library is an older version (<1.0.0d) or is not built with the appropriate optimizations enabled.

The difficult of finding a vanity address depends on its exact structure (leading letters and numbers) and how likely such an output is given the algorithms involved, which can consist of several pivots where the difficulty suddenly changes.

vanity

difficulty

Comment

1AAAAA

259,627,881

1QLbz6

259,627,881

This vanity is alphabetically before a major pivot, the RIPEMD-160 hash value of 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (address: 1QLbz7JHiBTspS962RLKV8GndWFwi5j6Qr)

Using vanitygen you might think that you would be able to find the private key for a given address. In practice, this is considered impossible. Given that the difficulty increases exponentially the longer your vanity is, so does the average time required to find that vanity. The example table below shows how an increasingly complex vanity affects the difficulty and average time required to find a match only for that vanity, let alone the full address, for a machine capable of looking through 1 million keys per second.

The safest option to calculate your vanity address is always to calculate it yourself. Though for larger patterns, you might not have enough resources or time to calculate this. In this case you can choose to outsource your vanity address generation to a Bitcoin Vanity Generation Website. In this case you always have to be very careful and you have to make sure you never trust your full private key to any third party. The best and safest manner how to outsource this vanity address generation is by using split-key address generation.