Vanity Address Generator
"Vanitgen" is an interesting program if you are in any way interested in the development and fulfillment of the Bitcoin industry. The Bitcoin currency system utilises a wallet system that can generate a unique 56 Bit random number to receive currency transfers or payments. All address bits of this type start with a single prefix "1" plus a continuous random sequence of 55 additional alpha numeric characters that comprise of a Public and Private address that form the Bitcoin address system, not the Bitcoin currency itself. Many such address are complex, unreadable if not unpronounceable. It's purpose is to provide a unique address no one else is using to identify the recipient with whom the Bitcoins are intended. Vanitygen on the other hand intention is to exploit these unique codes and identify or in some other way produce generated sequences that match a preferred vanity word you have chosen, these vanity words can appear directly after the "1" or any variation there on after using regular expression locating the vanity string anywhere in the key, these then are used within your Bitcoin wallets usually by importing the key or keys.
Random keys are not very impressive in themselves so how would it be if you could use a word within generated keys that personalise that key, a bit like a personalised number plate for a car. So if you were a Jaguar dealer for example and you had clients that would pay you the value of a car in Bitcoins you might be interested in sending them your Public key that just might look a bit like this.
eg 1JaguarqyMHHqnDPRSfiZ5GXJ8Gk9dbjL providing a personalised address
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.
You might liken "Vanitygen" to a fruit machine used for gambling on these machine you can lock the wheels and load your chances by selecting Bells, Fruit, Numbers or Bars. Your chances or odds are slightly better in Vanitygen because sooner or later you will obtain your desired address but the longer the vanity name the longer it may take to solve. If it does cost you something at least it is not money it is that it cost's you machine time.
In order to run "Vanitygen" from the command line you will need to install some additional specific installation dependencies.
># sudo apt-get upgrade
># sudo apt-get install build-essential git libssl-dev libpcre3-dev
The above only installs the programs dependencies and must be followed in order work. You now have to download the git repository that contains the files required using the following command line.
># cd Downloads ># git clone https://github.com/samr7/vanitygen.git
We do suggest that you take take all the standard precautions when downloading this sequence of files and that you have switched to the directory where you expect to find the downloaded files. Vanitygen should work on most Linux ditros available however please read all accompanying supporting information provided by the program developer, and understand what is expected of you. This program does work on Ubuntu 12.04 in the manner described below.
If you have the above dependencies installed you can open a new terminal window, change directory to the directory which host your vanitygen repository, example below.
># cd Downloads/vanitygen ># make
You shouldn't need to compile anything extra but you might need to use the following command if the above fails for any reason. Once again please ensure you have installed the above dependencies which are only valid for the Ubuntu installation. Please feel free to comment below if you have further information that aids installation on other distro's.
># sudo make
Again please ensure you are inside the vanitygen directory before running the command.
Once you have run make you should see if you run the "ls" command additional files that were not there before you ran the command "make". This is a good thing as it indicates successful completion of the compilation process.
To run "vanitygen" from the command line you need append a prefix to the command to force execution within the current directory (look at vanitygen command below). Ensure you have a command terminal window open and select using "cd" command, the directory that contains the vanitygen code thus.
># cd Downloads/vanitygen
There are a number of ways vanitygen can be run we will look at some of them and what might happen if you run them please be aware of the prefix this is not a mistake just the correct way to run an executable file without specifying the entire path.
On it's own vanitygen dispalys the help file that enable you run and execute the program efficiently
># ./vanitygen 1BMW
This command runs and generates the Bitcoin address code looking for the first instance of "1BMW" as a prefix once a match has been located the program displays this to the screen and exits the program. This program because it has only a very short sequence of letters to match "BMW" may take only a few minutes to find, longer sequences require much longer to run and find.
># ./vanitygen -v 1BMW -o matches.txt
A slight modification enables verbose output (-v) and can record the match to a file called "matches.txt" using option (-o).
># ./vanitygen -v -k 1BMW -o matches.txt
A new option command (-k) this allows the program run continuously finding all matches and placing them in the file defined as "matches.txt", this file can of course be called anything you like.
># ./vanitygen -v -r BMW
You will notice in the above command we are using the option (-v -r)so we a verbose-ing the output as we go just gives us a little more information and using the regular expression to derive a key that contains the vanity word BMW, note we do not use 1BMW because this is not a prefix ie we do not want a code that starts with 1BMW but has the string BMW elsewhere in the key. This may are may not be easy to spot but it will be there.
These are just a few possible permutations which you are free to indulge in. Give them a try and see what combinations you can come up with then try to install these keys into your Bitcoin wallet
This is an after thought and have only just found out how to do it.
With your installed Vanitygen it is possible to use the graphics card if it supports Open CL, there are two flavours of card I am aware of that support this feature ATI which I can't tell you about and NVidia which I think I can. You will need to install in addition to a Graphic card that supports Cuda and the Cuda drivers additional files from the Ubuntu repository see bellow.
># sudo apt-get install opencl-headers libcurl4-gnutls-devThe "opencl-headers" will not install unless you activate the Universe repository before you run "make" on the command line
You will also need to edit the Makefile in the vanitygen directory
># cd PATH_TO_Vanitygen_DIRECTORY
># vim Makefile
If this is within your home own directory you will not need sudo to modify this file
Locate this line
most: vanitygen keyconv
You need to add or change this line so it looks like this
most: oclvanitygen oclvanityminer vanitygen keyconv
If you have edited the Mafefile using the suggested vim editor and presuming you have previously installed this, exit and save the file by pressing your esc key once and ":wq" this saves the file.
ubuntu@asus-x58l:~/Downloads/vanitygen$ make cc -ggdb -O3 -Wall -c -o oclvanitygen.o oclvanitygen.c cc -ggdb -O3 -Wall -c -o oclengine.o oclengine.c oclengine.c: In function ‘vg_ocl_dump_info’: oclengine.c:313:9: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘cl_ulong’ [-Wformat] oclengine.c:315:9: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘cl_ulong’ [-Wformat] oclengine.c: In function ‘vg_ocl_prefix_check’: oclengine.c:1553:18: warning: variable ‘tablesize’ set but not used [-Wunused-but-set-variable] cc oclvanitygen.o oclengine.o pattern.o util.o -o oclvanitygen -ggdb -O3 -Wall -lpcre -lcrypto -lm -lpthread -lOpenCL /usr/bin/ld: cannot find -lOpenCL collect2: ld returned 1 exit status make: *** [oclvanitygen] Error 1
If you get one of these errors well you haven't read thoroughly enough my documentation or you have not yet installed the correct Graphics card and Cuda divers first.
When you have successfully installed the NVidia Card and Cuda drivers and compiled the "oclvanitygen" you may run the following command.
># ./oclvanitygen -v -d 0 1VanityName
There are some important differences with this code the first is "-d 0" this selects the default graphics card the number would change should you have more than one NVidia device. The second difference is that it does not support regular expression so according to the documentation you can not use it, the rest is as far as I know the same.