{"id":18605890,"url":"https://github.com/axllent/wireguard-vanity-keygen","last_synced_at":"2026-04-12T01:08:47.391Z","repository":{"id":61302773,"uuid":"254014413","full_name":"axllent/wireguard-vanity-keygen","owner":"axllent","description":"WireGuard vanity key generator","archived":false,"fork":false,"pushed_at":"2026-04-02T23:25:16.000Z","size":1219,"stargazers_count":267,"open_issues_count":0,"forks_count":10,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2026-04-03T09:47:06.651Z","etag":null,"topics":["go","golang","keygen","wireguard"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axllent.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-08T07:20:20.000Z","updated_at":"2026-04-02T23:25:24.000Z","dependencies_parsed_at":"2024-02-01T19:26:14.588Z","dependency_job_id":"9fb2ac8d-a95d-4a3f-94d8-e57f20ae341a","html_url":"https://github.com/axllent/wireguard-vanity-keygen","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/axllent/wireguard-vanity-keygen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fwireguard-vanity-keygen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fwireguard-vanity-keygen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fwireguard-vanity-keygen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fwireguard-vanity-keygen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axllent","download_url":"https://codeload.github.com/axllent/wireguard-vanity-keygen/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axllent%2Fwireguard-vanity-keygen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31700702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"ssl_error","status_checked_at":"2026-04-11T21:17:24.556Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","keygen","wireguard"],"created_at":"2024-11-07T02:23:27.558Z","updated_at":"2026-04-12T01:08:47.381Z","avatar_url":"https://github.com/axllent.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WireGuard vanity keygen\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/axllent/wireguard-vanity-keygen?style=flat-square)](https://github.com/axllent/wireguard-vanity-keygen/releases/latest)\n[![Tests](https://github.com/axllent/wireguard-vanity-keygen/actions/workflows/tests.yml/badge.svg)](https://github.com/axllent/wireguard-vanity-keygen/actions/workflows/tests.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/axllent/wireguard-vanity-keygen)](https://goreportcard.com/report/github.com/axllent/wireguard-vanity-keygen)\n\nA command-line vanity (public) key generator for [WireGuard](https://www.wireguard.com/). By default, it only matches the prefix of generated public keys,\nand not whether the search matches anywhere in the public key. The concept is based on\n[wireguard-vanity-address](https://github.com/warner/wireguard-vanity-address), however I wanted something a little more streamlined.\n\n## Features\n\n- Generates compliant [curve25519](https://cr.yp.to/ecdh.html) private and public keys\n- Configurable multi-core processing (defaults to all cores)\n- Optional case sensitive searching\n- Optional regex searching\n- Search multiple prefixes at once\n- Exit after results limit reached (defaults to 1)\n- Displays probability and estimated runtime based on quick benchmark\n- Optional JSON output of results to file\n\n## Usage options\n\n```\nUsage: wireguard-vanity-keygen [OPTIONS] \u003cSEARCH\u003e [\u003cSEARCH\u003e...]\n\nOptions:\n  -s, --summary          print results when all are found (default false)\n  -c, --case-sensitive   case sensitive match (default false)\n  -t, --threads int      threads (default 3)\n  -l, --limit int        limit results to n (exists after) (default 1)\n  -T, --timeout string   quit after n minutes (allowed suffixes: s/m/h) (default \"\")\n  -j, --json string      write results to JSON file\n  -v, --version          show app version\n  -u, --update           update to latest release\n```\n\n## Example\n\n```\n$ wireguard-vanity-keygen -l 3 test pc1/ \"^pc7[+/]\"\nCalculating speed: 49,950 calculations per second using 4 CPU cores\nCase-insensitive search, exiting after 4 results\nProbability for \"test\": 1 in 2,085,136 (approx 41 seconds per match)\nProbability for \"pc1/\": 1 in 5,914,624 (approx 1 minute per match)\nCannot calculate probability for the regular expression \"^pc7[/+]\"\n\nPress Ctrl-c to cancel\n\nprivate: OFVUjUoTNQp94fNPB9GCLzxiJPTbN03rcDPrVd12uFc=   public: tEstMXL/3ZzAd2TnVlr1BNs/+eOnKzSHpGUnjspk3kc=\nprivate: gInIEDmENYbyuaWR1W/KLfximExwbcCg45W2WOmEc0I=   public: TestKmA/XVagDW/JsHBXk5mhYJ6E1N1lAWeIeCttgRs=\nprivate: yDQLNiQlfnMGhUBsbLQjoBbuNezyHug31Qa1Ht6cgkw=   public: PC1/3oUId241TLYImJLUObR8NNxz4HXzG4z+EazfWxY=\nprivate: QIbJgxy83+F/1kdogcF+T04trs+1N9gAr1t5th2tLXM=   public: Pc7+h172sx0TfIMikjgszM/B8i8/ghi7qJVOwWQtx0w=\nprivate: +CUqn4jcKoL8pw53pD4IzfMKW/IMceDWKcM2W5Dxtn4=   public: teStmGXZwiJl9HmfnTSmk83girtiIH8oZEa6PFJ8F1Y=\nprivate: EMaUfQvAEABpQV/21ALJP5YtyGerRXAn8u67j2AQzVs=   public: pC1/t2x5V99Y1SBqNgPZDPsa6r+L5y3BJ4XUCJMar3g=\nprivate: wNuHOKCfoH1emfvijXNBoc/7KjrEXUeof7tSdGWvRFo=   public: PC1/jXQosaBad2HePOm/w1KjCZ82eT3qNbfzNDZiwTs=\nprivate: gJtn0woDChGvyN2eSdc7mTpAFA/nA6jykJeK5bYYfFA=   public: Pc7+UEJSHiWsQ9zkO2q+guqDK4sc3VMDMgJu+h/bOFI=\nprivate: IMyPmYm/v0SPmB62hC8l6kfxT3/Lfp7dMioo+SM6T2c=   public: Pc7/uVfD/ZftxWBHwYbaudEywUS61biBcpj5Tw830Q4=\n```\n\n## Installing\n\nDownload the [latest binary release](https://github.com/axllent/wireguard-vanity-keygen/releases/latest) for your system,\nor build from source `go install github.com/axllent/wireguard-vanity-keygen@latest`.\n\n## Timings\n\nTo give you a rough idea of how long it will take to generate keys, the following table lists\nestimated timings to find a matching key on a system that reported\n\"`Calculating speed: 230,000 calculations per second using 19 CPU cores`\" when it started:\n\n| Length  | Case-insensitive | Case-sensitive |\n| :------ | :--------------- | :------------- |\n| 3 chars | 0 seconds        | 1 second       |\n| 4 chars | 9 seconds        | 1 minute       |\n| 5 chars | 5 minutes        | 1.25 hours     |\n| 6 chars | 4 hours          | 3.5 days       |\n| 7 chars | 6 days           | 7 months       |\n| 8 chars | 7 months         | 38 years       |\n| 9 chars | 22 years         | 175 years      |\n\nNote that the above timings are for finding a matching key for a single search term.\nPassing multiple search terms will not substantially increase the time to find any single term, but the time to find\nall search terms is the sum of all the estimated times.\nAlso, increasing the limit to two (`--limit 2`) will double the estimated time, three will triple the time, etc.\n\nIf any search term contains numbers, the timings would fall somewhere between the case-insensitive and case-sensitive columns.\n\nOf course, your mileage will differ, depending on the number, and speed, of your CPU cores.\n\n## Regular Expressions\n\nSince each additional letter in a search term increases the search time exponentially, searching using a regular expression may\nreduce the time considerably. Here are some examples:\n\n1. `.*word.*` - find word anywhere in the key (`word.*` and `.*word` will also work)\n2. `^.{0,10}word` - find word anywhere in the first 10 letters of the key\n3. `word1.*word2` - find two words, anywhere in the key\n4. `^[s5][o0][ll]ar` - find 'solar', or the visually similar 's01ar`, at the beginning of the key\n5. `^(best|next)[/+]` - find 'best', or the 'next' best, at the beginning of the key, with `/` or `+` as a delimiter\n\nA good guide on Go's regular expression syntax is at https://pkg.go.dev/regexp/syntax.\n\nTo include a literal `+` in your regular expression, preface it with a backslash: `^ex\\+`.\n\nNOTE: If your search term contains shell metacharacters, such as `|`, or `^`, you will need to quote it.\nOn Windows, you must use double quotes. For example: `\"^(a|b)\"`.\n\nNOTE: Complex regular expressions, such as those using escape sequences, flags, or character classes, may never match a key.\nTo avoid that, consider testing your regex using a tool such as [this one](https://go.dev/play/p/6LJy51Wd08O) on The Go Playground,\nor the same tool on [goplay.tools](https://goplay.tools/snippet/6LJy51Wd08O).\n\n## FAQ\n\n### What characters can I search for?\n\nValid characters include `A-Z`, `a-z`, `0-9`, `/` and `+`. There are no other characters in a hash.\n\nYou can also use regex expressions to search.\n\n### Why does `test` \u0026 `tes1` show different probabilities despite having 4 characters each?\n\nWith case-insensitive searches (default), a-z have the chance of matching both uppercase and lowercase. A search for \"cat\" can match `Cat`, `cAT` etc.\n\n### How accurate are the estimated times?\n\nThey are not (and cannot be) accurate. Keys are completely randomly generated, and the estimate is based on a law of averages.\nFor 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.\nIt will however give you an indication based on your CPU speed, word count, case sensitivity, and use of numbers or characters.\n\n### Why do I need this?\n\nYou 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).\nUsing vanity keys, I can at least identify connections. I also wanted to learn more about multi-core processing in Golang.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxllent%2Fwireguard-vanity-keygen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxllent%2Fwireguard-vanity-keygen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxllent%2Fwireguard-vanity-keygen/lists"}