monero-vanity

Crates.iomonero-vanity
lib.rsmonero-vanity
version0.4.1
sourcesrc
created_at2023-04-02 03:38:27.487343
updated_at2023-04-02 15:27:34.808434
descriptionMonero Vanity Address Generator
homepage
repositoryhttps://github.com/hinto-janai/monero-vanity
max_upload_size
id827825
size2,071,307
(hinto-janai)

documentation

README

monero-vanity

monero-vanity is a GUI/CLI tool that generates vanity addresses for Monero, like this one:

44hintoFpuo3ugKfcqJvh5BmrsTRpnTasJmetKC4VXCt6QDtbHVuixdTtsm6Ptp7Y8haXnJ6j8Gj2dra8CKy5ewz7Vi9CYW

GUI

https://user-images.githubusercontent.com/101352116/229327381-2b001b8a-b1a0-4889-93d2-ce6a9c2a858f.mp4

CLI

https://user-images.githubusercontent.com/101352116/229327380-52a7f8a2-fcf7-4eb0-9ec8-c0554f86a2bc.mp4



Comparison

Generator Hardware needed Regex Calculates seed Normal speed Regex speed
vanity-monero CPU (x86, 32/64-bit) Yes Yes 400k/sec 170k/sec
monero-vanity CPU (x86, 64-bit) Yes No 5.8million/sec 5.8million/sec
vanity-xmr-cuda NVIDIA GPU (with CUDA) No No 8.1million/sec

Tested with: Ryzen 5950x, GTX 1660 Ti

Estimate

Characters Example Rough Time Estimate
1 44h Instant
2 44hi Instant
3 44hin Instant
4 44hint 2 seconds
5 44hinto 1 minute, 30 seconds
6 44hintoj 1 hour, 30 minutes
7 44hintoja 4 days, 10 hours
8 44hintojan 280 days
9 44hintojana 49 years
10 44hintojanai 3,151 years
11 44hintojanaiy 100,852 years
12 44hintojanaiyo Pretty much never

Assuming speed of 5.8million keys a second

GUI Usage

After finding an address, create a new Monero wallet:

Input the address, private view key, and private spend key:

And verify your new wallet address is correct:

CLI Usage

Usage: monero-vanity [--OPTIONS]

Options:
  -t, --threads <THREADS>  How many threads to use [default: HALF_THREADS]
  -p, --pattern <PATTERN>  Address regex pattern to look for
  -f, --first              Start from 1st character instead of: ^4.PATTERN.*$
  -r, --refresh <REFRESH>  How many milliseconds in-between output refreshes [default: 500]
  -v, --version            Print version
  -h, --help               Print help (see more with '--help')

Example 1 - Basic pattern using half threads:

./monero-vanity --pattern hinto

> 44hinto...

Example 2 - Advanced regex pattern using half threads:

./monero-vanity --first --pattern "^4(4|8)h(i|1)nto.*$"

> 48hinto...

After finding the private spend key:

./monero-wallet-cli --generate-from-spend-key YOUR_WALLET_NAME

Enter the private key and the generated wallet will have the address found.

Notes:

monero-vanity automatically prefixes your input with ^4. and suffixes it with .*$ so that your PATTERN starts from the 3rd character until the 43rd character of the address.

Example input: hinto
Actual regex used: ^4.hinto.*$

To disable this, use --first.

Warning: this puts you in full control of the regex, you can input any value, even an impossible one.

Install

Download here.

Cargo

If you have cargo, you can install with:

cargo install monero-vanity

Arch

If you're using Arch Linux, you can install from the AUR with:

paru monero-vanity

Implementation

  1. Random [u8; 64] is generated (512 bits/64 bytes)
  2. Scalar is created by reducing the above bytes
  3. Compressed EdwardsPoint's base58 encoding is checked (4...) with regex
  4. If match, create full address and return to user, else...
  5. Increment EdwardsPoint by 1 and continue

Notes:

Build

cargo build --release

Optimized for your specific CPU (up to 15%~ speed increase):

RUSTFLAGS="-C target-cpu=native" cargo build --release

Thanks

Big thanks to kayabaNerve for helping me with ECC cryptography and Rust (he's the reason why it's fast).

Commit count: 34

cargo fmt