Generate a Vanity v3 Hidden Service Onion Address with mkp224o

2024/08/29

Let us start with some history: as of July 2021, only V3 addresses will be allowed and V2 are deprecated for security and privacy reasons, as the algorithm used in V2 is no longer secure. I’ll write more about this when I’ve done my homework.

V3 onion addresses are 56 characters long and end with .onion. V2 only had 16 characters, and the reason V3 addresses are so long is that they contain the full ed25519 public key, not just a hash of it.

I plan to make ITTavern available over the Tor network, and in preparation I have been looking into vanity onion addresses. An example of what a vanity address is is the facebook onion address:

facebookwkhpilnemxj7asaniu7vnjjbiltxjqhye3mhbshg7kx5tfyd.onion.

Even if it is still impossible to remember, it makes it a little better.

mkp224o

There are dozens of tools to generate V3 onion addresses, but mkp224o was the most recommended, so I thought I’d give it a try.

Installation

The installation is straightforward and I won’t go into too much detail, as it’s described in more detail in the repository.

Assuming you are using Debian or Ubuntu, here are the simple steps:

sudo apt install gcc libc6-dev libsodium-dev make autoconf
git clone https://github.com/cathugger/mkp224o.git
cd ./mkp224o
./autogen.sh
./configure
make

That’s it.

Generating Keys

Let us start by creating a new directory in which we save the keys for the upcoming example..

mkdir vanity-addresses

We are going through the most common options using an example:

./mkp224o -t 2 -d ./vanity-addresses -f wordlist.txt -o ./vanity-addresses/list-of-hits.log

Explained:
/mkp224o # run the programm
-t 2 # limit to 2 threads - otherwise it tries to get all available
-d ./vanity-addresses # directory where keys will be saved in
-f wordlist.txt # list of filter words, every word must be in a new line
-o ./vanity-addresses/list-of-hits.log # optional log file for found entries - use -O to overwrite instead of appending

That said, it all depends on your needs. It could be as simple as ./mkp224o beer

./mkp224o beer
sorting filters... done.
filters:
        beer
in total, 1 filter
using 4 threads
beerduqu5tb5m3h75dkjv5kcqfyirivtia6vmnpqatzjfq54pkohcryd.onion
beeri7cj2ba7jlz4hhvbhv3lydfiawmonslz7yv63dagl3abrvx3xgyd.onion
beerykugi53rz4rvpelywafzgscot5div5g4soe677xetli2ee7vgmyd.onion
beerxyjhfc5lltenz4q6at3yguqx3gh5m737aht44qvs57vjzycpe2qd.onion
beeraqevtz5dhnkzees2bhvldja4li57mcmqz3gzvlipk6holttevaqd.onion
beerxhx32jgjnov6mdjuhkhbttem2cw6pgrla53vajwddb6ful2xdsid.onion
[...]

To get all options simply run ./mkp224o -h.

Chances

Just to give you an idea about the chances of getting your favorite name. Note this reference is from similar program and performance will vary.

Source katmagic/Shallot on Github (via Archive.org) with 1.5 Ghz:

characters time to generate (approx.)
1 less than 1 second
2 less than 1 second
3 less than 1 second
4 2 seconds
5 1 minute
6 30 minutes
7 1 day
8 25 days
9 2.5 years
10 40 years
11 640 years
12 10 millenia
13 160 millenia
14 2.6 million years

As you can see, length indeed matters.

Conclusion

It turned out to be easier than I thought. As I mentioned before, I’ll try to keep this site available over Tor and will share new things I learn along the way.



Most recent Articles:
  • Dummy IP & MAC Addresses for Documentation & Sanitization
  • Deploying ISSO Commenting System for Static Content using Docker
  • Generate a Vanity v3 Hidden Service Onion Address with mkp224o
  • ssh-audit Primer - Audit your SSH Server
  • mtr - More Detailed Traceroute - Network Troubleshooting