cathugger 5172c0fd71 make depends | 9 kuukautta sitten | |
---|---|---|
.github | 1 vuosi sitten | |
contrib | 10 kuukautta sitten | |
ed25519 | 1 vuosi sitten | |
.editorconfig | 4 vuotta sitten | |
.gitattributes | 6 vuotta sitten | |
.gitignore | 3 vuotta sitten | |
COPYING.txt | 7 vuotta sitten | |
GNUmakefile.in | 9 kuukautta sitten | |
OPTIMISATION.txt | 4 vuotta sitten | |
README.md | 11 kuukautta sitten | |
autogen.sh | 7 vuotta sitten | |
base16.h | 7 vuotta sitten | |
base16_from.c | 6 vuotta sitten | |
base16_to.c | 7 vuotta sitten | |
base32.h | 6 vuotta sitten | |
base32_from.c | 6 vuotta sitten | |
base32_to.c | 7 vuotta sitten | |
base64.h | 5 vuotta sitten | |
base64_from.c | 6 vuotta sitten | |
base64_to.c | 6 vuotta sitten | |
calcest.c | 2 vuotta sitten | |
common.h | 4 vuotta sitten | |
configure.ac | 2 vuotta sitten | |
cpucount.c | 5 vuotta sitten | |
cpucount.h | 7 vuotta sitten | |
filters.h | 5 vuotta sitten | |
filters_common.inc.h | 3 vuotta sitten | |
filters_inc.inc.h | 4 vuotta sitten | |
filters_main.inc.h | 3 vuotta sitten | |
filters_worker.inc.h | 5 vuotta sitten | |
hex.h | 7 vuotta sitten | |
ifilter_bitsum.h | 3 vuotta sitten | |
ioutil.c | 2 vuotta sitten | |
ioutil.h | 3 vuotta sitten | |
keccak.c | 7 vuotta sitten | |
keccak.h | 7 vuotta sitten | |
likely.h | 7 vuotta sitten | |
main.c | 1 vuosi sitten | |
test_base16.c | 6 vuotta sitten | |
test_base32.c | 6 vuotta sitten | |
test_base64.c | 5 vuotta sitten | |
test_ed25519.c | 2 vuotta sitten | |
testutil.h | 4 vuotta sitten | |
types.h | 7 vuotta sitten | |
vec.c | 7 vuotta sitten | |
vec.h | 6 vuotta sitten | |
worker.c | 1 vuosi sitten | |
worker.h | 1 vuosi sitten | |
worker_batch.inc.h | 1 vuosi sitten | |
worker_batch_pass.inc.h | 1 vuosi sitten | |
worker_impl.inc.h | 1 vuosi sitten | |
yaml.c | 1 vuosi sitten | |
yaml.h | 4 vuotta sitten |
ed25519
onion servicesThis tool generates vanity ed25519
(hidden service version 3^1^2,
formely known as proposal 224) onion addresses.
For debian-like linux distros, this should be enough to prepare for building:
apt install gcc libc6-dev libsodium-dev make autoconf
Run ./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.
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".
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.
0-1
and 8-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.
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.
It appears that onionbalance supports loading usual
hs_ed25519_secret_key
key so it should work.
Yes, if you do not wish to compile mkp224o yourself, you can use
the ghcr.io/cathugger/mkp224o
image like so:
docker run --rm -it -v $PWD:/keys ghcr.io/cathugger/mkp224o:master -d /keys neko
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.ced25519/{ref10,amd64-51-30k,amd64-64-24k}
are adopted from
SUPERCOPed25519/ed25519-donna
adopted from ed25519-donnaworker_fast()
is stolen from horse25519worker_batch()
contributed by foobar2019