Readit News logoReadit News
age123456gpg commented on Spinning Up an Onion Mirror Is Stupid Easy   flower.codes/2025/10/23/o... · Posted by u/speckx
tripplyons · 2 months ago
Be careful with vanity address generators. A cryptocurrency market maker once lost around $160,000,000 in a vanity Ethereum address because the generator they used was only seeded with 32 bits of entropy.

https://www.forbes.com/sites/jeffkauflin/2022/09/20/profanit...

age123456gpg · 2 months ago
Indeed, be careful with anything that involves secret bits.

This tool uses proper crypto/rand initialisation of the starting key https://github.com/AlexanderYastrebov/onion-vanity-address/b...

Check out my other vanity generators (they all use crypto/rand):

https://github.com/AlexanderYastrebov/wireguard-vanity-key

https://github.com/AlexanderYastrebov/age-vanity-keygen

https://github.com/AlexanderYastrebov/ethereum-vanity-addres...

age123456gpg commented on Spinning Up an Onion Mirror Is Stupid Easy   flower.codes/2025/10/23/o... · Posted by u/speckx
age123456gpg · 2 months ago
You can generate yourself a vanity .onion address using https://github.com/AlexanderYastrebov/onion-vanity-address tool. It can also generate vanity client authorization keypair.
age123456gpg commented on WireGuard topologies for self-hosting at home   garrido.io/notes/wireguar... · Posted by u/todsacerdoti
eadmund · 3 months ago
An issue with his remote setup is that the remote VPS decrypts packets from the remote laptop, then re-encrypts them for the LAN — this means that the remote VPS can see the plaintext of all those packets. He’ll need to layer TLS or something similar, or run Wireguard over Wireguard.
age123456gpg · 3 months ago
WireGuard over WireGuard (WireGuard end-to-end encrypted hub and spoke) example https://www.procustodibus.com/blog/2021/12/wireguard-e2ee-hu...
age123456gpg commented on Consistent Hashing   eli.thegreenplace.net/202... · Posted by u/ibobev
age123456gpg · 3 months ago

  // hashItem computes the slot an item hashes to, given a total number of slots.
  func hashItem(item string, nslots uint64) uint64 {
    digest := md5.Sum([]byte(item))
    digestHigh := binary.BigEndian.Uint64(digest[8:16])
    digestLow := binary.BigEndian.Uint64(digest[:8])
    return (digestHigh | digestLow) % nslots
  }
Should be using XOR: (digestHigh ^ digestLow) % nslots

age123456gpg commented on Show HN: Fast Tor Onion Service vanity address generator   github.com/AlexanderYastr... · Posted by u/age123456gpg
yakimant · 3 months ago
Thats facinating!

Don't know about `mkp224o`, but it would be great feature to search for multiple words, maybe with wildcards. Would it slow down the search?

age123456gpg · 3 months ago
Prefix check is a fast operation compared to candidate key generation so checking several prefixes adds a small overhead compared to checking just one.

Wildcard support has low value for the use case in my opinion, compare:

    helloyebjctfjivalxn343gppksrzdpm33qzmeeq4qnqwgrgqy75zoqd.onion
    qbtlzwabvvkvmogjy2wdvnn6gq55463jhellobwtnjsinvtxsur67oad.onion

age123456gpg commented on Show HN: Fast Tor Onion Service vanity address generator   github.com/AlexanderYastr... · Posted by u/age123456gpg
age123456gpg · 3 months ago
It also supports distributed search, e.g. you can run it in Kubernetes without exposing the secret key to the cluster, see https://github.com/AlexanderYastrebov/onion-vanity-address?t...
age123456gpg commented on Show HN: Fast Tor Onion Service vanity address generator   github.com/AlexanderYastr... · Posted by u/age123456gpg
avidiax · 3 months ago
How did you learn the math used to speed up your implementation?
age123456gpg · 3 months ago
Thanks, great question!

In short: I got obsessed by making it as fast as possible and read a ton of elliptic curve cryptography papers.

It was a journey that started from reading WireGuard kernel sources, then I was thinking about deriving IPv6 address from peer key, left a random comment on a dated gist https://gist.github.com/artizirk/c91e4f8c237dec07e3ad1b286f1... from which I learned about vanity key concept.

I naturally enjoy doing performance optimization work so when I discovered incremental approach idea here https://github.com/warner/wireguard-vanity-address/pull/15 I decided to create my own tool.

I've implemented first version of https://github.com/AlexanderYastrebov/wireguard-vanity-key and then continuously profiled it to improve performance. From profiling I saw that field inversion and multiplication are the main operations.

I realized I need to reduce unnecessary computation to make it faster and for that I need to understand the underlying math which is actually quite simple.

I read RFCs for Curve25519 and papers from D. J. Bernstein who invented it.

You can see how my understanding evolved from the commit history https://github.com/AlexanderYastrebov/wireguard-vanity-key/c...

Once I have the fastest algorithm to generate vanity Curve25519 keypairs I can apply it to other things that use Curve25519 (https://ianix.com/pub/curve25519-deployment.html) or Ed25519 (https://ianix.com/pub/ed25519-deployment.html) which is an equivalent curve.

See also my other related projects: * [age-vanity-keygen](https://github.com/AlexanderYastrebov/age-vanity-keygen) — Fast vanity age X25519 identity generator. * [vanity25519](https://github.com/AlexanderYastrebov/vanity25519) — Efficient Curve25519 vanity key generator.

age123456gpg commented on Setting up a home VPN server with WireGuard (2019)   mikkel.hoegh.org/2019/11/... · Posted by u/kayaroberts
age123456gpg · 4 months ago
You can create prefixed keys (aka vanity key) for each peer using https://github.com/AlexanderYastrebov/wireguard-vanity-key

    $ wireguard-vanity-key --prefix=mac/
    private                                      public                                       attempts   duration   attempts/s
    Mtvsq5urRK/HRE1EfqTkZ9dtBNNBjSVPbqYBZ/BL4Qw= mac/t3wcAUhyZUti7OM4KsGQ7/V00HPRmzI3agaSplM= 37258118   1s         70119328

    $ wireguard-vanity-key --prefix=ipad/
    private                                      public                                       attempts   duration   attempts/s
    hJXdv5FKyem2WqWzduSaEhEw1H4b+6BGTIqJeYu9H1c= ipad/s6w2nBEDhmuEl/xyLeohEbfc5MWUy5D8dJHgAs= 158299886  2s         69564916

u/age123456gpg

KarmaCake day29August 18, 2025
About
https://github.com/AlexanderYastrebov
View Original