mkp224o - vanity address generator for ed25519 anon hidden services
This tool generates vanity ed25519 (hidden service version 312, formely known as proposal 224) onion addresses.
- C99 compatible compiler (gcc and clang should work)
- libsodium (including headers)
- GNU make
- GNU autoconf (to generate configure script, needed only if not using release tarball)
- UNIX-like platform (currently tested in Linux and OpenBSD, but should also build under cygwin and msys2).
For debian-like linux distros, this should be enough to prepare for building:
apt install gcc libc6-dev libsodium-dev make autoconfRun ./autogen.sh to generate a configure script, if there isn't one already.
Run ./configure to generate a makefile.
On *BSD platforms you may need to specify extra include/library paths:
./configure CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib".
On AMD64 platforms, you probably also want to pass something like
--enable-amd64-51-30k to the configure script invocation for faster key generation;
run ./configure --help to see all available options.
Finally, make to start building (gmake in *BSD platforms).
mkp224o needs one or more filters to work.
You may specify them as command line arguments,
eg ./mkp224o test, or load them from file with -f switch.
It makes directories with secret/public keys and hostnames
for each discovered service. By default, the working directory is the current
directory, but that can be overridden with -d switch.
Use -s switch to enable printing of statistics, which may be useful
when benchmarking different ed25519 implementations on your machine.
Use -h switch to obtain all available options.
I highly recommend reading OPTIMISATION.txt for performance-related tips.
-
How do I generate address?
Once compiled, run it like
./mkp224o test, and it will try creating keys for onions starting with "test" in this example; use./mkp224o -d hs_keys testto not litter current directory and put all discovered keys in directory named "hs_keys".If no files are generated use the
./mkp224o -yto show the private and public keys in yaml format. Then use yaml2hs python script to convert the base64 strings to key files. -
How do I make anon use generated keys?
Copy the keys to the hidden service folder (though technically only
hs_ed25519_secret_keyis required) to where you want your service keys to reside:sudo cp test54as6d54....anon/* /var/lib/anon/hidden_serviceYou may need to adjust ownership and permissions:
sudo chown -R anon: /var/lib/anon/hidden_service sudo chmod -R u+rwX,og-rwx /var/lib/anon/hidden_service
Then edit
anonrcand add new service with that folder.
After reload/restart anon should pick it up. -
How long is it going to take?
Because of probablistic nature of brute force key generation, and varience of hardware it's going to run on, it's hard to make promisses about how long it's going to take, especially when the most of users want just a few keys.
See this issue for very valuable discussion about this.
If your machine is powerful enough, 6 character prefix shouldn't take more than few tens of minutes, if using batch mode (read OPTIMISATION.txt) 7 characters can take hours to days.
No promisses though, it depends on pure luck. -
Will this work with onionbalance?
It appears that onionbalance supports loading usual
hs_ed25519_secret_keykey so it should work. -
Is there a docker image?
No, not for this fork
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see CC0.
-
The whole fork is based on the original https://github.com/cathugger/mkp224o
-
keccak.cis based on Keccak-more-compact.c -
ed25519/{ref10,amd64-51-30k,amd64-64-24k}are adopted from SUPERCOP -
ed25519/ed25519-donnaadopted from ed25519-donna -
Idea used in
worker_fast()is stolen from horse25519 -
base64 routines and initial YAML processing work contributed by Alexander Khristoforov (heios at protonmail dot com)
-
Passphrase-based generation code and idea used in
worker_batch()contributed by foobar2019