You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
cathugger 1e18c10a11
make depend
1 month ago
contrib/docker Added maintainer for Dockerfile 1 year ago
ed25519 set thread size 1 year ago
.editorconfig various things 1 year ago
.gitattributes .gitattributes: make sure *.h *.c are detected as C 3 years ago
.gitignore a bit of calcest and some other stuff 3 months ago
COPYING.txt README & COPYING 4 years ago
GNUmakefile.in make depend 1 month ago
OPTIMISATION.txt adjust OPTIMISATION.txt for current stuff 2 years ago
README.md tweak wording a bit 11 months ago
autogen.sh add amd64-{51-30k,64-24k} from SUPERCOP, now use autoconf 4 years ago
base16.h improvements all over the place 4 years ago
base16_from.c some more explicitness 4 years ago
base16_to.c init 4 years ago
base32.h harden pseudo-YAML validation 4 years ago
base32_from.c some more explicitness 4 years ago
base32_to.c improvements all over the place 4 years ago
base64.h split worker off 3 years ago
base64_from.c stronger base64 validation 4 years ago
base64_to.c optional functionality for writing results to the single file and extracting specific keys from it 4 years ago
calcest.c a bit of calcest and some other stuff 3 months ago
common.h rawyaml mode 2 years ago
configure.ac fix default ed25519 impl check in configure.ac 2 months ago
cpucount.c glibc isn't limited to linux 3 years ago
cpucount.h explicit void declaration, remove unused arg. thanks ccomp 4 years ago
filters.h explicit void params declarations, add warnings to keep it correct 3 years ago
filters_common.inc.h fix intfilter expansion logic 10 months ago
filters_inc.inc.h various things 1 year ago
filters_main.inc.h whatever i implemented it anyway 10 months ago
filters_worker.inc.h split worker off 3 years ago
hex.h add numwords functionality 4 years ago
ifilter_bitsum.h fix compilation err in non-intfilter cases 10 months ago
ioutil.c cleanup, free memory 1 month ago
ioutil.h make checkpoint stuff actually proper 2 months ago
keccak.c explicit void declaration, remove unused arg. thanks ccomp 4 years ago
keccak.h explicit void declaration, remove unused arg. thanks ccomp 4 years ago
likely.h some fixes and optimizations 4 years ago
main.c move this there 2 months ago
test_base16.c delet trailing whitespace 4 years ago
test_base32.c delet trailing whitespace 4 years ago
test_base64.c cleanups, make clang happy 3 years ago
test_ed25519.c small cleanup, makefile preparation for calcdiff 2 years ago
testutil.h small cleanup, makefile preparation for calcdiff 2 years ago
types.h more flexible intfilter config 4 years ago
vec.c some vec tweaks 4 years ago
vec.h small fixup, implement deduplication support 3 years ago
worker.c Move checkpoint saving to main thread 3 months ago
worker.h Move checkpoint saving to main thread 3 months ago
worker_batch.inc.h idk 3 months ago
worker_batch_pass.inc.h Move checkpoint saving to main thread 3 months ago
worker_fast.inc.h idk 3 months ago
worker_fast_pass.inc.h Move checkpoint saving to main thread 3 months ago
worker_slow.inc.h idk 3 months ago
yaml.c rawyaml mode 2 years ago
yaml.h rawyaml mode 2 years ago

README.md

mkp224o - vanity address generator for ed25519 onion services

This tool generates vanity ed25519 (hidden service version 3, formely known as proposal 224) onion addresses.

Requirements

  • 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 libsodium-dev make autoconf

Building

./autogen.sh to generate configure script, if it's not there already.

./configure to generate makefile; in *BSD platforms you probably want to use ./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 configure script for faster key generation; run ./configure --help to see all available options.

Finally, make to start building (gmake in *BSD platforms).

Usage

Generator needs one or more filters to work.

It makes directory with secret/public keys and hostname for each discovered service. By default root is 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.

FAQ and other useful info

  • How do I generate address?

    Once compiled, run it like ./mkp224o neko, and it will try creating keys for onions starting with "neko" in this example; use ./mkp224o -d nekokeys neko to not litter current directory and put all discovered keys in directory named "nekokeys".

  • How do I make tor use generated keys?

    Copy key folder (though technically only hs_ed25519_secret_key is required) to where you want your service keys to reside:

    sudo cp -r neko54as6d54....onion /var/lib/tor/nekosvc
    

    You may need to adjust ownership and permissions:

    sudo chown -R tor: /var/lib/tor/nekosvc
    sudo chmod -R u+rwX,og-rwx /var/lib/tor/nekosvc
    

    Then edit torrc and add new service with that folder.
    After reload/restart tor should pick it up.

  • Generate addresses with 1-2 and 7-9 digits?

    Onion addresses use base32 encoding which does not include 0,1,8,9 numbers.
    So no, that's not possible to generate these, and mkp224o tries to detect invalid filters containing them early on.

  • 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_key key so it should work.

Contact

For bug reports/questions/whatever else, email cathugger at cock dot li.
PGP key, if needed, can be found at http://cathug2kyi4ilneggumrenayhuhsvrgn6qv2y47bgeet42iivkpynqad.onion/contact.html.

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.

  • keccak.c is based on Keccak-more-compact.c
  • ed25519/{ref10,amd64-51-30k,amd64-64-24k} are adopted from SUPERCOP
  • ed25519/ed25519-donna adopted 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