Vanitygen

From Bitcoin Wiki
Revision as of 17:19, 17 December 2013 by Michael S (talk | contribs) (→‎Vanity addresses for other crypto-coins: typo, and added a remark for dummies for hex->dec conversion)
Jump to navigation Jump to search

Vanitygen is a command-line vanity bitcoin address generator.

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 1Boat
Difficulty: 4476342
Pattern: 1Boat                                                                 
Address: 1BoatSLRHtKNngkdXEeobR76b53LETtpyT
Privkey: 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.

Main discussion at BitCoinTalk

For AMD Catalyst 13.1+ you need to run the AMD APP SDK Runtime from Catalyst 12.10 in order to get this program to work. (So all your Catalyst drivers would be brand new except for the SDK Runtime.) This is discussed on GitHub. For Linux, use AMD APP SDK 2.7.

Also 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.

Expected keysearch rate

Main article: Vanitygen keysearch rate

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.
NVIDIA GT200 GPUs: up to 6.5 Mkey/s
AMD Radeon 58XX, 68XX GPUs: up to 23.5 Mkey/s.
AMD Radeon 69XX GPUs: up to 19.5 Mkey/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.

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.

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.

Vanity addresses for other crypto-coins

While all "normal" bitcoin addresses start with a "1" (one) (except multi-signature addresses that start with "3"), some other crypto-coins use different address name spaces. Vanitygen (as of version 0.22) can be used to produce vanity addresses for these crypto coins as well (but not for bitmessage addresses), by using the "-X" option. The following list provides some example command line calls and also indicates the address range for the respective coin:

Generate Bitcoin (BTC), Devcoin (DVC), Freicoin (FRC), Terracoin (TRC) addresses:

$ ./vanitygen -X 0 1 -k

or simply just

$ ./vanitygen 1 -k

Generate Bitcoin (BTC) etc. multi-signature addresses:

$ ./vanitygen -X 5 3 -k
$ ./vanitygen -X 5 31 -k
$ ./vanitygen -X 5 39 -k
$ ./vanitygen -X 5 3A -k
$ ./vanitygen -X 5 3R -k

Generate Novacoin (NVC) addresses:

$ ./vanitygen -X 8 4 -k
$ ./vanitygen -X 8 4D -k
$ ./vanitygen -X 8 4Z -k
$ ./vanitygen -X 8 4a -k
$ ./vanitygen -X 8 4d -k

Generate Feathercoin (FTC) addresses:

$ ./vanitygen -X 14 6 -k
$ ./vanitygen -X 14 6d -k
$ ./vanitygen -X 14 6z -k
$ ./vanitygen -X 14 7 -k
$ ./vanitygen -X 14 71 -k
$ ./vanitygen -X 14 72 -k
$ ./vanitygen -X 14 73 -k

Generate Anoncoin (ANC) addresses:

$ ./vanitygen -X 23 A -k
$ ./vanitygen -X 23 AF -k
$ ./vanitygen -X 23 AZ -k
$ ./vanitygen -X 23 Aa -k
$ ./vanitygen -X 23 Af -k

Generate Chinacoin (CNC) addresses:

$ ./vanitygen -X 28 C -k
$ ./vanitygen -X 28 CG -k
$ ./vanitygen -X 28 CZ -k
$ ./vanitygen -X 28 Ca -k
$ ./vanitygen -X 28 Cf -k

Generate Digitalcoin (DGC) addresses:

$ ./vanitygen -X 30 D -k
$ ./vanitygen -X 30 D5 -k
$ ./vanitygen -X 30 D9 -k
$ ./vanitygen -X 30 DA -k
$ ./vanitygen -X 30 DU -k

Generate Litecoin (LTC) addresses:

$ ./vanitygen -X 48 L -k
$ ./vanitygen -X 48 LK -k
$ ./vanitygen -X 48 LZ -k
$ ./vanitygen -X 48 La -k
$ ./vanitygen -X 48 Li -k

Generate Namecoin (NMC) addresses:

$ ./vanitygen -X 52 M -k
$ ./vanitygen -X 52 Mv -k
$ ./vanitygen -X 52 Mz -k
$ ./vanitygen -X 52 N -k
$ ./vanitygen -X 52 N1 -k
$ ./vanitygen -X 52 N9 -k
$ ./vanitygen -X 52 NA -k
$ ./vanitygen -X 52 NK -k

Generate PPCoin (PPC) addresses:

$ ./vanitygen -X 55 P -k
$ ./vanitygen -X 55 P8 -k
$ ./vanitygen -X 55 P9 -k
$ ./vanitygen -X 55 PA -k
$ ./vanitygen -X 55 PX -k

Generate YaCoin (YAC) addresses:

$ ./vanitygen -X 77 X -k
$ ./vanitygen -X 77 Xz -k
$ ./vanitygen -X 77 Y -k
$ ./vanitygen -X 77 Y1 -k
$ ./vanitygen -X 77 Y9 -k
$ ./vanitygen -X 77 YA -k
$ ./vanitygen -X 77 YP -k

Generate BBQcoin (BQC) addresses:

$ ./vanitygen -X 85 b -k
$ ./vanitygen -X 85 bC -k
$ ./vanitygen -X 85 bZ -k
$ ./vanitygen -X 85 ba -k
$ ./vanitygen -X 85 bc -k

Generate Ixcoin (IXC) addresses:

$ ./vanitygen -X 138 x -k
$ ./vanitygen -X 138 xX -k
$ ./vanitygen -X 138 xZ -k
$ ./vanitygen -X 138 xa -k
$ ./vanitygen -X 138 xv -k

Generally, to find out the address format of a given crypto-coin (i.e. the number after the -X option of vanitygen) one can use this service:

   http://darkgamex.ch:2751/q/decode_address/<Address>

Example: Take any Litecoin address, e.g. "LNipKabgGoTPnzhxsyFwTZdjVSXybjWucp", and submit this URL:

   http://darkgamex.ch:2751/q/decode_address/LNipKabgGoTPnzhxsyFwTZdjVSXybjWucp

The browser output will be:

   30:265dcf8616a9723d3b4ba35c246b041e20013597

The 30 is Litecoin's address format in hex (!), i.e. 30 (hex) = 48 (decimal) [because 3*16 + 0*1 = 48], i.e. use -X 48 in vanitygen to generate Litecoin addresses.

Some related info here: https://en.bitcoin.it/wiki/List_of_address_prefixes

See also