GithubHelp home page GithubHelp logo

shmul / wireguard-vanity-keygen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from axllent/wireguard-vanity-keygen

0.0 1.0 0.0 22 KB

WireGuard vanity key generator

License: MIT License

Makefile 8.83% Go 91.17%

wireguard-vanity-keygen's Introduction

WireGuard vanity keygen

Go Report Card

A command-line vanity (public) key generator for WireGuard. It only matches the prefix of generated public keys, and not whether the search matches anywhere in the public key. The concept is based on wireguard-vanity-address, however I wanted something a little more streamlined.

Features

  • Generates compliant curve25519 private and public keys
  • Configurable multi-core processing (defaults to all cores)
  • Optional case sensitive searching
  • Search multiple prefixes at once
  • Exit after results limit reached (defaults to 1)
  • Displays probability and estimated runtime based on quick benchmark

Usage options

Usage: wireguard-vanity-keygen [OPTIONS] <SEARCH> [<SEARCH>...]

Options:
  -c, --case-sensitive   case sensitive match (default false)
  -t, --threads int      threads (defaults to all available cores minus 1)
  -l, --limit int        limit results to n (exists after) (default 1)

Example

$ wireguard-vanity-keygen -l 4 test pc1/ 
Calculating speed: 49,950 calculations per second using 4 CPU cores
Case-insensitive search, exiting after 4 results
Probability for "test": 1 in 2,085,136 (approx 41 seconds per match)
Probability for "pc1/": 1 in 5,914,624 (approx 1 minute per match)

Press Ctrl-c to cancel

private OFVUjUoTNQp94fNPB9GCLzxiJPTbN03rcDPrVd12uFc=   public tEstMXL/3ZzAd2TnVlr1BNs/+eOnKzSHpGUnjspk3kc=
private gInIEDmENYbyuaWR1W/KLfximExwbcCg45W2WOmEc0I=   public TestKmA/XVagDW/JsHBXk5mhYJ6E1N1lAWeIeCttgRs=
private yDQLNiQlfnMGhUBsbLQjoBbuNezyHug31Qa1Ht6cgkw=   public PC1/3oUId241TLYImJLUObR8NNxz4HXzG4z+EazfWxY=
private +CUqn4jcKoL8pw53pD4IzfMKW/IMceDWKcM2W5Dxtn4=   public teStmGXZwiJl9HmfnTSmk83girtiIH8oZEa6PFJ8F1Y=
private 2G0X+IvBLw3NRfRnHb8diIXp96NQ9wSu4gdqPidy3nw=   public tESt3DBU40Q/Zkp0d1aeb6HOgEOsEM3BxzNqLckKhhc=
private EMaUfQvAEABpQV/21ALJP5YtyGerRXAn8u67j2AQzVs=   public pC1/t2x5V99Y1SBqNgPZDPsa6r+L5y3BJ4XUCJMar3g=
private wNuHOKCfoH1emfvijXNBoc/7KjrEXUeof7tSdGWvRFo=   public PC1/jXQosaBad2HePOm/w1KjCZ82eT3qNbfzNDZiwTs=
private 8IdcNsman/ZRGvqWzw1e5cRfhhdtAAmk02X9TkQxhHI=   public pC1/N8coOcXmcwO09QXxLrF5/BoHQfvp/qsysGPXiw0=

Installing

Download the latest binary release for your system, or build from source go install github.com/axllent/wireguard-vanity-keygen.

FAQ

What characters can I search for?

Valid characters include A-Z, a-z, 0-9, / and +. There are no other characters in a hash.

Why does test & tes1 show different probabilities despite having 4 characters each?

With case-insensitive searches (default), a-z have the chance of matching both uppercase and lowercase. A search for "cat" can match Cat, cAT etc.

How accurate are the estimated times?

They are not (and cannot be) accurate. Keys are completely randomly generated, and the estimate is based on a law of averages. For instance, you could find a match for a one in a billion chance on the very first hit, or it could take you 5 billion attempts. It will however give you an indication based on your CPU speed, word count, case sensitivity, and use of numbers or characters.

Why do I need this?

You don't. I wrote it because I run a WireGuard server, which does not provide any reference as to who the key belongs to (wg on the server). Using vanity keys, I can at least identify connections. I also wanted to learn more about multi-core processing in Golang.

wireguard-vanity-keygen's People

Contributors

axllent avatar

Watchers

 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.