Giter Club home page Giter Club logo

monero-vanity's Introduction

monero-vanity

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

44hintoFpuo3ugKfcqJvh5BmrsTRpnTasJmetKC4VXCt6QDtbHVuixdTtsm6Ptp7Y8haXnJ6j8Gj2dra8CKy5ewz7Vi9CYW

GUI

gui.mp4

CLI

cli.mp4


Comparison

Tested with: Ryzen 5950x, GTX 1660 Ti

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 72 million/sec 72 million/sec
vanity-xmr-cuda NVIDIA GPU (with CUDA) No No 8.1 million/sec

The speed comes from:

  • Batched EdwardsPoint operations
  • Only encoding the first 11 bytes of the Monero address.

This means that you cannot search for anything past 11 characters, e.g:

44hintoFpuo3ug...
          ^
----------|
The last character that will be looked at

'3ug' onward is ignored.

This is fine since you (probably) want the identifier to be near the front.

Anything past 8 characters is also unrealistic, see below:

Estimate

Characters Example Rough Time Estimate
1 44h Instant
2 44hi Instant
3 44hin Instant
4 44hint Instant
5 44hinto 8 seconds
6 44hintoj 7 minutes, 30 seconds
7 44hintoja 2 hours, 45 minutes
8 44hintojan 23 days
9 44hintojana 5 years, 4 months
10 44hintojanai 253 years
11 44hintojanaiy 8,124 years
12 44hintojanaiyo Pretty much never

Assuming speed of 72 million 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 11th 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.

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. 10,000 EdwardsPoint's are created with += 1 offsetting
  4. EdwardsPoint are batch compressed into Y points
  5. Mainnet byte and first 10 CompressedEdwardsY bytes are concatted
  6. Those 11 bytes are encoded in base58
  7. If regex matches, create full address and return to user, else...
  8. Continue, either with next point or next batch

Notes:

Build

git clone --recursive https://github.com/hinto-janai/monero-vanity
cargo build --release

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

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

Warning

I am not a cryptographer, nor was this code audited.

Use this program at your own risk.

monero-vanity's People

Contributors

hinto-janai avatar boog900 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.